1%verify "executed" 2%verify "unknown method" 3 /* 4 * Handle a direct method call. 5 * 6 * (We could defer the "is 'this' pointer null" test to the common 7 * method invocation code, and use a flag to indicate that static 8 * calls don't count. If we do this as part of copying the arguments 9 * out we could avoiding loading the first arg twice.) 10 * 11 */ 12 /* invoke-direct/jumbo {vCCCC..v(CCCC+BBBB-1)}, meth@AAAAAAAA */ 13 ldr r3, [rSELF, #offThread_methodClassDex] @ r3<- pDvmDex 14 FETCH(r0, 1) @ r1<- aaaa (lo) 15 FETCH(r1, 2) @ r1<- AAAA (hi) 16 ldr r3, [r3, #offDvmDex_pResMethods] @ r3<- pDvmDex->pResMethods 17 orr r1, r0, r1, lsl #16 @ r1<- AAAAaaaa 18 FETCH(r10, 4) @ r10<- CCCC 19 ldr r0, [r3, r1, lsl #2] @ r0<- resolved methodToCall 20 cmp r0, #0 @ already resolved? 21 EXPORT_PC() @ must export for invoke 22 GET_VREG(r9, r10) @ r9<- "this" ptr 23 beq .L${opcode}_resolve @ not resolved, do it now 24.L${opcode}_finish: 25 cmp r9, #0 @ null "this" ref? 26 bne common_invokeMethodJumbo @ (r0=method, r9="this") 27 b common_errNullObject @ yes, throw exception 28%break 29 30 /* 31 * On entry: 32 * r1 = reference (CCCC) 33 * r10 = "this" register 34 */ 35.L${opcode}_resolve: 36 ldr r3, [rSELF, #offThread_method] @ r3<- self->method 37 ldr r0, [r3, #offMethod_clazz] @ r0<- method->clazz 38 mov r2, #METHOD_DIRECT @ resolver method type 39 bl dvmResolveMethod @ r0<- call(clazz, ref, flags) 40 cmp r0, #0 @ got null? 41 bne .L${opcode}_finish @ no, continue 42 b common_exceptionThrown @ yes, handle exception 43