blob: 7e6c5c0b5257b2a9ab1424c2f1ac5408e5a8c67c [file] [log] [blame]
%def op_array_length():
/*
* Return the length of an array.
*/
movl rINST, %eax # eax <- BA
sarl $$4, rINST # rINST <- B
GET_VREG %ecx, rINSTq # ecx <- vB (object ref)
testl %ecx, %ecx # is null?
je common_errNullObject
andb $$0xf, %al # eax <- A
movl MIRROR_ARRAY_LENGTH_OFFSET(%rcx), rINST
SET_VREG rINST, %rax
ADVANCE_PC_FETCH_AND_GOTO_NEXT 1