aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAlexander Troosh <[email protected]>2025-10-10 12:58:59 +0200
committerAndrew Dinh <[email protected]>2026-07-31 18:48:54 +0200
commit66f75fbcccf522e7ea5ead6beb1e6a84375e6326 (patch)
treedf3823d710c6b70fc51e9e7c2ce570f2fe836a40 /include
parentAdd SIMD specialization of chacha20 for the Elbrus2000 arch (diff)
downloadopenssl-66f75fbcccf522e7ea5ead6beb1e6a84375e6326.tar.gz
openssl-66f75fbcccf522e7ea5ead6beb1e6a84375e6326.zip
GCM/ghash specialization for the e2kv6 (Elbrus2000) arch
Co-authored-by: Gleb Popov <[email protected]> Reviewed-by: Andrew Dinh <[email protected]> Reviewed-by: Igor Ustinov <[email protected]> MergeDate: Fri Jul 31 16:49:56 2026 (Merged from https://github.com/openssl/openssl/pull/31269)
Diffstat (limited to 'include')
-rw-r--r--include/crypto/modes.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/crypto/modes.h b/include/crypto/modes.h
index baa0f3a6c14..7076e196478 100644
--- a/include/crypto/modes.h
+++ b/include/crypto/modes.h
@@ -25,7 +25,7 @@
#define STRICT_ALIGNMENT 1
#ifndef PEDANTIC
-#if defined(__i386) || defined(__i386__) || defined(__x86_64) || defined(__x86_64__) || defined(_M_IX86) || defined(_M_AMD64) || defined(_M_X64) || defined(__aarch64__) || defined(__s390__) || defined(__s390x__)
+#if defined(__i386) || defined(__i386__) || defined(__x86_64) || defined(__x86_64__) || defined(_M_IX86) || defined(_M_AMD64) || defined(_M_X64) || defined(__aarch64__) || defined(__s390__) || defined(__s390x__) || defined(__e2k__)
#undef STRICT_ALIGNMENT
#endif
#endif
@@ -72,6 +72,9 @@
#define BSWAP4(x) ({ uint32_t ret_=(x); \
asm ("rev8 %0,%0; srli %0,%0,32"\
: "+&r"(ret_)); ret_; })
+#elif defined(__e2k__)
+#define BSWAP8(x) __builtin_bswap64(x)
+#define BSWAP4(x) __builtin_bswap32(x)
#endif
#elif defined(_MSC_VER)
#if _MSC_VER >= 1300