From 15b741706dfd6fc9c58dd2b235acdbf8cf4c5506 Mon Sep 17 00:00:00 2001 From: nodchip Date: Sun, 25 Jul 2010 09:56:39 +0000 Subject: [PATCH] JitIL: Fixed the code which were pointed out in r5968. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5969 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Core/Src/PowerPC/Jit64IL/IR.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/Core/Core/Src/PowerPC/Jit64IL/IR.cpp b/Source/Core/Core/Src/PowerPC/Jit64IL/IR.cpp index 62685e65f6..98f0894b13 100644 --- a/Source/Core/Core/Src/PowerPC/Jit64IL/IR.cpp +++ b/Source/Core/Core/Src/PowerPC/Jit64IL/IR.cpp @@ -1037,13 +1037,13 @@ unsigned IRBuilder::getComplexity(InstLoc I) const { static unsigned ZeroOp[] = {LoadCR, LoadLink, LoadMSR, LoadGReg, LoadCTR, InterpreterBranch, LoadCarry, RFIExit, LoadFReg, LoadFRegDENToZero, LoadGQR, Int3, }; static unsigned UOp[] = {StoreLink, BranchUncond, StoreCR, StoreMSR, StoreFPRF, StoreGReg, StoreCTR, Load8, Load16, Load32, SExt16, SExt8, Cntlzw, StoreCarry, SystemCall, ShortIdleLoop, LoadSingle, LoadDouble, LoadPaired, StoreFReg, DupSingleToMReg, DupSingleToPacked, ExpandPackedToMReg, CompactMRegToPacked, FSNeg, FSRSqrt, FDNeg, FPDup0, FPDup1, FPNeg, DoubleToSingle, StoreGQR, StoreSRR, }; static unsigned BiOp[] = {BranchCond, IdleBranch, And, Xor, Sub, Or, Add, Mul, Rol, Shl, Shrl, Sarl, ICmpEq, ICmpNe, ICmpUgt, ICmpUlt, ICmpSgt, ICmpSlt, ICmpSge, ICmpSle, Store8, Store16, Store32, ICmpCRSigned, ICmpCRUnsigned, InterpreterFallback, StoreSingle, StoreDouble, StorePaired, InsertDoubleInMReg, FSMul, FSAdd, FSSub, FDMul, FDAdd, FDSub, FPAdd, FPMul, FPSub, FPMerge00, FPMerge01, FPMerge10, FPMerge11, FDCmpCR, }; - for (int i = 0; i < sizeof(ZeroOp) / sizeof(ZeroOp[0]); ++i) { + for (size_t i = 0; i < sizeof(ZeroOp) / sizeof(ZeroOp[0]); ++i) { complexities[ZeroOp[i]] = 2; } - for (int i = 0; i < sizeof(UOp) / sizeof(UOp[0]); ++i) { + for (size_t i = 0; i < sizeof(UOp) / sizeof(UOp[0]); ++i) { complexities[UOp[i]] = 3; } - for (int i = 0; i < sizeof(BiOp) / sizeof(BiOp[0]); ++i) { + for (size_t i = 0; i < sizeof(BiOp) / sizeof(BiOp[0]); ++i) { complexities[BiOp[i]] = 4; } } @@ -1078,7 +1078,7 @@ void IRBuilder::simplifyCommutative(unsigned Opcode, InstLoc& Op1, InstLoc& Op2) const InstLoc Op1Old = Op1; const InstLoc Op2Old = Op2; Op1 = getOp1(Op1Old); - Op2 = FoldBiOp(Opcode, getOp2(Op1Old), Op2); + Op2 = FoldBiOp(Opcode, getOp2(Op1Old), Op2Old); } // Transform: (op (op V1, C1), (op V2, C2)) ==> (op (op V1, V2), (op C1,C2))