This is the mail archive of the
mailing list for the binutils project.
Gnu assembler fsub "bug" status
- From: Michael Guyver <michael dot guyver at gmail dot com>
- To: binutils at sourceware dot org
- Date: Fri, 16 Mar 2012 13:19:34 +0000
- Subject: Gnu assembler fsub "bug" status
- References: <CAJO-WbeWoqCVo3vPX2a=e-0WL6LRFbMbWTp=NcxEfM0xotXRQA@mail.gmail.com> <CAJO-WbdyHy+o=B4c-0x_6eS4eOeAyjj566--yj7J=Xr+9FdQqg@mail.gmail.com> <CAJO-WbfN0Zyfnv0EsTbCZ3TG_vbMuAugLS=a95iRXB59iJ3oPQ@mail.gmail.com>
I happened across the gas bug in which it produces the wrong opcodes
for the non-commutative FP arithmetic instructions where %st(0) is the
source register. While looking into the problem and how to avoid it, I
blogged about what I found (at
http://www.mindfruit.co.uk/2012/03/trouble-with-fsub.html). I was
wondering about the current state of play regarding the issue?
It seems to me that there are three options for hand-assembly writers
to deal with this, either by compiling binutils with
CPPFLAGS=-DSYSV386_COMPAT (useful if you want correct instructions in
AT&T syntax in objdump), assembling with 'as' using -mmnemonic=intel
or specifying the directive .intel_mnemonic in the source. However,
it's really not clear (to me, at least) from the docs or Honiju Lu's
patches what the effects of using the last two options are, since it
appears to switch on intel syntax if you specify intel mnemonic; and
further, those flags are set equal to !SYSV386_COMPAT as well.
I was wondering if you could elaborate on what that means for my
assembly code? If I specify .intel_mnemonic (and therefore get
.intel_syntax), have all my operands changed place? If this is
well-trodden ground, perhaps you could point me to some documentation
which would clear things up for me, please? Is it possible to have
AT&T syntax yet have "fixed" FP opcodes?