< prev index next >
src/hotspot/cpu/x86/templateTable_x86.cpp
Print this page
*** 826,836 ****
Register index = rax;
index_check(array, index); // kills rbx
if (ValueArrayFlatten) {
Label is_flat_array, done;
! __ test_flat_array_oop(array, rbx, is_flat_array);
do_oop_load(_masm,
Address(array, index,
UseCompressedOops ? Address::times_4 : Address::times_ptr,
arrayOopDesc::base_offset_in_bytes(T_OBJECT)),
rax,
--- 826,836 ----
Register index = rax;
index_check(array, index); // kills rbx
if (ValueArrayFlatten) {
Label is_flat_array, done;
! __ test_flattened_array_oop(array, rbx, is_flat_array);
do_oop_load(_masm,
Address(array, index,
UseCompressedOops ? Address::times_4 : Address::times_ptr,
arrayOopDesc::base_offset_in_bytes(T_OBJECT)),
rax,
*** 1149,1159 ****
__ jcc(Assembler::zero, is_null);
// Move array class to rdi
__ load_klass(rdi, rdx);
if (ValueArrayFlatten) {
! __ test_flat_array_klass(rdi, rbx, is_flat_array);
}
// Move subklass into rbx
__ load_klass(rbx, rax);
// Move array element superklass into rax
--- 1149,1159 ----
__ jcc(Assembler::zero, is_null);
// Move array class to rdi
__ load_klass(rdi, rdx);
if (ValueArrayFlatten) {
! __ test_flattened_array_oop(rdx, rbx, is_flat_array);
}
// Move subklass into rbx
__ load_klass(rbx, rax);
// Move array element superklass into rax
*** 1183,1201 ****
__ bind(is_null);
__ profile_null_seen(rbx);
if (EnableValhalla) {
Label is_null_into_value_array_npe, store_null;
! __ load_klass(rdi, rdx);
! // No way to store null in flat array
! __ test_flat_array_klass(rdi, rbx, is_null_into_value_array_npe);
!
! // Use case for storing values in objArray where element_klass is specifically
! // a value type because they could not be flattened "for reasons",
! // these need to have the same semantics as flat arrays, i.e. NPE
! __ movptr(rdi, Address(rdi, ObjArrayKlass::element_klass_offset()));
! __ test_klass_is_value(rdi, rdi, is_null_into_value_array_npe);
__ jmp(store_null);
__ bind(is_null_into_value_array_npe);
__ jump(ExternalAddress(Interpreter::_throw_NullPointerException_entry));
--- 1183,1194 ----
__ bind(is_null);
__ profile_null_seen(rbx);
if (EnableValhalla) {
Label is_null_into_value_array_npe, store_null;
! // No way to store null in null-free array
! __ test_null_free_array_oop(rdx, rbx, is_null_into_value_array_npe);
__ jmp(store_null);
__ bind(is_null_into_value_array_npe);
__ jump(ExternalAddress(Interpreter::_throw_NullPointerException_entry));
< prev index next >