A bug in IA32 assembler

Alan Modra amodra@bigpond.net.au
Thu Jun 28 17:45:00 GMT 2001


On Thu, Jun 28, 2001 at 09:37:49AM -0700, H . J . Lu wrote:
> On Thu, Jun 28, 2001 at 10:58:33PM +0930, Alan Modra wrote:
> > On Wed, Jun 27, 2001 at 11:48:57PM -0700, H . J . Lu wrote:
> > > # gcc -c xmm.s
> > > xmm.s: Assembler messages:
> > > xmm.s:11: Error: suffix or operands invalid for `movaps'
> > > 
> > > Which one is valid,
> > > 
> > > 	movaps (A.3),%xmm0
> > > 
> > > or
> > > 	movaps ($A.3),%xmm0
> > 
> > Both, I suppose, although the second one is trickery to get a
> 
> Are they the same? FYI, gcc seems to generate both from asm statements.

No.  They reference different symbols.

> > '$' into a label.
> > 
> > 	movaps A.3,%xmm0
> > 
> > is really what you want;  Your added parentheses just act as they
> > normally do in arithmetic expressions.
> 
> Right now, gas treats $A.3 as a label in
> 
> 	movaps ($A.3),%xmm0
> 
> That is the relocation is against `$A.3'. Also it doesn't allow
> 
> 	movaps $A.3,%xmm0
> 
> Do you have a fix for it?

I don't understand what you want a "fix" for.  "$A.3" in your last
example is an immediate with value of the address of "A.3".  movaps
doesn't accept immediates, only xmm registers or memory.

It's not at all normal to have `$' in labels on x86, as `$' is the
immediate prefix.  Do you think your trickery with `($A.3)' should
not be allowed?

Alan



More information about the Binutils mailing list