SSE2 Compiler Error
I am trying to enter SSE2 and have tried the following sample program :
#include "stdafx.h"
#include <emmintrin.h>
int main(int argc, char* argv[])
{
__declspec(align(16)) long mul; // multiply variable
__declspec(align(16)) int t1[100000]; // temporary variable
__declspec(align(16)) int t2[100000]; // temporary variable
__m128i mul1, mul2;
for (int j = 0; j < 100000; j++)
{
t1[j] = j;
t2[j] = j+1;
} // set temporary variables to random values
_asm
{
mov eax, 0
label: movdqa xmm0, xmmword ptr [t1+eax]
movdqa xmm1, xmmword ptr [t2+eax]
pmuludq xmm0, xmm1
movdqa mul1, xmm0
movdqa xmm0, xmmword ptr [t1+eax]
pshufd xmm0, xmm0, 05fh
pshufd xmm1, xmm1, 05fh
muludq xmm0, xmm1
movdqa mul2, xmm0
add eax, 16
cmp eax, 100000
jnge label
}
return 0;
}
And get the following warnings and errors:
warning C4405: 'xmm0': identifier reserved word
error C2400: inline assembler syntax error in 'opcode'; found 'xmm0'
I tried to find possible causes, but most of the people who shared my problems used Visual C ++ 6.0, while I use Visual C ++ 8.0.
Any suggestions?