OSDN Git Service

Dalvik fast interpreter support and JIT implementation
[android-x86/dalvik.git] / vm / mterp / mips / OP_ARRAY_LENGTH.S
1 %verify "executed"
2     /*
3      * Return the length of an array.
4      */
5     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_offArrayObject_length(a3, a0) #  a3 <- array length
12     GET_INST_OPCODE(t0)                    #  extract opcode from rINST
13     SET_VREG_GOTO(a3, a2, t0)              #  vA <- length