Closed Kashio closed 3 months ago
Good catch. However, it seems like objdump doesn't follow the syntax defined in Intel manual. The operand is either 16-bit or 64-bit, never 32-bit one, according to the manual.
In 64-bit mode, the register is either 16-bit or 64-bit, depending on REX.W
. It seems like we need a new type wqp
: "Word, or quadword, promoted by REX.W in 64-bit mode".
And there's similar issue with 8C MOV Rvqp, Sw
. It should be 8C MOV Rwqp, Sw
.
Right now
MOV
encoded with opcode8E
use operand typew
for its operand of addressingE
which is defined as:According to the intel docs:
When dealing with memory addressing the operand always points to
word
pointer as expected, but when dealing with register addressing, one need to specify the full register name even tho the instruction only uses the lower 16 bit of the register, thus I think the appropriate solution would be to split the syntax tomem
andnomem
attributes, when themem
one has operand typew
and thenomem
one has operand typev
because the operand size prefix can affect the register in use according to my testing on objdump which is defined as::For 64 bit mode the operand type should be
vqp
which is defined as:EDIT: clarity