diff options
Diffstat (limited to 'src/lib/libcrypto/des/des_locl.h')
-rw-r--r-- | src/lib/libcrypto/des/des_locl.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/lib/libcrypto/des/des_locl.h b/src/lib/libcrypto/des/des_locl.h index 70e833be3f..e44e8e98b2 100644 --- a/src/lib/libcrypto/des/des_locl.h +++ b/src/lib/libcrypto/des/des_locl.h | |||
@@ -162,7 +162,18 @@ | |||
162 | 162 | ||
163 | #if defined(OPENSSL_SYS_WIN32) && defined(_MSC_VER) | 163 | #if defined(OPENSSL_SYS_WIN32) && defined(_MSC_VER) |
164 | #define ROTATE(a,n) (_lrotr(a,n)) | 164 | #define ROTATE(a,n) (_lrotr(a,n)) |
165 | #else | 165 | #elif defined(__GNUC__) && __GNUC__>=2 && !defined(__STRICT_ANSI__) && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) && !defined(PEDANTIC) |
166 | # if defined(__i386) || defined(__i386__) || defined(__x86_64) || defined(__x86_64__) | ||
167 | # define ROTATE(a,n) ({ register unsigned int ret; \ | ||
168 | asm ("rorl %1,%0" \ | ||
169 | : "=r"(ret) \ | ||
170 | : "I"(n),"0"(a) \ | ||
171 | : "cc"); \ | ||
172 | ret; \ | ||
173 | }) | ||
174 | # endif | ||
175 | #endif | ||
176 | #ifndef ROTATE | ||
166 | #define ROTATE(a,n) (((a)>>(n))+((a)<<(32-(n)))) | 177 | #define ROTATE(a,n) (((a)>>(n))+((a)<<(32-(n)))) |
167 | #endif | 178 | #endif |
168 | 179 | ||