Open Semnodime opened 3 years ago
Environment information
Describe the bug Assembly of lea rXX, XXX instructions produces wrong machine code (the second nibble is wrong): For rXX = r8...r15, rXX gets wrongly turned into rax, rcx, rdx, rbx, rsp, rbp, rsi, rdi. e.g. lea r12, [rsp+0x10] -> 488d642410 (which is correctly disassembled to lea rsp, [rsp + 0x10].
lea rXX, XXX
lea r12, [rsp+0x10]
488d642410
lea rsp, [rsp + 0x10]
To Reproduce Steps to reproduce the behavior:
Expected behavior Correct assembly: e.g. lea r12, [rsp+0x10] -> 4c8d642410
4c8d642410
This is very likely an issue for Rizin. I'm moving it there. Also, it seems to be in the x86 internal assembler. I bet x86.ks plugin (keystone) can disassemble this correctly.
Environment information
Describe the bug Assembly of
lea rXX, XXX
instructions produces wrong machine code (the second nibble is wrong): For rXX = r8...r15, rXX gets wrongly turned into rax, rcx, rdx, rbx, rsp, rbp, rsi, rdi. e.g.lea r12, [rsp+0x10]
->488d642410
(which is correctly disassembled tolea rsp, [rsp + 0x10]
.To Reproduce Steps to reproduce the behavior:
lea r12, [rsp+0x10]
Expected behavior Correct assembly: e.g.
lea r12, [rsp+0x10]
->4c8d642410