summaryrefslogtreecommitdiff
path: root/Userland/DevTools
diff options
context:
space:
mode:
authorHendiadyoin1 <leon2002.la@gmail.com>2022-02-03 12:47:17 +0100
committerAndreas Kling <kling@serenityos.org>2022-03-15 11:39:42 +0100
commit47fe911196b5551f5b4a829a1a310ca66cf12e99 (patch)
tree67f74ad8f530c4c095e5b4391530d5545b1d079c /Userland/DevTools
parent3f581c77d9710310f56b1d69ccd2b43de49efc4c (diff)
downloadserenity-47fe911196b5551f5b4a829a1a310ca66cf12e99.zip
UserspaceEmulator: Clear c0 on x87 constant load instructions
Diffstat (limited to 'Userland/DevTools')
-rw-r--r--Userland/DevTools/UserspaceEmulator/SoftFPU.cpp7
1 files changed, 7 insertions, 0 deletions
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));
}