1 %verify "executed" 2 %verify "unknown method" 3 /* 4 * Handle a "super" method call. 5 */ 6 /* invoke-super/jumbo {vCCCC..v(CCCC+BBBB-1)}, meth@AAAAAAAA */ 7 FETCH(r10, 4) @ r10<- CCCC 8 ldr r3, [rSELF, #offThread_methodClassDex] @ r3<- pDvmDex 9 FETCH(r0, 1) @ r1<- aaaa (lo) 10 FETCH(r1, 2) @ r1<- AAAA (hi) 11 ldr r3, [r3, #offDvmDex_pResMethods] @ r3<- pDvmDex->pResMethods 12 orr r1, r0, r1, lsl #16 @ r1<- AAAAaaaa 13 GET_VREG(r9, r10) @ r9<- "this" ptr 14 ldr r0, [r3, r1, lsl #2] @ r0<- resolved baseMethod 15 cmp r9, #0 @ null "this"? 16 ldr r10, [rSELF, #offThread_method] @ r10<- current method 17 beq common_errNullObject @ null "this", throw exception 18 cmp r0, #0 @ already resolved? 19 ldr r10, [r10, #offMethod_clazz] @ r10<- method->clazz 20 EXPORT_PC() @ must export for invoke 21 bne .L${opcode}_continue @ resolved, continue on 22 b .L${opcode}_resolve @ do resolve now 23 %break 24 25 /* 26 * At this point: 27 * r0 = resolved base method 28 * r10 = method->clazz 29 */ 30 .L${opcode}_continue: 31 ldr r1, [r10, #offClassObject_super] @ r1<- method->clazz->super 32 ldrh r2, [r0, #offMethod_methodIndex] @ r2<- baseMethod->methodIndex 33 ldr r3, [r1, #offClassObject_vtableCount] @ r3<- super->vtableCount 34 EXPORT_PC() @ must export for invoke 35 cmp r2, r3 @ compare (methodIndex, vtableCount) 36 bcs .L${opcode}_nsm @ method not present in superclass 37 ldr r1, [r1, #offClassObject_vtable] @ r1<- ...clazz->super->vtable 38 ldr r0, [r1, r2, lsl #2] @ r3<- vtable[methodIndex] 39 bl common_invokeMethodJumbo @ (r0=method, r9="this") 40 41 .L${opcode}_resolve: 42 mov r0, r10 @ r0<- method->clazz 43 mov r2, #METHOD_VIRTUAL @ resolver method type 44 bl dvmResolveMethod @ r0<- call(clazz, ref, flags) 45 cmp r0, #0 @ got null? 46 bne .L${opcode}_continue @ no, continue 47 b common_exceptionThrown @ yes, handle exception 48 49 /* 50 * Throw a NoSuchMethodError with the method name as the message. 51 * r0 = resolved base method 52 */ 53 .L${opcode}_nsm: 54 ldr r1, [r0, #offMethod_name] @ r1<- method name 55 b common_errNoSuchMethod 56