I have the following assembly program that gives me an error when compilating:
.686
.mmx
.model flat,c
.code
MmxAdd proc
push ebp
mov ebp,esp
mov eax, [ebp+24]
cmp eax, AddOpTableCount
jae BadAddOp
movq mm0,[ebp+8]
movq mm1,[ebp+16]
jmp [AddOpTable+eax*4]
MmxPaddb:
paddb mm0,mm1
jmp SaveResult
MmxPaddsb:
paddsb mm0,mm1
jmp SaveResult
MmxPaddusb:
paddusb mm0,mm1
jmp SaveResult
MmxPaddw:
paddw mm0,mm1
jmp SaveResult
MmxPaddsw:
paddsw mm0,mm1
jmp SaveResult
MmxPaddusw:
paddusw mm0,mm1
jmp SaveResult
MmxPaddd:
paddd mm0,mm1
jmp SaveResult
BadAddOp:
pxor mm0,mm0
SaveResult:
movd eax,mm0
pshufw mm2,mm0, 01001110b
movd edx,mm2
emms
pop ebp
ret
align 4
AddOpTable:
dword MmxPaddb, MmxPaddsb, MmxPaddusb
dword MmxPaddw, MmxPaddsw, MmxPaddusw
dword MmxPaddd
AddOpTableCount equ ($-AddOpTable) / size dword
MmxAdd endp
end
But every time I try to compile it with JWASM I get the following error:
Mmx_Addition.asm(51) : Error A2030: Instruction or register not accepted in current CPU mode
That is the instruction that give me the error:
pshufw mm2,mm0, 01001110b
How can I solve this?