1 /* 2 * Return the length of an array. 3 */ 4 srl a1, rINST, 12 # a1 <- B 5 GET_VREG_U a0, a1 # a0 <- vB (object ref) 6 ext a2, rINST, 8, 4 # a2 <- A 7 beqz a0, common_errNullObject # yup, fail 8 FETCH_ADVANCE_INST 1 # advance rPC, load rINST 9 lw a3, MIRROR_ARRAY_LENGTH_OFFSET(a0) # a3 <- array length 10 GET_INST_OPCODE v0 # extract opcode from rINST 11 SET_VREG a3, a2 # vB <- length 12 GOTO_OPCODE v0 # jump to next instruction 13