This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: A bug in IA32 assembler


On Thu, Jun 28, 2001 at 06:11:54PM -0700, H . J . Lu wrote:
>         asm("movaps (%0),%%xmm0"                                //SSE
>         :
>         :"g"(A));

This is broken code.  You want

	asm("movaps %0,%%xmm0" : : "mr"(A));

The movaps does not allow immediates, so the constraint 
should not.

> Since
> 
> 	movaps (A),%xmm0
> 
> generates the same binary as
> 
> 
> 	movaps A,%xmm0
> 
> shouldn't we treat
> 
> 	movaps ($A.3),%xmm0
> 	
> the same as
> 
> 	movaps $A.3,%xmm0

No.  '$' is the immediate prefix operator iff it is the
first character of the operand.


r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]