forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-08 01573e231f18eb2d99162747186f59511f56b64d
kernel/arch/arc/include/asm/linkage.h
....@@ -1,9 +1,6 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * 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.
74 */
85
96 #ifndef __ASM_LINKAGE_H
....@@ -12,6 +9,24 @@
129 #include <asm/dwarf.h>
1310
1411 #ifdef __ASSEMBLY__
12
+
13
+.macro ST2 e, o, off
14
+#ifdef CONFIG_ARC_HAS_LL64
15
+ std \e, [sp, \off]
16
+#else
17
+ st \e, [sp, \off]
18
+ st \o, [sp, \off+4]
19
+#endif
20
+.endm
21
+
22
+.macro LD2 e, o, off
23
+#ifdef CONFIG_ARC_HAS_LL64
24
+ ldd \e, [sp, \off]
25
+#else
26
+ ld \e, [sp, \off]
27
+ ld \o, [sp, \off+4]
28
+#endif
29
+.endm
1530
1631 #define ASM_NL ` /* use '`' to mark new line in macro */
1732 #define __ALIGN .align 4
....@@ -49,15 +64,15 @@
4964 #else /* !__ASSEMBLY__ */
5065
5166 #ifdef CONFIG_ARC_HAS_ICCM
52
-#define __arcfp_code __attribute__((__section__(".text.arcfp")))
67
+#define __arcfp_code __section(".text.arcfp")
5368 #else
54
-#define __arcfp_code __attribute__((__section__(".text")))
69
+#define __arcfp_code __section(".text")
5570 #endif
5671
5772 #ifdef CONFIG_ARC_HAS_DCCM
58
-#define __arcfp_data __attribute__((__section__(".data.arcfp")))
73
+#define __arcfp_data __section(".data.arcfp")
5974 #else
60
-#define __arcfp_data __attribute__((__section__(".data")))
75
+#define __arcfp_data __section(".data")
6176 #endif
6277
6378 #endif /* __ASSEMBLY__ */