1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 21:08:12 +00:00

UserspaceEmulator: Truncate in CVTTSS2SI

This commit is contained in:
Hendiadyoin1 2022-04-05 12:25:56 +02:00 committed by Andreas Kling
parent fd2af972ed
commit 5c19cfa55a

View file

@ -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)