1 %default { "chaintgt" : ".LinvokeChain" }
3 * For polymorphic callsite, check whether the cached class pointer matches
4 * the current one. If so setup the Dalvik frame and return to the
5 * Thumb code through the link register to transfer control to the callee
6 * method through a dedicated chaining cell.
8 * The predicted chaining cell is declared in ArmLIR.h with the
11 * typedef struct PredictedChainingCell {
14 * const ClassObject *clazz;
15 * const Method *method;
17 * } PredictedChainingCell;
19 * Upon returning to the callsite:
20 * - lr : to branch to the chaining cell
21 * - lr+8 : to punt to the interpreter
22 * - lr+16: to fully resolve the callee and may rechain.
25 # a0 = this, a1 = returnCell, a2 = predictedChainCell, rPC = dalvikCallsite
26 lw a3, offObject_clazz(a0) # a3 <- this->class
27 lw rIBASE, 8(a2) # t0 <- predictedChainCell->clazz
28 lw a0, 12(a2) # a0 <- predictedChainCell->method
29 lw t1, offThread_icRechainCount(rSELF) # t1 <- shared rechainCount
31 #if defined(WITH_JIT_TUNING)
32 la rINST, .LdvmICHitCount
42 beq a3, rIBASE, $chaintgt # branch if predicted chain is valid
43 lw rINST, offClassObject_vtable(a3) # rINST <- this->class->vtable
44 beqz rIBASE, 2f # initialized class or not
45 sub a1, t1, 1 # count--
46 sw a1, offThread_icRechainCount(rSELF) # write back to InterpState
51 add ra, ra, 16 # return to fully-resolve landing pad
54 * a2 <- &predictedChainCell
57 * rINST <- this->class->vtable