src/os_cpu/bsd_x86/vm/os_bsd_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
*** 383,399 ****
// From IA32 System Programming Guide
enum {
trap_page_fault = 0xE
};
- 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_bsd_signal(int sig,
siginfo_t* info,
void* ucVoid,
int abort_if_unrecognized) {
--- 383,392 ----
*** 452,471 ****
//%note os_trap_1
if (info != NULL && uc != NULL && thread != NULL) {
pc = (address) os::Bsd::ucontext_get_pc(uc);
! if (pc == (address) Fetch32PFI) {
! uc->context_pc = intptr_t(Fetch32Resume) ;
! return 1 ;
! }
! #ifdef AMD64
! if (pc == (address) FetchNPFI) {
! uc->context_pc = intptr_t (FetchNResume) ;
! return 1 ;
}
- #endif // AMD64
// Handle ALL stack overflow variations here
if (sig == SIGSEGV || sig == SIGBUS) {
address addr = (address) info->si_addr;
--- 445,458 ----
//%note os_trap_1
if (info != NULL && uc != NULL && thread != NULL) {
pc = (address) os::Bsd::ucontext_get_pc(uc);
! if (StubRoutines::is_safefetch_fault(pc)) {
! uc->context_pc = intptr_t(StubRoutines::continuation_for_safefetch_fault(pc));
! return 1;
}
// Handle ALL stack overflow variations here
if (sig == SIGSEGV || sig == SIGBUS) {
address addr = (address) info->si_addr;