Commit a8ede5fe32 for openssl.org
commit a8ede5fe32af08599f2738cb24d92464a2e9322e
Author: Gleb Popov <6yearold@gmail.com>
Date: Thu Aug 28 14:19:50 2025 +0300
md32_common.h: Add Elbrus2000-specific version of ROTATE
Reviewed-by: Andrew Dinh <andrewd@openssl.org>
Reviewed-by: Igor Ustinov <igus@openssl.foundation>
MergeDate: Fri Jul 31 16:49:30 2026
(Merged from https://github.com/openssl/openssl/pull/31269)
diff --git a/include/crypto/md32_common.inc b/include/crypto/md32_common.inc
index 3dea481c56..53c3bf7936 100644
--- a/include/crypto/md32_common.inc
+++ b/include/crypto/md32_common.inc
@@ -120,6 +120,11 @@
: "=r"(ret) \
: "r"(x), "i"(32 - (n))); ret; })
#endif
+# elif defined(__e2k__)
+# undef ROTATE
+# define ROTATE(a,n) ( (__builtin_constant_p(n) && (n) > 16) \
+ ? __builtin_e2k_scrs((a), 32 - (n)) \
+ : __builtin_e2k_scls((a), (n)) )
#endif
#endif
#endif