summaryrefslogtreecommitdiff
path: root/lsh256.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2021-04-19 13:58:29 -0400
committerJeffrey Walton <noloader@gmail.com>2021-04-19 13:58:29 -0400
commitc7c1f26676dc467e261b70fb85db4ea550f5bcc8 (patch)
tree5e801ab0acf9e07ac62304edf3311db2bc795ac2 /lsh256.cpp
parenteedd0ac934a897a885f799f393ded871beef0b8d (diff)
downloadcryptopp-git-c7c1f26676dc467e261b70fb85db4ea550f5bcc8.tar.gz
Move GCC target attribute into config_misc.h
Diffstat (limited to 'lsh256.cpp')
-rw-r--r--lsh256.cpp21
1 files changed, 3 insertions, 18 deletions
diff --git a/lsh256.cpp b/lsh256.cpp
index a3c5a8b4..98dad0ab 100644
--- a/lsh256.cpp
+++ b/lsh256.cpp
@@ -66,21 +66,6 @@
# define CONST_M256_CAST(x) ((const __m256i *)(const void *)(x))
#endif
-// Should work for Clang 7 and above: https://stackoverflow.com/q/39958935.
-// But Clang 10 is broke: https://bugs.llvm.org/show_bug.cgi?id=50025.
-#if defined(__i386__) || defined(__i686__) || defined(__amd64__)
-# if (CRYPTOPP_GCC_VERSION >= 40800)
-# include <x86intrin.h>
-# define GCC_HAVE_TARGET 1
-# define GCC_TARGET_DEFAULT __attribute__ ((target ("default")))
-# define GCC_TARGET_SSSE3 __attribute__ ((target ("ssse3")))
-# endif
-#endif
-
-#ifndef GCC_TARGET_DEFAULT
-# define GCC_TARGET_DEFAULT
-#endif
-
ANONYMOUS_NAMESPACE_BEGIN
using CryptoPP::byte;
@@ -654,8 +639,8 @@ inline void xor_with_const(lsh_u32* cv_l, const lsh_u32* const_v)
#endif
}
-#if defined(GCC_HAVE_TARGET)
-GCC_TARGET_SSSE3
+#if defined(CRYPTOPP_HAVE_ATTRIBUTE_TARGET)
+CRYPTOPP_TARGET_SSSE3
inline void rotate_msg_gamma(lsh_u32* cv_r)
{
CRYPTOPP_ASSERT(cv_r != NULLPTR);
@@ -670,7 +655,7 @@ inline void rotate_msg_gamma(lsh_u32* cv_r)
}
#endif
-GCC_TARGET_DEFAULT
+CRYPTOPP_TARGET_DEFAULT
inline void rotate_msg_gamma(lsh_u32* cv_r)
{
CRYPTOPP_ASSERT(cv_r != NULLPTR);