mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 05:47:56 -07:00
Jit64: Remove HandleNaNs's xmm_out parameter
All HandleNaNs does with the xmm_out parameter is emit MOVAPD at the end if xmm_out != xmm. The caller might as well do that themselves.
This commit is contained in:
parent
cf094eb415
commit
4b8a720c9b
@ -126,8 +126,7 @@ public:
|
|||||||
void FinalizeSingleResult(Gen::X64Reg output, const Gen::OpArg& input, bool packed = true,
|
void FinalizeSingleResult(Gen::X64Reg output, const Gen::OpArg& input, bool packed = true,
|
||||||
bool duplicate = false);
|
bool duplicate = false);
|
||||||
void FinalizeDoubleResult(Gen::X64Reg output, const Gen::OpArg& input);
|
void FinalizeDoubleResult(Gen::X64Reg output, const Gen::OpArg& input);
|
||||||
void HandleNaNs(UGeckoInstruction inst, Gen::X64Reg xmm_out, Gen::X64Reg xmm_in,
|
void HandleNaNs(UGeckoInstruction inst, Gen::X64Reg xmm, Gen::X64Reg clobber);
|
||||||
Gen::X64Reg clobber);
|
|
||||||
|
|
||||||
void MultiplyImmediate(u32 imm, int a, int d, bool overflow);
|
void MultiplyImmediate(u32 imm, int a, int d, bool overflow);
|
||||||
|
|
||||||
|
@ -92,7 +92,7 @@ void Jit64::FinalizeDoubleResult(X64Reg output, const OpArg& input)
|
|||||||
SetFPRFIfNeeded(input, false);
|
SetFPRFIfNeeded(input, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Jit64::HandleNaNs(UGeckoInstruction inst, X64Reg xmm_out, X64Reg xmm, X64Reg clobber)
|
void Jit64::HandleNaNs(UGeckoInstruction inst, X64Reg xmm, X64Reg clobber)
|
||||||
{
|
{
|
||||||
// | PowerPC | x86
|
// | PowerPC | x86
|
||||||
// ---------------------+----------+---------
|
// ---------------------+----------+---------
|
||||||
@ -103,11 +103,7 @@ void Jit64::HandleNaNs(UGeckoInstruction inst, X64Reg xmm_out, X64Reg xmm, X64Re
|
|||||||
// to be positive, so we'll have to handle them manually.
|
// to be positive, so we'll have to handle them manually.
|
||||||
|
|
||||||
if (!m_accurate_nans)
|
if (!m_accurate_nans)
|
||||||
{
|
|
||||||
if (xmm_out != xmm)
|
|
||||||
MOVAPD(xmm_out, R(xmm));
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
ASSERT(xmm != clobber);
|
ASSERT(xmm != clobber);
|
||||||
|
|
||||||
@ -200,8 +196,6 @@ void Jit64::HandleNaNs(UGeckoInstruction inst, X64Reg xmm_out, X64Reg xmm, X64Re
|
|||||||
SetJumpTarget(done);
|
SetJumpTarget(done);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (xmm_out != xmm)
|
|
||||||
MOVAPD(xmm_out, R(xmm));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Jit64::fp_arith(UGeckoInstruction inst)
|
void Jit64::fp_arith(UGeckoInstruction inst)
|
||||||
@ -259,11 +253,11 @@ void Jit64::fp_arith(UGeckoInstruction inst)
|
|||||||
avx_op(avxOp, sseOp, dest, Rop1, Rop2, packed, reversible);
|
avx_op(avxOp, sseOp, dest, Rop1, Rop2, packed, reversible);
|
||||||
}
|
}
|
||||||
|
|
||||||
HandleNaNs(inst, Rd, dest, XMM0);
|
HandleNaNs(inst, dest, XMM0);
|
||||||
if (single)
|
if (single)
|
||||||
FinalizeSingleResult(Rd, Rd, packed, true);
|
FinalizeSingleResult(Rd, R(dest), packed, true);
|
||||||
else
|
else
|
||||||
FinalizeDoubleResult(Rd, Rd);
|
FinalizeDoubleResult(Rd, R(dest));
|
||||||
};
|
};
|
||||||
|
|
||||||
switch (inst.SUBOP5)
|
switch (inst.SUBOP5)
|
||||||
@ -482,7 +476,7 @@ void Jit64::fmaddXX(UGeckoInstruction inst)
|
|||||||
result_xmm = Rd;
|
result_xmm = Rd;
|
||||||
}
|
}
|
||||||
|
|
||||||
HandleNaNs(inst, result_xmm, result_xmm, XMM0);
|
HandleNaNs(inst, result_xmm, XMM0);
|
||||||
|
|
||||||
if (single)
|
if (single)
|
||||||
FinalizeSingleResult(Rd, R(result_xmm), packed, true);
|
FinalizeSingleResult(Rd, R(result_xmm), packed, true);
|
||||||
|
@ -77,8 +77,8 @@ void Jit64::ps_sum(UGeckoInstruction inst)
|
|||||||
default:
|
default:
|
||||||
PanicAlertFmt("ps_sum WTF!!!");
|
PanicAlertFmt("ps_sum WTF!!!");
|
||||||
}
|
}
|
||||||
HandleNaNs(inst, Rd, tmp, tmp == XMM1 ? XMM0 : XMM1);
|
HandleNaNs(inst, tmp, tmp == XMM1 ? XMM0 : XMM1);
|
||||||
FinalizeSingleResult(Rd, Rd);
|
FinalizeSingleResult(Rd, R(tmp));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Jit64::ps_muls(UGeckoInstruction inst)
|
void Jit64::ps_muls(UGeckoInstruction inst)
|
||||||
@ -112,8 +112,8 @@ void Jit64::ps_muls(UGeckoInstruction inst)
|
|||||||
if (round_input)
|
if (round_input)
|
||||||
Force25BitPrecision(XMM1, R(XMM1), XMM0);
|
Force25BitPrecision(XMM1, R(XMM1), XMM0);
|
||||||
MULPD(XMM1, Ra);
|
MULPD(XMM1, Ra);
|
||||||
HandleNaNs(inst, Rd, XMM1, XMM0);
|
HandleNaNs(inst, XMM1, XMM0);
|
||||||
FinalizeSingleResult(Rd, Rd);
|
FinalizeSingleResult(Rd, R(XMM1));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Jit64::ps_mergeXX(UGeckoInstruction inst)
|
void Jit64::ps_mergeXX(UGeckoInstruction inst)
|
||||||
|
Loading…
Reference in New Issue
Block a user