diff options
author | Jeffrey Walton <noloader@gmail.com> | 2015-12-25 03:37:14 -0500 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2015-12-25 03:37:14 -0500 |
commit | 885b94707cb9a9178cd8787282428cc7c46304a1 (patch) | |
tree | 977bd8fc002a521377740153dc09b88146bfa59f /sha.cpp | |
parent | 4cf8d660d29f0533df21c1f29cce8e4e77e10a0c (diff) | |
download | cryptopp-git-885b94707cb9a9178cd8787282428cc7c46304a1.tar.gz |
Fixed Clang 3.3 integrated assembler crash on Linux
Diffstat (limited to 'sha.cpp')
-rw-r--r-- | sha.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -102,7 +102,7 @@ void SHA256::InitState(HashWordType *state) memcpy(state, s, sizeof(s));
}
-#if CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE
+#if CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE && !defined(CRYPTOPP_DISABLE_SHA_ASM)
CRYPTOPP_ALIGN_DATA(16) extern const word32 SHA256_K[64] CRYPTOPP_SECTION_ALIGN16 = {
#else
extern const word32 SHA256_K[64] = {
@@ -127,7 +127,7 @@ extern const word32 SHA256_K[64] = { #endif // #ifndef CRYPTOPP_GENERATE_X64_MASM
-#if defined(CRYPTOPP_X86_ASM_AVAILABLE) || defined(CRYPTOPP_X32_ASM_AVAILABLE) || defined(CRYPTOPP_GENERATE_X64_MASM)
+#if (defined(CRYPTOPP_X86_ASM_AVAILABLE) || defined(CRYPTOPP_X32_ASM_AVAILABLE) || defined(CRYPTOPP_GENERATE_X64_MASM)) && !defined(CRYPTOPP_DISABLE_SHA_ASM)
static void CRYPTOPP_FASTCALL X86_SHA256_HashBlocks(word32 *state, const word32 *data, size_t len
#if defined(_MSC_VER) && (_MSC_VER == 1200)
@@ -461,7 +461,7 @@ void CRYPTOPP_FASTCALL X86_SHA256_HashBlocks(word32 *state, const word32 *data, }
#endif
-#if defined(CRYPTOPP_X86_ASM_AVAILABLE) || defined(CRYPTOPP_X32_ASM_AVAILABLE) || defined(CRYPTOPP_X64_MASM_AVAILABLE)
+#if (defined(CRYPTOPP_X86_ASM_AVAILABLE) || defined(CRYPTOPP_X32_ASM_AVAILABLE) || defined(CRYPTOPP_X64_MASM_AVAILABLE)) && !defined(CRYPTOPP_DISABLE_SHA_ASM)
size_t SHA256::HashMultipleBlocks(const word32 *input, size_t length)
{
@@ -503,7 +503,7 @@ size_t SHA224::HashMultipleBlocks(const word32 *input, size_t length) void SHA256::Transform(word32 *state, const word32 *data)
{
word32 W[16];
-#if defined(CRYPTOPP_X86_ASM_AVAILABLE) || defined(CRYPTOPP_X32_ASM_AVAILABLE) || defined(CRYPTOPP_X64_MASM_AVAILABLE)
+#if (defined(CRYPTOPP_X86_ASM_AVAILABLE) || defined(CRYPTOPP_X32_ASM_AVAILABLE) || defined(CRYPTOPP_X64_MASM_AVAILABLE)) && !defined(CRYPTOPP_DISABLE_SHA_ASM)
// this byte reverse is a waste of time, but this function is only called by MDC
ByteReverse(W, data, BLOCKSIZE);
X86_SHA256_HashBlocks(state, W, BLOCKSIZE - !HasSSE2());
|