Home | History | Annotate | Download | only in armv5te
      1 %default { "postbarrier":"@ no-op ", "prebarrier":"@ no-op " }
      2 %verify "executed"
      3 %verify "field already resolved"
      4 %verify "field not yet resolved"
      5 %verify "field cannot be resolved"
      6     /*
      7      * 32-bit SPUT handler for objects
      8      *
      9      * for: sput-object, sput-object-volatile
     10      */
     11     /* op vAA, field@BBBB */
     12     ldr     r2, [rSELF, #offThread_methodClassDex]    @ r2<- DvmDex
     13     FETCH(r1, 1)                        @ r1<- field ref BBBB
     14     ldr     r10, [r2, #offDvmDex_pResFields] @ r10<- dvmDex->pResFields
     15     ldr     r0, [r10, r1, lsl #2]        @ r0<- resolved StaticField ptr
     16     cmp     r0, #0                      @ is resolved entry null?
     17     beq     .L${opcode}_resolve         @ yes, do resolve
     18 .L${opcode}_finish:   @ field ptr in r0
     19     mov     r2, rINST, lsr #8           @ r2<- AA
     20     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     21     GET_VREG(r1, r2)                    @ r1<- fp[AA]
     22     ldr     r2, [rSELF, #offThread_cardTable]  @ r2<- card table base
     23     ldr     r9, [r0, #offField_clazz]   @ r9<- field->clazz
     24     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     25     $prebarrier                        @ releasing store
     26     b       .L${opcode}_end
     27 %break
     28 
     29 
     30 .L${opcode}_end:
     31     str     r1, [r0, #offStaticField_value]  @ field<- vAA
     32     $postbarrier
     33     cmp     r1, #0                      @ stored a null object?
     34     strneb  r2, [r2, r9, lsr #GC_CARD_SHIFT]  @ mark card based on obj head
     35     GOTO_OPCODE(ip)                     @ jump to next instruction
     36 
     37     /* Continuation if the field has not yet been resolved.
     38      * r1:  BBBB field ref
     39      * r10: dvmDex->pResFields
     40      */
     41 .L${opcode}_resolve:
     42     ldr     r2, [rSELF, #offThread_method]    @ r2<- current method
     43 #if defined(WITH_JIT)
     44     add     r10, r10, r1, lsl #2        @ r10<- &dvmDex->pResFields[field]
     45 #endif
     46     EXPORT_PC()                         @ resolve() could throw, so export now
     47     ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
     48     bl      dvmResolveStaticField       @ r0<- resolved StaticField ptr
     49     cmp     r0, #0                      @ success?
     50     beq     common_exceptionThrown      @ no, handle exception
     51 #if defined(WITH_JIT)
     52     /*
     53      * If the JIT is actively building a trace we need to make sure
     54      * that the field is fully resolved before including this instruction.
     55      */
     56     bl      common_verifyField
     57 #endif
     58     b       .L${opcode}_finish          @ resume
     59 
     60