JIT64: optimize sign/zero-extend

Also remove some comments that no longer apply since x86_32 was dropped.
This commit is contained in:
Fiora 2014-08-24 11:25:56 -07:00
parent 61af91ff16
commit 355850f499
1 changed files with 1 additions and 9 deletions

View File

@ -796,11 +796,7 @@ void Jit64::extsbx(UGeckoInstruction inst)
{ {
gpr.Lock(a, s); gpr.Lock(a, s);
gpr.BindToRegister(a, a == s, true); gpr.BindToRegister(a, a == s, true);
// Always force moving to EAX because it isn't possible MOVSX(32, 8, gpr.RX(a), gpr.R(s));
// to refer to the lowest byte of some registers, at least in
// 32-bit mode.
MOV(32, R(EAX), gpr.R(s));
MOVSX(32, 8, gpr.RX(a), R(AL)); // watch out for ah and friends
gpr.UnlockAll(); gpr.UnlockAll();
} }
@ -823,11 +819,7 @@ void Jit64::extshx(UGeckoInstruction inst)
else else
{ {
gpr.Lock(a, s); gpr.Lock(a, s);
gpr.KillImmediate(s, true, false);
gpr.BindToRegister(a, a == s, true); gpr.BindToRegister(a, a == s, true);
// This looks a little dangerous, but it's safe because
// every 32-bit register has a 16-bit half at the same index
// as the 32-bit register.
MOVSX(32, 16, gpr.RX(a), gpr.R(s)); MOVSX(32, 16, gpr.RX(a), gpr.R(s));
gpr.UnlockAll(); gpr.UnlockAll();
} }