diff options
author | Andreas Kling <kling@serenityos.org> | 2020-07-11 17:05:04 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-07-11 17:05:04 +0200 |
commit | 42787ae3097d021e003ec0d6b7c0c320424675ee (patch) | |
tree | a785220b48c449de393a972c3db883aa5f197fe7 | |
parent | 0a448ee9603ad8eb4147eff291692c1eea736d3f (diff) | |
download | serenity-42787ae3097d021e003ec0d6b7c0c320424675ee.zip |
UserspaceEmulator: Implement the CALL_imm32 instruction
-rw-r--r-- | DevTools/UserspaceEmulator/SoftCPU.cpp | 8 |
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(); } |