src/os_cpu/solaris_x86/vm/os_solaris_x86.cpp

Print this page
rev 4810 : 8016697: PPC64 (part 5): Use stubs to implement safefetch
Summary: Implement Safefetch as stub routines. This reduces compiler and os dependencies.
Reviewed-by: twisti, kvn

*** 350,366 **** return addr != NULL; #endif // AMD64 } - extern "C" void Fetch32PFI () ; - extern "C" void Fetch32Resume () ; - #ifdef AMD64 - extern "C" void FetchNPFI () ; - extern "C" void FetchNResume () ; - #endif // AMD64 - extern "C" JNIEXPORT int JVM_handle_solaris_signal(int sig, siginfo_t* info, void* ucVoid, int abort_if_unrecognized) { ucontext_t* uc = (ucontext_t*) ucVoid; --- 350,359 ----
*** 434,454 **** //%note os_trap_1 if (info != NULL && uc != NULL && thread != NULL) { // factor me: getPCfromContext pc = (address) uc->uc_mcontext.gregs[REG_PC]; ! // SafeFetch32() support ! if (pc == (address) Fetch32PFI) { ! uc->uc_mcontext.gregs[REG_PC] = intptr_t(Fetch32Resume) ; ! return true ; ! } ! #ifdef AMD64 ! if (pc == (address) FetchNPFI) { ! uc->uc_mcontext.gregs [REG_PC] = intptr_t(FetchNResume) ; ! return true ; } - #endif // AMD64 // Handle ALL stack overflow variations here if (sig == SIGSEGV && info->si_code == SEGV_ACCERR) { address addr = (address) info->si_addr; if (thread->in_stack_yellow_zone(addr)) { --- 427,440 ---- //%note os_trap_1 if (info != NULL && uc != NULL && thread != NULL) { // factor me: getPCfromContext pc = (address) uc->uc_mcontext.gregs[REG_PC]; ! if (StubRoutines::is_safefetch_fault(pc)) { ! uc->uc_mcontext.gregs[REG_PC] = intptr_t(StubRoutines::continuation_for_safefetch_fault(pc)); ! return true; } // Handle ALL stack overflow variations here if (sig == SIGSEGV && info->si_code == SEGV_ACCERR) { address addr = (address) info->si_addr; if (thread->in_stack_yellow_zone(addr)) {