2019-05-29 16:57:47 -07:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
2009-07-24 12:32:53 +01:00
|
|
|
/*
|
|
|
|
* include/asm-arm/unified.h - Unified Assembler Syntax helper macros
|
|
|
|
*
|
|
|
|
* Copyright (C) 2008 ARM Limited
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __ASM_UNIFIED_H
|
|
|
|
#define __ASM_UNIFIED_H
|
|
|
|
|
2017-11-29 07:52:52 +01:00
|
|
|
#if defined(__ASSEMBLY__)
|
2009-07-24 12:32:53 +01:00
|
|
|
.syntax unified
|
2017-11-29 07:52:52 +01:00
|
|
|
#else
|
|
|
|
__asm__(".syntax unified");
|
2009-07-24 12:32:53 +01:00
|
|
|
#endif
|
|
|
|
|
2015-03-25 08:47:18 +01: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 12:32:53 +01:00
|
|
|
#ifdef CONFIG_THUMB2_KERNEL
|
|
|
|
|
|
|
|
/* The CPSR bit describing the instruction set (Thumb) */
|
|
|
|
#define PSR_ISETSTATE PSR_T_BIT
|
|
|
|
|
|
|
|
#define ARM(x...)
|
|
|
|
#define THUMB(x...) x
|
2009-09-18 15:09:33 +01:00
|
|
|
#ifdef __ASSEMBLY__
|
2009-07-24 12:32:53 +01:00
|
|
|
#define W(instr) instr.w
|
2013-07-02 12:10:42 +01:00
|
|
|
#else
|
|
|
|
#define WASM(instr) #instr ".w"
|
2012-01-09 15:43:20 -06:00
|
|
|
#endif
|
2009-07-24 12:32:53 +01: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 15:09:33 +01:00
|
|
|
#ifdef __ASSEMBLY__
|
2009-07-24 12:32:53 +01:00
|
|
|
#define W(instr) instr
|
2013-07-02 12:10:42 +01:00
|
|
|
#else
|
|
|
|
#define WASM(instr) #instr
|
2012-01-09 15:43:20 -06:00
|
|
|
#endif
|
2009-07-24 12:32:53 +01:00
|
|
|
|
|
|
|
#endif /* CONFIG_THUMB2_KERNEL */
|
|
|
|
|
|
|
|
#endif /* !__ASM_UNIFIED_H */
|