blob: ae2fe68322298c1f560927801178377042b0cd29 [file] [log] [blame]
Douglas Leung200f0402016-02-25 20:05:47 -08001 /*
2 * Return the length of an array.
3 */
Alexey Frunze84603bf2016-10-21 19:54:43 -07004 /* array-length vA, vB */
Douglas Leung200f0402016-02-25 20:05:47 -08005 GET_OPB(a1) # a1 <- B
6 GET_OPA4(a2) # a2 <- A+
7 GET_VREG(a0, a1) # a0 <- vB (object ref)
8 # is object null?
9 beqz a0, common_errNullObject # yup, fail
10 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
11 LOAD_base_offMirrorArray_length(a3, a0) # a3 <- array length
12 GET_INST_OPCODE(t0) # extract opcode from rINST
13 SET_VREG_GOTO(a3, a2, t0) # vA <- length