Home | History | Annotate | Download | only in mips
      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      * Jumbo 32-bit SPUT handler.
      8      *
      9      * for: sput/jumbo, sput-boolean/jumbo, sput-byte/jumbo, sput-char/jumbo,
     10      *      sput-short/jumbo
     11      */
     12     /* exop vBBBB, field@AAAAAAAA */
     13     LOAD_rSELF_methodClassDex(a2)          #  a2 <- DvmDex
     14     FETCH(a0, 1)                           # a0<- aaaa (lo)
     15     FETCH(a1, 2)                           # a1<- AAAA (hi)
     16     LOAD_base_offDvmDex_pResFields(rBIX, a2) #  rBIX <- dvmDex->pResFields
     17     sll       a1,a1,16
     18     or        a1, a0, a1                   # a1<- AAAAaaaa
     19     LOAD_eas2(a0, rBIX, a1)                #  a0 <- resolved StaticField ptr
     20     bnez      a0, .L${opcode}_finish       #  is resolved entry null?
     21 
     22     /*
     23      * Continuation if the field has not yet been resolved.
     24      *  a1:  AAAAAAAA field ref
     25      *  rBIX: dvmDex->pResFields
     26      */
     27     LOAD_rSELF_method(a2)                  #  a2 <- current method
     28 #if defined(WITH_JIT)
     29     EAS2(rBIX, rBIX, a1)                   #  rBIX<- &dvmDex->pResFields[field]
     30 #endif
     31     EXPORT_PC()                            #  resolve() may throw, so export now
     32     LOAD_base_offMethod_clazz(a0, a2)      #  a0 <- method->clazz
     33     JAL(dvmResolveStaticField)             #  v0 <- resolved StaticField ptr
     34     move      a0, v0
     35     beqz      v0, common_exceptionThrown   #  success? no, handle exception
     36 #if defined(WITH_JIT)
     37     /*
     38      * If the JIT is actively building a trace we need to make sure
     39      * that the field is fully resolved before including this instruction.
     40      */
     41     JAL(common_verifyField)
     42 #endif
     43     b        .L${opcode}_finish            # resume
     44 %break
     45 
     46 .L${opcode}_finish:
     47     # field ptr in a0
     48     FETCH(a2, 3)                           # a2<- BBBB
     49     FETCH_ADVANCE_INST(4)                  #  advance rPC, load rINST
     50     GET_VREG(a1, a2)                       #  a1 <- fp[BBBB]
     51     GET_INST_OPCODE(t0)                    #  extract opcode from rINST
     52     $prebarrier                            #  releasing store
     53     sw        a1, offStaticField_value(a0) #  field <- vBBBB
     54     $postbarrier
     55     GOTO_OPCODE(t0)                        #  jump to next instruction
     56