JitIL: Make LoadCarry work correctly.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2202 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
6daae62df3
commit
cf5fc063ce
|
@ -259,7 +259,7 @@ InstLoc IRBuilder::FoldZeroOp(unsigned Opcode, unsigned extra) {
|
|||
}
|
||||
if (Opcode == LoadCarry) {
|
||||
if (!CarryCache)
|
||||
CarryCache = EmitZeroOp(LoadGReg, extra);
|
||||
CarryCache = EmitZeroOp(LoadCarry, extra);
|
||||
return CarryCache;
|
||||
}
|
||||
if (Opcode == LoadCR) {
|
||||
|
@ -1408,6 +1408,15 @@ static void DoWriteCode(IRBuilder* ibuild, Jit64* Jit, bool UseProfile) {
|
|||
Jit->MOV(32, R(reg), M(&MSR));
|
||||
RI.regs[reg] = I;
|
||||
break;
|
||||
}
|
||||
case LoadCarry: {
|
||||
if (!thisUsed) break;
|
||||
X64Reg reg = regFindFreeReg(RI);
|
||||
Jit->MOV(32, R(reg), M(&PowerPC::ppcState.spr[SPR_XER]));
|
||||
Jit->SHR(32, R(reg), Imm8(29));
|
||||
Jit->AND(32, R(reg), Imm8(1));
|
||||
RI.regs[reg] = I;
|
||||
break;
|
||||
}
|
||||
case StoreGReg: {
|
||||
unsigned ppcreg = *I >> 16;
|
||||
|
|
|
@ -341,8 +341,6 @@
|
|||
|
||||
void Jit64::addzex(UGeckoInstruction inst)
|
||||
{
|
||||
Default(inst); return;
|
||||
// FIXME: There's a bug in here somewhere!
|
||||
INSTRUCTION_START
|
||||
IREmitter::InstLoc lhs = ibuild.EmitLoadGReg(inst.RA),
|
||||
val, newcarry;
|
||||
|
|
Loading…
Reference in New Issue