1 %default { "isrange":"0", "routine":"NoRange" } 2 %verify "executed" 3 %verify "unknown method" 4 %verify "null object" 5 /* 6 * Handle an interface method call. 7 * 8 * for: invoke-interface, invoke-interface/range 9 */ 10 /* op vB, {vD, vE, vF, vG, vA}, class@CCCC */ 11 /* op {vCCCC..v(CCCC+AA-1)}, meth@BBBB */ 12 FETCH(r2, 2) @ r2<- FEDC or CCCC 13 FETCH(r1, 1) @ r1<- BBBB 14 .if (!$isrange) 15 and r2, r2, #15 @ r2<- C (or stays CCCC) 16 .endif 17 EXPORT_PC() @ must export for invoke 18 GET_VREG(r9, r2) @ r9<- first arg ("this") 19 ldr r3, [rSELF, #offThread_methodClassDex] @ r3<- methodClassDex 20 cmp r9, #0 @ null obj? 21 ldr r2, [rSELF, #offThread_method] @ r2<- method 22 beq common_errNullObject @ yes, fail 23 ldr r0, [r9, #offObject_clazz] @ r0<- thisPtr->clazz 24 bl dvmFindInterfaceMethodInCache @ r0<- call(class, ref, method, dex) 25 cmp r0, #0 @ failed? 26 beq common_exceptionThrown @ yes, handle exception 27 b common_invokeMethod${routine} @ (r0=method, r9="this") 28