UserspaceEmulator: Implement FISUBR_RM32
Fixes crash when playing `ue Breakout` with the mouse.
This commit is contained in:
parent
d739483ee8
commit
be73f9f544
Notes:
sideshowbarker
2024-07-19 01:23:18 +09:00
Author: https://github.com/nico Commit: https://github.com/SerenityOS/serenity/commit/be73f9f5443 Pull-request: https://github.com/SerenityOS/serenity/pull/4091 Reviewed-by: https://github.com/awesomekling
1 changed files with 9 additions and 3 deletions
|
@ -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(); }
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue