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 | |
| 12 | #ifdef __ASSEMBLY__ |
| 13 | |
| 14 | /* Can't use the ENTRY macro in linux/linkage.h |
| 15 | * gas considers ';' as comment vs. newline |
| 16 | */ |
| 17 | .macro ARC_ENTRY name |
| 18 | .global \name |
| 19 | .align 4 |
| 20 | \name: |
| 21 | .endm |
| 22 | |
| 23 | .macro ARC_EXIT name |
| 24 | #define ASM_PREV_SYM_ADDR(name) .-##name |
| 25 | .size \ name, ASM_PREV_SYM_ADDR(\name) |
| 26 | .endm |
| 27 | |
Vineet Gupta | 8b5850f | 2013-01-18 15:12:25 +0530 | [diff] [blame] | 28 | /* annotation for data we want in DCCM - if enabled in .config */ |
| 29 | .macro ARCFP_DATA nm |
| 30 | #ifdef CONFIG_ARC_HAS_DCCM |
| 31 | .section .data.arcfp |
| 32 | #else |
| 33 | .section .data |
| 34 | #endif |
| 35 | .global \nm |
| 36 | .endm |
| 37 | |
| 38 | /* annotation for data we want in DCCM - if enabled in .config */ |
| 39 | .macro ARCFP_CODE |
| 40 | #ifdef CONFIG_ARC_HAS_ICCM |
| 41 | .section .text.arcfp, "ax",@progbits |
| 42 | #else |
| 43 | .section .text, "ax",@progbits |
| 44 | #endif |
| 45 | .endm |
| 46 | |
| 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 |