mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-25 05:45:11 +02:00
8076185: Provide SafeFetchX implementation for zero
Implement SafeFetchX for zero using setjmp/longjmp and Posix TLS Reviewed-by: sgehwolf, dholmes
This commit is contained in:
parent
38c3337610
commit
1afbc04d56
4 changed files with 79 additions and 8 deletions
|
@ -451,14 +451,10 @@ inline intptr_t SafeFetchN(intptr_t* adr, intptr_t errValue) {
|
|||
|
||||
// returns true if SafeFetch32 and SafeFetchN can be used safely (stubroutines are already generated)
|
||||
inline bool CanUseSafeFetch32() {
|
||||
// All platforms have the stub but ZERO isn't safe.
|
||||
assert(StubRoutines::SafeFetch32_stub() != NULL, "should have generated stub");
|
||||
return NOT_ZERO(true) ZERO_ONLY(false);
|
||||
return StubRoutines::SafeFetch32_stub() ? true : false;
|
||||
}
|
||||
|
||||
inline bool CanUseSafeFetchN() {
|
||||
// All platforms have the stub but ZERO isn't safe.
|
||||
assert(StubRoutines::SafeFetchN_stub() != NULL, "should have generated stub");
|
||||
return NOT_ZERO(true) ZERO_ONLY(false);
|
||||
inline bool CanUseSafeFetchN() {
|
||||
return StubRoutines::SafeFetchN_stub() ? true : false;
|
||||
}
|
||||
#endif // SHARE_VM_RUNTIME_STUBROUTINES_HPP
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue