I'm trying to figure out some of the SSE instruction set's operand types in virtual real mode / real mode / 16-bit protected mode.
For example let's take the following instruction:
66 0F 38 01 /r PHADDW xmm1, xmm2/m128
The destination operand is an XMM register and the source operand is an XMM register or a 128-bit memory.
Now I couldn't find anything regarding the modes I've been mentioning in the Intel reference and the SSE instruction's operand types changing in these modes, but according to capstone this instruction's source operand suddenly became a 64-bit memory operand, not to mention that it seems capstone just dismissed the mandatory 0x66
operand size prefix for this instruction and used the addressing P
and Q
instead of V
and W
(as mentioned in the Intel ref) for the destination and source operands accordingly, and thus disassembling it as:
66 0F 38 01 58 D6 phaddw mm3, qword ptr [bx + si - 0x2a]
with an MMX register instead of an XMM register as I would have thought.
To my understanding the correct disassembly should be:
phaddw xmm3, xmmword ptr [bx + si - 0x2a]
using 128-bit memory as the source operand, and using an XMM register as the destination operand.
So either capstone is wrong or I'm missing something regarding SSE instructions and 16-bit mode somewhere in the Intel ref.
Clarification would be appreciated.