Home | History | Annotate | Download | only in armv5te
      1     /*
      2      * For polymorphic callsites - setup the Dalvik frame and load Dalvik PC
      3      * into rPC then jump to dvmJitToInterpNoChain to dispatch the
      4      * runtime-resolved callee.
      5      */
      6     @ r0 = methodToCall, r1 = returnCell, rPC = dalvikCallsite
      7     ldrh    r7, [r0, #offMethod_registersSize]  @ r7<- methodToCall->regsSize
      8     ldrh    r2, [r0, #offMethod_outsSize]  @ r2<- methodToCall->outsSize
      9     ldr     r9, [rSELF, #offThread_interpStackEnd]    @ r9<- interpStackEnd
     10     ldrb    r8, [rSELF, #offThread_breakFlags] @ r8<- breakFlags
     11     add     r3, r1, #1  @ Thumb addr is odd
     12     SAVEAREA_FROM_FP(r1, rFP)           @ r1<- stack save area
     13     sub     r1, r1, r7, lsl #2          @ r1<- newFp (old savearea - regsSize)
     14     SAVEAREA_FROM_FP(r10, r1)           @ r10<- stack save area
     15     sub     r10, r10, r2, lsl #2        @ r10<- bottom (newsave - outsSize)
     16     cmp     r10, r9                     @ bottom < interpStackEnd?
     17     bxlo    lr                          @ return to raise stack overflow excep.
     18     @ r1 = newFP, r0 = methodToCall, r3 = returnCell, rPC = dalvikCallsite
     19     ldr     r9, [r0, #offMethod_clazz]      @ r9<- method->clazz
     20     ldr     r10, [r0, #offMethod_accessFlags] @ r10<- methodToCall->accessFlags
     21     str     rPC, [rFP, #(offStackSaveArea_currentPc - sizeofStackSaveArea)]
     22     str     rPC, [r1, #(offStackSaveArea_savedPc - sizeofStackSaveArea)]
     23     ldr     rPC, [r0, #offMethod_insns]     @ rPC<- methodToCall->insns
     24 
     25 
     26     @ set up newSaveArea
     27     str     rFP, [r1, #(offStackSaveArea_prevFrame - sizeofStackSaveArea)]
     28     str     r3, [r1, #(offStackSaveArea_returnAddr - sizeofStackSaveArea)]
     29     str     r0, [r1, #(offStackSaveArea_method - sizeofStackSaveArea)]
     30     cmp     r8, #0                      @ breakFlags != 0
     31     bxne    lr                          @ bail to the interpreter
     32     tst     r10, #ACC_NATIVE
     33 #if !defined(WITH_SELF_VERIFICATION)
     34     bne     .LinvokeNative
     35 #else
     36     bxne    lr                          @ bail to the interpreter
     37 #endif
     38 
     39     ldr     r10, .LdvmJitToInterpTraceSelectNoChain
     40     ldr     r3, [r9, #offClassObject_pDvmDex] @ r3<- method->clazz->pDvmDex
     41 
     42     @ Update "thread" values for the new method
     43     str     r0, [rSELF, #offThread_method]    @ self->method = methodToCall
     44     str     r3, [rSELF, #offThread_methodClassDex] @ self->methodClassDex = ...
     45     mov     rFP, r1                         @ fp = newFp
     46     str     rFP, [rSELF, #offThread_curFrame]  @ curFrame = newFp
     47 #if defined(TEMPLATE_INLINE_PROFILING)
     48     stmfd   sp!, {r0-r3}                    @ preserve r0-r3
     49     mov     r1, r6
     50     @ r0=methodToCall, r1=rSELF
     51     mov     lr, pc
     52     ldr     pc, .LdvmFastMethodTraceEnter
     53     ldmfd   sp!, {r0-r3}                    @ restore r0-r3
     54 #endif
     55 
     56     @ Start executing the callee
     57 #if defined(WITH_JIT_TUNING)
     58     mov     r0, #kInlineCacheMiss
     59 #endif
     60     mov     pc, r10                         @ dvmJitToInterpTraceSelectNoChain
     61