diff --git a/DevTools/UserspaceEmulator/SoftCPU.cpp b/DevTools/UserspaceEmulator/SoftCPU.cpp index 44581cc517..57f4677bd9 100644 --- a/DevTools/UserspaceEmulator/SoftCPU.cpp +++ b/DevTools/UserspaceEmulator/SoftCPU.cpp @@ -1055,9 +1055,20 @@ void SoftCPU::MOVSW(const X86::Instruction& insn) }); } } -void SoftCPU::MOVSX_reg16_RM8(const X86::Instruction&) { TODO(); } -void SoftCPU::MOVSX_reg32_RM16(const X86::Instruction&) { TODO(); } -void SoftCPU::MOVSX_reg32_RM8(const X86::Instruction&) { TODO(); } +void SoftCPU::MOVSX_reg16_RM8(const X86::Instruction& insn) +{ + gpr16(insn.reg16()) = sign_extended_to(insn.modrm().read8(*this, insn)); +} + +void SoftCPU::MOVSX_reg32_RM16(const X86::Instruction& insn) +{ + gpr32(insn.reg32()) = sign_extended_to(insn.modrm().read16(*this, insn)); +} + +void SoftCPU::MOVSX_reg32_RM8(const X86::Instruction& insn) +{ + gpr32(insn.reg32()) = sign_extended_to(insn.modrm().read8(*this, insn)); +} void SoftCPU::MOVZX_reg16_RM8(const X86::Instruction& insn) {