[LLVMbugs] [Bug 9164] [MC] fsubp invalid operand for instruction

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Feb 13 11:13:03 PST 2011


http://llvm.org/bugs/show_bug.cgi?id=9164

Chris Lattner <clattner at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID

--- Comment #1 from Chris Lattner <clattner at apple.com> 2011-02-13 13:13:02 CST ---
This should be fixed in the upstream code.  A-B != B-A, and gas is compiling
both of these instructions to the same code:

$ cat t.s
fsubp   %st, %st(2)
fsubp   %st(2), %st
$ gcc t.s -c
t.s:2:translating to `fsubp %st,%st(2)'
$ otool -tv t.o 
t.o:
(__TEXT,__text) section
0000000000000000    fsubp    %st,%st(2)
0000000000000002    fsubp    %st,%st(2)

FWIW, darwin cctools has produced an annoying warning about this for a long
time, maybe you should have your gas do something similar to avoid bugs like
this from creeping into your code.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list