Jit_Paired: ps_muls

This commit is contained in:
MerryMage 2018-10-15 21:02:09 +01:00
parent 1550729688
commit cf5823c146
1 changed files with 12 additions and 9 deletions

View File

@ -90,26 +90,29 @@ void Jit64::ps_muls(UGeckoInstruction inst)
int a = inst.FA; int a = inst.FA;
int c = inst.FC; int c = inst.FC;
bool round_input = !js.op->fprIsSingle[c]; bool round_input = !js.op->fprIsSingle[c];
fpr.Lock(a, c, d);
RCOpArg Ra = fpr.Use(a, RCMode::Read);
RCOpArg Rc = fpr.Use(c, RCMode::Read);
RCX64Reg Rd = fpr.Bind(d, RCMode::Write);
RegCache::Realize(Ra, Rc, Rd);
switch (inst.SUBOP5) switch (inst.SUBOP5)
{ {
case 12: // ps_muls0 case 12: // ps_muls0
MOVDDUP(XMM1, fpr.R(c)); MOVDDUP(XMM1, Rc);
break; break;
case 13: // ps_muls1 case 13: // ps_muls1
avx_op(&XEmitter::VSHUFPD, &XEmitter::SHUFPD, XMM1, fpr.R(c), fpr.R(c), 3); avx_op(&XEmitter::VSHUFPD, &XEmitter::SHUFPD, XMM1, Rc, Rc, 3);
break; break;
default: default:
PanicAlert("ps_muls WTF!!!"); PanicAlert("ps_muls WTF!!!");
} }
if (round_input) if (round_input)
Force25BitPrecision(XMM1, R(XMM1), XMM0); Force25BitPrecision(XMM1, R(XMM1), XMM0);
MULPD(XMM1, fpr.R(a)); MULPD(XMM1, Ra);
fpr.BindToRegister(d, false); HandleNaNs(inst, Rd, XMM1);
HandleNaNs(inst, fpr.RX(d), XMM1); ForceSinglePrecision(Rd, Rd);
ForceSinglePrecision(fpr.RX(d), fpr.R(d)); SetFPRFIfNeeded(Rd);
SetFPRFIfNeeded(fpr.RX(d));
fpr.UnlockAll();
} }
void Jit64::ps_mergeXX(UGeckoInstruction inst) void Jit64::ps_mergeXX(UGeckoInstruction inst)