Vineet Gupta | 3be80aa | 2013-01-18 15:12:17 +0530 | [diff] [blame] | 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 | |
Vineet Gupta | 5a205a3 | 2016-09-16 17:23:26 -0700 | [diff] [blame] | 12 | #include <asm/dwarf.h> |
| 13 | |
Vineet Gupta | 3be80aa | 2013-01-18 15:12:17 +0530 | [diff] [blame] | 14 | #ifdef __ASSEMBLY__ |
| 15 | |
Chen Gang | 9df62f0 | 2014-01-12 09:59:13 +0800 | [diff] [blame] | 16 | #define ASM_NL ` /* use '`' to mark new line in macro */ |
| 17 | |
Vineet Gupta | 8b5850f | 2013-01-18 15:12:25 +0530 | [diff] [blame] | 18 | /* annotation for data we want in DCCM - if enabled in .config */ |
| 19 | .macro ARCFP_DATA nm |
| 20 | #ifdef CONFIG_ARC_HAS_DCCM |
| 21 | .section .data.arcfp |
| 22 | #else |
| 23 | .section .data |
| 24 | #endif |
| 25 | .global \nm |
| 26 | .endm |
| 27 | |
| 28 | /* annotation for data we want in DCCM - if enabled in .config */ |
| 29 | .macro ARCFP_CODE |
| 30 | #ifdef CONFIG_ARC_HAS_ICCM |
| 31 | .section .text.arcfp, "ax",@progbits |
| 32 | #else |
| 33 | .section .text, "ax",@progbits |
| 34 | #endif |
| 35 | .endm |
| 36 | |
Vineet Gupta | 5a205a3 | 2016-09-16 17:23:26 -0700 | [diff] [blame] | 37 | #define ENTRY_CFI(name) \ |
| 38 | .globl name ASM_NL \ |
| 39 | ALIGN ASM_NL \ |
| 40 | name: ASM_NL \ |
| 41 | CFI_STARTPROC ASM_NL |
| 42 | |
| 43 | #define END_CFI(name) \ |
| 44 | CFI_ENDPROC ASM_NL \ |
| 45 | .size name, .-name |
| 46 | |
Vineet Gupta | 8b5850f | 2013-01-18 15:12:25 +0530 | [diff] [blame] | 47 | #else /* !__ASSEMBLY__ */ |
| 48 | |
| 49 | #ifdef CONFIG_ARC_HAS_ICCM |
| 50 | #define __arcfp_code __attribute__((__section__(".text.arcfp"))) |
| 51 | #else |
| 52 | #define __arcfp_code __attribute__((__section__(".text"))) |
| 53 | #endif |
| 54 | |
| 55 | #ifdef CONFIG_ARC_HAS_DCCM |
| 56 | #define __arcfp_data __attribute__((__section__(".data.arcfp"))) |
| 57 | #else |
| 58 | #define __arcfp_data __attribute__((__section__(".data"))) |
| 59 | #endif |
| 60 | |
Vineet Gupta | 3be80aa | 2013-01-18 15:12:17 +0530 | [diff] [blame] | 61 | #endif /* __ASSEMBLY__ */ |
| 62 | |
| 63 | #endif |