llvm-project
a073cbbb - [X86] Fix misassemble due to not storing registers to state machine on RParen (#150252)

Commit
139 days ago
[X86] Fix misassemble due to not storing registers to state machine on RParen (#150252) This fixes #116883. The x86 parser saves any register it encounters to a TmpReg field in its state machine, then on encountering the next valid token immediately afterwards saves it to either BaseReg, or IndexReg if BaseReg was already filled. However, this saving logic was missing on the RParen token handler, causing the parser to "forget" the register immediately beforehand. This also would prevent later validation logic from detecting the addressing mode as invalid, leading to a silent misassembly rather than an error.
Author
Parents
Loading