ppu: improve fnmsub instruction

This commit is contained in:
scribam 2018-06-26 22:11:08 +02:00 committed by Ivan
parent 1c9769670c
commit f1e6532ec0
2 changed files with 2 additions and 2 deletions

View file

@ -4189,7 +4189,7 @@ void PPUTranslator::FNMSUB(ppu_opcode_t op)
const auto a = GetFpr(op.fra);
const auto b = GetFpr(op.frb);
const auto c = GetFpr(op.frc);
const auto result = m_ir->CreateFSub(b, m_ir->CreateFMul(a, c));
const auto result = m_ir->CreateFNeg(m_ir->CreateFSub(m_ir->CreateFMul(a, c), b));
SetFpr(op.frd, result);
//SetFPSCR_FR(Call(GetType<bool>(), m_pure_attr, "__fmadd_get_fr", a, b, c)); // TODO ???