mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8205199: more Linux clang compile failures
Co-authored-by: Thomas Stuefe <thomas.stuefe@gmail.com> Reviewed-by: dholmes, kbarrett, stuefe
This commit is contained in:
parent
161dc40015
commit
6e0bd36f42
2 changed files with 8 additions and 12 deletions
|
@ -96,11 +96,11 @@
|
||||||
address os::current_stack_pointer() {
|
address os::current_stack_pointer() {
|
||||||
#ifdef SPARC_WORKS
|
#ifdef SPARC_WORKS
|
||||||
register void *esp;
|
register void *esp;
|
||||||
__asm__("mov %%"SPELL_REG_SP", %0":"=r"(esp));
|
__asm__("mov %%" SPELL_REG_SP ", %0":"=r"(esp));
|
||||||
return (address) ((char*)esp + sizeof(long)*2);
|
return (address) ((char*)esp + sizeof(long)*2);
|
||||||
#elif defined(__clang__)
|
#elif defined(__clang__)
|
||||||
intptr_t* esp;
|
intptr_t* esp;
|
||||||
__asm__ __volatile__ ("mov %%"SPELL_REG_SP", %0":"=r"(esp):);
|
__asm__ __volatile__ ("mov %%" SPELL_REG_SP ", %0":"=r"(esp):);
|
||||||
return (address) esp;
|
return (address) esp;
|
||||||
#else
|
#else
|
||||||
register void *esp __asm__ (SPELL_REG_SP);
|
register void *esp __asm__ (SPELL_REG_SP);
|
||||||
|
@ -234,10 +234,10 @@ frame os::get_sender_for_C_frame(frame* fr) {
|
||||||
intptr_t* _get_previous_fp() {
|
intptr_t* _get_previous_fp() {
|
||||||
#ifdef SPARC_WORKS
|
#ifdef SPARC_WORKS
|
||||||
register intptr_t **ebp;
|
register intptr_t **ebp;
|
||||||
__asm__("mov %%"SPELL_REG_FP", %0":"=r"(ebp));
|
__asm__("mov %%" SPELL_REG_FP ", %0":"=r"(ebp));
|
||||||
#elif defined(__clang__)
|
#elif defined(__clang__)
|
||||||
intptr_t **ebp;
|
intptr_t **ebp;
|
||||||
__asm__ __volatile__ ("mov %%"SPELL_REG_FP", %0":"=r"(ebp):);
|
__asm__ __volatile__ ("mov %%" SPELL_REG_FP ", %0":"=r"(ebp):);
|
||||||
#else
|
#else
|
||||||
register intptr_t **ebp __asm__ (SPELL_REG_FP);
|
register intptr_t **ebp __asm__ (SPELL_REG_FP);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -714,16 +714,13 @@ void initialize_assert_poison() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool store_context(const void* context) {
|
static void store_context(const void* context) {
|
||||||
if (memcpy(&g_stored_assertion_context, context, sizeof(ucontext_t)) == false) {
|
memcpy(&g_stored_assertion_context, context, sizeof(ucontext_t));
|
||||||
return false;
|
|
||||||
}
|
|
||||||
#if defined(__linux) && defined(PPC64)
|
#if defined(__linux) && defined(PPC64)
|
||||||
// on Linux ppc64, ucontext_t contains pointers into itself which have to be patched up
|
// on Linux ppc64, ucontext_t contains pointers into itself which have to be patched up
|
||||||
// after copying the context (see comment in sys/ucontext.h):
|
// after copying the context (see comment in sys/ucontext.h):
|
||||||
*((void**) &g_stored_assertion_context.uc_mcontext.regs) = &(g_stored_assertion_context.uc_mcontext.gp_regs);
|
*((void**) &g_stored_assertion_context.uc_mcontext.regs) = &(g_stored_assertion_context.uc_mcontext.gp_regs);
|
||||||
#endif
|
#endif
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool handle_assert_poison_fault(const void* ucVoid, const void* faulting_address) {
|
bool handle_assert_poison_fault(const void* ucVoid, const void* faulting_address) {
|
||||||
|
@ -734,9 +731,8 @@ bool handle_assert_poison_fault(const void* ucVoid, const void* faulting_address
|
||||||
if (ucVoid) {
|
if (ucVoid) {
|
||||||
const intx my_tid = os::current_thread_id();
|
const intx my_tid = os::current_thread_id();
|
||||||
if (Atomic::cmpxchg(my_tid, &g_asserting_thread, (intx)0) == 0) {
|
if (Atomic::cmpxchg(my_tid, &g_asserting_thread, (intx)0) == 0) {
|
||||||
if (store_context(ucVoid)) {
|
store_context(ucVoid);
|
||||||
g_assertion_context = &g_stored_assertion_context;
|
g_assertion_context = &g_stored_assertion_context;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue