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