Home | History | Annotate | Download | only in mips
      1 %default {"volatile":"0"}
      2 %verify "executed"
      3 %verify "null object"
      4 %verify "field already resolved"
      5 %verify "field not yet resolved"
      6 %verify "field cannot be resolved"
      7     /*
      8      * Wide 32-bit instance field get.
      9      */
     10     # iget-wide vA, vB, field              /* CCCC */
     11     GET_OPB(a0)                            #  a0 <- B
     12     LOAD_rSELF_methodClassDex(a3)          #  a3 <- DvmDex
     13     FETCH(a1, 1)                           #  a1 <- field ref CCCC
     14     LOAD_base_offDvmDex_pResFields(a2, a3) #  a2 <- pResFields
     15     GET_VREG(rOBJ, a0)                     #  rOBJ <- fp[B], the object pointer
     16     LOAD_eas2(a0, a2, a1)                  #  a0 <- resolved InstField ptr
     17     # is resolved entry null?
     18     bnez      a0, .L${opcode}_finish       #  no, already resolved
     19     LOAD_rSELF_method(a2)                  #  a2 <- current method
     20     EXPORT_PC()                            #  resolve() could throw
     21     LOAD_base_offMethod_clazz(a0, a2)      #  a0 <- method->clazz
     22     JAL(dvmResolveInstField)               #  v0 <- resolved InstField ptr
     23     # test return code
     24     move      a0, v0
     25     bnez      v0, .L${opcode}_finish
     26     b         common_exceptionThrown
     27 %break
     28 
     29     /*
     30      * Currently:
     31      *  a0   holds resolved field
     32      *  rOBJ holds object
     33      */
     34 .L${opcode}_finish:
     35     LOAD_base_offInstField_byteOffset(a3, a0) #  a3 <- byte offset of field
     36     beqz      rOBJ, common_errNullObject   #  object was null
     37     GET_OPA4(a2)                           #  a2 <- A+
     38     addu      rOBJ, rOBJ, a3               #  form address
     39     .if $volatile
     40     vLOAD64(a0, a1, rOBJ)                  #  a0/a1 <- obj.field (64-bit align ok)
     41     .else
     42     LOAD64(a0, a1, rOBJ)                   #  a0/a1 <- obj.field (64-bit align ok)
     43     .endif
     44     FETCH_ADVANCE_INST(2)                  #  advance rPC, load rINST
     45     EAS2(a3, rFP, a2)                      #  a3 <- &fp[A]
     46     GET_INST_OPCODE(t0)                    #  extract opcode from rINST
     47     STORE64(a0, a1, a3)                    #  fp[A] <- a0/a1
     48     GOTO_OPCODE(t0)                        #  jump to next instruction
     49 
     50