2 * include/asm-arm/unified.h - Unified Assembler Syntax helper macros
4 * Copyright (C) 2008 ARM Limited
6 * SPDX-License-Identifier: GPL-2.0
9 #ifndef __ASM_UNIFIED_H
10 #define __ASM_UNIFIED_H
12 #if defined(__ASSEMBLY__) && defined(CONFIG_ARM_ASM_UNIFIED)
17 #define AR_CLASS(x...)
18 #define M_CLASS(x...) x
20 #define AR_CLASS(x...) x
24 #ifdef CONFIG_THUMB2_KERNEL
27 #error Thumb-2 kernel requires gcc >= 4
30 /* The CPSR bit describing the instruction set (Thumb) */
31 #define PSR_ISETSTATE PSR_T_BIT
36 #define W(instr) instr.w
38 #define WASM(instr) #instr ".w"
41 #else /* !CONFIG_THUMB2_KERNEL */
43 /* The CPSR bit describing the instruction set (ARM) */
44 #define PSR_ISETSTATE 0
49 #define W(instr) instr
51 #define WASM(instr) #instr
54 #endif /* CONFIG_THUMB2_KERNEL */
56 #ifndef CONFIG_ARM_ASM_UNIFIED
59 * If the unified assembly syntax isn't used (in ARM mode), these
60 * macros expand to an empty string
93 #else /* !__ASSEMBLY__ */
101 " .macro ittt, cond\n"
103 " .macro itte, cond\n"
105 " .macro itet, cond\n"
107 " .macro itee, cond\n"
109 " .macro itttt, cond\n"
111 " .macro ittte, cond\n"
113 " .macro ittet, cond\n"
115 " .macro ittee, cond\n"
117 " .macro itett, cond\n"
119 " .macro itete, cond\n"
121 " .macro iteet, cond\n"
123 " .macro iteee, cond\n"
125 #endif /* __ASSEMBLY__ */
127 #endif /* CONFIG_ARM_ASM_UNIFIED */
129 #endif /* !__ASM_UNIFIED_H */