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 movzwl 4(rPC),%eax # eax<- FEDC or CCCC 13 movl rSELF,%ecx 14 .if (!$isrange) 15 andl $$0xf,%eax # eax<- C (or stays CCCC) 16 .endif 17 GET_VREG_R %eax %eax # eax<- "this" 18 EXPORT_PC 19 testl %eax,%eax # null this? 20 je common_errNullObject # yes, fail 21 movl offObject_clazz(%eax),%eax# eax<- thisPtr->clazz 22 movl %eax,OUT_ARG0(%esp) # arg0<- class 23 movl offThread_methodClassDex(%ecx),%eax # eax<- methodClassDex 24 movl offThread_method(%ecx),%ecx # ecx<- method 25 movl %eax,OUT_ARG3(%esp) # arg3<- dex 26 movzwl 2(rPC),%eax # eax<- BBBB 27 movl %ecx,OUT_ARG2(%esp) # arg2<- method 28 movl %eax,OUT_ARG1(%esp) # arg1<- BBBB 29 call dvmFindInterfaceMethodInCache # eax<- call(class, ref, method, dex) 30 testl %eax,%eax 31 je common_exceptionThrown 32 jmp common_invokeMethod${routine} 33