aboutsummaryrefslogtreecommitdiff
path: root/vm/compiler/codegen/arm/CodegenDriver.c
diff options
context:
space:
mode:
authorBen Cheng <bccheng@android.com>2010-01-14 14:33:27 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-01-14 14:33:27 -0800
commit8f8347dabe2c7c0cd956c81544d8ca69ac25440d (patch)
treee0c8e17967b8f27ad3789922ecc723b4bf9b62a3 /vm/compiler/codegen/arm/CodegenDriver.c
parent1eed8cdf41e824b72945a85a44d772d230a84040 (diff)
parent51ecf60dca9f98eeda1818814de6a344e197802f (diff)
Merge "Fix bad long negate; bug 2373405 - EnumSetTest failure with JIT today"
Diffstat (limited to 'vm/compiler/codegen/arm/CodegenDriver.c')
-rw-r--r--vm/compiler/codegen/arm/CodegenDriver.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/vm/compiler/codegen/arm/CodegenDriver.c b/vm/compiler/codegen/arm/CodegenDriver.c
index 010e8ca23..d6cb5d6c1 100644
--- a/vm/compiler/codegen/arm/CodegenDriver.c
+++ b/vm/compiler/codegen/arm/CodegenDriver.c
@@ -1048,12 +1048,15 @@ static bool genArithOpLong(CompilationUnit *cUnit, MIR *mir,
secondOp = kOpXor;
break;
case OP_NEG_LONG: {
+ //TUNING: can improve this using Thumb2 code
+ int tReg = allocTemp(cUnit);
rlSrc2 = loadValueWide(cUnit, rlSrc2, kCoreReg);
rlResult = evalLoc(cUnit, rlDest, kCoreReg, true);
- loadConstantValue(cUnit, rlResult.highReg, 0);
+ loadConstantValue(cUnit, tReg, 0);
opRegRegReg(cUnit, kOpSub, rlResult.lowReg,
- rlResult.highReg, rlSrc2.lowReg);
- opRegReg(cUnit, kOpSbc, rlResult.highReg, rlSrc2.highReg);
+ tReg, rlSrc2.lowReg);
+ opRegReg(cUnit, kOpSbc, tReg, rlSrc2.highReg);
+ genRegCopy(cUnit, rlResult.highReg, tReg);
storeValueWide(cUnit, rlDest, rlResult);
return false;
}