From afc779a824eec6bf8da12c302e4bfec5c04cabb6 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Mon, 8 Dec 2014 21:17:01 -0800 Subject: [PATCH] jit: Add IN_RT to lwl/lwr and re-enable clobbering. --- Core/MIPS/ARM/ArmRegCache.cpp | 2 +- Core/MIPS/MIPSTables.cpp | 4 ++-- Core/MIPS/x86/RegCache.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Core/MIPS/ARM/ArmRegCache.cpp b/Core/MIPS/ARM/ArmRegCache.cpp index c037134ddb..92ec76394e 100644 --- a/Core/MIPS/ARM/ArmRegCache.cpp +++ b/Core/MIPS/ARM/ArmRegCache.cpp @@ -296,7 +296,7 @@ allocate: if (bestToSpill != INVALID_REG) { // ERROR_LOG(JIT, "Out of registers at PC %08x - spills register %i.", mips_->pc, bestToSpill); // TODO: Broken somehow in Dante's Inferno, but most games work. Bad flags in MIPSTables somewhere? - if (clobbered && false) { + if (clobbered) { DiscardR(ar[bestToSpill].mipsReg); } else { FlushArmReg(bestToSpill); diff --git a/Core/MIPS/MIPSTables.cpp b/Core/MIPS/MIPSTables.cpp index 3040ed7330..e6f640f997 100644 --- a/Core/MIPS/MIPSTables.cpp +++ b/Core/MIPS/MIPSTables.cpp @@ -147,11 +147,11 @@ const MIPSInstruction tableImmediate[64] = // xxxxxx ..... ..... ............... //32 INSTR("lb", JITFUNC(Comp_ITypeMem), Dis_ITypeMem, Int_ITypeMem, IN_MEM|IN_IMM16|IN_RS_ADDR|OUT_RT|MEMTYPE_BYTE), INSTR("lh", JITFUNC(Comp_ITypeMem), Dis_ITypeMem, Int_ITypeMem, IN_MEM|IN_IMM16|IN_RS_ADDR|OUT_RT|MEMTYPE_HWORD), - INSTR("lwl", JITFUNC(Comp_ITypeMem), Dis_ITypeMem, Int_ITypeMem, IN_MEM|IN_IMM16|IN_RS_ADDR|OUT_RT|MEMTYPE_WORD), + INSTR("lwl", JITFUNC(Comp_ITypeMem), Dis_ITypeMem, Int_ITypeMem, IN_MEM|IN_IMM16|IN_RS_ADDR|IN_RT|OUT_RT|MEMTYPE_WORD), INSTR("lw", JITFUNC(Comp_ITypeMem), Dis_ITypeMem, Int_ITypeMem, IN_MEM|IN_IMM16|IN_RS_ADDR|OUT_RT|MEMTYPE_WORD), INSTR("lbu", JITFUNC(Comp_ITypeMem), Dis_ITypeMem, Int_ITypeMem, IN_MEM|IN_IMM16|IN_RS_ADDR|OUT_RT|MEMTYPE_BYTE), INSTR("lhu", JITFUNC(Comp_ITypeMem), Dis_ITypeMem, Int_ITypeMem, IN_MEM|IN_IMM16|IN_RS_ADDR|OUT_RT|MEMTYPE_HWORD), - INSTR("lwr", JITFUNC(Comp_ITypeMem), Dis_ITypeMem, Int_ITypeMem, IN_MEM|IN_IMM16|IN_RS_ADDR|OUT_RT|MEMTYPE_WORD), + INSTR("lwr", JITFUNC(Comp_ITypeMem), Dis_ITypeMem, Int_ITypeMem, IN_MEM|IN_IMM16|IN_RS_ADDR|IN_RT|OUT_RT|MEMTYPE_WORD), INVALID, //40 INSTR("sb", JITFUNC(Comp_ITypeMem), Dis_ITypeMem, Int_ITypeMem, IN_IMM16|IN_RS_ADDR|IN_RT|OUT_MEM|MEMTYPE_BYTE), diff --git a/Core/MIPS/x86/RegCache.cpp b/Core/MIPS/x86/RegCache.cpp index f69c9305a9..f8422630ca 100644 --- a/Core/MIPS/x86/RegCache.cpp +++ b/Core/MIPS/x86/RegCache.cpp @@ -175,7 +175,7 @@ X64Reg GPRRegCache::GetFreeXReg() if (bestToSpill != INVALID_REG) { // TODO: Broken somehow in Dante's Inferno, but most games work. Bad flags in MIPSTables somewhere? - if (clobbered && false) { + if (clobbered) { DiscardRegContentsIfCached(xregs[bestToSpill].mipsReg); } else { StoreFromRegister(xregs[bestToSpill].mipsReg);