Home | History | Annotate | Download | only in x86
      1 %verify "executed"
      2 %verify "field already resolved"
      3 %verify "field not yet resolved"
      4 %verify "field cannot be resolved"
      5     /*
      6      * General 32-bit SPUT handler.
      7      *
      8      * for: sput, sput-object, sput-boolean, sput-byte, sput-char, sput-short
      9      */
     10     /* op vAA, field@BBBB */
     11     GET_GLUE(%ecx)
     12     movzwl    2(rPC),%eax                        # eax<- field ref BBBB
     13     movl      offGlue_methodClassDex(%ecx),%ecx  # ecx<- DvmDex
     14     movl      offDvmDex_pResFields(%ecx),%ecx    # ecx<- dvmDex->pResFields
     15     movl      (%ecx,%eax,4),%eax                 # eax<- resolved StaticField ptr
     16     testl     %eax,%eax                          # resolved entry null?
     17     je        .L${opcode}_resolve                # if not, make it so
     18 .L${opcode}_finish:     # field ptr in eax
     19     movzbl    rINST_HI,%ecx                      # ecx<- AA
     20     GET_VREG_WORD(rINST_FULL,%ecx,0)             # rINST_FULL<- lsw
     21     GET_VREG_WORD(%ecx,%ecx,1)                   # ecx<- msw
     22     movl      rINST_FULL,offStaticField_value(%eax)
     23     FETCH_INST_WORD(2)
     24     ADVANCE_PC(2)
     25     movl      %ecx,4+offStaticField_value(%eax)
     26     GOTO_NEXT
     27 %break
     28 
     29     /*
     30      * Go resolve the field
     31      */
     32 .L${opcode}_resolve:
     33     GET_GLUE(%ecx)
     34     movzwl   2(rPC),%eax                        # eax<- field ref BBBB
     35     movl     offGlue_method(%ecx),%ecx          # ecx<- current method
     36     EXPORT_PC()                                 # could throw, need to export
     37     movl     offMethod_clazz(%ecx),%ecx         # ecx<- method->clazz
     38     SPILL(rPC)
     39     movl     %eax,OUT_ARG1(%esp)
     40     movl     %ecx,OUT_ARG0(%esp)
     41     call     dvmResolveStaticField              # eax<- resolved StaticField ptr
     42     UNSPILL(rPC)
     43     testl    %eax,%eax
     44     jne      .L${opcode}_finish                 # success, continue
     45     jmp      common_exceptionThrown             # no, handle exception
     46