Mercurial > hg > truffle
comparison src/os_cpu/solaris_sparc/vm/os_solaris_sparc.cpp @ 11153:af21010d1062
Merge
author | dcubed |
---|---|
date | Thu, 18 Jul 2013 12:35:55 -0700 |
parents | 5e3b6f79d280 980532a806a5 |
children | 6f8d03da5d08 |
comparison
equal
deleted
inserted
replaced
11151:5e3b6f79d280 | 11153:af21010d1062 |
---|---|
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 |
381 // factor me: getPCfromContext | 376 // factor me: getPCfromContext |
382 pc = (address) uc->uc_mcontext.gregs[REG_PC]; | 377 pc = (address) uc->uc_mcontext.gregs[REG_PC]; |
383 npc = (address) uc->uc_mcontext.gregs[REG_nPC]; | 378 npc = (address) uc->uc_mcontext.gregs[REG_nPC]; |
384 | 379 |
385 // SafeFetch() support | 380 // SafeFetch() support |
386 // Implemented with either a fixed set of addresses such | 381 if (StubRoutines::is_safefetch_fault(pc)) { |
387 // as Fetch32*, or with Thread._OnTrap. | 382 uc->uc_mcontext.gregs[REG_PC] = intptr_t(StubRoutines::continuation_for_safefetch_fault(pc)); |
388 if (uc->uc_mcontext.gregs[REG_PC] == intptr_t(Fetch32PFI)) { | 383 uc->uc_mcontext.gregs[REG_nPC] = uc->uc_mcontext.gregs[REG_PC] + 4; |
389 uc->uc_mcontext.gregs [REG_PC] = intptr_t(Fetch32Resume) ; | 384 return 1; |
390 uc->uc_mcontext.gregs [REG_nPC] = intptr_t(Fetch32Resume) + 4 ; | |
391 return true ; | |
392 } | |
393 if (uc->uc_mcontext.gregs[REG_PC] == intptr_t(FetchNPFI)) { | |
394 uc->uc_mcontext.gregs [REG_PC] = intptr_t(FetchNResume) ; | |
395 uc->uc_mcontext.gregs [REG_nPC] = intptr_t(FetchNResume) + 4 ; | |
396 return true ; | |
397 } | 385 } |
398 | 386 |
399 // Handle ALL stack overflow variations here | 387 // Handle ALL stack overflow variations here |
400 if (sig == SIGSEGV && info->si_code == SEGV_ACCERR) { | 388 if (sig == SIGSEGV && info->si_code == SEGV_ACCERR) { |
401 address addr = (address) info->si_addr; | 389 address addr = (address) info->si_addr; |