aboutsummaryrefslogtreecommitdiff
path: root/vm/compiler/codegen/arm/Thumb
diff options
context:
space:
mode:
Diffstat (limited to 'vm/compiler/codegen/arm/Thumb')
-rw-r--r--vm/compiler/codegen/arm/Thumb/Gen.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/vm/compiler/codegen/arm/Thumb/Gen.c b/vm/compiler/codegen/arm/Thumb/Gen.c
index a274e1928..35c4451b7 100644
--- a/vm/compiler/codegen/arm/Thumb/Gen.c
+++ b/vm/compiler/codegen/arm/Thumb/Gen.c
@@ -289,3 +289,12 @@ static bool genInlinedAbsLong(CompilationUnit *cUnit, MIR *mir)
dvmCompilerClobber(cUnit, ophi);
return false;
}
+
+static void genMultiplyByTwoBitMultiplier(CompilationUnit *cUnit,
+ RegLocation rlSrc, RegLocation rlResult, int lit,
+ int firstBit, int secondBit)
+{
+ // We can't implement "add src, src, src, lsl#shift" on Thumb, so we have
+ // to do a regular multiply.
+ opRegRegImm(cUnit, kOpMul, rlResult.lowReg, rlSrc.lowReg, lit);
+}