OSDN Git Service

Quick compiler: fix CmpLong pair handling
authorbuzbee <buzbee@google.com>
Mon, 7 Apr 2014 19:35:39 +0000 (12:35 -0700)
committerbuzbee <buzbee@google.com>
Mon, 7 Apr 2014 19:35:39 +0000 (12:35 -0700)
OpCmpLong wasn't properly extracting the low register of a
pair.

Change-Id: I6d6cc3de1f543f4316e561648f371f793502fddb

compiler/dex/quick/arm/int_arm.cc

index 1abb91d..54c118d 100644 (file)
@@ -90,8 +90,7 @@ void ArmMir2Lir::OpEndIT(LIR* it) {
  *     neg   rX
  * done:
  */
-void ArmMir2Lir::GenCmpLong(RegLocation rl_dest, RegLocation rl_src1,
-                            RegLocation rl_src2) {
+void ArmMir2Lir::GenCmpLong(RegLocation rl_dest, RegLocation rl_src1, RegLocation rl_src2) {
   LIR* target1;
   LIR* target2;
   rl_src1 = LoadValueWide(rl_src1, kCoreReg);
@@ -101,7 +100,7 @@ void ArmMir2Lir::GenCmpLong(RegLocation rl_dest, RegLocation rl_src1,
   OpRegReg(kOpCmp, rl_src1.reg.GetHigh(), rl_src2.reg.GetHigh());
   LIR* branch1 = OpCondBranch(kCondLt, NULL);
   LIR* branch2 = OpCondBranch(kCondGt, NULL);
-  OpRegRegReg(kOpSub, t_reg, rl_src1.reg, rl_src2.reg);
+  OpRegRegReg(kOpSub, t_reg, rl_src1.reg.GetLow(), rl_src2.reg.GetLow());
   LIR* branch3 = OpCondBranch(kCondEq, NULL);
 
   LIR* it = OpIT(kCondHi, "E");