__asm {
mov edi,d;
mov esi,s;
mov ecx,_size;
shr ecx,4;
lx:
movaps xmm0, [esi];
lea esi,[esi+16];
movaps [edi],xmm0;
lea edi,[edi+16];
dec ecx;
jnz lx;
}
Copy _size bytes form s to d.
But i get some errors.
error C2400: Inline-Assembler: Syntaxerror at 'Opcode'; 'xmm0' found (movaps xmm0, [esi]
error C2400: Inline-Assembler: Syntaxfehler in 'Opcode'; '[' found (movaps [edi],xmm0
I am using VC++ 6.0 SP5 + Processor Pack
What i am making wrong?
Thanks, Christian
[SIMD] Question
I have here this code:
Now i get these errors:
C:\Programme\Microsoft Visual Studio\VC98\INCLUDE\mmintrin.h(29): error C2146: Syntax error: Missing '';'' before designators '' _ m_from_int''
C:\Programme\Microsoft Visual Studio\VC98\INCLUDE\mmintrin.h(29) m_from_int: error C2501: '' __m64 '': Missing storage class or type designator
C:\Programme\Microsoft Visual Studio\VC98\INCLUDE\mmintrin.h(29): fatal error C1004: Unexpected file end found
(Translated form german to englisch via altavista)
C:\Programme\Microsoft Visual Studio\VC98\INCLUDE\mmintrin.h(29): error C2146: Syntax error: Missing '';'' before designators '' _ m_from_int''
C:\Programme\Microsoft Visual Studio\VC98\INCLUDE\mmintrin.h(29) m_from_int: error C2501: '' __m64 '': Missing storage class or type designator
C:\Programme\Microsoft Visual Studio\VC98\INCLUDE\mmintrin.h(29): fatal error C1004: Unexpected file end found
(Translated form german to englisch via altavista)
you included mmintrin.h? this is for mmx support i think... theres a difference between xmmintrin and mmintrin
no you don´t need xmmintrin.h that´s for the intrinsics functions not inline assembler. is d and s pointers?
void SSE_16bytes_CopyMem(unsigned char* d, unsigned char* s, int _size)
{
__asm {
mov edi,d;
mov esi,s;
mov ecx,_size;
shr ecx,4;
lx:
movaps xmm0, [esi];
lea esi,[esi+16];
movaps [edi],xmm0;
lea edi,[edi+16];
dec ecx;
jnz lx;
}
}
{
__asm {
mov edi,d;
mov esi,s;
mov ecx,_size;
shr ecx,4;
lx:
movaps xmm0, [esi];
lea esi,[esi+16];
movaps [edi],xmm0;
lea edi,[edi+16];
dec ecx;
jnz lx;
}
}
Yes i have installed the processor pack. I have reisntalled it now, but the same erros.
Should I use the beta version of the processor pack? Must i create an win32 app, not console, to use SSE?
Should I use the beta version of the processor pack? Must i create an win32 app, not console, to use SSE?
forgive me if I am wrong, and it won''t solve your problem but why use lea instead of simply add ?
I wonder if two consecutive address taking on esi and edi wont slow the code.
I wonder if two consecutive address taking on esi and edi wont slow the code.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement