Skip to content

Commit f8d7c5a

Browse files
committed
8256922: ppc, ppcle build broken after JDK-8254231
Reviewed-by: shade, lucy, mdoerr
1 parent b52f6c0 commit f8d7c5a

18 files changed

+208
-58
lines changed

src/hotspot/cpu/ppc/c1_LIRAssembler_ppc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1339,7 +1339,7 @@ void LIR_Assembler::return_op(LIR_Opr result, C1SafepointPollStub* code_stub) {
13391339
__ ld(polling_page, in_bytes(Thread::polling_page_offset()), R16_thread);
13401340

13411341
// Restore return pc relative to callers' sp.
1342-
__ ld(return_pc, _abi(lr), R1_SP);
1342+
__ ld(return_pc, _abi0(lr), R1_SP);
13431343
// Move return pc to LR.
13441344
__ mtlr(return_pc);
13451345

src/hotspot/cpu/ppc/c1_MacroAssembler_ppc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ void C1_MacroAssembler::build_frame(int frame_size_in_bytes, int bang_size_in_by
7979
assert(bang_size_in_bytes >= frame_size_in_bytes, "stack bang size incorrect");
8080
generate_stack_overflow_check(bang_size_in_bytes);
8181

82-
std(return_pc, _abi(lr), R1_SP); // SP->lr = return_pc
82+
std(return_pc, _abi0(lr), R1_SP); // SP->lr = return_pc
8383
push_frame(frame_size_in_bytes, R0); // SP -= frame_size_in_bytes
8484
}
8585

src/hotspot/cpu/ppc/c1_Runtime1_ppc.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ int StubAssembler::call_RT(Register oop_result1, Register metadata_result,
9292
if (frame_size() == no_frame_size) {
9393
ShouldNotReachHere(); // We always have a frame size.
9494
//pop_frame(); // pop the stub frame
95-
//ld(R0, _abi(lr), R1_SP);
95+
//ld(R0, _abi0(lr), R1_SP);
9696
//mtlr(R0);
9797
//load_const_optimized(R0, StubRoutines::forward_exception_entry());
9898
//mtctr(R0);
@@ -185,7 +185,7 @@ static OopMap* save_live_registers(StubAssembler* sasm, bool save_fpu_registers
185185
ret_pc = R0;
186186
__ mflr(ret_pc);
187187
}
188-
__ std(ret_pc, _abi(lr), R1_SP); // C code needs pc in C1 method.
188+
__ std(ret_pc, _abi0(lr), R1_SP); // C code needs pc in C1 method.
189189
__ push_frame(frame_size_in_bytes + stack_preserve, R0);
190190

191191
// Record volatile registers as callee-save values in an OopMap so
@@ -233,7 +233,7 @@ static void restore_live_registers(StubAssembler* sasm, Register result1, Regist
233233
}
234234

235235
__ pop_frame();
236-
__ ld(R0, _abi(lr), R1_SP);
236+
__ ld(R0, _abi0(lr), R1_SP);
237237
__ mtlr(R0);
238238
}
239239

@@ -485,7 +485,7 @@ OopMapSet* Runtime1::generate_code_for(StubID id, StubAssembler* sasm) {
485485
__ bclr(Assembler::bcondCRbiIs1, Assembler::bi0(CCR0, Assembler::equal), Assembler::bhintbhBCLRisReturn);
486486

487487
__ mflr(R0);
488-
__ std(R0, _abi(lr), R1_SP);
488+
__ std(R0, _abi0(lr), R1_SP);
489489
__ push_frame(frame::abi_reg_args_size, R0); // Empty dummy frame (no callee-save regs).
490490
sasm->set_frame_size(frame::abi_reg_args_size / BytesPerWord);
491491
OopMap* oop_map = new OopMap(frame::abi_reg_args_size / sizeof(jint), 0);
@@ -495,7 +495,7 @@ OopMapSet* Runtime1::generate_code_for(StubID id, StubAssembler* sasm) {
495495
oop_maps->add_gc_map(call_offset, oop_map);
496496

497497
__ pop_frame();
498-
__ ld(R0, _abi(lr), R1_SP);
498+
__ ld(R0, _abi0(lr), R1_SP);
499499
__ mtlr(R0);
500500
__ blr();
501501
}
@@ -554,11 +554,11 @@ OopMapSet* Runtime1::generate_code_for(StubID id, StubAssembler* sasm) {
554554
__ ld(Rcaller_sp, 0, R1_SP);
555555
__ push_frame_reg_args(0, R0); // dummy frame for C call
556556
__ mr(Rexception_save, Rexception); // save over C call
557-
__ ld(Rexception_pc, _abi(lr), Rcaller_sp); // return pc
557+
__ ld(Rexception_pc, _abi0(lr), Rcaller_sp); // return pc
558558
__ call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::exception_handler_for_return_address), R16_thread, Rexception_pc);
559559
__ verify_not_null_oop(Rexception_save);
560560
__ mtctr(R3_RET);
561-
__ ld(Rexception_pc, _abi(lr), Rcaller_sp); // return pc
561+
__ ld(Rexception_pc, _abi0(lr), Rcaller_sp); // return pc
562562
__ mr(R1_SP, Rcaller_sp); // Pop both frames at once.
563563
__ mr(Rexception, Rexception_save); // restore
564564
__ mtlr(Rexception_pc);
@@ -730,7 +730,7 @@ OopMapSet* Runtime1::generate_code_for(StubID id, StubAssembler* sasm) {
730730
{
731731
__ set_info("unimplemented entry", dont_gc_arguments);
732732
__ mflr(R0);
733-
__ std(R0, _abi(lr), R1_SP);
733+
__ std(R0, _abi0(lr), R1_SP);
734734
__ push_frame(frame::abi_reg_args_size, R0); // empty dummy frame
735735
sasm->set_frame_size(frame::abi_reg_args_size / BytesPerWord);
736736
OopMap* oop_map = new OopMap(frame::abi_reg_args_size / sizeof(jint), 0);
@@ -766,12 +766,12 @@ OopMapSet* Runtime1::generate_handle_exception(StubID id, StubAssembler* sasm) {
766766
// exception handler.
767767
oop_map = generate_oop_map(sasm, true);
768768
// Transfer the pending exception to the exception_oop.
769-
// Also load the PC which is typically at SP + frame_size_in_bytes + _abi(lr),
769+
// Also load the PC which is typically at SP + frame_size_in_bytes +_abi0(lr),
770770
// but we support additional slots in the frame for parameter passing.
771771
__ ld(Rexception_pc, 0, R1_SP);
772772
__ ld(Rexception, in_bytes(JavaThread::pending_exception_offset()), R16_thread);
773773
__ li(R0, 0);
774-
__ ld(Rexception_pc, _abi(lr), Rexception_pc);
774+
__ ld(Rexception_pc, _abi0(lr), Rexception_pc);
775775
__ std(R0, in_bytes(JavaThread::pending_exception_offset()), R16_thread);
776776
break;
777777
case handle_exception_nofpu_id:
@@ -783,7 +783,7 @@ OopMapSet* Runtime1::generate_handle_exception(StubID id, StubAssembler* sasm) {
783783
// At this point all registers except exception oop and exception pc are dead.
784784
oop_map = new OopMap(frame_size_in_bytes / sizeof(jint), 0);
785785
sasm->set_frame_size(frame_size_in_bytes / BytesPerWord);
786-
__ std(Rexception_pc, _abi(lr), R1_SP);
786+
__ std(Rexception_pc, _abi0(lr), R1_SP);
787787
__ push_frame(frame_size_in_bytes, R0);
788788
break;
789789
default: ShouldNotReachHere();
@@ -826,7 +826,7 @@ OopMapSet* Runtime1::generate_handle_exception(StubID id, StubAssembler* sasm) {
826826
break;
827827
case handle_exception_from_callee_id: {
828828
__ pop_frame();
829-
__ ld(Rexception_pc, _abi(lr), R1_SP);
829+
__ ld(Rexception_pc, _abi0(lr), R1_SP);
830830
__ mtlr(Rexception_pc);
831831
__ bctr();
832832
break;
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/*
2+
* Copyright (c) 2020 SAP SE. All rights reserved.
3+
* Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
4+
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5+
*
6+
* This code is free software; you can redistribute it and/or modify it
7+
* under the terms of the GNU General Public License version 2 only, as
8+
* published by the Free Software Foundation.
9+
*
10+
* This code is distributed in the hope that it will be useful, but WITHOUT
11+
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12+
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13+
* version 2 for more details (a copy is included in the LICENSE file that
14+
* accompanied this code).
15+
*
16+
* You should have received a copy of the GNU General Public License version
17+
* 2 along with this work; if not, write to the Free Software Foundation,
18+
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
19+
*
20+
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
21+
* or visit www.oracle.com if you need additional information or have any
22+
* questions.
23+
*/
24+
25+
#include "precompiled.hpp"
26+
#include "prims/foreign_globals.hpp"
27+
#include "utilities/debug.hpp"
28+
29+
// Stubbed out, implement later
30+
const ABIDescriptor ForeignGlobals::parse_abi_descriptor_impl(jobject jabi) const {
31+
Unimplemented();
32+
return {};
33+
}
34+
35+
const BufferLayout ForeignGlobals::parse_buffer_layout_impl(jobject jlayout) const {
36+
Unimplemented();
37+
return {};
38+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*
2+
* Copyright (c) 2020 SAP SE. All rights reserved.
3+
* Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
4+
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5+
*
6+
* This code is free software; you can redistribute it and/or modify it
7+
* under the terms of the GNU General Public License version 2 only, as
8+
* published by the Free Software Foundation.
9+
*
10+
* This code is distributed in the hope that it will be useful, but WITHOUT
11+
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12+
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13+
* version 2 for more details (a copy is included in the LICENSE file that
14+
* accompanied this code).
15+
*
16+
* You should have received a copy of the GNU General Public License version
17+
* 2 along with this work; if not, write to the Free Software Foundation,
18+
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
19+
*
20+
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
21+
* or visit www.oracle.com if you need additional information or have any
22+
* questions.
23+
*/
24+
25+
#ifndef CPU_PPC_VM_FOREIGN_GLOBALS_PPC_HPP
26+
#define CPU_PPC_VM_FOREIGN_GLOBALS_PPC_HPP
27+
28+
class BufferLayout {};
29+
class ABIDescriptor {};
30+
31+
#endif // CPU_PPC_VM_FOREIGN_GLOBALS_PPC_HPP

src/hotspot/cpu/ppc/frame_ppc.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@
118118
abi_reg_args_size = sizeof(abi_reg_args)
119119
};
120120

121-
#define _abi(_component) \
121+
#define _abi0(_component) \
122122
(offset_of(frame::abi_reg_args, _component))
123123

124124
struct abi_reg_args_spill : abi_reg_args {

src/hotspot/cpu/ppc/gc/g1/g1BarrierSetAssembler_ppc.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -457,11 +457,11 @@ void G1BarrierSetAssembler::generate_c1_pre_barrier_runtime_stub(StubAssembler*
457457
const int nbytes_save = (MacroAssembler::num_volatile_regs + stack_slots) * BytesPerWord;
458458
__ save_volatile_gprs(R1_SP, -nbytes_save); // except R0
459459
__ mflr(R0);
460-
__ std(R0, _abi(lr), R1_SP);
460+
__ std(R0, _abi0(lr), R1_SP);
461461
__ push_frame_reg_args(nbytes_save, R0); // dummy frame for C call
462462
__ call_VM_leaf(CAST_FROM_FN_PTR(address, G1SATBMarkQueueSet::handle_zero_index_for_thread), R16_thread);
463463
__ pop_frame();
464-
__ ld(R0, _abi(lr), R1_SP);
464+
__ ld(R0, _abi0(lr), R1_SP);
465465
__ mtlr(R0);
466466
__ restore_volatile_gprs(R1_SP, -nbytes_save); // except R0
467467
__ b(restart);
@@ -537,11 +537,11 @@ void G1BarrierSetAssembler::generate_c1_post_barrier_runtime_stub(StubAssembler*
537537
const int nbytes_save = (MacroAssembler::num_volatile_regs + stack_slots) * BytesPerWord;
538538
__ save_volatile_gprs(R1_SP, -nbytes_save); // except R0
539539
__ mflr(R0);
540-
__ std(R0, _abi(lr), R1_SP);
540+
__ std(R0, _abi0(lr), R1_SP);
541541
__ push_frame_reg_args(nbytes_save, R0); // dummy frame for C call
542542
__ call_VM_leaf(CAST_FROM_FN_PTR(address, G1DirtyCardQueueSet::handle_zero_index_for_thread), R16_thread);
543543
__ pop_frame();
544-
__ ld(R0, _abi(lr), R1_SP);
544+
__ ld(R0, _abi0(lr), R1_SP);
545545
__ mtlr(R0);
546546
__ restore_volatile_gprs(R1_SP, -nbytes_save); // except R0
547547
__ b(restart);

src/hotspot/cpu/ppc/interp_masm_ppc_64.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,7 @@ void InterpreterMacroAssembler::merge_frames(Register Rsender_sp, Register retur
772772
ld(Rsender_sp, _ijava_state_neg(sender_sp), Rscratch1); // top_frame_sp
773773
ld(Rscratch2, 0, Rscratch1); // **SP
774774
if (return_pc!=noreg) {
775-
ld(return_pc, _abi(lr), Rscratch1); // LR
775+
ld(return_pc, _abi0(lr), Rscratch1); // LR
776776
}
777777

778778
// Merge top frames.
@@ -849,7 +849,7 @@ void InterpreterMacroAssembler::remove_activation(TosState state,
849849
// call could have a smaller SP, so that this compare succeeds for an
850850
// inner call of the method annotated with ReservedStack.
851851
ld_ptr(R0, JavaThread::reserved_stack_activation_offset(), R16_thread);
852-
ld_ptr(R11_scratch1, _abi(callers_sp), R1_SP); // Load frame pointer.
852+
ld_ptr(R11_scratch1, _abi0(callers_sp), R1_SP); // Load frame pointer.
853853
cmpld(CCR0, R11_scratch1, R0);
854854
blt_predict_taken(CCR0, no_reserved_zone_enabling);
855855

src/hotspot/cpu/ppc/interpreterRT_ppc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
// The first Java argument is at index -1.
4343
#define locals_j_arg_at(index) (Interpreter::local_offset_in_bytes(index)), R18_locals
4444
// The first C argument is at index 0.
45-
#define sp_c_arg_at(index) ((index)*wordSize + _abi(carg_1)), R1_SP
45+
#define sp_c_arg_at(index) ((index)*wordSize + _abi0(carg_1)), R1_SP
4646

4747
// Implementation of SignatureHandlerGenerator
4848

src/hotspot/cpu/ppc/macroAssembler_ppc.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -857,17 +857,17 @@ void MacroAssembler::restore_volatile_gprs(Register src, int offset) {
857857

858858
void MacroAssembler::save_LR_CR(Register tmp) {
859859
mfcr(tmp);
860-
std(tmp, _abi(cr), R1_SP);
860+
std(tmp, _abi0(cr), R1_SP);
861861
mflr(tmp);
862-
std(tmp, _abi(lr), R1_SP);
862+
std(tmp, _abi0(lr), R1_SP);
863863
// Tmp must contain lr on exit! (see return_addr and prolog in ppc64.ad)
864864
}
865865

866866
void MacroAssembler::restore_LR_CR(Register tmp) {
867867
assert(tmp != R1_SP, "must be distinct");
868-
ld(tmp, _abi(lr), R1_SP);
868+
ld(tmp, _abi0(lr), R1_SP);
869869
mtlr(tmp);
870-
ld(tmp, _abi(cr), R1_SP);
870+
ld(tmp, _abi0(cr), R1_SP);
871871
mtcr(tmp);
872872
}
873873

@@ -888,7 +888,7 @@ void MacroAssembler::resize_frame(Register offset, Register tmp) {
888888
#endif
889889

890890
// tmp <- *(SP)
891-
ld(tmp, _abi(callers_sp), R1_SP);
891+
ld(tmp, _abi0(callers_sp), R1_SP);
892892
// addr <- SP + offset;
893893
// *(addr) <- tmp;
894894
// SP <- addr
@@ -900,7 +900,7 @@ void MacroAssembler::resize_frame(int offset, Register tmp) {
900900
assert_different_registers(tmp, R1_SP);
901901
assert((offset & (frame::alignment_in_bytes-1))==0, "resize_frame: unaligned");
902902
// tmp <- *(SP)
903-
ld(tmp, _abi(callers_sp), R1_SP);
903+
ld(tmp, _abi0(callers_sp), R1_SP);
904904
// addr <- SP + offset;
905905
// *(addr) <- tmp;
906906
// SP <- addr
@@ -954,7 +954,7 @@ void MacroAssembler::push_frame_reg_args_nonvolatiles(unsigned int bytes,
954954

955955
// Pop current C frame.
956956
void MacroAssembler::pop_frame() {
957-
ld(R1_SP, _abi(callers_sp), R1_SP);
957+
ld(R1_SP, _abi0(callers_sp), R1_SP);
958958
}
959959

960960
#if defined(ABI_ELFv2)

0 commit comments

Comments
 (0)