mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 08:28:11 +00:00
UserspaceEmulator: Make call rm32 work with address on the stack
Previously, we pushed the old `eip` on the stack before reading the new address, which made us jump to the wrong place if the destination was relative to the `esp`.
This commit is contained in:
parent
bfe5509a28
commit
09cef25e92
1 changed files with 1 additions and 1 deletions
|
@ -1176,8 +1176,8 @@ void SoftCPU::CALL_RM16(const X86::Instruction&) { TODO_INSN(); }
|
|||
|
||||
void SoftCPU::CALL_RM32(const X86::Instruction& insn)
|
||||
{
|
||||
push32(shadow_wrap_as_initialized(eip()));
|
||||
auto address = insn.modrm().read32(*this, insn);
|
||||
push32(shadow_wrap_as_initialized(eip()));
|
||||
warn_if_uninitialized(address, "call rm32");
|
||||
set_eip(address.value());
|
||||
// FIXME: this won't catch at the moment due to us not having a way to set
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue