From b5b535aa810c3d66d283e2efd1e99f668a898094 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 14 Nov 2020 23:11:07 +0100 Subject: [PATCH] UserspaceEmulator: Untaint flags in FCOMI and FUCOMI for now This makes UE logging bearable until we can get proper shadow data support for the FPU stack. --- DevTools/UserspaceEmulator/SoftCPU.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/DevTools/UserspaceEmulator/SoftCPU.cpp b/DevTools/UserspaceEmulator/SoftCPU.cpp index f8300527d9..4774c47ef6 100644 --- a/DevTools/UserspaceEmulator/SoftCPU.cpp +++ b/DevTools/UserspaceEmulator/SoftCPU.cpp @@ -1742,6 +1742,9 @@ void SoftCPU::FUCOMI(const X86::Instruction& insn) set_cf(fpu_get(0) < fpu_get(i)); set_of(false); } + + // FIXME: Taint should be based on ST(0) and ST(i) + m_flags_tainted = false; } void SoftCPU::FCOMI(const X86::Instruction& insn) @@ -1753,6 +1756,9 @@ void SoftCPU::FCOMI(const X86::Instruction& insn) set_pf(false); set_cf(fpu_get(0) < fpu_get(i)); set_of(false); + + // FIXME: Taint should be based on ST(0) and ST(i) + m_flags_tainted = false; } void SoftCPU::FSTP_RM80(const X86::Instruction&) { TODO_INSN(); }