Skip to content

Commit 512cdb2

Browse files
committed
8350683: Non-C2 / minimal JVM crashes in the build on ppc64 platforms
Backport-of: 2af76de05a50dee052307b8b82055a4787e96df9
1 parent 7dd8681 commit 512cdb2

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

src/hotspot/cpu/ppc/compiledIC_ppc.cpp

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved.
3-
* Copyright (c) 2012, 2015 SAP SE. All rights reserved.
3+
* Copyright (c) 2012, 2025 SAP SE. All rights reserved.
44
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55
*
66
* This code is free software; you can redistribute it and/or modify it
@@ -30,9 +30,6 @@
3030
#include "memory/resourceArea.hpp"
3131
#include "runtime/mutexLocker.hpp"
3232
#include "runtime/safepoint.hpp"
33-
#ifdef COMPILER2
34-
#include "opto/matcher.hpp"
35-
#endif
3633

3734
// ----------------------------------------------------------------------------
3835

@@ -79,7 +76,6 @@
7976
const int IC_pos_in_java_to_interp_stub = 8;
8077
#define __ masm->
8178
address CompiledDirectCall::emit_to_interp_stub(MacroAssembler *masm, address mark/* = nullptr*/) {
82-
#ifdef COMPILER2
8379
if (mark == nullptr) {
8480
// Get the mark within main instrs section which is set to the address of the call.
8581
mark = __ inst_mark();
@@ -109,7 +105,7 @@ address CompiledDirectCall::emit_to_interp_stub(MacroAssembler *masm, address ma
109105
// - call
110106
__ calculate_address_from_global_toc(reg_scratch, __ method_toc());
111107
AddressLiteral ic = __ allocate_metadata_address((Metadata *)nullptr);
112-
bool success = __ load_const_from_method_toc(as_Register(Matcher::inline_cache_reg_encode()),
108+
bool success = __ load_const_from_method_toc(R19_inline_cache_reg,
113109
ic, reg_scratch, /*fixed_size*/ true);
114110
if (!success) {
115111
return nullptr; // CodeCache is full
@@ -135,13 +131,9 @@ address CompiledDirectCall::emit_to_interp_stub(MacroAssembler *masm, address ma
135131
assert(!is_NativeCallTrampolineStub_at(__ addr_at(stub_start_offset)),
136132
"must not confuse java_to_interp with trampoline stubs");
137133

138-
// End the stub.
134+
// End the stub.
139135
__ end_a_stub();
140136
return stub;
141-
#else
142-
ShouldNotReachHere();
143-
return nullptr;
144-
#endif
145137
}
146138
#undef __
147139

0 commit comments

Comments
 (0)