summaryrefslogtreecommitdiff
path: root/gcm-simd.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2017-08-17 18:06:57 -0400
committerJeffrey Walton <noloader@gmail.com>2017-08-17 18:06:57 -0400
commit51fe8a7776cc105ccab83131b6058dc0691bb634 (patch)
treeeb1c175f6b992484cf94d6b275b794c824aded30 /gcm-simd.cpp
parent82456515c522fc8765604ad762d5f9baa8b482cb (diff)
downloadcryptopp-git-51fe8a7776cc105ccab83131b6058dc0691bb634.tar.gz
Guard use of SIGILL probes on Apple platforms
Diffstat (limited to 'gcm-simd.cpp')
-rw-r--r--gcm-simd.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcm-simd.cpp b/gcm-simd.cpp
index d80fd5b6..b98914df 100644
--- a/gcm-simd.cpp
+++ b/gcm-simd.cpp
@@ -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;