Merge "Fixes for register promotion; enable fast path" into dalvik-dev
diff --git a/src/compiler/codegen/RallocUtil.cc b/src/compiler/codegen/RallocUtil.cc
index d6e0bbc..5951ad4 100644
--- a/src/compiler/codegen/RallocUtil.cc
+++ b/src/compiler/codegen/RallocUtil.cc
@@ -640,26 +640,16 @@
if (rl.location == kLocPhysReg) {
RegisterInfo* infoLo = getRegInfo(cUnit, rl.lowReg);
RegisterInfo* infoHi = getRegInfo(cUnit, rl.highReg);
- if (!infoLo->pair) {
- dumpRegPool(cUnit->regPool->coreRegs,
- cUnit->regPool->numCoreRegs);
- assert(infoLo->pair);
+ if (infoLo->isTemp) {
+ infoLo->pair = false;
+ infoLo->defStart = NULL;
+ infoLo->defEnd = NULL;
}
- if (!infoHi->pair) {
- dumpRegPool(cUnit->regPool->coreRegs,
- cUnit->regPool->numCoreRegs);
- assert(infoHi->pair);
+ if (infoHi->isTemp) {
+ infoHi->pair = false;
+ infoHi->defStart = NULL;
+ infoHi->defEnd = NULL;
}
- assert(infoLo->pair);
- assert(infoHi->pair);
- assert(infoLo->partner == infoHi->reg);
- assert(infoHi->partner == infoLo->reg);
- infoLo->pair = false;
- infoHi->pair = false;
- infoLo->defStart = NULL;
- infoLo->defEnd = NULL;
- infoHi->defStart = NULL;
- infoHi->defEnd = NULL;
}
rl.wide = false;
return rl;
diff --git a/src/compiler/codegen/arm/MethodCodegenDriver.cc b/src/compiler/codegen/arm/MethodCodegenDriver.cc
index 96f5423..9c87659 100644
--- a/src/compiler/codegen/arm/MethodCodegenDriver.cc
+++ b/src/compiler/codegen/arm/MethodCodegenDriver.cc
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#define FORCE_SLOW 1
+#define FORCE_SLOW 0
static const RegLocation badLoc = {kLocDalvikFrame, 0, 0, INVALID_REG,
INVALID_REG, INVALID_SREG, 0,
@@ -804,7 +804,7 @@
* frame backing storage.
*/
// Scan the rest of the args - if in physReg flush to memory
- for (int i = 4; i < numArgs; i++) {
+ for (int i = 3; i < numArgs; i++) {
RegLocation loc = oatGetRawSrc(cUnit, mir, i);
if (loc.wide) {
loc = oatUpdateLocWide(cUnit, loc);