[Jit] Fix for 3311468 Maps crashed at handleFmt...
Change https://android-git.corp.google.com/g/#change,86452 eliminated unused
chaining cells for direct JNI calls. However, a code path in CodegenDriver.c
assumed all similar invokes would have such cells. Slightly re-arranged the
to avoid relying on the existance of the cell in cases in which it isn't
needed.
Change-Id: Ifc28acf559455a292b4b915ef1302085557e1d81
diff --git a/vm/compiler/codegen/arm/CodegenDriver.c b/vm/compiler/codegen/arm/CodegenDriver.c
index 98236b6..273cef1 100644
--- a/vm/compiler/codegen/arm/CodegenDriver.c
+++ b/vm/compiler/codegen/arm/CodegenDriver.c
@@ -3127,8 +3127,6 @@
static bool handleFmt35ms_3rms(CompilationUnit *cUnit, MIR *mir,
BasicBlock *bb, ArmLIR *labelList)
{
- ArmLIR *retChainingCell = &labelList[bb->fallThrough->id];
- ArmLIR *predChainingCell = &labelList[bb->taken->id];
ArmLIR *pcrLabel = NULL;
/* An invoke with the MIR_INLINED is effectively a no-op */
@@ -3141,6 +3139,8 @@
case OP_INVOKE_VIRTUAL_QUICK_RANGE:
case OP_INVOKE_VIRTUAL_QUICK: {
int methodIndex = dInsn->vB;
+ ArmLIR *retChainingCell = &labelList[bb->fallThrough->id];
+ ArmLIR *predChainingCell = &labelList[bb->taken->id];
/*
* If the invoke has non-null misPredBranchOver, we need to generate