문제

The following code:

simd(n, is)
long *is;
{   
   long i;
   asm("pxor %mm0,%mm0");
   for (i = 0; i < n; i += W) {

       asm("movq %0 %%mm1\n\t"
           "paddq %%mm1 %%mm0"
           :
           :"m"(is[i])          );

   }
   return 0;
}

I'm unable to understand why it fails to compile with the following error:

/tmp/ccrDnFTm.s: Assembler messages:
/tmp/ccrDnFTm.s:29: Error: suffix or operands invalid for `movq'
/tmp/ccrDnFTm.s:30: Error: junk `%mm0' after register

Why?

도움이 되었습니까?

해결책

Operands must be separated by commas:

movq %0, %%mm1
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top