mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-09 15:49:25 +01:00
Jit64: subfx - Special case a == b
Soul Calibur II does this. Before: 2B F6 sub esi,esi After: Nothing!
This commit is contained in:
parent
b0be20560f
commit
c0be34aa81
@ -941,7 +941,13 @@ void Jit64::subfx(UGeckoInstruction inst)
|
||||
JITDISABLE(bJITIntegerOff);
|
||||
int a = inst.RA, b = inst.RB, d = inst.RD;
|
||||
|
||||
if (gpr.IsImm(a) && gpr.IsImm(b))
|
||||
if (a == b)
|
||||
{
|
||||
gpr.SetImmediate32(d, 0);
|
||||
if (inst.OE)
|
||||
GenerateConstantOverflow(false);
|
||||
}
|
||||
else if (gpr.IsImm(a, b))
|
||||
{
|
||||
s32 i = gpr.SImm32(b), j = gpr.SImm32(a);
|
||||
gpr.SetImmediate32(d, i - j);
|
||||
|
Loading…
x
Reference in New Issue
Block a user