| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * 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 | 4 | */ |
|---|
| 8 | 5 | |
|---|
| 9 | 6 | #ifndef __ASM_LINKAGE_H |
|---|
| .. | .. |
|---|
| 11 | 8 | |
|---|
| 12 | 9 | #include <asm/dwarf.h> |
|---|
| 13 | 10 | |
|---|
| 14 | | -#ifdef __ASSEMBLY__ |
|---|
| 15 | | - |
|---|
| 16 | 11 | #define ASM_NL ` /* use '`' to mark new line in macro */ |
|---|
| 17 | 12 | #define __ALIGN .align 4 |
|---|
| 18 | 13 | #define __ALIGN_STR __stringify(__ALIGN) |
|---|
| 14 | + |
|---|
| 15 | +#ifdef __ASSEMBLY__ |
|---|
| 16 | + |
|---|
| 17 | +.macro ST2 e, o, off |
|---|
| 18 | +#ifdef CONFIG_ARC_HAS_LL64 |
|---|
| 19 | + std \e, [sp, \off] |
|---|
| 20 | +#else |
|---|
| 21 | + st \e, [sp, \off] |
|---|
| 22 | + st \o, [sp, \off+4] |
|---|
| 23 | +#endif |
|---|
| 24 | +.endm |
|---|
| 25 | + |
|---|
| 26 | +.macro LD2 e, o, off |
|---|
| 27 | +#ifdef CONFIG_ARC_HAS_LL64 |
|---|
| 28 | + ldd \e, [sp, \off] |
|---|
| 29 | +#else |
|---|
| 30 | + ld \e, [sp, \off] |
|---|
| 31 | + ld \o, [sp, \off+4] |
|---|
| 32 | +#endif |
|---|
| 33 | +.endm |
|---|
| 19 | 34 | |
|---|
| 20 | 35 | /* annotation for data we want in DCCM - if enabled in .config */ |
|---|
| 21 | 36 | .macro ARCFP_DATA nm |
|---|
| .. | .. |
|---|
| 49 | 64 | #else /* !__ASSEMBLY__ */ |
|---|
| 50 | 65 | |
|---|
| 51 | 66 | #ifdef CONFIG_ARC_HAS_ICCM |
|---|
| 52 | | -#define __arcfp_code __attribute__((__section__(".text.arcfp"))) |
|---|
| 67 | +#define __arcfp_code __section(".text.arcfp") |
|---|
| 53 | 68 | #else |
|---|
| 54 | | -#define __arcfp_code __attribute__((__section__(".text"))) |
|---|
| 69 | +#define __arcfp_code __section(".text") |
|---|
| 55 | 70 | #endif |
|---|
| 56 | 71 | |
|---|
| 57 | 72 | #ifdef CONFIG_ARC_HAS_DCCM |
|---|
| 58 | | -#define __arcfp_data __attribute__((__section__(".data.arcfp"))) |
|---|
| 73 | +#define __arcfp_data __section(".data.arcfp") |
|---|
| 59 | 74 | #else |
|---|
| 60 | | -#define __arcfp_data __attribute__((__section__(".data"))) |
|---|
| 75 | +#define __arcfp_data __section(".data") |
|---|
| 61 | 76 | #endif |
|---|
| 62 | 77 | |
|---|
| 63 | 78 | #endif /* __ASSEMBLY__ */ |
|---|