From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-wm0-x241.google.com ([2a00:1450:400c:c09::241]) by casper.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bIAmK-0001Ge-D9 for barebox@lists.infradead.org; Wed, 29 Jun 2016 08:23:25 +0000 Received: by mail-wm0-x241.google.com with SMTP id 187so12392026wmz.1 for ; Wed, 29 Jun 2016 01:23:05 -0700 (PDT) From: Raphael Poggi Date: Wed, 29 Jun 2016 10:22:19 +0200 Message-Id: <1467188540-76509-13-git-send-email-poggi.raph@gmail.com> In-Reply-To: <1467188540-76509-1-git-send-email-poggi.raph@gmail.com> References: <1467188540-76509-1-git-send-email-poggi.raph@gmail.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH v4 12/13] arm: include: swab: use rigth assembly for armv8 To: barebox@lists.infradead.org Cc: Raphael Poggi Signed-off-by: Raphael Poggi --- arch/arm/include/asm/swab.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/include/asm/swab.h b/arch/arm/include/asm/swab.h index 9997ad2..3795437 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 -- 2.1.0 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox