Jit_FloatingPoint: fctiwx

This commit is contained in:
MerryMage 2018-10-15 21:02:01 +01:00
parent 457327cbc4
commit cc77e2f3ef
1 changed files with 6 additions and 5 deletions

View File

@ -598,8 +598,10 @@ void Jit64::fctiwx(UGeckoInstruction inst)
int d = inst.RD; int d = inst.RD;
int b = inst.RB; int b = inst.RB;
fpr.Lock(d, b);
fpr.BindToRegister(d); RCOpArg Rb = fpr.Use(b, RCMode::Read);
RCX64Reg Rd = fpr.Bind(d, RCMode::Write);
RegCache::Realize(Rb, Rd);
// Intel uses 0x80000000 as a generic error code while PowerPC uses clamping: // Intel uses 0x80000000 as a generic error code while PowerPC uses clamping:
// //
@ -613,7 +615,7 @@ void Jit64::fctiwx(UGeckoInstruction inst)
// except for -0.0 where they are set to 0xfff80001 (TODO). // except for -0.0 where they are set to 0xfff80001 (TODO).
MOVAPD(XMM0, MConst(half_qnan_and_s32_max)); MOVAPD(XMM0, MConst(half_qnan_and_s32_max));
MINSD(XMM0, fpr.R(b)); MINSD(XMM0, Rb);
switch (inst.SUBOP10) switch (inst.SUBOP10)
{ {
// fctiwx // fctiwx
@ -627,8 +629,7 @@ void Jit64::fctiwx(UGeckoInstruction inst)
break; break;
} }
// d[64+] must not be modified // d[64+] must not be modified
MOVSD(fpr.R(d), XMM0); MOVSD(Rd, XMM0);
fpr.UnlockAll();
} }
void Jit64::frspx(UGeckoInstruction inst) void Jit64::frspx(UGeckoInstruction inst)