-
-
Notifications
You must be signed in to change notification settings - Fork 439
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implicit memory operands that pushes values to stack should have displacement #510
Comments
Hi @NaC-L, we do not provide full semantics in most cases (sometimes it's completely impossible without a rich context; e.g. for certain However, I agree that we could relatively easily improve that case as it's a static condition. We just have to check a bunch of other instructions as well to check, if they behave the same (like |
Behavior is the same with |
I think it is correct as it is, the value is written to [rsp] after rsp is modified and not before, also check the pseudo code https://www.felixcloutier.com/x86/push#operation. |
Hey @ZehMatt, while psuedocode states that rsp is decremented first then value is written to the address, few lines above its mentioned:
and as my original post states
would result in its the intel manual being unclear again |
I think you are assuming that SRC is just an alias for RSP in the pseudo code, the operand has to be read first, if we go by read/write order then it will work out, also as @flobernd previously mentioned Zydis doesn't have the full semantics but its good enough as it is if you respect the read/write order, like this example:
|
if we do
push rsp
operand info tells us that we pushrsp
to[rsp]
however, it should be[rsp-8(size)]
.https://www.felixcloutier.com/x86/push
is
[0x1000] = 0x1008
and not[0x1000] = 0x1000
The text was updated successfully, but these errors were encountered: