summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/sha3
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/sha3')
-rwxr-xr-xsrc/3rdparty/sha3/KeccakF-1600-opt64.c8
-rwxr-xr-xsrc/3rdparty/sha3/KeccakSponge.h8
2 files changed, 12 insertions, 4 deletions
diff --git a/src/3rdparty/sha3/KeccakF-1600-opt64.c b/src/3rdparty/sha3/KeccakF-1600-opt64.c
index 0432f1ab18..7bd442ef69 100755
--- a/src/3rdparty/sha3/KeccakF-1600-opt64.c
+++ b/src/3rdparty/sha3/KeccakF-1600-opt64.c
@@ -19,12 +19,16 @@ http://creativecommons.org/publicdomain/zero/1.0/
typedef unsigned char UINT8;
typedef unsigned long long int UINT64;
+#if defined(UseSSE) || defined(UseXOP)
#if defined(__GNUC__)
#define ALIGN __attribute__ ((aligned(32)))
#elif defined(_MSC_VER)
#define ALIGN __declspec(align(32))
-#else
-#define ALIGN
+#endif
+#endif
+
+#ifndef ALIGN
+# define ALIGN
#endif
#if defined(UseSSE)
diff --git a/src/3rdparty/sha3/KeccakSponge.h b/src/3rdparty/sha3/KeccakSponge.h
index a545cacb30..8bb11a8a1d 100755
--- a/src/3rdparty/sha3/KeccakSponge.h
+++ b/src/3rdparty/sha3/KeccakSponge.h
@@ -19,12 +19,16 @@ http://creativecommons.org/publicdomain/zero/1.0/
#define KeccakMaximumRate 1536
#define KeccakMaximumRateInBytes (KeccakMaximumRate/8)
+#if defined(UseSSE) || defined(UseXOP)
#if defined(__GNUC__)
#define ALIGN __attribute__ ((aligned(32)))
#elif defined(_MSC_VER)
#define ALIGN __declspec(align(32))
-#else
-#define ALIGN
+#endif
+#endif
+
+#ifndef ALIGN
+# define ALIGN
#endif
ALIGN typedef struct spongeStateStruct {