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);
|
__ stw(R11_scratch1, simm16_offs, tmp);
|
||||||
}
|
}
|
||||||
#endif
|
#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);
|
__ nand(tmp, R3_RET, R3_RET);
|
||||||
__ subf(length, tmp, length);
|
__ 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());
|
int sco_offset = in_bytes(Klass::super_check_offset_offset());
|
||||||
__ lwz(chk_off, sco_offset, super_k);
|
__ 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
|
#ifndef PRODUCT
|
||||||
if (PrintC1Statistics) {
|
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.
|
// Arraycopy stubs takes a length in number of elements, so don't scale it.
|
||||||
__ mr(len, length);
|
__ 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) {
|
if (stub != nullptr) {
|
||||||
__ bind(*stub->continuation());
|
__ bind(*stub->continuation());
|
||||||
@ -2862,7 +2862,7 @@ void LIR_Assembler::rt_call(LIR_Opr result, address dest,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
__ call_c_with_frame_resize(dest, /*no resizing*/ 0);
|
__ call_c(dest, relocInfo::runtime_call_type);
|
||||||
if (info != nullptr) {
|
if (info != nullptr) {
|
||||||
add_call_info_here(info);
|
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);
|
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);
|
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
|
#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.
|
// ARG1 must hold thread address.
|
||||||
mr(R3_ARG1, R16_thread);
|
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();
|
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()
|
// Call the Interpreter::remove_activation_preserving_args_entry()
|
||||||
// func to get the address of the same-named entrypoint in the
|
// func to get the address of the same-named entrypoint in the
|
||||||
// generated interpreter code.
|
// generated interpreter code.
|
||||||
#if defined(ABI_ELFv2)
|
call_c(CAST_FROM_FN_PTR(address, Interpreter::remove_activation_preserving_args_entry));
|
||||||
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
|
|
||||||
|
|
||||||
// Jump to Interpreter::_remove_activation_preserving_args_entry.
|
// Jump to Interpreter::_remove_activation_preserving_args_entry.
|
||||||
mtctr(R3_RET);
|
mtctr(R3_RET);
|
||||||
|
@ -1293,11 +1293,7 @@ void MacroAssembler::call_VM_base(Register oop_result,
|
|||||||
|
|
||||||
// ARG1 must hold thread address.
|
// ARG1 must hold thread address.
|
||||||
mr(R3_ARG1, R16_thread);
|
mr(R3_ARG1, R16_thread);
|
||||||
#if defined(ABI_ELFv2)
|
|
||||||
address return_pc = call_c(entry_point, relocInfo::none);
|
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();
|
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) {
|
void MacroAssembler::call_VM_leaf_base(address entry_point) {
|
||||||
BLOCK_COMMENT("call_VM_leaf {");
|
BLOCK_COMMENT("call_VM_leaf {");
|
||||||
#if defined(ABI_ELFv2)
|
call_c(entry_point);
|
||||||
call_c(entry_point, relocInfo::none);
|
|
||||||
#else
|
|
||||||
call_c(CAST_FROM_FN_PTR(FunctionDescriptor*, entry_point), relocInfo::none);
|
|
||||||
#endif
|
|
||||||
BLOCK_COMMENT("} call_VM_leaf");
|
BLOCK_COMMENT("} call_VM_leaf");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -359,7 +359,7 @@ class MacroAssembler: public Assembler {
|
|||||||
address call_c(Register function_entry);
|
address call_c(Register function_entry);
|
||||||
// For tail calls: only branch, don't link, so callee returns to caller of this function.
|
// 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_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
|
#else
|
||||||
// Call a C function via a function descriptor and use full C
|
// Call a C function via a function descriptor and use full C
|
||||||
// calling conventions. Updates and returns _last_calls_return_pc.
|
// 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.
|
// 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_and_return_to_caller(Register function_descriptor);
|
||||||
address call_c(const FunctionDescriptor* function_descriptor, relocInfo::relocType rt);
|
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,
|
address call_c_using_toc(const FunctionDescriptor* function_descriptor, relocInfo::relocType rt,
|
||||||
Register toc);
|
Register toc);
|
||||||
#endif
|
#endif
|
||||||
|
@ -99,12 +99,7 @@ void OptoRuntime::generate_exception_blob() {
|
|||||||
__ set_last_Java_frame(/*sp=*/R1_SP, noreg);
|
__ set_last_Java_frame(/*sp=*/R1_SP, noreg);
|
||||||
|
|
||||||
__ mr(R3_ARG1, R16_thread);
|
__ mr(R3_ARG1, R16_thread);
|
||||||
#if defined(ABI_ELFv2)
|
__ call_c((address) OptoRuntime::handle_exception_C);
|
||||||
__ call_c((address) OptoRuntime::handle_exception_C, relocInfo::none);
|
|
||||||
#else
|
|
||||||
__ call_c(CAST_FROM_FN_PTR(FunctionDescriptor*, OptoRuntime::handle_exception_C),
|
|
||||||
relocInfo::none);
|
|
||||||
#endif
|
|
||||||
address calls_return_pc = __ last_calls_return_pc();
|
address calls_return_pc = __ last_calls_return_pc();
|
||||||
# ifdef ASSERT
|
# ifdef ASSERT
|
||||||
__ cmpdi(CCR0, R3_RET, 0);
|
__ cmpdi(CCR0, R3_RET, 0);
|
||||||
|
@ -2444,12 +2444,7 @@ nmethod *SharedRuntime::generate_native_wrapper(MacroAssembler *masm,
|
|||||||
|
|
||||||
// The JNI call
|
// The JNI call
|
||||||
// --------------------------------------------------------------------------
|
// --------------------------------------------------------------------------
|
||||||
#if defined(ABI_ELFv2)
|
|
||||||
__ call_c(native_func, relocInfo::runtime_call_type);
|
__ 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.
|
// 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);
|
__ set_last_Java_frame(/*sp*/R1_SP, /*pc*/R11_scratch1);
|
||||||
|
|
||||||
__ mr(R3_ARG1, R16_thread);
|
__ mr(R3_ARG1, R16_thread);
|
||||||
#if defined(ABI_ELFv2)
|
__ call_c(runtime_entry);
|
||||||
__ call_c(runtime_entry, relocInfo::none);
|
|
||||||
#else
|
|
||||||
__ call_c(CAST_FROM_FN_PTR(FunctionDescriptor*, runtime_entry), relocInfo::none);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Set an oopmap for the call site.
|
// Set an oopmap for the call site.
|
||||||
oop_maps->add_gc_map((int)(gc_map_pc - start), map);
|
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.
|
// native result across the call. No oop is present.
|
||||||
|
|
||||||
__ mr(R3_ARG1, R16_thread);
|
__ mr(R3_ARG1, R16_thread);
|
||||||
#if defined(ABI_ELFv2)
|
__ call_c(CAST_FROM_FN_PTR(address, JavaThread::check_special_condition_for_native_trans));
|
||||||
__ 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
|
|
||||||
|
|
||||||
__ bind(sync_check_done);
|
__ bind(sync_check_done);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user