From f165d1822d7c2cc02c89d6afbc976b2ac78c2b43 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Fri, 27 Jul 2018 01:51:27 -0400 Subject: [PATCH] More SunStudio/SunCC workarounds --- config.h | 8 +++++++- simon.h | 6 ++++++ speck.h | 6 ++++++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/config.h b/config.h index 0af378a8..64c76930 100644 --- a/config.h +++ b/config.h @@ -585,7 +585,13 @@ NAMESPACE_END # endif #endif -// Fixup for SunCC 12.2-12.6. Compiler crash on GCM_Reduce_CLMUL and friends. +// Fixup for SunCC 12.1-12.4. Bad code generation in AES_Encrypt and friends. +// http://github.com/weidai11/cryptopp/issues/226 +#if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x5130) +# undef CRYPTOPP_AESNI_AVAILABLE +#endif + +// Fixup for SunCC 12.1-12.6. Compiler crash on GCM_Reduce_CLMUL and friends. // http://github.com/weidai11/cryptopp/issues/226 #if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x5150) # undef CRYPTOPP_CLMUL_AVAILABLE diff --git a/simon.h b/simon.h index 4a6d0609..1ab3526a 100644 --- a/simon.h +++ b/simon.h @@ -25,6 +25,12 @@ # define CRYPTOPP_SIMON128_ADVANCED_PROCESS_BLOCKS 1 #endif +// Yet another SunStudio/SunCC workaround +#if defined(__SUNPRO_CC) +# undef CRYPTOPP_SIMON64_ADVANCED_PROCESS_BLOCKS +# undef CRYPTOPP_SIMON128_ADVANCED_PROCESS_BLOCKS +#endif + NAMESPACE_BEGIN(CryptoPP) /// \brief SIMON block cipher information diff --git a/speck.h b/speck.h index 7ed7517e..211ee683 100644 --- a/speck.h +++ b/speck.h @@ -25,6 +25,12 @@ # define CRYPTOPP_SPECK128_ADVANCED_PROCESS_BLOCKS 1 #endif +// Yet another SunStudio/SunCC workaround +#if defined(__SUNPRO_CC) +# undef CRYPTOPP_SPECK64_ADVANCED_PROCESS_BLOCKS +# undef CRYPTOPP_SPECK128_ADVANCED_PROCESS_BLOCKS +#endif + NAMESPACE_BEGIN(CryptoPP) /// \brief SPECK block cipher information