aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Leach <matthew.leach@arm.com>2013-10-11 09:52:15 -0400
committerCatalin Marinas <catalin.marinas@arm.com>2013-10-25 10:59:38 -0400
commite68bedaa03c950ae8045e7899e7a6b2a97d1bf41 (patch)
tree95e93cb128426c1a6c7437e91e898ba02fb310b9
parenta1d5ebaf8ccdd100f45042ce32c591867de04ac3 (diff)
arm64: asm: add CPU_LE & CPU_BE assembler helpers
Add CPU_LE and CPU_BE to select assembler code in little and big endian configurations respectively. Signed-off-by: Matthew Leach <matthew.leach@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
-rw-r--r--arch/arm64/include/asm/assembler.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/assembler.h b/arch/arm64/include/asm/assembler.h
index 381b935e74cd..fd3e3924041b 100644
--- a/arch/arm64/include/asm/assembler.h
+++ b/arch/arm64/include/asm/assembler.h
@@ -115,6 +115,25 @@ lr .req x30 // link register
115 .align 7 115 .align 7
116 b \label 116 b \label
117 .endm 117 .endm
118
119/*
120 * Select code when configured for BE.
121 */
122#ifdef CONFIG_CPU_BIG_ENDIAN
123#define CPU_BE(code...) code
124#else
125#define CPU_BE(code...)
126#endif
127
128/*
129 * Select code when configured for LE.
130 */
131#ifdef CONFIG_CPU_BIG_ENDIAN
132#define CPU_LE(code...)
133#else
134#define CPU_LE(code...) code
135#endif
136
118/* 137/*
119 * Define a macro that constructs a 64-bit value by concatenating two 138 * Define a macro that constructs a 64-bit value by concatenating two
120 * 32-bit registers. Note that on big endian systems the order of the 139 * 32-bit registers. Note that on big endian systems the order of the