It is just a native callout helper function.
Change-Id: I6398b6876f5ba579b76e732107157a4c99337796
* rechain attempt to happen.
* 2) Chain is not setup because the callee has not been created yet. Reset
* the rechain count to a small number and retry in the near future.
- * 3) Ask all other threads to stop before patching this chaining cell.
- * This is required because another thread may have passed the class check
- * but hasn't reached the chaining cell yet to follow the chain. If we
- * patch the content before halting the other thread, there could be a
- * small window for race conditions to happen that it may follow the new
- * but wrong chain to invoke a different method.
+ * 3) Enqueue the new content for the chaining cell which will be appled in
+ * next safe point.
*/
const Method *dvmJitToPatchPredictedChain(const Method *method,
InterpState *interpState,
bool dvmInterpHandleFillArrayData(ArrayObject* arrayObject,// OP_FILL_ARRAY_DATA
const u2* arrayData);
+/* Originally declared in compiler/codegen/arm/Assemble.c */
+const Method *dvmJitToPatchPredictedChain(const Method *method,
+ InterpState *interpState,
+ PredictedChainingCell *cell,
+ const ClassObject *clazz);
+
/*
* Switch dispatch offset calculation for OP_PACKED_SWITCH & OP_SPARSE_SWITCH
* Used in CodegenDriver.c
* 0x426a99b8 : ldr r0, [r7, #44] --> r0 <- this->class->vtable[methodIdx]
* 0x426a99ba : cmp r1, #0 --> compare r1 (rechain count) against 0
* 0x426a99bc : bgt 0x426a99c2 --> >=0? don't rechain
- * 0x426a99be : ldr r7, [r6, #96] --+ dvmJitToPatchPredictedChain
+ * 0x426a99be : ldr r7, [pc, #off]--+ dvmJitToPatchPredictedChain
* 0x426a99c0 : blx r7 --+
* 0x426a99c2 : add r1, pc, #12 --> r1 <- &retChainingCell
* 0x426a99c4 : blx_1 0x426a9098 --+ TEMPLATE_INVOKE_METHOD_NO_OPT
/* Check if rechain limit is reached */
ArmLIR *bypassRechaining = genCmpImmBranch(cUnit, kArmCondGt, r1, 0);
- loadWordDisp(cUnit, rGLUE, offsetof(InterpState,
- jitToInterpEntries.dvmJitToPatchPredictedChain), r7);
+ LOAD_FUNC_ADDR(cUnit, r7, (int) dvmJitToPatchPredictedChain);
genRegCopy(cUnit, r1, rGLUE);
* 0x47357e6e : mov r1, r8 --> r1 <- &retChainingCell
* 0x47357e70 : cmp r1, #0 --> compare against 0
* 0x47357e72 : bgt 0x47357e7c --> >=0? don't rechain
- * 0x47357e74 : ldr r7, [r6, #108] --+
+ * 0x47357e74 : ldr r7, [pc, #off] --+
* 0x47357e76 : mov r2, r9 | dvmJitToPatchPredictedChain
* 0x47357e78 : mov r3, r10 |
* 0x47357e7a : blx r7 --+
ArmLIR *bypassRechaining = genCmpImmBranch(cUnit, kArmCondGt,
r1, 0);
- loadWordDisp(cUnit, rGLUE, offsetof(InterpState,
- jitToInterpEntries.dvmJitToPatchPredictedChain), r7);
+ LOAD_FUNC_ADDR(cUnit, r7, (int) dvmJitToPatchPredictedChain);
genRegCopy(cUnit, r1, rGLUE);
genRegCopy(cUnit, r2, r9);
* rechain attempt to happen.
* 2) Chain is not setup because the callee has not been created yet. Reset
* the rechain count to a small number and retry in the near future.
- * 3) Ask all other threads to stop before patching this chaining cell.
- * This is required because another thread may have passed the class check
- * but hasn't reached the chaining cell yet to follow the chain. If we
- * patch the content before halting the other thread, there could be a
- * small window for race conditions to happen that it may follow the new
- * but wrong chain to invoke a different method.
+ * 3) Enqueue the new content for the chaining cell which will be appled in
+ * next safe point.
*/
const Method *dvmJitToPatchPredictedChain(const Method *method,
InterpState *interpState,
extern void dvmJitToInterpSingleStep();
extern void dvmJitToInterpTraceSelectNoChain();
extern void dvmJitToInterpTraceSelect();
- extern void dvmJitToPatchPredictedChain();
#if defined(WITH_SELF_VERIFICATION)
extern void dvmJitToInterpBackwardBranch();
#endif
dvmJitToInterpSingleStep,
dvmJitToInterpTraceSelectNoChain,
dvmJitToInterpTraceSelect,
- dvmJitToPatchPredictedChain,
#if defined(WITH_SELF_VERIFICATION)
dvmJitToInterpBackwardBranch,
#endif
void *dvmJitToInterpSingleStep;
void *dvmJitToInterpTraceSelectNoChain;
void *dvmJitToInterpTraceSelect;
- void *dvmJitToPatchPredictedChain;
#if defined(WITH_SELF_VERIFICATION)
void *dvmJitToInterpBackwardBranch;
#endif