bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gas/30120] New: x87: fucomp assembled as fucom


From: matz at suse dot de
Subject: [Bug gas/30120] New: x87: fucomp assembled as fucom
Date: Mon, 13 Feb 2023 16:33:03 +0000

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

[Prev in Thread] Current Thread [Next in Thread]