189c1feb0a69a7707b271086e749975b3f7acacf7The Android Open Source Project%default { "routine":"NoRange","isrange":"0" } 289c1feb0a69a7707b271086e749975b3f7acacf7The Android Open Source Project%verify "executed" 389c1feb0a69a7707b271086e749975b3f7acacf7The Android Open Source Project%verify "unknown method" 489c1feb0a69a7707b271086e749975b3f7acacf7The Android Open Source Project /* 589c1feb0a69a7707b271086e749975b3f7acacf7The Android Open Source Project * Handle a static method call. 689c1feb0a69a7707b271086e749975b3f7acacf7The Android Open Source Project * 789c1feb0a69a7707b271086e749975b3f7acacf7The Android Open Source Project * for: invoke-static, invoke-static/range 889c1feb0a69a7707b271086e749975b3f7acacf7The Android Open Source Project */ 989c1feb0a69a7707b271086e749975b3f7acacf7The Android Open Source Project /* op vB, {vD, vE, vF, vG, vA}, class@CCCC */ 1089c1feb0a69a7707b271086e749975b3f7acacf7The Android Open Source Project /* op {vCCCC..v(CCCC+AA-1)}, meth@BBBB */ 119f601a917c8878204482c37aec7005054b6776fabuzbee movl rSELF,%ecx 1289c1feb0a69a7707b271086e749975b3f7acacf7The Android Open Source Project movzwl 2(rPC),%eax # eax<- BBBB 139f601a917c8878204482c37aec7005054b6776fabuzbee movl offThread_methodClassDex(%ecx),%ecx # ecx<- pDvmDex 14f3e177289ac078f18401cfd8eebafe584dd0d01fbuzbee EXPORT_PC 1589c1feb0a69a7707b271086e749975b3f7acacf7The Android Open Source Project movl offDvmDex_pResMethods(%ecx),%ecx # ecx<- pDvmDex->pResMethods 160c2dc522d0e120f346cf0a40c8cf0c93346131c2Dong-Yuan Chen#if defined(WITH_JIT) 170c2dc522d0e120f346cf0a40c8cf0c93346131c2Dong-Yuan Chen movl %edx, TMP_SPILL1(%ebp) 180c2dc522d0e120f346cf0a40c8cf0c93346131c2Dong-Yuan Chen lea (%ecx,%eax,4), %edx 190c2dc522d0e120f346cf0a40c8cf0c93346131c2Dong-Yuan Chen movl %edx, TMP_SPILL2(%ebp) 200c2dc522d0e120f346cf0a40c8cf0c93346131c2Dong-Yuan Chen movl TMP_SPILL1(%ebp), %edx 210c2dc522d0e120f346cf0a40c8cf0c93346131c2Dong-Yuan Chen#endif 2289c1feb0a69a7707b271086e749975b3f7acacf7The Android Open Source Project movl (%ecx,%eax,4),%eax # eax<- resolved methodToCall 230c2dc522d0e120f346cf0a40c8cf0c93346131c2Dong-Yuan Chen movl $$0, %ecx # make "this" null 2489c1feb0a69a7707b271086e749975b3f7acacf7The Android Open Source Project testl %eax,%eax 25c4080f6bdeda19901a508cc75f96ac7e07903918Johnnie Birch jne common_invokeMethod${routine} 260c2dc522d0e120f346cf0a40c8cf0c93346131c2Dong-Yuan Chen 279f601a917c8878204482c37aec7005054b6776fabuzbee movl rSELF,%ecx 289f601a917c8878204482c37aec7005054b6776fabuzbee movl offThread_method(%ecx),%ecx # ecx<- self->method 2989c1feb0a69a7707b271086e749975b3f7acacf7The Android Open Source Project movzwl 2(rPC),%eax 3089c1feb0a69a7707b271086e749975b3f7acacf7The Android Open Source Project movl offMethod_clazz(%ecx),%ecx# ecx<- method->clazz 3189c1feb0a69a7707b271086e749975b3f7acacf7The Android Open Source Project movl %eax,OUT_ARG1(%esp) # arg1<- BBBB 3289c1feb0a69a7707b271086e749975b3f7acacf7The Android Open Source Project movl %ecx,OUT_ARG0(%esp) # arg0<- clazz 3389c1feb0a69a7707b271086e749975b3f7acacf7The Android Open Source Project movl $$METHOD_STATIC,%eax 3489c1feb0a69a7707b271086e749975b3f7acacf7The Android Open Source Project movl %eax,OUT_ARG2(%esp) # arg2<- flags 350c2dc522d0e120f346cf0a40c8cf0c93346131c2Dong-Yuan Chen SPILL(rIBASE) 3689c1feb0a69a7707b271086e749975b3f7acacf7The Android Open Source Project call dvmResolveMethod # call(clazz,ref,flags) 370c2dc522d0e120f346cf0a40c8cf0c93346131c2Dong-Yuan Chen UNSPILL(rIBASE) 3889c1feb0a69a7707b271086e749975b3f7acacf7The Android Open Source Project testl %eax,%eax # got null? 390c2dc522d0e120f346cf0a40c8cf0c93346131c2Dong-Yuan Chen#if defined(WITH_JIT) 400c2dc522d0e120f346cf0a40c8cf0c93346131c2Dong-Yuan Chen movl TMP_SPILL1(%ebp), %edx 410c2dc522d0e120f346cf0a40c8cf0c93346131c2Dong-Yuan Chen movl rSELF,%ecx 420c2dc522d0e120f346cf0a40c8cf0c93346131c2Dong-Yuan Chen movzwl offThread_subMode(%ecx), %ecx 430c2dc522d0e120f346cf0a40c8cf0c93346131c2Dong-Yuan Chen je common_exceptionThrown # null, handle exception 440c2dc522d0e120f346cf0a40c8cf0c93346131c2Dong-Yuan Chen andl $$kSubModeJitTraceBuild, %ecx # is trace under construction? 450c2dc522d0e120f346cf0a40c8cf0c93346131c2Dong-Yuan Chen movl $$0, %ecx # make "this" null 460c2dc522d0e120f346cf0a40c8cf0c93346131c2Dong-Yuan Chen je common_invokeMethod${routine} # no (%eax=method, %ecx="this") 470c2dc522d0e120f346cf0a40c8cf0c93346131c2Dong-Yuan Chen movl TMP_SPILL2(%ebp), %edx 480c2dc522d0e120f346cf0a40c8cf0c93346131c2Dong-Yuan Chen cmpl $$0, (%edx) # finished resolving 490c2dc522d0e120f346cf0a40c8cf0c93346131c2Dong-Yuan Chen movl TMP_SPILL1(%ebp), %edx 500c2dc522d0e120f346cf0a40c8cf0c93346131c2Dong-Yuan Chen jne common_invokeMethod${routine} # yes (%eax=method, %ecx="this") 510c2dc522d0e120f346cf0a40c8cf0c93346131c2Dong-Yuan Chen movl rSELF, %edx 520c2dc522d0e120f346cf0a40c8cf0c93346131c2Dong-Yuan Chen movl %edx, OUT_ARG0(%esp) 530c2dc522d0e120f346cf0a40c8cf0c93346131c2Dong-Yuan Chen movl rPC, OUT_ARG1(%esp) 540c2dc522d0e120f346cf0a40c8cf0c93346131c2Dong-Yuan Chen movl %eax, TMP_SPILL2(%ebp) 550c2dc522d0e120f346cf0a40c8cf0c93346131c2Dong-Yuan Chen movl %ecx, TMP_SPILL3(%ebp) 560c2dc522d0e120f346cf0a40c8cf0c93346131c2Dong-Yuan Chen SPILL(rIBASE) 570c2dc522d0e120f346cf0a40c8cf0c93346131c2Dong-Yuan Chen call dvmJitEndTraceSelect 580c2dc522d0e120f346cf0a40c8cf0c93346131c2Dong-Yuan Chen UNSPILL(rIBASE) 590c2dc522d0e120f346cf0a40c8cf0c93346131c2Dong-Yuan Chen movl TMP_SPILL1(%ebp), %edx 600c2dc522d0e120f346cf0a40c8cf0c93346131c2Dong-Yuan Chen movl TMP_SPILL2(%ebp), %eax 610c2dc522d0e120f346cf0a40c8cf0c93346131c2Dong-Yuan Chen movl TMP_SPILL3(%ebp), %ecx 620c2dc522d0e120f346cf0a40c8cf0c93346131c2Dong-Yuan Chen jmp common_invokeMethod${routine} 630c2dc522d0e120f346cf0a40c8cf0c93346131c2Dong-Yuan Chen#else 640c2dc522d0e120f346cf0a40c8cf0c93346131c2Dong-Yuan Chen movl $$0, %ecx # make "this" null 65c4080f6bdeda19901a508cc75f96ac7e07903918Johnnie Birch jne common_invokeMethod${routine} 6689c1feb0a69a7707b271086e749975b3f7acacf7The Android Open Source Project jmp common_exceptionThrown 670c2dc522d0e120f346cf0a40c8cf0c93346131c2Dong-Yuan Chen#endif 680c2dc522d0e120f346cf0a40c8cf0c93346131c2Dong-Yuan Chen 69