Incorrect address offset decoding
Created by: dvyukov
Describe the bug
Decoding 2e 2e 67 62 01 c5 00 c4 62 21 00
with drdecode gives:
addr32 vpinsrw %xmm23[14byte] %cs:0x21(%r10d)[2byte] $0x00 -> %xmm28
But actual execution on CPU and other decoders suggest that the address offset is 0x42 rather than 0x21:
echo -en "\x2e\x2e\x67\x62\x01\xc5\x00\xc4\x62\x21\x00" > /tmp/bin | objdump -mi386 -Mx86-64 -b binary -D /tmp/bin
cs cs vpinsrw $0x0,0x42(%r10d),%xmm23,%xmm28
echo -en "0x2e 0x2e 0x67 0x62 0x01 0xc5 0x00 0xc4 0x62 0x21 0x00" | llvm-mc --disassemble -
vpinsrw $0, %cs:66(%r10d), %xmm23, %xmm28
Expected behavior
Decode address with 0x42 offset.
Versions
-
What version of DynamoRIO are you using? 6e69f2a9
-
Does the latest build from https://github.com/DynamoRIO/dynamorio/releases solve the problem? Did not try, but there are only 3 commits that don't look relevant.