From 1579cbdc9dc94b4ad3eae503072379bdea801309 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 11 Jul 2020 23:03:09 +0200 Subject: [PATCH] UserspaceEmulator: Implement CALL_RM32 --- 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 ed225442c9..c3a4ee0472 100644 --- a/DevTools/UserspaceEmulator/SoftCPU.cpp +++ b/DevTools/UserspaceEmulator/SoftCPU.cpp @@ -583,7 +583,13 @@ void SoftCPU::BT_RM32_reg32(const X86::Instruction&) { TODO(); } void SoftCPU::CALL_FAR_mem16(const X86::Instruction&) { TODO(); } void SoftCPU::CALL_FAR_mem32(const X86::Instruction&) { TODO(); } void SoftCPU::CALL_RM16(const X86::Instruction&) { TODO(); } -void SoftCPU::CALL_RM32(const X86::Instruction&) { TODO(); } + +void SoftCPU::CALL_RM32(const X86::Instruction& insn) +{ + push32(eip()); + set_eip(insn.modrm().read32(*this, insn)); +} + 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(); }