]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
PPC: Add asm helpers for BE 32bit load/store
authorAlexander Graf <agraf@suse.de>
Wed, 11 Jun 2014 08:07:40 +0000 (10:07 +0200)
committerAlexander Graf <agraf@suse.de>
Mon, 28 Jul 2014 13:22:21 +0000 (15:22 +0200)
From assembly code we might not only have to explicitly BE access 64bit values,
but sometimes also 32bit ones. Add helpers that allow for easy use of lwzx/stwx
in their respective byte-reverse or native form.

Signed-off-by: Alexander Graf <agraf@suse.de>
CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/include/asm/asm-compat.h

index 4b237aa35660ffae9a8b5506fdba78cd58281a2e..21be8ae8f809747302debb8d2b8f9ae974e69613 100644 (file)
 #define PPC_MIN_STKFRM 112
 
 #ifdef __BIG_ENDIAN__
+#define LWZX_BE        stringify_in_c(lwzx)
 #define LDX_BE stringify_in_c(ldx)
+#define STWX_BE        stringify_in_c(stwx)
 #define STDX_BE        stringify_in_c(stdx)
 #else
+#define LWZX_BE        stringify_in_c(lwbrx)
 #define LDX_BE stringify_in_c(ldbrx)
+#define STWX_BE        stringify_in_c(stwbrx)
 #define STDX_BE        stringify_in_c(stdbrx)
 #endif