Mercurial > hg > truffle
diff src/cpu/ppc/vm/runtime_ppc.cpp @ 17803:31e80afe3fed
8035647: PPC64: Support for elf v2 abi.
Summary: ELFv2 ABI used by the little endian PowerPC64 on Linux.
Reviewed-by: kvn
Contributed-by: asmundak@google.com
author | goetz |
---|---|
date | Thu, 06 Mar 2014 10:55:28 -0800 |
parents | 67fa91961822 |
children | 92aa6797d639 |
line wrap: on
line diff
--- a/src/cpu/ppc/vm/runtime_ppc.cpp Thu Feb 20 11:05:12 2014 +0100 +++ b/src/cpu/ppc/vm/runtime_ppc.cpp Thu Mar 06 10:55:28 2014 -0800 @@ -87,7 +87,7 @@ address start = __ pc(); - int frame_size_in_bytes = frame::abi_112_size; + int frame_size_in_bytes = frame::abi_reg_args_size; OopMap* map = new OopMap(frame_size_in_bytes / sizeof(jint), 0); // Exception pc is 'return address' for stack walker. @@ -99,7 +99,7 @@ // Save callee-saved registers. // Push a C frame for the exception blob. It is needed for the C call later on. - __ push_frame_abi112(0, R11_scratch1); + __ push_frame_reg_args(0, R11_scratch1); // This call does all the hard work. It checks if an exception handler // exists in the method. @@ -109,8 +109,12 @@ __ 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 address calls_return_pc = __ last_calls_return_pc(); # ifdef ASSERT __ cmpdi(CCR0, R3_RET, 0); @@ -162,7 +166,11 @@ __ bind(mh_callsite); __ mr(R31, R3_RET); // Save branch address. __ mr(R3_ARG1, R16_thread); +#if defined(ABI_ELFv2) + __ call_c((address) adjust_SP_for_methodhandle_callsite, relocInfo::none); +#else __ call_c(CAST_FROM_FN_PTR(FunctionDescriptor*, adjust_SP_for_methodhandle_callsite), relocInfo::none); +#endif // Returns unextended_sp in R3_RET. __ mtctr(R31); // Move address of exception handler to SR_CTR.