Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
8256843: [PPC64] runtime/logging/RedefineClasses.java fails with asse…
…rt: registers not saved on stack

Reviewed-by: mdoerr, lucy
  • Loading branch information
reinrich committed Dec 18, 2020
1 parent 45a150b commit 1ce2e94f5ff2a69449d27a365ff2e9319c7760e9
@@ -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,
@@ -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,
@@ -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))

1 comment on commit 1ce2e94

@openjdk-notifier

This comment has been minimized.

Copy link

@openjdk-notifier openjdk-notifier bot commented on 1ce2e94 Dec 18, 2020

Please sign in to comment.