Merge pull request #879 from FioraAeterna/frspx

JIT64: add frspx implementation
This commit is contained in:
Ryan Houdek 2014-08-28 14:12:21 -05:00
commit ad8fe0fb52
3 changed files with 19 additions and 1 deletions

View File

@ -188,6 +188,7 @@ public:
void fcmpx(UGeckoInstruction inst); void fcmpx(UGeckoInstruction inst);
void fctiwx(UGeckoInstruction inst); void fctiwx(UGeckoInstruction inst);
void fmrx(UGeckoInstruction inst); void fmrx(UGeckoInstruction inst);
void frspx(UGeckoInstruction inst);
void cmpXX(UGeckoInstruction inst); void cmpXX(UGeckoInstruction inst);

View File

@ -342,7 +342,7 @@ static GekkoOPTemplate table63[] =
{72, &Jit64::fmrx}, //"fmrx", OPTYPE_FPU, FL_RC_BIT_F}}, {72, &Jit64::fmrx}, //"fmrx", OPTYPE_FPU, FL_RC_BIT_F}},
{136, &Jit64::fsign}, //"fnabsx", OPTYPE_FPU, FL_RC_BIT_F}}, {136, &Jit64::fsign}, //"fnabsx", OPTYPE_FPU, FL_RC_BIT_F}},
{40, &Jit64::fsign}, //"fnegx", OPTYPE_FPU, FL_RC_BIT_F}}, {40, &Jit64::fsign}, //"fnegx", OPTYPE_FPU, FL_RC_BIT_F}},
{12, &Jit64::FallBackToInterpreter}, //"frspx", OPTYPE_FPU, FL_RC_BIT_F}}, {12, &Jit64::frspx}, //"frspx", OPTYPE_FPU, FL_RC_BIT_F}},
{64, &Jit64::FallBackToInterpreter}, //"mcrfs", OPTYPE_SYSTEMFP, 0}}, {64, &Jit64::FallBackToInterpreter}, //"mcrfs", OPTYPE_SYSTEMFP, 0}},
{583, &Jit64::FallBackToInterpreter}, //"mffsx", OPTYPE_SYSTEMFP, 0}}, {583, &Jit64::FallBackToInterpreter}, //"mffsx", OPTYPE_SYSTEMFP, 0}},

View File

@ -349,3 +349,20 @@ void Jit64::fctiwx(UGeckoInstruction inst)
MOVSD(fpr.R(d), XMM0); MOVSD(fpr.R(d), XMM0);
fpr.UnlockAll(); fpr.UnlockAll();
} }
void Jit64::frspx(UGeckoInstruction inst)
{
INSTRUCTION_START
JITDISABLE(bJITFloatingPointOff);
int b = inst.FB;
int d = inst.FD;
fpr.Lock(b, d);
fpr.BindToRegister(d, d == b);
if (b != d)
MOVAPD(fpr.RX(d), fpr.R(b));
ForceSinglePrecisionS(fpr.RX(d));
MOVDDUP(fpr.RX(d), fpr.R(d));
SetFPRFIfNeeded(inst, fpr.RX(d));
fpr.UnlockAll();
}