Home | History | Annotate | Download | only in arm
      1     /*
      2      * Return the length of an array.
      3      */
      4     mov     r1, rINST, lsr #12          @ r1<- B
      5     ubfx    r2, rINST, #8, #4           @ r2<- A
      6     GET_VREG r0, r1                     @ r0<- vB (object ref)
      7     cmp     r0, #0                      @ is object null?
      8     beq     common_errNullObject        @ yup, fail
      9     FETCH_ADVANCE_INST 1                @ advance rPC, load rINST
     10     ldr     r3, [r0, #MIRROR_ARRAY_LENGTH_OFFSET]    @ r3<- array length
     11     GET_INST_OPCODE ip                  @ extract opcode from rINST
     12     SET_VREG r3, r2                     @ vB<- length
     13     GOTO_OPCODE ip                      @ jump to next instruction
     14