1    /*
2     * Array get, 64 bits.  vAA <- vBB[vCC].
3     *
4     */
5    /* aget-wide vAA, vBB, vCC */
6    lbu     a2, 2(rPC)                  # a2 <- BB
7    lbu     a3, 3(rPC)                  # a3 <- CC
8    srl     a4, rINST, 8                # a4 <- AA
9    GET_VREG_U a0, a2                   # a0 <- vBB (array object)
10    GET_VREG a1, a3                     # a1 <- vCC (requested index)
11    beqz    a0, common_errNullObject    # bail if null array object
12    lw      a3, MIRROR_ARRAY_LENGTH_OFFSET(a0)  # a3 <- arrayObj->length
13    dlsa    a0, a1, a0, 3               # a0 <- arrayObj + index*width
14    bgeu    a1, a3, common_errArrayIndex  # unsigned compare: index >= length, bail
15    FETCH_ADVANCE_INST 2                # advance rPC, load rINST
16    lw      a2, MIRROR_WIDE_ARRAY_DATA_OFFSET(a0)
17    lw      a3, (MIRROR_WIDE_ARRAY_DATA_OFFSET+4)(a0)
18    dinsu   a2, a3, 32, 32              # a2 <- vBB[vCC]
19    GET_INST_OPCODE v0                  # extract opcode from rINST
20    SET_VREG_WIDE a2, a4                # vAA <- a2
21    GOTO_OPCODE v0                      # jump to next instruction
22