aboutsummaryrefslogtreecommitdiff
path: root/patches/modes_local.h.patch
blob: 8f55eedf386d3245269f72f55f17c8efe631d56a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--- crypto/modes/modes_local.h.orig	Tue Nov 14 10:25:15 2017
+++ crypto/modes/modes_local.h	Sat Jan 19 22:19:23 2019
@@ -45,14 +45,16 @@
 			asm ("bswapl %0"		\
 			: "+r"(ret));	ret;		})
 # elif (defined(__arm__) || defined(__arm)) && !defined(__STRICT_ALIGNMENT)
-#  define BSWAP8(x) ({	u32 lo=(u64)(x)>>32,hi=(x);	\
+#  if (__ARM_ARCH >= 6)
+#   define BSWAP8(x) ({	u32 lo=(u64)(x)>>32,hi=(x);	\
 			asm ("rev %0,%0; rev %1,%1"	\
 			: "+r"(hi),"+r"(lo));		\
 			(u64)hi<<32|lo;			})
-#  define BSWAP4(x) ({	u32 ret;			\
+#   define BSWAP4(x) ({	u32 ret;			\
 			asm ("rev %0,%1"		\
 			: "=r"(ret) : "r"((u32)(x)));	\
 			ret;				})
+#  endif
 # endif
 #endif
 #endif