https://sourceware.org/bugzilla/show_bug.cgi?id=30120

            Bug ID: 30120
           Summary: x87: fucomp assembled as fucom
           Product: binutils
           Version: 2.41 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gas
          Assignee: unassigned at sourceware dot org
          Reporter: matz at suse dot de
  Target Milestone: ---

% cat asm.s
fucomp %st(1)
% ./gas/as-new asm.s && objdump -d a.out
...
0000000000000000 <.text>:
   0:   dd e1                   fucom  %st(1)

It should be 'dd e9    fucomp %st(1)'.  This results in the x87 sometimes not
be popped and wrong results.  (GCC generates fucom{i,}p sometimes, of course).

Possibly some other mnemonics are affected as well, where there are popping (or
twice-popping) and non-popping variants, but this is one that effectively made
glibc miscompiled (in the sqrt implementation that uses 'isless').

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to