ppu: improve vnmsubfp instruction
This commit is contained in:
@@ -1363,7 +1363,7 @@ bool ppu_interpreter::VMULOUH(ppu_thread& ppu, ppu_opcode_t op)
|
|||||||
|
|
||||||
bool ppu_interpreter::VNMSUBFP(ppu_thread& ppu, ppu_opcode_t op)
|
bool ppu_interpreter::VNMSUBFP(ppu_thread& ppu, ppu_opcode_t op)
|
||||||
{
|
{
|
||||||
ppu.vr[op.vd].vf = _mm_sub_ps(ppu.vr[op.vb].vf, _mm_mul_ps(ppu.vr[op.va].vf, ppu.vr[op.vc].vf));
|
ppu.vr[op.vd].vf = _mm_xor_ps(_mm_sub_ps(_mm_mul_ps(ppu.vr[op.va].vf, ppu.vr[op.vc].vf), ppu.vr[op.vb].vf), _mm_set1_ps(-0.0f));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1175,7 +1175,7 @@ void PPUTranslator::VMULOUH(ppu_opcode_t op)
|
|||||||
void PPUTranslator::VNMSUBFP(ppu_opcode_t op)
|
void PPUTranslator::VNMSUBFP(ppu_opcode_t op)
|
||||||
{
|
{
|
||||||
const auto acb = GetVrs(VrType::vf, op.va, op.vc, op.vb);
|
const auto acb = GetVrs(VrType::vf, op.va, op.vc, op.vb);
|
||||||
SetVr(op.vd, m_ir->CreateFSub(acb[2], m_ir->CreateFMul(acb[0], acb[1])));
|
SetVr(op.vd, m_ir->CreateFNeg(m_ir->CreateFSub(m_ir->CreateFMul(acb[0], acb[1]), acb[2])));
|
||||||
}
|
}
|
||||||
|
|
||||||
void PPUTranslator::VNOR(ppu_opcode_t op)
|
void PPUTranslator::VNOR(ppu_opcode_t op)
|
||||||
|
|||||||
Reference in New Issue
Block a user