diff --git a/src/hotspot/cpu/ppc/c1_LIRAssembler_ppc.cpp b/src/hotspot/cpu/ppc/c1_LIRAssembler_ppc.cpp index 88d635f2b85..2191b894f6e 100644 --- a/src/hotspot/cpu/ppc/c1_LIRAssembler_ppc.cpp +++ b/src/hotspot/cpu/ppc/c1_LIRAssembler_ppc.cpp @@ -1859,7 +1859,7 @@ void LIR_Assembler::emit_arraycopy(LIR_OpArrayCopy* op) { __ stw(R11_scratch1, simm16_offs, tmp); } #endif - __ call_c_with_frame_resize(copyfunc_addr, /*stub does not need resized frame*/ 0); + __ call_c(copyfunc_addr, relocInfo::runtime_call_type); __ nand(tmp, R3_RET, R3_RET); __ subf(length, tmp, length); @@ -2057,7 +2057,7 @@ void LIR_Assembler::emit_arraycopy(LIR_OpArrayCopy* op) { int sco_offset = in_bytes(Klass::super_check_offset_offset()); __ lwz(chk_off, sco_offset, super_k); - __ call_c_with_frame_resize(copyfunc_addr, /*stub does not need resized frame*/ 0); + __ call_c(copyfunc_addr, relocInfo::runtime_call_type); #ifndef PRODUCT if (PrintC1Statistics) { @@ -2181,7 +2181,7 @@ void LIR_Assembler::emit_arraycopy(LIR_OpArrayCopy* op) { // Arraycopy stubs takes a length in number of elements, so don't scale it. __ mr(len, length); - __ call_c_with_frame_resize(entry, /*stub does not need resized frame*/ 0); + __ call_c(entry, relocInfo::runtime_call_type); if (stub != nullptr) { __ bind(*stub->continuation()); @@ -2862,7 +2862,7 @@ void LIR_Assembler::rt_call(LIR_Opr result, address dest, return; } - __ call_c_with_frame_resize(dest, /*no resizing*/ 0); + __ call_c(dest, relocInfo::runtime_call_type); if (info != nullptr) { add_call_info_here(info); } diff --git a/src/hotspot/cpu/ppc/c1_MacroAssembler_ppc.cpp b/src/hotspot/cpu/ppc/c1_MacroAssembler_ppc.cpp index 081d10f065f..059bb2eae0c 100644 --- a/src/hotspot/cpu/ppc/c1_MacroAssembler_ppc.cpp +++ b/src/hotspot/cpu/ppc/c1_MacroAssembler_ppc.cpp @@ -404,14 +404,3 @@ void C1_MacroAssembler::null_check(Register r, Label* Lnull) { bc_far_optimized(Assembler::bcondCRbiIs1, bi0(CCR0, Assembler::equal), *Lnull); } } - -address C1_MacroAssembler::call_c_with_frame_resize(address dest, int frame_resize) { - if (frame_resize) { resize_frame(-frame_resize, R0); } -#if defined(ABI_ELFv2) - address return_pc = call_c(dest, relocInfo::runtime_call_type); -#else - address return_pc = call_c(CAST_FROM_FN_PTR(FunctionDescriptor*, dest), relocInfo::runtime_call_type); -#endif - if (frame_resize) { resize_frame(frame_resize, R0); } - return return_pc; -} diff --git a/src/hotspot/cpu/ppc/c1_MacroAssembler_ppc.hpp b/src/hotspot/cpu/ppc/c1_MacroAssembler_ppc.hpp index c0a3dd3b83c..381cb63f832 100644 --- a/src/hotspot/cpu/ppc/c1_MacroAssembler_ppc.hpp +++ b/src/hotspot/cpu/ppc/c1_MacroAssembler_ppc.hpp @@ -89,6 +89,5 @@ void null_check(Register r, Label *Lnull = nullptr); - address call_c_with_frame_resize(address dest, int frame_resize); #endif // CPU_PPC_C1_MACROASSEMBLER_PPC_HPP diff --git a/src/hotspot/cpu/ppc/c1_Runtime1_ppc.cpp b/src/hotspot/cpu/ppc/c1_Runtime1_ppc.cpp index d212d25b3ad..adddfda4ee7 100644 --- a/src/hotspot/cpu/ppc/c1_Runtime1_ppc.cpp +++ b/src/hotspot/cpu/ppc/c1_Runtime1_ppc.cpp @@ -62,7 +62,7 @@ int StubAssembler::call_RT(Register oop_result1, Register metadata_result, // ARG1 must hold thread address. mr(R3_ARG1, R16_thread); - address return_pc = call_c_with_frame_resize(entry_point, /*No resize, we have a C compatible frame.*/0); + address return_pc = call_c(entry_point); reset_last_Java_frame(); diff --git a/src/hotspot/cpu/ppc/interp_masm_ppc_64.cpp b/src/hotspot/cpu/ppc/interp_masm_ppc_64.cpp index c24089ccdd5..a29e0810d52 100644 --- a/src/hotspot/cpu/ppc/interp_masm_ppc_64.cpp +++ b/src/hotspot/cpu/ppc/interp_masm_ppc_64.cpp @@ -135,15 +135,7 @@ void InterpreterMacroAssembler::check_and_handle_popframe(Register scratch_reg) // Call the Interpreter::remove_activation_preserving_args_entry() // func to get the address of the same-named entrypoint in the // generated interpreter code. -#if defined(ABI_ELFv2) - call_c(CAST_FROM_FN_PTR(address, - Interpreter::remove_activation_preserving_args_entry), - relocInfo::none); -#else - call_c(CAST_FROM_FN_PTR(FunctionDescriptor*, - Interpreter::remove_activation_preserving_args_entry), - relocInfo::none); -#endif + call_c(CAST_FROM_FN_PTR(address, Interpreter::remove_activation_preserving_args_entry)); // Jump to Interpreter::_remove_activation_preserving_args_entry. mtctr(R3_RET); diff --git a/src/hotspot/cpu/ppc/macroAssembler_ppc.cpp b/src/hotspot/cpu/ppc/macroAssembler_ppc.cpp index e596f91704c..8449d74d8a8 100644 --- a/src/hotspot/cpu/ppc/macroAssembler_ppc.cpp +++ b/src/hotspot/cpu/ppc/macroAssembler_ppc.cpp @@ -1293,11 +1293,7 @@ void MacroAssembler::call_VM_base(Register oop_result, // ARG1 must hold thread address. mr(R3_ARG1, R16_thread); -#if defined(ABI_ELFv2) address return_pc = call_c(entry_point, relocInfo::none); -#else - address return_pc = call_c((FunctionDescriptor*)entry_point, relocInfo::none); -#endif reset_last_Java_frame(); @@ -1318,11 +1314,7 @@ void MacroAssembler::call_VM_base(Register oop_result, void MacroAssembler::call_VM_leaf_base(address entry_point) { BLOCK_COMMENT("call_VM_leaf {"); -#if defined(ABI_ELFv2) - call_c(entry_point, relocInfo::none); -#else - call_c(CAST_FROM_FN_PTR(FunctionDescriptor*, entry_point), relocInfo::none); -#endif + call_c(entry_point); BLOCK_COMMENT("} call_VM_leaf"); } diff --git a/src/hotspot/cpu/ppc/macroAssembler_ppc.hpp b/src/hotspot/cpu/ppc/macroAssembler_ppc.hpp index 9a0cf3d8da0..03ad37a4fb0 100644 --- a/src/hotspot/cpu/ppc/macroAssembler_ppc.hpp +++ b/src/hotspot/cpu/ppc/macroAssembler_ppc.hpp @@ -359,7 +359,7 @@ class MacroAssembler: public Assembler { address call_c(Register function_entry); // For tail calls: only branch, don't link, so callee returns to caller of this function. address call_c_and_return_to_caller(Register function_entry); - address call_c(address function_entry, relocInfo::relocType rt); + address call_c(address function_entry, relocInfo::relocType rt = relocInfo::none); #else // Call a C function via a function descriptor and use full C // calling conventions. Updates and returns _last_calls_return_pc. @@ -367,6 +367,9 @@ class MacroAssembler: public Assembler { // For tail calls: only branch, don't link, so callee returns to caller of this function. address call_c_and_return_to_caller(Register function_descriptor); address call_c(const FunctionDescriptor* function_descriptor, relocInfo::relocType rt); + address call_c(address function_entry, relocInfo::relocType rt = relocInfo::none) { + return call_c((const FunctionDescriptor*)function_entry, rt); + } address call_c_using_toc(const FunctionDescriptor* function_descriptor, relocInfo::relocType rt, Register toc); #endif diff --git a/src/hotspot/cpu/ppc/runtime_ppc.cpp b/src/hotspot/cpu/ppc/runtime_ppc.cpp index 8c3bfd4f37b..dbdc16ee5f1 100644 --- a/src/hotspot/cpu/ppc/runtime_ppc.cpp +++ b/src/hotspot/cpu/ppc/runtime_ppc.cpp @@ -99,12 +99,7 @@ void OptoRuntime::generate_exception_blob() { __ set_last_Java_frame(/*sp=*/R1_SP, noreg); __ mr(R3_ARG1, R16_thread); -#if defined(ABI_ELFv2) - __ call_c((address) OptoRuntime::handle_exception_C, relocInfo::none); -#else - __ call_c(CAST_FROM_FN_PTR(FunctionDescriptor*, OptoRuntime::handle_exception_C), - relocInfo::none); -#endif + __ call_c((address) OptoRuntime::handle_exception_C); address calls_return_pc = __ last_calls_return_pc(); # ifdef ASSERT __ cmpdi(CCR0, R3_RET, 0); diff --git a/src/hotspot/cpu/ppc/sharedRuntime_ppc.cpp b/src/hotspot/cpu/ppc/sharedRuntime_ppc.cpp index 98610d21b67..981f1c7afd2 100644 --- a/src/hotspot/cpu/ppc/sharedRuntime_ppc.cpp +++ b/src/hotspot/cpu/ppc/sharedRuntime_ppc.cpp @@ -2444,12 +2444,7 @@ nmethod *SharedRuntime::generate_native_wrapper(MacroAssembler *masm, // The JNI call // -------------------------------------------------------------------------- -#if defined(ABI_ELFv2) __ call_c(native_func, relocInfo::runtime_call_type); -#else - FunctionDescriptor* fd_native_method = (FunctionDescriptor*) native_func; - __ call_c(fd_native_method, relocInfo::runtime_call_type); -#endif // Now, we are back from the native code. @@ -3455,11 +3450,7 @@ RuntimeStub* SharedRuntime::generate_throw_exception(const char* name, address r __ set_last_Java_frame(/*sp*/R1_SP, /*pc*/R11_scratch1); __ mr(R3_ARG1, R16_thread); -#if defined(ABI_ELFv2) - __ call_c(runtime_entry, relocInfo::none); -#else - __ call_c(CAST_FROM_FN_PTR(FunctionDescriptor*, runtime_entry), relocInfo::none); -#endif + __ call_c(runtime_entry); // Set an oopmap for the call site. oop_maps->add_gc_map((int)(gc_map_pc - start), map); diff --git a/src/hotspot/cpu/ppc/templateInterpreterGenerator_ppc.cpp b/src/hotspot/cpu/ppc/templateInterpreterGenerator_ppc.cpp index bb746619616..03dca2aeb9b 100644 --- a/src/hotspot/cpu/ppc/templateInterpreterGenerator_ppc.cpp +++ b/src/hotspot/cpu/ppc/templateInterpreterGenerator_ppc.cpp @@ -1464,13 +1464,7 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) { // native result across the call. No oop is present. __ mr(R3_ARG1, R16_thread); -#if defined(ABI_ELFv2) - __ call_c(CAST_FROM_FN_PTR(address, JavaThread::check_special_condition_for_native_trans), - relocInfo::none); -#else - __ call_c(CAST_FROM_FN_PTR(FunctionDescriptor*, JavaThread::check_special_condition_for_native_trans), - relocInfo::none); -#endif + __ call_c(CAST_FROM_FN_PTR(address, JavaThread::check_special_condition_for_native_trans)); __ bind(sync_check_done);