2009-07-24 18:32:53 +07:00
|
|
|
/*
|
|
|
|
* include/asm-arm/unified.h - Unified Assembler Syntax helper macros
|
|
|
|
*
|
|
|
|
* Copyright (C) 2008 ARM Limited
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
|
|
* published by the Free Software Foundation.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __ASM_UNIFIED_H
|
|
|
|
#define __ASM_UNIFIED_H
|
|
|
|
|
2017-11-29 13:52:52 +07:00
|
|
|
#if defined(__ASSEMBLY__)
|
2009-07-24 18:32:53 +07:00
|
|
|
.syntax unified
|
2017-11-29 13:52:52 +07:00
|
|
|
#else
|
|
|
|
__asm__(".syntax unified");
|
2009-07-24 18:32:53 +07:00
|
|
|
#endif
|
|
|
|
|
2015-03-25 14:47:18 +07:00
|
|
|
#ifdef CONFIG_CPU_V7M
|
|
|
|
#define AR_CLASS(x...)
|
|
|
|
#define M_CLASS(x...) x
|
|
|
|
#else
|
|
|
|
#define AR_CLASS(x...) x
|
|
|
|
#define M_CLASS(x...)
|
|
|
|
#endif
|
|
|
|
|
2009-07-24 18:32:53 +07:00
|
|
|
#ifdef CONFIG_THUMB2_KERNEL
|
|
|
|
|
|
|
|
#if __GNUC__ < 4
|
|
|
|
#error Thumb-2 kernel requires gcc >= 4
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* The CPSR bit describing the instruction set (Thumb) */
|
|
|
|
#define PSR_ISETSTATE PSR_T_BIT
|
|
|
|
|
|
|
|
#define ARM(x...)
|
|
|
|
#define THUMB(x...) x
|
2009-09-18 21:09:33 +07:00
|
|
|
#ifdef __ASSEMBLY__
|
2009-07-24 18:32:53 +07:00
|
|
|
#define W(instr) instr.w
|
2013-07-02 18:10:42 +07:00
|
|
|
#else
|
|
|
|
#define WASM(instr) #instr ".w"
|
2012-01-10 04:43:20 +07:00
|
|
|
#endif
|
2009-07-24 18:32:53 +07:00
|
|
|
|
|
|
|
#else /* !CONFIG_THUMB2_KERNEL */
|
|
|
|
|
|
|
|
/* The CPSR bit describing the instruction set (ARM) */
|
|
|
|
#define PSR_ISETSTATE 0
|
|
|
|
|
|
|
|
#define ARM(x...) x
|
|
|
|
#define THUMB(x...)
|
2009-09-18 21:09:33 +07:00
|
|
|
#ifdef __ASSEMBLY__
|
2009-07-24 18:32:53 +07:00
|
|
|
#define W(instr) instr
|
2013-07-02 18:10:42 +07:00
|
|
|
#else
|
|
|
|
#define WASM(instr) #instr
|
2012-01-10 04:43:20 +07:00
|
|
|
#endif
|
2009-07-24 18:32:53 +07:00
|
|
|
|
|
|
|
#endif /* CONFIG_THUMB2_KERNEL */
|
|
|
|
|
|
|
|
#endif /* !__ASM_UNIFIED_H */
|