https://bugs.kde.org/show_bug.cgi?id=462974
Bug ID: 462974
Summary: amd64 pop opcode 8F should support registers
Classification: Developer tools
Product: valgrind
Version: 3.21 GIT
Platform: Ubuntu
OS: Linux
Status: REPORTED
Severity: minor
Priority: NOR
Component: vex
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
SUMMARY
While working on a private jit, valgrind crashes with an "unhandled instruction
bytes" message. The bytes start with 0x49 0x8F 0xC2 . Looking at objdump, this
decodes to a valid instruction: "rex.WB pop r10".
STEPS TO REPRODUCE
Using pyvex since it's easier to repro, run this code:
```
import pyvex, archinfo
pyvex.lift(bytes([0x49, 0x8F, 0xC2]), 0x400400, archinfo.ArchAMD64()).pp()
```
OBSERVED RESULT
`Ijk_NoDecode`
EXPECTED RESULT
`Ijk_Boring`
ADDITIONAL INFORMATION
The cause seems to be that the code for decoding POPQ around
https://sourceware.org/git/?p=valgrind.git;a=blob;f=VEX/priv/guest_amd64_toIR.c;h=f7c3d34ce791d6563e45efede55ac97189e863cd;hb=HEAD#l20521
doesn't believe you can use a register as a destination. Looking at the amd64
architecture manual, opcode 8F is described as "Pop Stack (register or
memory)".
--
You are receiving this mail because:
You are watching all bug changes.