diff options
| author | 2012-10-17 16:41:07 -0700 | |
|---|---|---|
| committer | 2012-10-18 12:13:33 -0700 | |
| commit | 4eb68edeecc4d6641bcca2a40620631335e7cadc (patch) | |
| tree | 7b627587f60f8cef5a76db2a361ee4ba9a4042e7 /src/compiler/codegen/GenCommon.cc | |
| parent | 99bc2176824556730c948f17cbdb7993b17fcb6e (diff) | |
More MIPS fixes. Fibonacci and ExceptionTest work.
In this change:
- Fixed compilation of div-int and instance-of
- Fixed VERIFY_OBJECT to compile again
- Added stack space for passing extra function arguments for
REF_ONLY_CALLEE_SAVE functions
- Fixed AbstractMethodErrorStub to match stack layout
Change-Id: I3d4540a3285a0acf49522ffc6f01d04b888bb8ef
Diffstat (limited to 'src/compiler/codegen/GenCommon.cc')
| -rw-r--r-- | src/compiler/codegen/GenCommon.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/compiler/codegen/GenCommon.cc b/src/compiler/codegen/GenCommon.cc index c1d46611a5..21f824dfd6 100644 --- a/src/compiler/codegen/GenCommon.cc +++ b/src/compiler/codegen/GenCommon.cc @@ -1321,6 +1321,10 @@ void genInstanceof(CompilationUnit* cUnit, uint32_t type_idx, RegLocation rlDest } } /* rARG0 is ref, rARG2 is class. If ref==null, use directly as bool result */ + RegLocation rlResult = oatGetReturn(cUnit, false); +#if defined(TARGET_MIPS) + opRegCopy(cUnit, rlResult.lowReg, r_ZERO); // store false result for if branch is taken +#endif LIR* branch1 = opCmpImmBranch(cUnit, kCondEq, rARG0, 0, NULL); /* load object->klass_ */ DCHECK_EQ(Object::ClassOffset().Int32Value(), 0); @@ -1339,7 +1343,7 @@ void genInstanceof(CompilationUnit* cUnit, uint32_t type_idx, RegLocation rlDest oatFreeTemp(cUnit, rTgt); #else /* Uses branchovers */ - loadConstant(cUnit, rARG0, 1); // assume true + loadConstant(cUnit, rlResult.lowReg, 1); // assume true LIR* branchover = opCmpBranch(cUnit, kCondEq, rARG1, rARG2, NULL); #if !defined(TARGET_X86) int rTgt = loadHelper(cUnit, @@ -1356,7 +1360,6 @@ void genInstanceof(CompilationUnit* cUnit, uint32_t type_idx, RegLocation rlDest oatClobberCalleeSave(cUnit); /* branch targets here */ LIR* target = newLIR0(cUnit, kPseudoTargetLabel); - RegLocation rlResult = oatGetReturn(cUnit, false); storeValue(cUnit, rlDest, rlResult); branch1->target = target; #if !defined(TARGET_ARM) @@ -1884,9 +1887,10 @@ bool genArithOpInt(CompilationUnit* cUnit, Instruction::Code opcode, RegLocation storeValue(cUnit, rlDest, rlResult); } else { #if defined(TARGET_MIPS) + rlSrc1 = loadValue(cUnit, rlSrc1, kCoreReg); rlSrc2 = loadValue(cUnit, rlSrc2, kCoreReg); if (checkZero) { - genNullCheck(cUnit, rlSrc2.sRegLow, rlSrc2.lowReg, 0); + genImmedCheck(cUnit, kCondEq, rlSrc2.lowReg, 0, kThrowDivZero); } newLIR4(cUnit, kMipsDiv, r_HI, r_LO, rlSrc1.lowReg, rlSrc2.lowReg); rlResult = oatEvalLoc(cUnit, rlDest, kCoreReg, true); @@ -1918,8 +1922,8 @@ bool genArithOpInt(CompilationUnit* cUnit, Instruction::Code opcode, RegLocation rlResult = oatGetReturn(cUnit, false); else rlResult = oatGetReturnAlt(cUnit); - storeValue(cUnit, rlDest, rlResult); #endif + storeValue(cUnit, rlDest, rlResult); } return false; } |