1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-25 04:02:42 +01:00

PPU LLVM: fix VNMSUBFP sign handling

PPU cache needs to be cleared.
This commit is contained in:
Nekotekina 2022-01-15 15:28:37 +03:00
parent e9efa73eed
commit 6dda047128

View File

@ -1260,14 +1260,14 @@ void PPUTranslator::VNMSUBFP(ppu_opcode_t op)
{
if (data == v128{})
{
set_vr(op.vd, vec_handle_result(-a * c));
set_vr(op.vd, vec_handle_result(-(a * c)));
ppu_log.notice("LLVM: VNMSUBFP with 0 addend at [0x%08x]", m_addr + (m_reloc ? m_reloc->addr : 0));
return;
}
if (!m_use_fma && data == v128::from32p(1u << 31))
{
set_vr(op.vd, vec_handle_result(-a * c + fsplat<f32[4]>(0.f)));
set_vr(op.vd, vec_handle_result(-(a * c - fsplat<f32[4]>(0.f))));
ppu_log.notice("LLVM: VNMSUBFP with -0 addend at [0x%08x]", m_addr + (m_reloc ? m_reloc->addr : 0));
return;
}
@ -1276,7 +1276,7 @@ void PPUTranslator::VNMSUBFP(ppu_opcode_t op)
// Differs from the emulated path with regards to negative zero
if (m_use_fma)
{
set_vr(op.vd, vec_handle_result(fmuladd(-a, c, b)));
set_vr(op.vd, vec_handle_result(-fmuladd(a, c, -b)));
return;
}