summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-07-11 17:05:04 +0200
committerAndreas Kling <kling@serenityos.org>2020-07-11 17:05:04 +0200
commit42787ae3097d021e003ec0d6b7c0c320424675ee (patch)
treea785220b48c449de393a972c3db883aa5f197fe7
parent0a448ee9603ad8eb4147eff291692c1eea736d3f (diff)
downloadserenity-42787ae3097d021e003ec0d6b7c0c320424675ee.zip
UserspaceEmulator: Implement the CALL_imm32 instruction
-rw-r--r--DevTools/UserspaceEmulator/SoftCPU.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/DevTools/UserspaceEmulator/SoftCPU.cpp b/DevTools/UserspaceEmulator/SoftCPU.cpp
index a1d2d76883..5a187d271c 100644
--- a/DevTools/UserspaceEmulator/SoftCPU.cpp
+++ b/DevTools/UserspaceEmulator/SoftCPU.cpp
@@ -452,7 +452,13 @@ void SoftCPU::CALL_RM32(const X86::Instruction&) { TODO(); }
void SoftCPU::CALL_imm16(const X86::Instruction&) { TODO(); }
void SoftCPU::CALL_imm16_imm16(const X86::Instruction&) { TODO(); }
void SoftCPU::CALL_imm16_imm32(const X86::Instruction&) { TODO(); }
-void SoftCPU::CALL_imm32(const X86::Instruction&) { TODO(); }
+
+void SoftCPU::CALL_imm32(const X86::Instruction& insn)
+{
+ push32(eip());
+ set_eip(eip() + (i32)insn.imm32());
+}
+
void SoftCPU::CBW(const X86::Instruction&) { TODO(); }
void SoftCPU::CDQ(const X86::Instruction&) { TODO(); }
void SoftCPU::CLC(const X86::Instruction&) { TODO(); }