Home | History | Annotate | Download | only in armv5te
      1 %default { "load":"ldr", "sqnum":"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      * General 32-bit instance field get.
      9      *
     10      * for: iget, iget-object, iget-boolean, iget-byte, iget-char, iget-short
     11      */
     12     /* op vA, vB, field@CCCC */
     13     mov     r0, rINST, lsr #12          @ r0<- B
     14     ldr     r3, [rGLUE, #offGlue_methodClassDex]    @ r3<- DvmDex
     15     FETCH(r1, 1)                        @ r1<- field ref CCCC
     16     ldr     r2, [r3, #offDvmDex_pResFields] @ r2<- pDvmDex->pResFields
     17     GET_VREG(r9, r0)                    @ r9<- fp[B], the object pointer
     18     ldr     r0, [r2, r1, lsl #2]        @ r0<- resolved InstField ptr
     19     cmp     r0, #0                      @ is resolved entry null?
     20     bne     .L${opcode}_finish          @ no, already resolved
     21 8:  ldr     r2, [rGLUE, #offGlue_method]    @ r2<- current method
     22     EXPORT_PC()                         @ resolve() could throw
     23     ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
     24     bl      dvmResolveInstField         @ r0<- resolved InstField ptr
     25     cmp     r0, #0
     26     bne     .L${opcode}_finish
     27     b       common_exceptionThrown
     28 %break
     29 
     30     /*
     31      * Currently:
     32      *  r0 holds resolved field
     33      *  r9 holds object
     34      */
     35 .L${opcode}_finish:
     36     @bl      common_squeak${sqnum}
     37     cmp     r9, #0                      @ check object for null
     38     ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
     39     beq     common_errNullObject        @ object was null
     40     $load   r0, [r9, r3]                @ r0<- obj.field (8/16/32 bits)
     41     mov     r2, rINST, lsr #8           @ r2<- A+
     42     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     43     and     r2, r2, #15                 @ r2<- A
     44     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     45     SET_VREG(r0, r2)                    @ fp[A]<- r0
     46     GOTO_OPCODE(ip)                     @ jump to next instruction
     47 
     48