summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/modes/modes_lcl.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/modes/modes_lcl.h')
-rw-r--r--src/lib/libcrypto/modes/modes_lcl.h12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/lib/libcrypto/modes/modes_lcl.h b/src/lib/libcrypto/modes/modes_lcl.h
index 68c0e355ad..a53333df3d 100644
--- a/src/lib/libcrypto/modes/modes_lcl.h
+++ b/src/lib/libcrypto/modes/modes_lcl.h
@@ -22,14 +22,6 @@ typedef unsigned long long u64;
22typedef unsigned int u32; 22typedef unsigned int u32;
23typedef unsigned char u8; 23typedef unsigned char u8;
24 24
25#define STRICT_ALIGNMENT 1
26#if defined(__i386) || defined(__i386__) || \
27 defined(__x86_64) || defined(__x86_64__) || \
28 defined(_M_IX86) || defined(_M_AMD64) || defined(_M_X64) || \
29 defined(__s390__) || defined(__s390x__)
30# undef STRICT_ALIGNMENT
31#endif
32
33#if !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) 25#if !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM)
34#if defined(__GNUC__) && __GNUC__>=2 26#if defined(__GNUC__) && __GNUC__>=2
35# if defined(__x86_64) || defined(__x86_64__) 27# if defined(__x86_64) || defined(__x86_64__)
@@ -47,7 +39,7 @@ typedef unsigned char u8;
47# define BSWAP4(x) ({ u32 ret=(x); \ 39# define BSWAP4(x) ({ u32 ret=(x); \
48 asm ("bswapl %0" \ 40 asm ("bswapl %0" \
49 : "+r"(ret)); ret; }) 41 : "+r"(ret)); ret; })
50# elif (defined(__arm__) || defined(__arm)) && !defined(STRICT_ALIGNMENT) 42# elif (defined(__arm__) || defined(__arm)) && !defined(__STRICT_ALIGNMENT)
51# define BSWAP8(x) ({ u32 lo=(u64)(x)>>32,hi=(x); \ 43# define BSWAP8(x) ({ u32 lo=(u64)(x)>>32,hi=(x); \
52 asm ("rev %0,%0; rev %1,%1" \ 44 asm ("rev %0,%0; rev %1,%1" \
53 : "+r"(hi),"+r"(lo)); \ 45 : "+r"(hi),"+r"(lo)); \
@@ -60,7 +52,7 @@ typedef unsigned char u8;
60#endif 52#endif
61#endif 53#endif
62 54
63#if defined(BSWAP4) && !defined(STRICT_ALIGNMENT) 55#if defined(BSWAP4) && !defined(__STRICT_ALIGNMENT)
64#define GETU32(p) BSWAP4(*(const u32 *)(p)) 56#define GETU32(p) BSWAP4(*(const u32 *)(p))
65#define PUTU32(p,v) *(u32 *)(p) = BSWAP4(v) 57#define PUTU32(p,v) *(u32 *)(p) = BSWAP4(v)
66#else 58#else