PPU LLVM: Fix rounding regression of FNMADDS, FNMSUBS (#8066)

* PPU LLVM: Fix rounding regression of FNMADDS, FNMSUBS
This commit is contained in:
Eladash 2020-04-19 22:55:26 +03:00 committed by GitHub
parent 5101bc189e
commit dbce10d0e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3966,7 +3966,7 @@ void PPUTranslator::FNMSUBS(ppu_opcode_t op)
result = m_ir->CreateFSub(m_ir->CreateFMul(a, c), b);
}
SetFpr(op.frd, m_ir->CreateFNeg(m_ir->CreateFPTrunc(result, GetType<f32>())));
SetFpr(op.frd, m_ir->CreateFPTrunc(m_ir->CreateFNeg(result), GetType<f32>()));
//SetFPSCR_FR(Call(GetType<bool>(), m_pure_attr, "__fmadds_get_fr", a, b, c)); // TODO ???
//SetFPSCR_FI(Call(GetType<bool>(), m_pure_attr, "__fmadds_get_fi", a, b, c));
@ -3994,7 +3994,7 @@ void PPUTranslator::FNMADDS(ppu_opcode_t op)
result = m_ir->CreateFAdd(m_ir->CreateFMul(a, c), b);
}
SetFpr(op.frd, m_ir->CreateFNeg(m_ir->CreateFPTrunc(result, GetType<f32>())));
SetFpr(op.frd, m_ir->CreateFPTrunc(m_ir->CreateFNeg(result), GetType<f32>()));
//SetFPSCR_FR(Call(GetType<bool>(), m_pure_attr, "__fmadds_get_fr", a, b, c)); // TODO ???
//SetFPSCR_FI(Call(GetType<bool>(), m_pure_attr, "__fmadds_get_fi", a, b, c));