• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1    /*
2     * Array get, 64 bits.  vAA <- vBB[vCC].
3     *
4     */
5    /* aget-wide vAA, vBB, vCC */
6    FETCH w0, 1                         // w0<- CCBB
7    lsr     w4, wINST, #8               // w4<- AA
8    and     w2, w0, #255                // w2<- BB
9    lsr     w3, w0, #8                  // w3<- CC
10    GET_VREG w0, w2                     // w0<- vBB (array object)
11    GET_VREG w1, w3                     // w1<- vCC (requested index)
12    cbz     w0, common_errNullObject        // yes, bail
13    ldr     w3, [x0, #MIRROR_ARRAY_LENGTH_OFFSET]    // w3<- arrayObj->length
14    add     x0, x0, w1, lsl #3          // w0<- arrayObj + index*width
15    cmp     w1, w3                      // compare unsigned index, length
16    bcs     common_errArrayIndex        // index >= length, bail
17    FETCH_ADVANCE_INST 2                // advance rPC, load wINST
18    ldr     x2, [x0, #MIRROR_WIDE_ARRAY_DATA_OFFSET]  // x2<- vBB[vCC]
19    GET_INST_OPCODE ip                  // extract opcode from wINST
20    SET_VREG_WIDE x2, w4
21    GOTO_OPCODE ip                      // jump to next instruction
22