UserspaceEmulator: Implement FISUBR_RM32

Fixes crash when playing `ue Breakout` with the mouse.
This commit is contained in:
Nico Weber 2020-11-14 21:50:59 -05:00 committed by Andreas Kling
parent d739483ee8
commit be73f9f544
Notes: sideshowbarker 2024-07-19 01:23:18 +09:00

View file

@ -1672,11 +1672,17 @@ void SoftCPU::FISUB_RM32(const X86::Instruction& insn)
ASSERT(!insn.modrm().is_register());
auto m32int = (i32)insn.modrm().read32(*this, insn).value();
// FIXME: Respect shadow values
auto f64 = (long double)m32int;
fpu_set(0, fpu_get(0) - f64);
fpu_set(0, fpu_get(0) - (long double)m32int);
}
void SoftCPU::FISUBR_RM32(const X86::Instruction& insn)
{
ASSERT(!insn.modrm().is_register());
auto m32int = (i32)insn.modrm().read32(*this, insn).value();
// FIXME: Respect shadow values
fpu_set(0, (long double)m32int - fpu_get(0));
}
void SoftCPU::FISUBR_RM32(const X86::Instruction&) { TODO_INSN(); }
void SoftCPU::FUCOMPP(const X86::Instruction&) { TODO_INSN(); }
void SoftCPU::FIDIV_RM32(const X86::Instruction&) { TODO_INSN(); }