diff options
author | Bill Buzbee <buzbee@google.com> | 2010-01-14 14:27:52 -0800 |
---|---|---|
committer | Bill Buzbee <buzbee@google.com> | 2010-01-14 14:27:52 -0800 |
commit | 51ecf60dca9f98eeda1818814de6a344e197802f (patch) | |
tree | 65aa291408907e97d58ebec2612816b9b53335d1 /vm/compiler/codegen/arm/CodegenDriver.c | |
parent | 5f8a5fc4ee351a7e57a73b1ed0c4ebafe95bab32 (diff) | |
download | android_dalvik-51ecf60dca9f98eeda1818814de6a344e197802f.tar.gz android_dalvik-51ecf60dca9f98eeda1818814de6a344e197802f.tar.bz2 android_dalvik-51ecf60dca9f98eeda1818814de6a344e197802f.zip |
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.c | 9 |
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; } |