fix pop instruction to correctly handle %rsp as destination#89
fix pop instruction to correctly handle %rsp as destination#89andres-erbsen wants to merge 2 commits intomainfrom
Conversation
protz
left a comment
There was a problem hiding this comment.
https://www.felixcloutier.com/x86/pop says "Loads the value from the top of the stack to the location specified with the destination operand (or explicit opcode) and then increments the stack pointer."
Your patch seems to do the opposite. Am I missing something?
|
Indeed. But the test fails without this change and passes with it (even with SDE from #87). |
| pushq %rsp | ||
| popq (%rsp) |
There was a problem hiding this comment.
Even more fun: what does this one do?
|
After thinking about it some more, I suspect the sentence in the documentation exists to order steps 1 and 2 below, and is just incorrect when read as ordering steps 2 and 4.
It would of course be great if we could find an authoritative reference to confirm this behavior. |
|
As long as Intel SDE agrees I think we're good? Thanks for investigating. But I'm still confused because the pseudocode says: let's talk about it today |
|
@lukaszobernig mentioned this NationalSecurityAgency/ghidra#4282 |
No description provided.