[ARM] ps_div implementation.

This commit is contained in:
Ryan Houdek 2013-09-24 20:46:57 +00:00
parent 94a731b49d
commit 3b1b0d3fb5
3 changed files with 22 additions and 1 deletions

View File

@ -222,6 +222,7 @@ public:
// Paired Singles
void ps_add(UGeckoInstruction _inst);
void ps_div(UGeckoInstruction _inst);
void ps_sum0(UGeckoInstruction _inst);
void ps_sum1(UGeckoInstruction _inst);
void ps_madd(UGeckoInstruction _inst);

View File

@ -149,6 +149,26 @@ void JitArm::ps_add(UGeckoInstruction inst)
VADD(vD1, vA1, vB1);
}
void JitArm::ps_div(UGeckoInstruction inst)
{
INSTRUCTION_START
JITDISABLE(bJITPairedOff)
u32 a = inst.FA, b = inst.FB, d = inst.FD;
if (inst.Rc){
Default(inst); return;
}
ARMReg vA0 = fpr.R0(a);
ARMReg vA1 = fpr.R1(a);
ARMReg vB0 = fpr.R0(b);
ARMReg vB1 = fpr.R1(b);
ARMReg vD0 = fpr.R0(d, false);
ARMReg vD1 = fpr.R1(d, false);
VDIV(vD0, vA0, vB0);
VDIV(vD1, vA1, vB1);
}
void JitArm::ps_nmadd(UGeckoInstruction inst)
{
INSTRUCTION_START

View File

@ -149,7 +149,7 @@ static GekkoOPTemplate table4_2[] =
{13, &JitArm::ps_muls1}, //"ps_muls1", OPTYPE_PS, 0}},
{14, &JitArm::ps_madds0}, //"ps_madds0", OPTYPE_PS, 0}},
{15, &JitArm::ps_madds1}, //"ps_madds1", OPTYPE_PS, 0}},
{18, &JitArm::Default}, //"ps_div", OPTYPE_PS, 0, 16}},
{18, &JitArm::ps_div}, //"ps_div", OPTYPE_PS, 0, 16}},
{20, &JitArm::ps_sub}, //"ps_sub", OPTYPE_PS, 0}},
{21, &JitArm::ps_add}, //"ps_add", OPTYPE_PS, 0}},
{23, &JitArm::ps_sel}, //"ps_sel", OPTYPE_PS, 0}},