Guard use of SIGILL probes on Apple platforms
parent
82456515c5
commit
51fe8a7776
|
|
@ -75,6 +75,11 @@ bool CPU_ProbeCRC32()
|
|||
return result;
|
||||
#else
|
||||
|
||||
# if defined(__APPLE__)
|
||||
// No SIGILL probes on Apple platforms.
|
||||
return false;
|
||||
# endif
|
||||
|
||||
// longjmp and clobber warnings. Volatile is required.
|
||||
// http://github.com/weidai11/cryptopp/issues/24 and http://stackoverflow.com/q/7721854
|
||||
volatile bool result = true;
|
||||
|
|
|
|||
|
|
@ -221,6 +221,11 @@ bool CPU_ProbePMULL()
|
|||
return result;
|
||||
# else
|
||||
|
||||
# if defined(__APPLE__)
|
||||
// No SIGILL probes on Apple platforms. Plus, Apple Clang does not have PMULL intrinsics.
|
||||
return false;
|
||||
# endif
|
||||
|
||||
// longjmp and clobber warnings. Volatile is required.
|
||||
// http://github.com/weidai11/cryptopp/issues/24 and http://stackoverflow.com/q/7721854
|
||||
volatile bool result = true;
|
||||
|
|
|
|||
|
|
@ -98,6 +98,11 @@ bool CPU_ProbeAES()
|
|||
return result;
|
||||
# else
|
||||
|
||||
# if defined(__APPLE__)
|
||||
// No SIGILL probes on Apple platforms.
|
||||
return false;
|
||||
# endif
|
||||
|
||||
// longjmp and clobber warnings. Volatile is required.
|
||||
// http://github.com/weidai11/cryptopp/issues/24 and http://stackoverflow.com/q/7721854
|
||||
volatile bool result = true;
|
||||
|
|
|
|||
10
sha-simd.cpp
10
sha-simd.cpp
|
|
@ -84,6 +84,11 @@ bool CPU_ProbeSHA1()
|
|||
return result;
|
||||
# else
|
||||
|
||||
# if defined(__APPLE__)
|
||||
// No SIGILL probes on Apple platforms.
|
||||
return false;
|
||||
# endif
|
||||
|
||||
// longjmp and clobber warnings. Volatile is required.
|
||||
// http://github.com/weidai11/cryptopp/issues/24 and http://stackoverflow.com/q/7721854
|
||||
volatile bool result = true;
|
||||
|
|
@ -143,6 +148,11 @@ bool CPU_ProbeSHA2()
|
|||
return result;
|
||||
#else
|
||||
|
||||
# if defined(__APPLE__)
|
||||
// No SIGILL probes on Apple platforms.
|
||||
return false;
|
||||
# endif
|
||||
|
||||
// longjmp and clobber warnings. Volatile is required.
|
||||
// http://github.com/weidai11/cryptopp/issues/24 and http://stackoverflow.com/q/7721854
|
||||
volatile bool result = true;
|
||||
|
|
|
|||
Loading…
Reference in New Issue