Home | History | Annotate | Download | only in x86
      1 %default { "routine":"NoRange","isrange":"0" }
      2 %verify "executed"
      3 %verify "unknown method"
      4     /*
      5      * Handle a static method call.
      6      *
      7      * for: invoke-static, invoke-static/range
      8      */
      9     /* op vB, {vD, vE, vF, vG, vA}, class@CCCC */
     10     /* op {vCCCC..v(CCCC+AA-1)}, meth@BBBB */
     11     GET_GLUE(%ecx)
     12     movzwl    2(rPC),%eax               # eax<- BBBB
     13     movl      offGlue_methodClassDex(%ecx),%ecx # ecx<- pDvmDex
     14     EXPORT_PC()
     15     movl      offDvmDex_pResMethods(%ecx),%ecx  # ecx<- pDvmDex->pResMethods
     16     movl      (%ecx,%eax,4),%eax        # eax<- resolved methodToCall
     17     testl     %eax,%eax
     18     jne       common_invokeMethod${routine}
     19     GET_GLUE(%ecx)
     20     movl      offGlue_method(%ecx),%ecx # ecx<- glue->method
     21     movzwl    2(rPC),%eax
     22     movl      offMethod_clazz(%ecx),%ecx# ecx<- method->clazz
     23     movl      %eax,OUT_ARG1(%esp)       # arg1<- BBBB
     24     movl      %ecx,OUT_ARG0(%esp)       # arg0<- clazz
     25     jmp       .L${opcode}_continue
     26 %break
     27 
     28 .L${opcode}_continue:
     29     movl      $$METHOD_STATIC,%eax
     30     movl      %eax,OUT_ARG2(%esp)       # arg2<- flags
     31     SPILL(rPC)
     32     call      dvmResolveMethod          # call(clazz,ref,flags)
     33     UNSPILL(rPC)
     34     testl     %eax,%eax                 # got null?
     35     jne       common_invokeMethod${routine}
     36     jmp       common_exceptionThrown
     37 
     38