Skip to content

Commit 139a337

Browse files
committed
Backport ba9f44c90fe8da2d97d67b6878ac2c0c14e35bd0
1 parent 432eb57 commit 139a337

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/hotspot/cpu/ppc/methodHandles_ppc.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,9 @@ void MethodHandles::generate_method_handle_dispatch(MacroAssembler* _masm,
360360
? -1 // enforce receiver null check
361361
: oopDesc::klass_offset_in_bytes(); // regular null-checking behavior
362362

363-
__ null_check_throw(receiver_reg, klass_offset, temp1, Interpreter::throw_NullPointerException_entry());
363+
address NullPointerException_entry = for_compiler_entry ? StubRoutines::throw_NullPointerException_at_call_entry()
364+
: Interpreter::throw_NullPointerException_entry();
365+
__ null_check_throw(receiver_reg, klass_offset, temp1, NullPointerException_entry);
364366

365367
if (iid != vmIntrinsics::_linkToSpecial || VerifyMethodHandles) {
366368
__ load_klass(temp1_recv_klass, receiver_reg);

src/hotspot/cpu/ppc/templateTable_ppc_64.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1041,7 +1041,7 @@ void TemplateTable::bastore() {
10411041

10421042
// Need to check whether array is boolean or byte
10431043
// since both types share the bastore bytecode.
1044-
__ load_klass(Rscratch, Rarray);
1044+
__ load_klass_check_null_throw(Rscratch, Rarray, Rscratch);
10451045
__ lwz(Rscratch, in_bytes(Klass::layout_helper_offset()), Rscratch);
10461046
int diffbit = exact_log2(Klass::layout_helper_boolean_diffbit());
10471047
__ testbitdi(CCR0, R0, Rscratch, diffbit);

0 commit comments

Comments
 (0)