diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/compiler/codegen/GenCommon.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/compiler/codegen/GenCommon.cc b/src/compiler/codegen/GenCommon.cc index 035617e8f3..cc3685c6f6 100644 --- a/src/compiler/codegen/GenCommon.cc +++ b/src/compiler/codegen/GenCommon.cc @@ -1803,8 +1803,9 @@ int lowestSetBit(unsigned int x) { bool handleEasyDivide(CompilationUnit* cUnit, Instruction::Code dalvikOpcode, RegLocation rlSrc, RegLocation rlDest, int lit) { - if (lit < 2) + if ((lit < 2) || ((cUnit->instructionSet != kThumb2) && !isPowerOfTwo(lit))) { return false; + } // No divide instruction for Arm, so check for more special cases if ((cUnit->instructionSet == kThumb2) && !isPowerOfTwo(lit)) { return smallLiteralDivide(cUnit, dalvikOpcode, rlSrc, rlDest, lit); |