summaryrefslogtreecommitdiffstats
path: root/vm/compiler/codegen/arm
diff options
context:
space:
mode:
Diffstat (limited to 'vm/compiler/codegen/arm')
-rw-r--r--vm/compiler/codegen/arm/ArchUtility.c7
-rw-r--r--vm/compiler/codegen/arm/CodegenDriver.c13
2 files changed, 18 insertions, 2 deletions
diff --git a/vm/compiler/codegen/arm/ArchUtility.c b/vm/compiler/codegen/arm/ArchUtility.c
index d94b1a7e1..961a2e17e 100644
--- a/vm/compiler/codegen/arm/ArchUtility.c
+++ b/vm/compiler/codegen/arm/ArchUtility.c
@@ -325,10 +325,13 @@ void dvmDumpLIRInsn(LIR *arg, unsigned char *baseAddr)
LOGD("-------- chaining cell (hot): 0x%04x\n", dest);
break;
case kArmPseudoChainingCellInvokePredicted:
- LOGD("-------- chaining cell (predicted)\n");
+ LOGD("-------- chaining cell (predicted): %s%s\n",
+ dest ? ((Method *) dest)->clazz->descriptor : "",
+ dest ? ((Method *) dest)->name : "N/A");
break;
case kArmPseudoChainingCellInvokeSingleton:
- LOGD("-------- chaining cell (invoke singleton): %s/%p\n",
+ LOGD("-------- chaining cell (invoke singleton): %s%s/%p\n",
+ ((Method *)dest)->clazz->descriptor,
((Method *)dest)->name,
((Method *)dest)->insns);
break;
diff --git a/vm/compiler/codegen/arm/CodegenDriver.c b/vm/compiler/codegen/arm/CodegenDriver.c
index 55c06476f..2937cf241 100644
--- a/vm/compiler/codegen/arm/CodegenDriver.c
+++ b/vm/compiler/codegen/arm/CodegenDriver.c
@@ -1187,6 +1187,12 @@ static void genInvokeVirtualCommon(CompilationUnit *cUnit, MIR *mir,
*/
dvmCompilerLockAllTemps(cUnit);
+ /*
+ * For verbose printing, store the method pointer in operands[1] first as
+ * operands[0] will be clobbered in dvmCompilerMIR2LIR.
+ */
+ predChainingCell->operands[1] = (int) mir->meta.callsiteInfo->method;
+
/* "this" is already left in r0 by genProcessArgs* */
/* r4PC = dalvikCallsite */
@@ -4234,6 +4240,13 @@ void dvmCompilerMIR2LIR(CompilationUnit *cUnit)
case kChainingCellInvokePredicted:
labelList[i].opcode =
kArmPseudoChainingCellInvokePredicted;
+ /*
+ * Move the cached method pointer from operand 1 to 0.
+ * Operand 0 was clobbered earlier in this routine to store
+ * the block starting offset, which is not applicable to
+ * predicted chaining cell.
+ */
+ labelList[i].operands[0] = labelList[i].operands[1];
/* handle the codegen later */
dvmInsertGrowableList(
&chainingListByType[kChainingCellInvokePredicted], i);