inline asm problem

TWISTI twisti@fusion.at
Mon Mar 18 13:19:00 GMT 2002


On Mon, 2002-03-18 at 20:10, DJ Delorie wrote:
> This seems to work:
> 
> long long filt_cos[100];
> 
> int foo(int n)
> {
>         asm("mov  %0(,%%eax,8), %%mm1" : : "m" (filt_cos[0]));
> }
> 
>         mov  filt_cos(,%eax,8), %mm1
> 

Yes works. Thanks very much. But more obvious for me:

asm("movq %0(, %%eax, 8), %%mm1" : : "m" (*filt_cos));

As i experimented with this, i found a solution for my very first
problem:

__asm__ __volatile__ ("pmaddwd  (%0 + 8), %%mm1" : : "m" (*filt_cos));

But i haven't found this documented. Or am i overlooking something...

Anyway.



More information about the Binutils mailing list