Jit_Integer: extsXx

This commit is contained in:
MerryMage 2018-10-15 21:01:18 +01:00
parent c380764ed0
commit b7a4296bec
1 changed files with 7 additions and 7 deletions

View File

@ -866,19 +866,19 @@ void Jit64::extsXx(UGeckoInstruction inst)
int a = inst.RA, s = inst.RS; int a = inst.RA, s = inst.RS;
int size = inst.SUBOP10 == 922 ? 16 : 8; int size = inst.SUBOP10 == 922 ? 16 : 8;
if (gpr.R(s).IsImm()) if (gpr.IsImm(s))
{ {
gpr.SetImmediate32(a, (u32)(s32)(size == 16 ? (s16)gpr.R(s).Imm32() : (s8)gpr.R(s).Imm32())); gpr.SetImmediate32(a, (u32)(s32)(size == 16 ? (s16)gpr.Imm32(s) : (s8)gpr.Imm32(s)));
} }
else else
{ {
gpr.Lock(a, s); RCOpArg Rs = gpr.Use(s, RCMode::Read);
gpr.BindToRegister(a, a == s, true); RCX64Reg Ra = gpr.Bind(a, RCMode::Write);
MOVSX(32, size, gpr.RX(a), gpr.R(s)); RegCache::Realize(Rs, Ra);
MOVSX(32, size, Ra, Rs);
} }
if (inst.Rc) if (inst.Rc)
ComputeRC(gpr.R(a)); ComputeRC(a);
gpr.UnlockAll();
} }
void Jit64::subfic(UGeckoInstruction inst) void Jit64::subfic(UGeckoInstruction inst)