mirror of
https://github.com/darlinghq/darling-openjdk.git
synced 2025-03-01 20:46:07 +00: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
@ -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 @@ frame os::get_sender_for_C_frame(frame* fr) {
|
||||
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
|
||||
|
@ -714,16 +714,13 @@ void initialize_assert_poison() {
|
||||
}
|
||||
}
|
||||
|
||||
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 @@ bool handle_assert_poison_fault(const void* ucVoid, const void* faulting_address
|
||||
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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user