summaryrefslogtreecommitdiff
path: root/src/compiler/codegen/arm
diff options
context:
space:
mode:
author buzbee <buzbee@google.com> 2012-03-30 09:11:45 -0700
committer buzbee <buzbee@google.com> 2012-03-30 09:34:31 -0700
commita2e39d9c54a1e35e3f67ee3543bf7039f112d39c (patch)
treef3c6b31484ca6c119e371935127a8ec3b59c4015 /src/compiler/codegen/arm
parente103141a78d705f2009b7f98c9a9df201dda63a7 (diff)
Enable the rest of branch fusing
I mistakenly left most of the branch fusing cases disabled in the previous CL. This CL turns them all on, along with a fix for the bug I was chasing while disabling them in the first place. Change-Id: Ia60f7fe5394a5da08ed75bbff39b47ae9497a61c
Diffstat (limited to 'src/compiler/codegen/arm')
-rw-r--r--src/compiler/codegen/arm/Thumb2/Gen.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/compiler/codegen/arm/Thumb2/Gen.cc b/src/compiler/codegen/arm/Thumb2/Gen.cc
index ea02ca99ac..f48540329e 100644
--- a/src/compiler/codegen/arm/Thumb2/Gen.cc
+++ b/src/compiler/codegen/arm/Thumb2/Gen.cc
@@ -658,12 +658,12 @@ void genFusedLongCmpBranch(CompilationUnit* cUnit, BasicBlock* bb, MIR* mir)
{
LIR* labelList = (LIR*)cUnit->blockLabelList;
LIR* taken = &labelList[bb->taken->id];
+ LIR* notTaken = &labelList[bb->fallThrough->id];
RegLocation rlSrc1 = oatGetSrcWide(cUnit, mir, 0, 1);
RegLocation rlSrc2 = oatGetSrcWide(cUnit, mir, 2, 3);
rlSrc1 = loadValueWide(cUnit, rlSrc1, kCoreReg);
rlSrc2 = loadValueWide(cUnit, rlSrc2, kCoreReg);
ConditionCode ccode = static_cast<ConditionCode>(mir->dalvikInsn.arg[0]);
- LIR* notTaken = rawLIR(cUnit, mir->offset, kPseudoTargetLabel);
opRegReg(cUnit, kOpCmp, rlSrc1.highReg, rlSrc2.highReg);
switch(ccode) {
case kCondEq:
@@ -675,25 +675,28 @@ void genFusedLongCmpBranch(CompilationUnit* cUnit, BasicBlock* bb, MIR* mir)
case kCondLt:
opCondBranch(cUnit, kCondLt, taken);
opCondBranch(cUnit, kCondGt, notTaken);
+ ccode = kCondCc;
break;
case kCondLe:
opCondBranch(cUnit, kCondLt, taken);
opCondBranch(cUnit, kCondGt, notTaken);
+ ccode = kCondLs;
break;
case kCondGt:
opCondBranch(cUnit, kCondGt, taken);
opCondBranch(cUnit, kCondLt, notTaken);
+ ccode = kCondHi;
break;
case kCondGe:
opCondBranch(cUnit, kCondGt, taken);
opCondBranch(cUnit, kCondLt, notTaken);
+ ccode = kCondCs;
break;
default:
LOG(FATAL) << "Unexpected ccode: " << (int)ccode;
}
opRegReg(cUnit, kOpCmp, rlSrc1.lowReg, rlSrc2.lowReg);
opCondBranch(cUnit, ccode, taken);
- oatAppendLIR(cUnit, notTaken);
}
/*