xref: /openbmc/linux/arch/arc/include/asm/linkage.h (revision 2f5947df)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3  * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
4  */
5 
6 #ifndef __ASM_LINKAGE_H
7 #define __ASM_LINKAGE_H
8 
9 #include <asm/dwarf.h>
10 
11 #ifdef __ASSEMBLY__
12 
13 #define ASM_NL		 `	/* use '`' to mark new line in macro */
14 
15 /* annotation for data we want in DCCM - if enabled in .config */
16 .macro ARCFP_DATA nm
17 #ifdef CONFIG_ARC_HAS_DCCM
18 	.section .data.arcfp
19 #else
20 	.section .data
21 #endif
22 	.global \nm
23 .endm
24 
25 /* annotation for data we want in DCCM - if enabled in .config */
26 .macro ARCFP_CODE
27 #ifdef CONFIG_ARC_HAS_ICCM
28 	.section .text.arcfp, "ax",@progbits
29 #else
30 	.section .text, "ax",@progbits
31 #endif
32 .endm
33 
34 #define ENTRY_CFI(name)		\
35 	.globl name ASM_NL	\
36 	ALIGN ASM_NL 		\
37 	name: ASM_NL		\
38 	CFI_STARTPROC ASM_NL
39 
40 #define END_CFI(name) 		\
41 	CFI_ENDPROC ASM_NL	\
42 	.size name, .-name
43 
44 #else	/* !__ASSEMBLY__ */
45 
46 #ifdef CONFIG_ARC_HAS_ICCM
47 #define __arcfp_code __attribute__((__section__(".text.arcfp")))
48 #else
49 #define __arcfp_code __attribute__((__section__(".text")))
50 #endif
51 
52 #ifdef CONFIG_ARC_HAS_DCCM
53 #define __arcfp_data __attribute__((__section__(".data.arcfp")))
54 #else
55 #define __arcfp_data __attribute__((__section__(".data")))
56 #endif
57 
58 #endif /* __ASSEMBLY__ */
59 
60 #endif
61