8332423: [PPC64] Remove C1_MacroAssembler::call_c_with_frame_resize
Reviewed-by: mdoerr, varadam
This commit is contained in:
parent
59c4649be3
commit
b895d7cf9f
@ -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);
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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");
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user