| Thomas Gleixner | d2912cb | 2019-06-04 10:11:33 +0200 | [diff] [blame^] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
| Vineet Gupta | 3be80aa | 2013-01-18 15:12:17 +0530 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com) |
| Vineet Gupta | 3be80aa | 2013-01-18 15:12:17 +0530 | [diff] [blame] | 4 | */ |
| 5 | |
| 6 | #ifndef __ASM_LINKAGE_H |
| 7 | #define __ASM_LINKAGE_H |
| 8 | |
| Vineet Gupta | 5a205a3 | 2016-09-16 17:23:26 -0700 | [diff] [blame] | 9 | #include <asm/dwarf.h> |
| 10 | |
| Vineet Gupta | 3be80aa | 2013-01-18 15:12:17 +0530 | [diff] [blame] | 11 | #ifdef __ASSEMBLY__ |
| 12 | |
| Chen Gang | 9df62f0 | 2014-01-12 09:59:13 +0800 | [diff] [blame] | 13 | #define ASM_NL ` /* use '`' to mark new line in macro */ |
| 14 | |
| Vineet Gupta | 8b5850f | 2013-01-18 15:12:25 +0530 | [diff] [blame] | 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 | |
| Vineet Gupta | 5a205a3 | 2016-09-16 17:23:26 -0700 | [diff] [blame] | 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 | |
| Vineet Gupta | 8b5850f | 2013-01-18 15:12:25 +0530 | [diff] [blame] | 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 | |
| Vineet Gupta | 3be80aa | 2013-01-18 15:12:17 +0530 | [diff] [blame] | 58 | #endif /* __ASSEMBLY__ */ |
| 59 | |
| 60 | #endif |