Fix the ARM JIT's subfic implementation.

This commit is contained in:
Ryan Houdek 2014-06-15 09:40:31 -05:00
parent 020b4fde1e
commit 83157ba350

View File

@ -104,16 +104,12 @@ void JitArm::FinalizeCarry(ARMReg reg)
STR(tmp, R9, PPCSTATE_OFF(spr[SPR_XER])); STR(tmp, R9, PPCSTATE_OFF(spr[SPR_XER]));
gpr.Unlock(tmp); gpr.Unlock(tmp);
} }
// Wrong - prevents WW from loading in to a game and also inverted intro logos
void JitArm::subfic(UGeckoInstruction inst) void JitArm::subfic(UGeckoInstruction inst)
{ {
INSTRUCTION_START INSTRUCTION_START
JITDISABLE(bJITIntegerOff) JITDISABLE(bJITIntegerOff)
// FIXME
FallBackToInterpreter(inst);
return;
int a = inst.RA, d = inst.RD; int a = inst.RA, d = inst.RD;
int imm = inst.SIMM_16; int imm = inst.SIMM_16;
@ -127,8 +123,7 @@ void JitArm::subfic(UGeckoInstruction inst)
BIC(tmp, tmp, mask); BIC(tmp, tmp, mask);
// Flags act exactly like subtracting from 0 // Flags act exactly like subtracting from 0
RSBS(gpr.R(d), gpr.R(d), 0); RSBS(gpr.R(d), gpr.R(d), 0);
// Output carry is inverted SetCC(CC_CS);
SetCC(CC_CC);
ORR(tmp, tmp, mask); ORR(tmp, tmp, mask);
SetCC(); SetCC();
STR(tmp, R9, PPCSTATE_OFF(spr[SPR_XER])); STR(tmp, R9, PPCSTATE_OFF(spr[SPR_XER]));