inline asm problem

TWISTI twisti@fusion.at
Mon Mar 18 11:04:00 GMT 2002


On Mon, 2002-03-18 at 19:16, DJ Delorie wrote:
> Did you use inline asm to put the counter in %eax?  Wherever you got
> the count value from, tell gcc about that, and it should figure out to
> use %eax anyway.

It's something like this:

%edx = n
%eax = %edx
%eax >> 22

It's completely modified in assembler.

> 
> Have you tried using &filt_cos instead of just filt_cos?  You'd need
> an "i" constraint.

Like this: "pmaddwd  (%0, %%eax, 8), %%mm3" : : "i" (&cosin64)?
Results in: pmaddwd  ($cosin64, %eax, 8), %mm3
/tmp/ccNuWzdA.s:1827: Error: missing ')'
/tmp/ccNuWzdA.s:1827: Error: junk `,%eax,8)' after expression

> 
> At some point, it becomes worthwhile to switch to plain old assembler
> (*.S) instead of inline assembler.  The whole advantage of inline
> assembler is to let gcc keep track of where everything is.

Hmm.



More information about the Binutils mailing list