• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1%verify "executed"
2%verify "unknown method"
3    /*
4     * Handle a static method call.
5     */
6    /* invoke-static/jumbo {vCCCC..v(CCCC+BBBB-1)}, meth@AAAAAAAA */
7    ldr     r3, [rSELF, #offThread_methodClassDex]    @ r3<- pDvmDex
8    FETCH(r0, 1)                        @ r1<- aaaa (lo)
9    FETCH(r1, 2)                        @ r1<- AAAA (hi)
10    ldr     r3, [r3, #offDvmDex_pResMethods]    @ r3<- pDvmDex->pResMethods
11    orr     r1, r0, r1, lsl #16         @ r1<- AAAAaaaa
12    ldr     r0, [r3, r1, lsl #2]        @ r0<- resolved methodToCall
13#if defined(WITH_JIT)
14    add     r10, r3, r1, lsl #2         @ r10<- &resolved_methodToCall
15#endif
16    cmp     r0, #0                      @ already resolved?
17    EXPORT_PC()                         @ must export for invoke
18    bne     common_invokeMethodJumboNoThis   @ (r0=method)
19    b       .L${opcode}_resolve
20%break
21
22
23.L${opcode}_resolve:
24    ldr     r3, [rSELF, #offThread_method] @ r3<- self->method
25    ldr     r0, [r3, #offMethod_clazz]  @ r0<- method->clazz
26    mov     r2, #METHOD_STATIC          @ resolver method type
27    bl      dvmResolveMethod            @ r0<- call(clazz, ref, flags)
28    cmp     r0, #0                      @ got null?
29#if defined(WITH_JIT)
30    /*
31     * Check to see if we're actively building a trace.  If so,
32     * we need to keep this instruction out of it.
33     * r10: &resolved_methodToCall
34     */
35    ldrh    r2, [rSELF, #offThread_subMode]
36    beq     common_exceptionThrown            @ null, handle exception
37    ands    r2, #kSubModeJitTraceBuild        @ trace under construction?
38    beq     common_invokeMethodJumboNoThis    @ no (r0=method, r9="this")
39    ldr     r1, [r10]                         @ reload resolved method
40    cmp     r1, #0                            @ finished resolving?
41    bne     common_invokeMethodJumboNoThis    @ yes (r0=method, r9="this")
42    mov     r10, r0                           @ preserve method
43    mov     r0, rSELF
44    mov     r1, rPC
45    bl      dvmJitEndTraceSelect              @ (self, pc)
46    mov     r0, r10
47    b       common_invokeMethodJumboNoThis    @ whew, finally!
48#else
49    bne     common_invokeMethodJumboNoThis    @ (r0=method, r9="this")
50    b       common_exceptionThrown            @ yes, handle exception
51#endif
52