Mercurial > hg > truffle
comparison src/os_cpu/solaris_sparc/vm/os_solaris_sparc.cpp @ 11128:a74ec8831c7b
Merge
author | clucasius |
---|---|
date | Mon, 15 Jul 2013 12:24:32 -0400 |
parents | 980532a806a5 |
children | af21010d1062 |
comparison
equal
deleted
inserted
replaced
11124:bd1dc81da579 | 11128:a74ec8831c7b |
---|---|
301 #else | 301 #else |
302 return (bytes <= (size_t)3835*M); | 302 return (bytes <= (size_t)3835*M); |
303 #endif | 303 #endif |
304 } | 304 } |
305 | 305 |
306 extern "C" void Fetch32PFI () ; | |
307 extern "C" void Fetch32Resume () ; | |
308 extern "C" void FetchNPFI () ; | |
309 extern "C" void FetchNResume () ; | |
310 | |
311 extern "C" JNIEXPORT int | 306 extern "C" JNIEXPORT int |
312 JVM_handle_solaris_signal(int sig, siginfo_t* info, void* ucVoid, | 307 JVM_handle_solaris_signal(int sig, siginfo_t* info, void* ucVoid, |
313 int abort_if_unrecognized) { | 308 int abort_if_unrecognized) { |
314 ucontext_t* uc = (ucontext_t*) ucVoid; | 309 ucontext_t* uc = (ucontext_t*) ucVoid; |
315 | 310 |
377 // factor me: getPCfromContext | 372 // factor me: getPCfromContext |
378 pc = (address) uc->uc_mcontext.gregs[REG_PC]; | 373 pc = (address) uc->uc_mcontext.gregs[REG_PC]; |
379 npc = (address) uc->uc_mcontext.gregs[REG_nPC]; | 374 npc = (address) uc->uc_mcontext.gregs[REG_nPC]; |
380 | 375 |
381 // SafeFetch() support | 376 // SafeFetch() support |
382 // Implemented with either a fixed set of addresses such | 377 if (StubRoutines::is_safefetch_fault(pc)) { |
383 // as Fetch32*, or with Thread._OnTrap. | 378 uc->uc_mcontext.gregs[REG_PC] = intptr_t(StubRoutines::continuation_for_safefetch_fault(pc)); |
384 if (uc->uc_mcontext.gregs[REG_PC] == intptr_t(Fetch32PFI)) { | 379 uc->uc_mcontext.gregs[REG_nPC] = uc->uc_mcontext.gregs[REG_PC] + 4; |
385 uc->uc_mcontext.gregs [REG_PC] = intptr_t(Fetch32Resume) ; | 380 return 1; |
386 uc->uc_mcontext.gregs [REG_nPC] = intptr_t(Fetch32Resume) + 4 ; | |
387 return true ; | |
388 } | |
389 if (uc->uc_mcontext.gregs[REG_PC] == intptr_t(FetchNPFI)) { | |
390 uc->uc_mcontext.gregs [REG_PC] = intptr_t(FetchNResume) ; | |
391 uc->uc_mcontext.gregs [REG_nPC] = intptr_t(FetchNResume) + 4 ; | |
392 return true ; | |
393 } | 381 } |
394 | 382 |
395 // Handle ALL stack overflow variations here | 383 // Handle ALL stack overflow variations here |
396 if (sig == SIGSEGV && info->si_code == SEGV_ACCERR) { | 384 if (sig == SIGSEGV && info->si_code == SEGV_ACCERR) { |
397 address addr = (address) info->si_addr; | 385 address addr = (address) info->si_addr; |