blob: 54f5ec5c17598113d2c046a107c1a01b25e89efc [file] [log] [blame]
Thomas Gleixnerd2912cb2019-06-04 10:11:33 +02001/* SPDX-License-Identifier: GPL-2.0-only */
Vineet Gupta3be80aa2013-01-18 15:12:17 +05302/*
3 * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
Vineet Gupta3be80aa2013-01-18 15:12:17 +05304 */
5
6#ifndef __ASM_LINKAGE_H
7#define __ASM_LINKAGE_H
8
Vineet Gupta5a205a32016-09-16 17:23:26 -07009#include <asm/dwarf.h>
10
Vineet Gupta3be80aa2013-01-18 15:12:17 +053011#ifdef __ASSEMBLY__
12
Chen Gang9df62f02014-01-12 09:59:13 +080013#define ASM_NL ` /* use '`' to mark new line in macro */
14
Vineet Gupta8b5850f2013-01-18 15:12:25 +053015/* 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 Gupta5a205a32016-09-16 17:23:26 -070034#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 Gupta8b5850f2013-01-18 15:12:25 +053044#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 Gupta3be80aa2013-01-18 15:12:17 +053058#endif /* __ASSEMBLY__ */
59
60#endif