diff options
author | Raphael Poggi <poggi.raph@gmail.com> | 2016-07-04 13:52:55 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2016-07-06 11:23:50 +0200 |
commit | 10bf671754cbf7780f5fff19a987644e305c647f (patch) | |
tree | 73f2497699e4ffcafed3f8985ec7eae59b696ac3 /arch | |
parent | ac04e9332689ee93daab1e8ea9ebe260c5bf6bf3 (diff) | |
download | barebox-10bf671754cbf7780f5fff19a987644e305c647f.tar.gz barebox-10bf671754cbf7780f5fff19a987644e305c647f.tar.xz |
arm: include: swab: use rigth assembly for armv8
Signed-off-by: Raphael Poggi <poggi.raph@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/include/asm/swab.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/include/asm/swab.h b/arch/arm/include/asm/swab.h index 9997ad20ef..3795437831 100644 --- a/arch/arm/include/asm/swab.h +++ b/arch/arm/include/asm/swab.h @@ -33,7 +33,11 @@ static inline __attribute_const__ __u16 __arch_swab16(__u16 x) static inline __attribute_const__ __u32 __arch_swab32(__u32 x) { +#if __LINUX_ARM_ARCH__ == 8 + __asm__ ("rev %w0, %w1" : "=r" (x) : "r" (x)); +#else __asm__ ("rev %0, %1" : "=r" (x) : "r" (x)); +#endif return x; } #define __arch_swab32 __arch_swab32 |