JIT64: add frspx implementation

This commit is contained in:
Fiora 2014-08-26 00:07:49 -07:00
parent 0217fb2008
commit c359d65dfe
3 changed files with 19 additions and 1 deletions

View file

@ -188,6 +188,7 @@ public:
void fcmpx(UGeckoInstruction inst);
void fctiwx(UGeckoInstruction inst);
void fmrx(UGeckoInstruction inst);
void frspx(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}},
{136, &Jit64::fsign}, //"fnabsx", 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}},
{583, &Jit64::FallBackToInterpreter}, //"mffsx", OPTYPE_SYSTEMFP, 0}},

View file

@ -343,3 +343,20 @@ void Jit64::fctiwx(UGeckoInstruction inst)
MOVSD(fpr.R(d), XMM0);
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();
}