From 47fe911196b5551f5b4a829a1a310ca66cf12e99 Mon Sep 17 00:00:00 2001 From: Hendiadyoin1 Date: Thu, 3 Feb 2022 12:47:17 +0100 Subject: UserspaceEmulator: Clear c0 on x87 constant load instructions --- Userland/DevTools/UserspaceEmulator/SoftFPU.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Userland/DevTools') diff --git a/Userland/DevTools/UserspaceEmulator/SoftFPU.cpp b/Userland/DevTools/UserspaceEmulator/SoftFPU.cpp index 7c8cd5ccf8..61ec8de3cb 100644 --- a/Userland/DevTools/UserspaceEmulator/SoftFPU.cpp +++ b/Userland/DevTools/UserspaceEmulator/SoftFPU.cpp @@ -1088,30 +1088,37 @@ void SoftFPU::FYL2XP1(const X86::Instruction&) // LOAD CONSTANT void SoftFPU::FLD1(const X86::Instruction&) { + set_c1(0); fpu_push(1.0l); } void SoftFPU::FLDZ(const X86::Instruction&) { + set_c1(0); fpu_push(0.0l); } void SoftFPU::FLDPI(const X86::Instruction&) { + set_c1(0); fpu_push(M_PIl); } void SoftFPU::FLDL2E(const X86::Instruction&) { + set_c1(0); fpu_push(M_LOG2El); } void SoftFPU::FLDLN2(const X86::Instruction&) { + set_c1(0); fpu_push(M_LN2l); } void SoftFPU::FLDL2T(const X86::Instruction&) { + set_c1(0); fpu_push(log2l(10.0l)); } void SoftFPU::FLDLG2(const X86::Instruction&) { + set_c1(0); fpu_push(log10l(2.0l)); } -- cgit v1.2.3