xref: /linux/arch/arc/include/asm/linkage.h (revision ca55b2fef3a9373fcfc30f82fd26bc7fccbda732)
1 /*
2  * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation.
7  */
8 
9 #ifndef __ASM_LINKAGE_H
10 #define __ASM_LINKAGE_H
11 
12 #ifdef __ASSEMBLY__
13 
14 #define ASM_NL		 `	/* use '`' to mark new line in macro */
15 
16 /* annotation for data we want in DCCM - if enabled in .config */
17 .macro ARCFP_DATA nm
18 #ifdef CONFIG_ARC_HAS_DCCM
19 	.section .data.arcfp
20 #else
21 	.section .data
22 #endif
23 	.global \nm
24 .endm
25 
26 /* annotation for data we want in DCCM - if enabled in .config */
27 .macro ARCFP_CODE
28 #ifdef CONFIG_ARC_HAS_ICCM
29 	.section .text.arcfp, "ax",@progbits
30 #else
31 	.section .text, "ax",@progbits
32 #endif
33 .endm
34 
35 #else	/* !__ASSEMBLY__ */
36 
37 #ifdef CONFIG_ARC_HAS_ICCM
38 #define __arcfp_code __attribute__((__section__(".text.arcfp")))
39 #else
40 #define __arcfp_code __attribute__((__section__(".text")))
41 #endif
42 
43 #ifdef CONFIG_ARC_HAS_DCCM
44 #define __arcfp_data __attribute__((__section__(".data.arcfp")))
45 #else
46 #define __arcfp_data __attribute__((__section__(".data")))
47 #endif
48 
49 #endif /* __ASSEMBLY__ */
50 
51 #endif
52