OSDN Git Service

Jit: Make debugging mode aware of inlineExecute/moveResult optimization
authorBill Buzbee <buzbee@google.com>
Thu, 11 Mar 2010 19:12:15 +0000 (11:12 -0800)
committerBill Buzbee <buzbee@google.com>
Thu, 11 Mar 2010 19:12:15 +0000 (11:12 -0800)
The Jit has a mode in which selected opcodes can be handled normally
or single-stepped in the interpter.  This was broken for cases in
which the Jit applied an optimization to fold inlineExecute/moveResult
intruction pairs into a single operation and the debug mode was set
to handle the two opcodes differently.

Change-Id: Ifa436d4ba66ba0c13ea366c0956e6cf92ce9cdfd

vm/compiler/codegen/arm/CodegenDriver.c

index 21a52d8..58c3e79 100644 (file)
@@ -1226,6 +1226,10 @@ static void genInterpSingleStep(CompilationUnit *cUnit, MIR *mir)
     int flagsToCheck = kInstrCanBranch | kInstrCanSwitch | kInstrCanReturn |
                        kInstrCanThrow;
 
+    //If already optimized out, just ignore
+    if (mir->dalvikInsn.opCode == OP_NOP)
+        return;
+
     //Ugly, but necessary.  Flush all Dalvik regs so Interp can find them
     dvmCompilerFlushAllRegs(cUnit);