mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-10 13:00:29 +03:00
UserspaceEmulator: Remove some unnecessary casting
This commit is contained in:
parent
d759175767
commit
0d6d780183
Notes:
sideshowbarker
2024-07-18 01:25:42 +09:00
Author: https://github.com/Hendiadyoin1 Commit: https://github.com/SerenityOS/serenity/commit/0d6d7801839 Pull-request: https://github.com/SerenityOS/serenity/pull/8946 Reviewed-by: https://github.com/Dexesttp Reviewed-by: https://github.com/awesomekling Reviewed-by: https://github.com/kleinesfilmroellchen ✅
@ -638,14 +638,14 @@ void SoftFPU::FIMUL_RM32(const X86::Instruction& insn)
|
||||
VERIFY(!insn.modrm().is_register());
|
||||
auto m32int = (i32)insn.modrm().read32(m_cpu, insn).value();
|
||||
// FIXME: Respect shadow values
|
||||
fpu_set(0, fpu_get(0) * (long double)m32int);
|
||||
fpu_set(0, fpu_get(0) * m32int);
|
||||
}
|
||||
void SoftFPU::FIMUL_RM16(const X86::Instruction& insn)
|
||||
{
|
||||
VERIFY(!insn.modrm().is_register());
|
||||
auto m16int = (i16)insn.modrm().read16(m_cpu, insn).value();
|
||||
// FIXME: Respect shadow values
|
||||
fpu_set(0, fpu_get(0) * (long double)m16int);
|
||||
fpu_set(0, fpu_get(0) * m16int);
|
||||
}
|
||||
|
||||
void SoftFPU::FDIV_RM32(const X86::Instruction& insn)
|
||||
@ -720,7 +720,7 @@ void SoftFPU::FIDIV_RM16(const X86::Instruction& insn)
|
||||
auto m16int = (i16)insn.modrm().read16(m_cpu, insn).value();
|
||||
// FIXME: Respect shadow values
|
||||
// FIXME: Raise IA on 0 / _=0, raise Z on finite / +-0
|
||||
fpu_set(0, fpu_get(0) / (long double)m16int);
|
||||
fpu_set(0, fpu_get(0) / m16int);
|
||||
}
|
||||
void SoftFPU::FIDIV_RM32(const X86::Instruction& insn)
|
||||
{
|
||||
@ -728,7 +728,7 @@ void SoftFPU::FIDIV_RM32(const X86::Instruction& insn)
|
||||
auto m32int = (i32)insn.modrm().read32(m_cpu, insn).value();
|
||||
// FIXME: Respect shadow values
|
||||
// FIXME: Raise IA on 0 / _=0, raise Z on finite / +-0
|
||||
fpu_set(0, fpu_get(0) / (long double)m32int);
|
||||
fpu_set(0, fpu_get(0) / m32int);
|
||||
}
|
||||
|
||||
void SoftFPU::FIDIVR_RM16(const X86::Instruction& insn)
|
||||
@ -737,7 +737,7 @@ void SoftFPU::FIDIVR_RM16(const X86::Instruction& insn)
|
||||
auto m16int = (i16)insn.modrm().read16(m_cpu, insn).value();
|
||||
// FIXME: Respect shadow values
|
||||
// FIXME: Raise IA on 0 / _=0, raise Z on finite / +-0
|
||||
fpu_set(0, (long double)m16int / fpu_get(0));
|
||||
fpu_set(0, m16int / fpu_get(0));
|
||||
}
|
||||
void SoftFPU::FIDIVR_RM32(const X86::Instruction& insn)
|
||||
{
|
||||
@ -745,7 +745,7 @@ void SoftFPU::FIDIVR_RM32(const X86::Instruction& insn)
|
||||
auto m32int = (i32)insn.modrm().read32(m_cpu, insn).value();
|
||||
// FIXME: Respect shadow values
|
||||
// FIXME: Raise IA on 0 / _=0, raise Z on finite / +-0
|
||||
fpu_set(0, (long double)m32int / fpu_get(0));
|
||||
fpu_set(0, m32int / fpu_get(0));
|
||||
}
|
||||
|
||||
void SoftFPU::FPREM(const X86::Instruction&)
|
||||
|
Loading…
Reference in New Issue
Block a user