diff options
| author | 2012-03-19 01:12:01 -0700 | |
|---|---|---|
| committer | 2012-03-19 08:39:59 -0700 | |
| commit | b3ab25b58945f1bd22da1be2eb49dc3eb121011e (patch) | |
| tree | e17de76e6be5e2b1bbeea8c66cecc782bc7fb417 /src/compiler/codegen/GenInvoke.cc | |
| parent | 19daac61b9e73c0c805538e77f6e75ef273caa0f (diff) | |
Enable compiler_test on host.
Change-Id: I67a745ba78567af6c967cc44cd9c9640ef5ba398
Diffstat (limited to 'src/compiler/codegen/GenInvoke.cc')
| -rw-r--r-- | src/compiler/codegen/GenInvoke.cc | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/compiler/codegen/GenInvoke.cc b/src/compiler/codegen/GenInvoke.cc index c2023ff113..2810936caa 100644 --- a/src/compiler/codegen/GenInvoke.cc +++ b/src/compiler/codegen/GenInvoke.cc @@ -52,11 +52,12 @@ void flushIns(CompilationUnit* cUnit) if (cUnit->numIns == 0) return; - int firstArgReg = rARG1; #if !defined(TARGET_X86) - int lastArgReg = rARG3; + const int numArgRegs = 3; + static int argRegs[] = {rARG1, rARG2, rARG3}; #else - int lastArgReg = rARG2; + const int numArgRegs = 2; + static int argRegs[] = {rARG1, rARG2}; #endif int startVReg = cUnit->numDalvikRegisters - cUnit->numIns; /* @@ -73,15 +74,15 @@ void flushIns(CompilationUnit* cUnit) */ for (int i = 0; i < cUnit->numIns; i++) { PromotionMap* vMap = &cUnit->promotionMap[startVReg + i]; - if (i <= (lastArgReg - firstArgReg)) { + if (i < numArgRegs) { // If arriving in register bool needFlush = true; RegLocation* tLoc = &cUnit->regLocation[startVReg + i]; if ((vMap->coreLocation == kLocPhysReg) && !tLoc->fp) { - opRegCopy(cUnit, vMap->coreReg, firstArgReg + i); + opRegCopy(cUnit, vMap->coreReg, argRegs[i]); needFlush = false; } else if ((vMap->fpLocation == kLocPhysReg) && tLoc->fp) { - opRegCopy(cUnit, vMap->fpReg, firstArgReg + i); + opRegCopy(cUnit, vMap->fpReg, argRegs[i]); needFlush = false; } else { needFlush = true; @@ -95,7 +96,7 @@ void flushIns(CompilationUnit* cUnit) } if (needFlush) { storeBaseDisp(cUnit, rSP, oatSRegOffset(cUnit, startVReg + i), - firstArgReg + i, kWord); + argRegs[i], kWord); } } else { // If arriving in frame & promoted |