From 42787ae3097d021e003ec0d6b7c0c320424675ee Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 11 Jul 2020 17:05:04 +0200 Subject: [PATCH] UserspaceEmulator: Implement the CALL_imm32 instruction --- DevTools/UserspaceEmulator/SoftCPU.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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(); }