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      * SPUT object handler.
      7      */
      8     /* op vAA, field@BBBB */
      9     movl      rSELF,%ecx
     10     movzwl    2(rPC),%eax                        # eax<- field ref BBBB
     11     movl      offThread_methodClassDex(%ecx),%ecx  # ecx<- DvmDex
     12     movl      offDvmDex_pResFields(%ecx),%ecx    # ecx<- dvmDex->pResFields
     13 #if defined(WITH_JIT)
     14     movl      %ecx, TMP_SPILL1(%ebp)
     15     lea       (%ecx,%eax,4),%ecx
     16     movl      %ecx, TMP_SPILL2(%ebp)
     17     movl      TMP_SPILL1(%ebp), %ecx
     18 #endif
     19     movl      (%ecx,%eax,4),%eax                 # eax<- resolved StaticField
     20     testl     %eax,%eax                          # resolved entry null?
     21     je        .L${opcode}_resolve                # if not, make it so
     22 .L${opcode}_finish:                              # field ptr in eax
     23     movzbl    rINSTbl,%ecx                       # ecx<- AA
     24     GET_VREG_R  %ecx %ecx
     25     movl      %ecx,offStaticField_value(%eax)    # do the store
     26     testl     %ecx,%ecx                          # stored null object ptr?
     27     je        1f                                 # skip card mark if null
     28     movl      rSELF,%ecx
     29     movl      offField_clazz(%eax),%eax          # eax<- method->clazz
     30     movl      offThread_cardTable(%ecx),%ecx       # get card table base
     31     shrl      $$GC_CARD_SHIFT,%eax               # head to card number
     32     movb      %cl,(%ecx,%eax)                    # mark card
     33 1:
     34     FETCH_INST_OPCODE 2 %ecx
     35     ADVANCE_PC 2
     36     GOTO_NEXT_R %ecx
     37 
     38 .L${opcode}_resolve:
     39     movl     rSELF,%ecx
     40     movzwl   2(rPC),%eax                        # eax<- field ref BBBB
     41     movl     offThread_method(%ecx),%ecx          # ecx<- current method
     42     EXPORT_PC                                   # could throw, need to export
     43     movl     offMethod_clazz(%ecx),%ecx         # ecx<- method->clazz
     44     movl     %eax,OUT_ARG1(%esp)
     45     movl     %ecx,OUT_ARG0(%esp)
     46     SPILL(rIBASE)
     47     call     dvmResolveStaticField              # eax<- resolved StaticField ptr
     48     UNSPILL(rIBASE)
     49     testl    %eax,%eax
     50     je      common_exceptionThrown             # no, handle exception
     51 #if defined(WITH_JIT)
     52     movl      TMP_SPILL2(%ebp), %ecx
     53     SPILL(rIBASE)
     54     call     common_verifyField
     55     UNSPILL(rIBASE)
     56 #endif
     57     jmp      .L${opcode}_finish                 # success, continue
     58