From 55bd45f4ea40b9a0af323f813d07f23d7a8ed397 Mon Sep 17 00:00:00 2001 From: Ian Rogers Date: Wed, 4 Apr 2012 17:31:20 -0700 Subject: More X86 fixes. Support for long divides and sparse switches. Change-Id: I07cdf6a9a2e4c6156cc70a429bf58f22e0e45ef1 --- src/compiler/codegen/GenCommon.cc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/compiler/codegen/GenCommon.cc') diff --git a/src/compiler/codegen/GenCommon.cc b/src/compiler/codegen/GenCommon.cc index 444f5f2dc7..aeacab8514 100644 --- a/src/compiler/codegen/GenCommon.cc +++ b/src/compiler/codegen/GenCommon.cc @@ -1858,7 +1858,7 @@ bool genArithOpInt(CompilationUnit* cUnit, MIR* mir, RegLocation rlDest, } else { RegLocation rlResult; oatFlushAllRegs(cUnit); /* Send everything to home location */ - loadValueDirectFixed(cUnit, rlSrc2, rRET1); + loadValueDirectFixed(cUnit, rlSrc2, rARG1); #if !defined(TARGET_X86) int rTgt = loadHelper(cUnit, funcOffset); #endif @@ -2197,14 +2197,17 @@ bool genArithOpLong(CompilationUnit* cUnit, MIR* mir, RegLocation rlDest, retReg = rRET0; funcOffset = ENTRYPOINT_OFFSET(pLdivmod); break; - /* NOTE - result is in rARG2/rARG3 instead of rRET0/rRET1 */ - // FIXME: is true, or could be made true, or other targets? case Instruction::REM_LONG: case Instruction::REM_LONG_2ADDR: callOut = true; checkZero = true; - funcOffset = ENTRYPOINT_OFFSET(pLdivmod); + funcOffset = ENTRYPOINT_OFFSET(pLdiv); +#if defined(TARGET_ARM) + /* NOTE - result is in rARG2/rARG3 instead of rRET0/rRET1 */ retReg = rARG2; +#else + retReg = rRET0; +#endif break; case Instruction::AND_LONG_2ADDR: case Instruction::AND_LONG: -- cgit v1.2.3-59-g8ed1b