JitArm64: Merge ps_maddsX.

This commit is contained in:
degasus 2016-02-11 00:09:04 +01:00
parent 19713f7c14
commit 1b6d9dfc4e
3 changed files with 6 additions and 28 deletions

View File

@ -150,8 +150,7 @@ public:
// Paired
void ps_abs(UGeckoInstruction inst);
void ps_madd(UGeckoInstruction inst);
void ps_madds0(UGeckoInstruction inst);
void ps_madds1(UGeckoInstruction inst);
void ps_maddsX(UGeckoInstruction inst);
void ps_merge00(UGeckoInstruction inst);
void ps_merge01(UGeckoInstruction inst);
void ps_merge10(UGeckoInstruction inst);

View File

@ -53,7 +53,7 @@ void JitArm64::ps_madd(UGeckoInstruction inst)
fpr.Unlock(V0);
}
void JitArm64::ps_madds0(UGeckoInstruction inst)
void JitArm64::ps_maddsX(UGeckoInstruction inst)
{
INSTRUCTION_START
JITDISABLE(bJITPairedOff);
@ -62,28 +62,7 @@ void JitArm64::ps_madds0(UGeckoInstruction inst)
u32 a = inst.FA, b = inst.FB, c = inst.FC, d = inst.FD;
ARM64Reg VA = fpr.R(a, REG_REG);
ARM64Reg VB = fpr.R(b, REG_REG);
ARM64Reg VC = fpr.R(c, REG_REG);
ARM64Reg VD = fpr.RW(d, REG_REG);
ARM64Reg V0 = fpr.GetReg();
m_float_emit.DUP(64, V0, VC, 0);
m_float_emit.FMUL(64, V0, V0, VA);
m_float_emit.FADD(64, VD, V0, VB);
fpr.FixSinglePrecision(d);
fpr.Unlock(V0);
}
void JitArm64::ps_madds1(UGeckoInstruction inst)
{
INSTRUCTION_START
JITDISABLE(bJITPairedOff);
FALLBACK_IF(inst.Rc);
FALLBACK_IF(SConfig::GetInstance().bFPRF && js.op->wantsFPRF);
u32 a = inst.FA, b = inst.FB, c = inst.FC, d = inst.FD;
bool upper = inst.SUBOP5 == 15;
ARM64Reg VA = fpr.R(a, REG_REG);
ARM64Reg VB = fpr.R(b, REG_REG);
@ -91,7 +70,7 @@ void JitArm64::ps_madds1(UGeckoInstruction inst)
ARM64Reg VD = fpr.RW(d, REG_REG);
ARM64Reg V0 = fpr.GetReg();
m_float_emit.DUP(64, V0, VC, 1);
m_float_emit.DUP(64, V0, VC, upper ? 1 : 0);
m_float_emit.FMUL(64, V0, V0, VA);
m_float_emit.FADD(64, VD, V0, VB);
fpr.FixSinglePrecision(d);

View File

@ -124,8 +124,8 @@ static GekkoOPTemplate table4_2[] =
{11, &JitArm64::ps_sum1}, // ps_sum1
{12, &JitArm64::ps_muls0}, // ps_muls0
{13, &JitArm64::ps_muls1}, // ps_muls1
{14, &JitArm64::ps_madds0}, // ps_madds0
{15, &JitArm64::ps_madds1}, // ps_madds1
{14, &JitArm64::ps_maddsX}, // ps_madds0
{15, &JitArm64::ps_maddsX}, // ps_madds1
{18, &JitArm64::fp_arith}, // ps_div
{20, &JitArm64::fp_arith}, // ps_sub
{21, &JitArm64::fp_arith}, // ps_add