Skip to content

Commit

Permalink
arm: include: swab: use rigth assembly for armv8
Browse files Browse the repository at this point in the history
Signed-off-by: Raphael Poggi <[email protected]>
Signed-off-by: Sascha Hauer <[email protected]>
  • Loading branch information
raphui authored and saschahauer committed Jul 6, 2016
1 parent ac04e93 commit 10bf671
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions arch/arm/include/asm/swab.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 10bf671

Please sign in to comment.