OP_INVOKE_DIRECT_JUMBO.S revision a8b91c52fd8a90b784835dfe1f8898035266c4dd
1%default { "isrange":"0", "routine":"NoRange" }
2%verify "executed"
3%verify "unknown method"
4    /*
5     * Handle a direct method call.
6     *
7     * (We could defer the "is 'this' pointer null" test to the common
8     * method invocation code, and use a flag to indicate that static
9     * calls don't count.  If we do this as part of copying the arguments
10     * out we could avoiding loading the first arg twice.)
11     *
12     */
13     /* invoke-direct/jumbo {vCCCC..v(CCCC+BBBB-1)}, meth@AAAAAAAA */
14    LOAD_rSELF_methodClassDex(a3)          #  a3 <- pDvmDex
15    FETCH(a0, 1)                           # a0<- aaaa (lo)
16    FETCH(a1, 2)                           # a1<- AAAA (hi)
17    LOAD_base_offDvmDex_pResMethods(a3, a3) #  a3 <- pDvmDex->pResMethods
18    sll     a1,a1,16
19    or      a1, a0, a1                     # a1<- AAAAaaaa
20    FETCH(rBIX, 4)                         #  rBIX <- GFED or CCCC
21    LOAD_eas2(a0, a3, a1)                  #  a0 <- resolved methodToCall
22    .if (!$isrange)
23    and       rBIX, rBIX, 15               #  rBIX <- D (or stays CCCC)
24    .endif
25    EXPORT_PC()                            #  must export for invoke
26    GET_VREG(rOBJ, rBIX)                   #  rOBJ <- "this" ptr
27    # already resolved?
28    bnez      a0, 1f                       #  resolved, call the function
29
30    lw        a3, offThread_method(rSELF)  #  a3 <- self->method
31    LOAD_base_offMethod_clazz(a0, a3)      #  a0 <- method->clazz
32    li        a2, METHOD_DIRECT            #  resolver method type
33    JAL(dvmResolveMethod)                  #  v0 <- call(clazz, ref, flags)
34    move      a0, v0
35    # got null?
36    beqz      v0, common_exceptionThrown   #  yes, handle exception
37
381:
39    bnez      rOBJ, common_invokeMethodJumbo #  a0=method, rOBJ="this"
40    b         common_errNullObject         #  yes, throw exception
41
42
43
44