diff options
author | Hendiadyoin1 <leon.a@serenityos.org> | 2022-04-05 12:25:56 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-04-06 18:30:22 +0200 |
commit | 5c19cfa55ac117af6eb6dda0eddfc4848c0e6c64 (patch) | |
tree | 192bfc1343cbc3c73a88300b13060c3f6d42891e | |
parent | fd2af972eda46c04a5dab9c9674d7c46a6611626 (diff) | |
download | serenity-5c19cfa55ac117af6eb6dda0eddfc4848c0e6c64.zip |
UserspaceEmulator: Truncate in CVTTSS2SI
-rw-r--r-- | Userland/DevTools/UserspaceEmulator/SoftVPU.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/DevTools/UserspaceEmulator/SoftVPU.cpp b/Userland/DevTools/UserspaceEmulator/SoftVPU.cpp index c66876c22e..70e9093f9d 100644 --- a/Userland/DevTools/UserspaceEmulator/SoftVPU.cpp +++ b/Userland/DevTools/UserspaceEmulator/SoftVPU.cpp @@ -215,7 +215,7 @@ void SoftVPU::CVTTSS2SI_r32_xmm2m32(X86::Instruction const& insn) else value = bit_cast<float>(insn.modrm().read32(m_cpu, insn).value()); - m_cpu.gpr32(insn.reg32()) = ValueWithShadow<u32>::create_initialized((u32)lround(value)); + m_cpu.gpr32(insn.reg32()) = ValueWithShadow<u32>::create_initialized((u32)(i32)truncf(value)); } void SoftVPU::CVTPS2PI_xmm1_mm2m64(X86::Instruction const&) { TODO(); } void SoftVPU::CVTSS2SI_r32_xmm2m32(X86::Instruction const& insn) |