8256843: [PPC64] runtime/logging/RedefineClasses.java fails with assert: registers not saved on stack

Reviewed-by: mdoerr, lucy
This commit is contained in:
Richard Reingruber 2020-12-18 13:16:09 +00:00
parent 45a150b8dc
commit 1ce2e94f5f
3 changed files with 9 additions and 31 deletions

View File

@ -65,16 +65,7 @@
# include <ucontext.h>
address os::current_stack_pointer() {
address csp;
#if !defined(USE_XLC_BUILTINS)
// inline assembly for `mr regno(csp), R1_SP':
__asm__ __volatile__ ("mr %0, 1":"=r"(csp):);
#else
csp = (address) __builtin_frame_address(0);
#endif
return csp;
return (address)__builtin_frame_address(0);
}
char* os::non_memory_address_word() {
@ -159,13 +150,9 @@ frame os::get_sender_for_C_frame(frame* fr) {
frame os::current_frame() {
intptr_t* csp = (intptr_t*) *((intptr_t*) os::current_stack_pointer());
// hack.
frame topframe(csp, (address)0x8);
// Return sender of sender of current topframe which hopefully
// both have pc != NULL.
frame tmp = os::get_sender_for_C_frame(&topframe);
return os::get_sender_for_C_frame(&tmp);
intptr_t* csp = *(intptr_t**) __builtin_frame_address(0);
frame topframe(csp, CAST_FROM_FN_PTR(address, os::current_frame));
return os::get_sender_for_C_frame(&topframe);
}
bool PosixSignals::pd_hotspot_signal_handler(int sig, siginfo_t* info,

View File

@ -78,12 +78,7 @@
address os::current_stack_pointer() {
intptr_t* csp;
// inline assembly `mr regno(csp), R1_SP':
__asm__ __volatile__ ("mr %0, 1":"=r"(csp):);
return (address) csp;
return (address)__builtin_frame_address(0);
}
char* os::non_memory_address_word() {
@ -179,13 +174,9 @@ frame os::get_sender_for_C_frame(frame* fr) {
frame os::current_frame() {
intptr_t* csp = (intptr_t*) *((intptr_t*) os::current_stack_pointer());
// hack.
frame topframe(csp, (address)0x8);
// Return sender of sender of current topframe which hopefully
// both have pc != NULL.
frame tmp = os::get_sender_for_C_frame(&topframe);
return os::get_sender_for_C_frame(&tmp);
intptr_t* csp = *(intptr_t**) __builtin_frame_address(0);
frame topframe(csp, CAST_FROM_FN_PTR(address, os::current_frame));
return os::get_sender_for_C_frame(&topframe);
}
bool PosixSignals::pd_hotspot_signal_handler(int sig, siginfo_t* info,

View File

@ -36,7 +36,7 @@ NativeCallStack::NativeCallStack(int toSkip, bool fillStack) :
// to call os::get_native_stack. A tail call is used if _NMT_NOINLINE_ is not defined
// (which means this is not a slowdebug build), and we are on 64-bit (except Windows).
// This is not necessarily a rule, but what has been obvserved to date.
#if (defined(_NMT_NOINLINE_) || defined(_WINDOWS) || !defined(_LP64))
#if (defined(_NMT_NOINLINE_) || defined(_WINDOWS) || !defined(_LP64) || defined(PPC64))
// Not a tail call.
toSkip++;
#if (defined(_NMT_NOINLINE_) && defined(BSD) && defined(_LP64))