Quote:
Originally Posted by jpsdr
My plugins use external asm, and the asm provided with Visual Studio, no need to install any another stuff, just VS is enough.
You can check in my github to see exemples of code, for both x86 and x64 versions.
|
Thanks for the pointer. I tried using your code to work off. I think I'm close but I get these 4 errors in the asm.
The code in the cpp is:
Code:
extern "C" void lut_isse(Pixel32 *dst,int *LUT,int psize);
and the asm file is:
Code:
.586
.mmx
.xmm
.model flat, c
.code
lut_isse proc dst:dword,LUT:dword,psize:dword
public lut_isse
mov edi,[dst]
mov esi,[LUT]
mov ecx,[psize]
align 16
GLoop: mov eax,[edi]
xor ebx,ebx
mov edx,eax
mov bl,ah
and edx,0xff0000 ;A2206 missing operator in expression
and eax,0xff ;A2206 missing operator in expression
shr edx,16
movd mm0,[esi+eax*4+(512*4)] ;A2070 invalid instruction operands
prefetchnta [edi+512]
por mm0,[esi+ebx*4+(256*4)]
por mm0,[esi+edx*4 ]
movd [edi],mm0 ;A2070 invalid instruction operands
add edi,4
dec ecx
jnz GLoop
emms
ret
lut_isse endp
END
I've marked where and what the 4 errors are.
I don't know assembly and was hoping wouldn't have to rewrite any of it.