blob: 07c8e1a6c56e25dd40463107809e40491baac77c [file] [log] [blame]
Vineet Gupta3be80aa2013-01-18 15:12:17 +05301/*
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 Gupta5a205a32016-09-16 17:23:26 -070012#include <asm/dwarf.h>
13
Vineet Gupta3be80aa2013-01-18 15:12:17 +053014#ifdef __ASSEMBLY__
15
Chen Gang9df62f02014-01-12 09:59:13 +080016#define ASM_NL ` /* use '`' to mark new line in macro */
Eugeniy Paltsevb5badeb2020-03-11 19:26:43 +030017#define __ALIGN .align 4
18#define __ALIGN_STR __stringify(__ALIGN)
Chen Gang9df62f02014-01-12 09:59:13 +080019
Vineet Gupta8b5850f2013-01-18 15:12:25 +053020/* annotation for data we want in DCCM - if enabled in .config */
21.macro ARCFP_DATA nm
22#ifdef CONFIG_ARC_HAS_DCCM
23 .section .data.arcfp
24#else
25 .section .data
26#endif
27 .global \nm
28.endm
29
30/* annotation for data we want in DCCM - if enabled in .config */
31.macro ARCFP_CODE
32#ifdef CONFIG_ARC_HAS_ICCM
33 .section .text.arcfp, "ax",@progbits
34#else
35 .section .text, "ax",@progbits
36#endif
37.endm
38
Vineet Gupta5a205a32016-09-16 17:23:26 -070039#define ENTRY_CFI(name) \
40 .globl name ASM_NL \
41 ALIGN ASM_NL \
42 name: ASM_NL \
43 CFI_STARTPROC ASM_NL
44
45#define END_CFI(name) \
46 CFI_ENDPROC ASM_NL \
47 .size name, .-name
48
Vineet Gupta8b5850f2013-01-18 15:12:25 +053049#else /* !__ASSEMBLY__ */
50
51#ifdef CONFIG_ARC_HAS_ICCM
52#define __arcfp_code __attribute__((__section__(".text.arcfp")))
53#else
54#define __arcfp_code __attribute__((__section__(".text")))
55#endif
56
57#ifdef CONFIG_ARC_HAS_DCCM
58#define __arcfp_data __attribute__((__section__(".data.arcfp")))
59#else
60#define __arcfp_data __attribute__((__section__(".data")))
61#endif
62
Vineet Gupta3be80aa2013-01-18 15:12:17 +053063#endif /* __ASSEMBLY__ */
64
65#endif