I'm trying to convert an inherited 32-bit Windows app to 64-bit. I'm hung up on this bit which was embedded in the 32-bit C file:
__asm {
pxor mm0,mm0
punpcklbw mm0, dword ptr[x]
... }
'x' is a structure in C.
As required by MASM 64-bit, I refactored the ASM into an external file like this:
mmx_speedup_asm PROC x:PTR DWORD
pxor mm0,mm0
punpcklbw mm0, x
...
mmx_spedup_asm ENDP
On compile, I get this error:
invalid instruction operands
on the 'punpcklbw' line
This seems like it might be a mismatch between 64-bit/32-bit but I can't tell exactly why or how to fix it.