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 GET_GLUE(%ecx) 14 .if (!$isrange) 15 andl $$0xf,%eax # eax<- C (or stays CCCC) 16 .endif 17 GET_VREG(%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 offGlue_methodClassDex(%ecx),%eax # eax<- methodClassDex 24 movl offGlue_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 SPILL(rPC) 30 jmp .L${opcode}_continue 31%break 32 33.L${opcode}_continue: 34 call dvmFindInterfaceMethodInCache # eax<- call(class, ref, method, dex) 35 UNSPILL(rPC) 36 testl %eax,%eax 37 je common_exceptionThrown 38 jmp common_invokeMethod${routine} 39 40