OpenJDK / amber / amber
changeset 51368:0828a0f6676b
8205199: more Linux clang compile failures
Reviewed-by: dholmes, kbarrett, stuefe
Contributed-by: Arthur Eubanks <aeubanks@google.com>, Thomas Stuefe <thomas.stuefe@gmail.com>
author | martin |
---|---|
date | Fri, 22 Jun 2018 17:49:21 -0700 |
parents | a1d7444076e4 |
children | 2f2af62dfac7 6cc2dc161c64 |
files | src/hotspot/os_cpu/linux_x86/os_linux_x86.cpp src/hotspot/share/utilities/debug.cpp |
diffstat | 2 files changed, 8 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/src/hotspot/os_cpu/linux_x86/os_linux_x86.cpp Fri Jun 22 17:36:03 2018 -0700 +++ b/src/hotspot/os_cpu/linux_x86/os_linux_x86.cpp Fri Jun 22 17:49:21 2018 -0700 @@ -96,11 +96,11 @@ address os::current_stack_pointer() { #ifdef SPARC_WORKS 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); #elif defined(__clang__) intptr_t* esp; - __asm__ __volatile__ ("mov %%"SPELL_REG_SP", %0":"=r"(esp):); + __asm__ __volatile__ ("mov %%" SPELL_REG_SP ", %0":"=r"(esp):); return (address) esp; #else register void *esp __asm__ (SPELL_REG_SP); @@ -234,10 +234,10 @@ intptr_t* _get_previous_fp() { #ifdef SPARC_WORKS register intptr_t **ebp; - __asm__("mov %%"SPELL_REG_FP", %0":"=r"(ebp)); + __asm__("mov %%" SPELL_REG_FP ", %0":"=r"(ebp)); #elif defined(__clang__) intptr_t **ebp; - __asm__ __volatile__ ("mov %%"SPELL_REG_FP", %0":"=r"(ebp):); + __asm__ __volatile__ ("mov %%" SPELL_REG_FP ", %0":"=r"(ebp):); #else register intptr_t **ebp __asm__ (SPELL_REG_FP); #endif
--- a/src/hotspot/share/utilities/debug.cpp Fri Jun 22 17:36:03 2018 -0700 +++ b/src/hotspot/share/utilities/debug.cpp Fri Jun 22 17:49:21 2018 -0700 @@ -714,16 +714,13 @@ } } -static bool store_context(const void* context) { - if (memcpy(&g_stored_assertion_context, context, sizeof(ucontext_t)) == false) { - return false; - } +static void store_context(const void* context) { + memcpy(&g_stored_assertion_context, context, sizeof(ucontext_t)); #if defined(__linux) && defined(PPC64) // 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): *((void**) &g_stored_assertion_context.uc_mcontext.regs) = &(g_stored_assertion_context.uc_mcontext.gp_regs); #endif - return true; } bool handle_assert_poison_fault(const void* ucVoid, const void* faulting_address) { @@ -734,9 +731,8 @@ if (ucVoid) { const intx my_tid = os::current_thread_id(); if (Atomic::cmpxchg(my_tid, &g_asserting_thread, (intx)0) == 0) { - if (store_context(ucVoid)) { - g_assertion_context = &g_stored_assertion_context; - } + store_context(ucVoid); + g_assertion_context = &g_stored_assertion_context; } } return true;