2 * include/asm-arm/unified.h - Unified Assembler Syntax helper macros
4 * Copyright (C) 2008 ARM Limited
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 #ifndef __ASM_UNIFIED_H
21 #define __ASM_UNIFIED_H
23 #if defined(__ASSEMBLY__)
26 __asm__(".syntax unified");
30 #define AR_CLASS(x...)
31 #define M_CLASS(x...) x
33 #define AR_CLASS(x...) x
37 #ifdef CONFIG_THUMB2_KERNEL
40 #error Thumb-2 kernel requires gcc >= 4
43 /* The CPSR bit describing the instruction set (Thumb) */
44 #define PSR_ISETSTATE PSR_T_BIT
49 #define W(instr) instr.w
51 #define WASM(instr) #instr ".w"
54 #else /* !CONFIG_THUMB2_KERNEL */
56 /* The CPSR bit describing the instruction set (ARM) */
57 #define PSR_ISETSTATE 0
62 #define W(instr) instr
64 #define WASM(instr) #instr
67 #endif /* CONFIG_THUMB2_KERNEL */
69 #endif /* !__ASM_UNIFIED_H */