mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-11 00:29:11 +01:00
JitArm64: fix addzex
CMP don't update the carry flag, so we have to use an addition.
This commit is contained in:
parent
63480da4ee
commit
f7fa22a053
@ -678,17 +678,12 @@ void JitArm64::addzex(UGeckoInstruction inst)
|
|||||||
JITDISABLE(bJITIntegerOff);
|
JITDISABLE(bJITIntegerOff);
|
||||||
FALLBACK_IF(inst.OE);
|
FALLBACK_IF(inst.OE);
|
||||||
|
|
||||||
// breaks Kirby
|
|
||||||
FALLBACK_IF(1);
|
|
||||||
|
|
||||||
int a = inst.RA, d = inst.RD;
|
int a = inst.RA, d = inst.RD;
|
||||||
|
|
||||||
gpr.BindToRegister(d, d == a);
|
gpr.BindToRegister(d, d == a);
|
||||||
ARM64Reg WA = gpr.GetReg();
|
ARM64Reg WA = gpr.GetReg();
|
||||||
LDRB(INDEX_UNSIGNED, WA, X29, PPCSTATE_OFF(xer_ca));
|
LDRB(INDEX_UNSIGNED, WA, X29, PPCSTATE_OFF(xer_ca));
|
||||||
CMP(WA, 0);
|
ADDS(gpr.R(d), gpr.R(a), WA);
|
||||||
CSINC(gpr.R(d), gpr.R(a), gpr.R(a), CC_EQ);
|
|
||||||
CMP(gpr.R(d), 0);
|
|
||||||
gpr.Unlock(WA);
|
gpr.Unlock(WA);
|
||||||
ComputeCarry();
|
ComputeCarry();
|
||||||
if (inst.Rc)
|
if (inst.Rc)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user