OSDN Git Service

JIT: Correct conversion of cb[n]z to cmp/cond_br pair
authorbuzbee <buzbee@google.com>
Tue, 10 Aug 2010 22:50:34 +0000 (15:50 -0700)
committerbuzbee <buzbee@google.com>
Tue, 10 Aug 2010 22:58:32 +0000 (15:58 -0700)
This fixes the regression introduced in the fast assembly retry
that was causing excessive bailouts.  The good news is that with
this fix, we're seeing a ~5% boost in Linpack because of the
cb[n]z usage.

Change-Id: Ib4a48dcba809af4343456eae49a90b4a1e3aee9d

vm/compiler/codegen/arm/Assemble.c

index 226a942..4f54f1e 100644 (file)
@@ -985,7 +985,7 @@ static AssemblerStatus assembleInstructions(CompilationUnit *cUnit,
                 dvmCompilerInsertLIRAfter((LIR *)lir, (LIR *)newInst);
                 /* Convert the cb[n]z to a cmp rx, #0 ] */
                 lir->opCode = kThumbCmpRI8;
-                lir->operands[0] = lir->operands[1];
+                /* operand[0] is src1 in both cb[n]z & CmpRI8 */
                 lir->operands[1] = 0;
                 lir->generic.target = 0;
                 dvmCompilerSetupResourceMasks(lir);