1 %default { "load":"movl", "shift":"4" } 2 %verify "executed" 3 /* 4 * Array get, 32 bits or less. vAA <- vBB[vCC]. 5 * 6 * for: aget, aget-object, aget-boolean, aget-byte, aget-char, aget-short 7 */ 8 /* op vAA, vBB, vCC */ 9 movzbl 2(rPC),%eax # eax<- BB 10 movzbl 3(rPC),%ecx # ecx<- CC 11 GET_VREG_R %eax %eax # eax<- vBB (array object) 12 GET_VREG_R %ecx %ecx # ecs<- vCC (requested index) 13 testl %eax,%eax # null array object? 14 je common_errNullObject # bail if so 15 cmpl offArrayObject_length(%eax),%ecx 16 jae common_errArrayIndex # index >= length, bail. Expects 17 # arrayObj in eax 18 # index in ecx 19 $load offArrayObject_contents(%eax,%ecx,$shift),%eax 20 .L${opcode}_finish: 21 FETCH_INST_OPCODE 2 %ecx 22 SET_VREG %eax rINST 23 ADVANCE_PC 2 24 GOTO_NEXT_R %ecx 25