# HG changeset patch # User jwilhelm # Date 1427377333 -3600 # Node ID 73f895aed8043e29557c394927134303191a4e9d # Parent 2a1a74472bfdfe13a86878f3334b159fd3ee35de# Parent 67d4909233f2b4d330df4ee7209ca36831a37ba1 Merge diff -r 2a1a74472bfd -r 73f895aed804 hotspot/src/os_cpu/linux_aarch64/vm/os_linux_aarch64.cpp --- a/hotspot/src/os_cpu/linux_aarch64/vm/os_linux_aarch64.cpp Wed Mar 25 19:50:00 2015 +0100 +++ b/hotspot/src/os_cpu/linux_aarch64/vm/os_linux_aarch64.cpp Thu Mar 26 14:42:13 2015 +0100 @@ -116,6 +116,14 @@ #endif } +void os::Linux::ucontext_set_pc(ucontext_t * uc, address pc) { +#ifdef BUILTIN_SIM + uc->uc_mcontext.gregs[REG_PC] = (intptr_t)pc; +#else + uc->uc_mcontext.pc = (intptr_t)pc; +#endif +} + intptr_t* os::Linux::ucontext_get_sp(ucontext_t * uc) { #ifdef BUILTIN_SIM return (intptr_t*)uc->uc_mcontext.gregs[REG_SP]; @@ -311,7 +319,7 @@ } #else if (StubRoutines::is_safefetch_fault(pc)) { - uc->uc_mcontext.pc = intptr_t(StubRoutines::continuation_for_safefetch_fault(pc)); + os::Linux::ucontext_set_pc(uc, StubRoutines::continuation_for_safefetch_fault(pc)); return 1; } #endif @@ -432,11 +440,7 @@ // save all thread context in case we need to restore it if (thread != NULL) thread->set_saved_exception_pc(pc); -#ifdef BUILTIN_SIM - uc->uc_mcontext.gregs[REG_PC] = (greg_t)stub; -#else - uc->uc_mcontext.pc = (__u64)stub; -#endif + os::Linux::ucontext_set_pc(uc, stub); return true; }