Home | History | Annotate | Download | only in mips
      1 %default {"volatile":"0"}
      2 %verify "executed"
      3 %verify "field already resolved"
      4 %verify "field not yet resolved"
      5 %verify "field cannot be resolved"
      6     /*
      7      * 64-bit SGET handler.
      8      */
      9     # sget-wide vAA, field                 /* BBBB */
     10     LOAD_rSELF_methodClassDex(a2)          #  a2 <- DvmDex
     11     FETCH(a1, 1)                           #  a1 <- field ref BBBB
     12     LOAD_base_offDvmDex_pResFields(rBIX, a2) #  rBIX <- dvmDex->pResFields
     13     LOAD_eas2(a0, rBIX, a1)                #  a0 <- resolved StaticField ptr
     14     # is resolved entry null?
     15     bnez      a0, .L${opcode}_finish
     16 
     17     /*
     18      * Continuation if the field has not yet been resolved.
     19      *  a1:  BBBB field ref
     20      *  rBIX: dvmDex->pResFields
     21      *
     22      * Returns StaticField pointer in v0.
     23      */
     24     LOAD_rSELF_method(a2)                  #  a2 <- current method
     25 #if defined(WITH_JIT)
     26     EAS2(rBIX, rBIX, a1)                   #  rBIX<- &dvmDex->pResFields[field]
     27 #endif
     28     EXPORT_PC()                            #  resolve() could throw, so export now
     29     LOAD_base_offMethod_clazz(a0, a2)      #  a0 <- method->clazz
     30     JAL(dvmResolveStaticField)             #  v0 <- resolved StaticField ptr
     31     move      a0, v0
     32     # success?
     33     beqz      v0, common_exceptionThrown   #  no, handle exception
     34 #if defined(WITH_JIT)
     35     /*
     36      * If the JIT is actively building a trace we need to make sure
     37      * that the field is fully resolved before including this instruction.
     38      */
     39     JAL(common_verifyField)
     40 #endif
     41 
     42     b        .L${opcode}_finish            # resume
     43 %break
     44 
     45 .L${opcode}_finish:
     46     GET_OPA(a1)                            #  a1 <- AA
     47     .if $volatile
     48     vLOAD64_off(a2, a3, a0, offStaticField_value) #  a2/a3 <- field value (aligned)
     49     .else
     50     LOAD64_off(a2, a3, a0, offStaticField_value) #  a2/a3 <- field value (aligned)
     51     .endif
     52     FETCH_ADVANCE_INST(2)                  #  advance rPC, load rINST
     53     EAS2(a1, rFP, a1)                      #  a1 <- &fp[AA]
     54     STORE64(a2, a3, a1)                    #  vAA/vAA+1 <- a2/a3
     55     GET_INST_OPCODE(t0)                    #  extract opcode from rINST
     56     GOTO_OPCODE(t0)                        #  jump to next instruction
     57 
     58 
     59