3 * Store an object into an array. vBB[vCC] <- vAA.
7 FETCH(a0, 1) # a0 <- CCBB
9 and a2, a0, 255 # a2 <- BB
10 srl a3, a0, 8 # a3 <- CC
11 GET_VREG(rINST, a2) # rINST <- vBB (array object)
12 GET_VREG(a1, a3) # a1 <- vCC (requested index)
13 GET_VREG(rBIX, t1) # rBIX <- vAA
15 beqz rINST, common_errNullObject # yes, bail
17 LOAD_base_offArrayObject_length(a3, rINST) # a3 <- arrayObj->length
18 EAS2(rOBJ, rINST, a1) # rOBJ <- arrayObj + index*width
19 # compare unsigned index, length
20 bgeu a1, a3, common_errArrayIndex # index >= length, bail
23 * rINST = vBB (arrayObj)
25 * rOBJ = offset into array (vBB + vCC * width)
27 bnez rBIX, .L${opcode}_checks # yes, skip type checks
29 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
30 GET_INST_OPCODE(t0) # extract opcode from rINST
31 sw rBIX, offArrayObject_contents(rOBJ) # vBB[vCC] <- vAA
32 GOTO_OPCODE(t0) # jump to next instruction
36 LOAD_base_offObject_clazz(a0, rBIX) # a0 <- obj->clazz
37 LOAD_base_offObject_clazz(a1, rINST) # a1 <- arrayObj->clazz
38 JAL(dvmCanPutArrayElement) # test object type vs. array type
39 beqz v0, .L${opcode}_throw # okay ?
40 lw a2, offThread_cardTable(rSELF)
41 srl t1, rINST, GC_CARD_SHIFT
44 b .L${opcode}_finish # yes, skip type checks
46 LOAD_base_offObject_clazz(a0, rBIX) # a0 <- obj->clazz
47 LOAD_base_offObject_clazz(a1, rINST) # a1 <- arrayObj->clazz
49 JAL(dvmThrowArrayStoreExceptionIncompatibleElement)
50 b common_exceptionThrown