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     movl      rSELF,%ecx
     12     movzwl    2(rPC),%eax                        # eax<- field ref BBBB
     13     movl      offThread_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     GET_VREG_WORD %ecx rINST 0                  # rINST<- lsw
     20     GET_VREG_WORD rINST rINST 1                 # ecx<- msw
     21     movl      %ecx,offStaticField_value(%eax)
     22     FETCH_INST_OPCODE 2 %ecx
     23     movl      rINST,4+offStaticField_value(%eax)
     24     ADVANCE_PC 2
     25     GOTO_NEXT_R %ecx
     26 
     27     /*
     28      * Go resolve the field
     29      */
     30 .L${opcode}_resolve:
     31     movl     rSELF,%ecx
     32     movzwl   2(rPC),%eax                        # eax<- field ref BBBB
     33     movl     offThread_method(%ecx),%ecx          # ecx<- current method
     34     EXPORT_PC                                   # could throw, need to export
     35     movl     offMethod_clazz(%ecx),%ecx         # ecx<- method->clazz
     36     movl     %eax,OUT_ARG1(%esp)
     37     movl     %ecx,OUT_ARG0(%esp)
     38     SPILL(rIBASE)
     39     call     dvmResolveStaticField              # eax<- resolved StaticField ptr
     40     UNSPILL(rIBASE)
     41     testl    %eax,%eax
     42     jne      .L${opcode}_finish                 # success, continue
     43     jmp      common_exceptionThrown             # no, handle exception
     44