blob: b3324167d47e6d18d22294f0fa100c78ff488a27 [file] [log] [blame]
Alexey Brodkin93206d22015-02-03 13:58:20 +03001/*
2 * Copyright (C) 1995, 1997, 2007-2013 Free Software Foundation, Inc.
3 *
4 * SPDX-License-Identifier: GPL-2.0+
5 */
6
7 /* ANSI concatenation macros. */
8
9 #define CONCAT1(a, b) CONCAT2(a, b)
10 #define CONCAT2(a, b) a ## b
11
12 /* Use the right prefix for global labels. */
13
14 #define SYM(x) CONCAT1 (__USER_LABEL_PREFIX__, x)
15
16#ifndef WORKING_ASSEMBLER
17#define abs_l abs
18#define asl_l asl
19#define mov_l mov
20#endif
21
22#define FUNC(X) .type SYM(X),@function
23#define HIDDEN_FUNC(X) FUNC(X)` .hidden X
24#define ENDFUNC0(X) .Lfe_##X: .size X,.Lfe_##X-X
25#define ENDFUNC(X) ENDFUNC0(X)
26
27 .section .text
28 .align 4
29 .global SYM(__st_r13_to_r15)
30 .global SYM(__st_r13_to_r16)
31 .global SYM(__st_r13_to_r17)
32 .global SYM(__st_r13_to_r18)
33 .global SYM(__st_r13_to_r19)
34 .global SYM(__st_r13_to_r20)
35 .global SYM(__st_r13_to_r21)
36 .global SYM(__st_r13_to_r22)
37 .global SYM(__st_r13_to_r23)
38 .global SYM(__st_r13_to_r24)
39 .global SYM(__st_r13_to_r25)
40 HIDDEN_FUNC(__st_r13_to_r15)
41 HIDDEN_FUNC(__st_r13_to_r16)
42 HIDDEN_FUNC(__st_r13_to_r17)
43 HIDDEN_FUNC(__st_r13_to_r18)
44 HIDDEN_FUNC(__st_r13_to_r19)
45 HIDDEN_FUNC(__st_r13_to_r20)
46 HIDDEN_FUNC(__st_r13_to_r21)
47 HIDDEN_FUNC(__st_r13_to_r22)
48 HIDDEN_FUNC(__st_r13_to_r23)
49 HIDDEN_FUNC(__st_r13_to_r24)
50 HIDDEN_FUNC(__st_r13_to_r25)
51 .align 4
52SYM(__st_r13_to_r25):
53 st r25, [sp,48]
54SYM(__st_r13_to_r24):
55 st r24, [sp,44]
56SYM(__st_r13_to_r23):
57 st r23, [sp,40]
58SYM(__st_r13_to_r22):
59 st r22, [sp,36]
60SYM(__st_r13_to_r21):
61 st r21, [sp,32]
62SYM(__st_r13_to_r20):
63 st r20, [sp,28]
64SYM(__st_r13_to_r19):
65 st r19, [sp,24]
66SYM(__st_r13_to_r18):
67 st r18, [sp,20]
68SYM(__st_r13_to_r17):
69 st r17, [sp,16]
70SYM(__st_r13_to_r16):
71 st r16, [sp,12]
72SYM(__st_r13_to_r15):
73#ifdef __ARC700__
74 st r15, [sp,8] ; minimum function size to avoid stall: 6 bytes.
75#else
76 st_s r15, [sp,8]
77#endif
78 st_s r14, [sp,4]
79 j_s.d [%blink]
80 st_s r13, [sp,0]
81 ENDFUNC(__st_r13_to_r15)
82 ENDFUNC(__st_r13_to_r16)
83 ENDFUNC(__st_r13_to_r17)
84 ENDFUNC(__st_r13_to_r18)
85 ENDFUNC(__st_r13_to_r19)
86 ENDFUNC(__st_r13_to_r20)
87 ENDFUNC(__st_r13_to_r21)
88 ENDFUNC(__st_r13_to_r22)
89 ENDFUNC(__st_r13_to_r23)
90 ENDFUNC(__st_r13_to_r24)
91 ENDFUNC(__st_r13_to_r25)
92
93 .section .text
94 .align 4
95; ==================================
96; the loads
97
98 .global SYM(__ld_r13_to_r15)
99 .global SYM(__ld_r13_to_r16)
100 .global SYM(__ld_r13_to_r17)
101 .global SYM(__ld_r13_to_r18)
102 .global SYM(__ld_r13_to_r19)
103 .global SYM(__ld_r13_to_r20)
104 .global SYM(__ld_r13_to_r21)
105 .global SYM(__ld_r13_to_r22)
106 .global SYM(__ld_r13_to_r23)
107 .global SYM(__ld_r13_to_r24)
108 .global SYM(__ld_r13_to_r25)
109 HIDDEN_FUNC(__ld_r13_to_r15)
110 HIDDEN_FUNC(__ld_r13_to_r16)
111 HIDDEN_FUNC(__ld_r13_to_r17)
112 HIDDEN_FUNC(__ld_r13_to_r18)
113 HIDDEN_FUNC(__ld_r13_to_r19)
114 HIDDEN_FUNC(__ld_r13_to_r20)
115 HIDDEN_FUNC(__ld_r13_to_r21)
116 HIDDEN_FUNC(__ld_r13_to_r22)
117 HIDDEN_FUNC(__ld_r13_to_r23)
118 HIDDEN_FUNC(__ld_r13_to_r24)
119 HIDDEN_FUNC(__ld_r13_to_r25)
120SYM(__ld_r13_to_r25):
121 ld r25, [sp,48]
122SYM(__ld_r13_to_r24):
123 ld r24, [sp,44]
124SYM(__ld_r13_to_r23):
125 ld r23, [sp,40]
126SYM(__ld_r13_to_r22):
127 ld r22, [sp,36]
128SYM(__ld_r13_to_r21):
129 ld r21, [sp,32]
130SYM(__ld_r13_to_r20):
131 ld r20, [sp,28]
132SYM(__ld_r13_to_r19):
133 ld r19, [sp,24]
134SYM(__ld_r13_to_r18):
135 ld r18, [sp,20]
136SYM(__ld_r13_to_r17):
137 ld r17, [sp,16]
138SYM(__ld_r13_to_r16):
139 ld r16, [sp,12]
140SYM(__ld_r13_to_r15):
141#ifdef __ARC700__
142 ld r15, [sp,8] ; minimum function size to avoid stall: 6 bytes.
143#else
144 ld_s r15, [sp,8]
145#endif
146 ld_s r14, [sp,4]
147 j_s.d [%blink]
148 ld_s r13, [sp,0]
149 ENDFUNC(__ld_r13_to_r15)
150 ENDFUNC(__ld_r13_to_r16)
151 ENDFUNC(__ld_r13_to_r17)
152 ENDFUNC(__ld_r13_to_r18)
153 ENDFUNC(__ld_r13_to_r19)
154 ENDFUNC(__ld_r13_to_r20)
155 ENDFUNC(__ld_r13_to_r21)
156 ENDFUNC(__ld_r13_to_r22)
157 ENDFUNC(__ld_r13_to_r23)
158 ENDFUNC(__ld_r13_to_r24)
159 ENDFUNC(__ld_r13_to_r25)
160
161 .global SYM(__ld_r13_to_r14_ret)
162 .global SYM(__ld_r13_to_r15_ret)
163 .global SYM(__ld_r13_to_r16_ret)
164 .global SYM(__ld_r13_to_r17_ret)
165 .global SYM(__ld_r13_to_r18_ret)
166 .global SYM(__ld_r13_to_r19_ret)
167 .global SYM(__ld_r13_to_r20_ret)
168 .global SYM(__ld_r13_to_r21_ret)
169 .global SYM(__ld_r13_to_r22_ret)
170 .global SYM(__ld_r13_to_r23_ret)
171 .global SYM(__ld_r13_to_r24_ret)
172 .global SYM(__ld_r13_to_r25_ret)
173 HIDDEN_FUNC(__ld_r13_to_r14_ret)
174 HIDDEN_FUNC(__ld_r13_to_r15_ret)
175 HIDDEN_FUNC(__ld_r13_to_r16_ret)
176 HIDDEN_FUNC(__ld_r13_to_r17_ret)
177 HIDDEN_FUNC(__ld_r13_to_r18_ret)
178 HIDDEN_FUNC(__ld_r13_to_r19_ret)
179 HIDDEN_FUNC(__ld_r13_to_r20_ret)
180 HIDDEN_FUNC(__ld_r13_to_r21_ret)
181 HIDDEN_FUNC(__ld_r13_to_r22_ret)
182 HIDDEN_FUNC(__ld_r13_to_r23_ret)
183 HIDDEN_FUNC(__ld_r13_to_r24_ret)
184 HIDDEN_FUNC(__ld_r13_to_r25_ret)
185 .section .text
186 .align 4
187SYM(__ld_r13_to_r25_ret):
188 ld r25, [sp,48]
189SYM(__ld_r13_to_r24_ret):
190 ld r24, [sp,44]
191SYM(__ld_r13_to_r23_ret):
192 ld r23, [sp,40]
193SYM(__ld_r13_to_r22_ret):
194 ld r22, [sp,36]
195SYM(__ld_r13_to_r21_ret):
196 ld r21, [sp,32]
197SYM(__ld_r13_to_r20_ret):
198 ld r20, [sp,28]
199SYM(__ld_r13_to_r19_ret):
200 ld r19, [sp,24]
201SYM(__ld_r13_to_r18_ret):
202 ld r18, [sp,20]
203SYM(__ld_r13_to_r17_ret):
204 ld r17, [sp,16]
205SYM(__ld_r13_to_r16_ret):
206 ld r16, [sp,12]
207SYM(__ld_r13_to_r15_ret):
208 ld r15, [sp,8]
209SYM(__ld_r13_to_r14_ret):
210 ld blink,[sp,r12]
211 ld_s r14, [sp,4]
212 ld.ab r13, [sp,r12]
213 j_s.d [%blink]
214 add_s sp,sp,4
215 ENDFUNC(__ld_r13_to_r14_ret)
216 ENDFUNC(__ld_r13_to_r15_ret)
217 ENDFUNC(__ld_r13_to_r16_ret)
218 ENDFUNC(__ld_r13_to_r17_ret)
219 ENDFUNC(__ld_r13_to_r18_ret)
220 ENDFUNC(__ld_r13_to_r19_ret)
221 ENDFUNC(__ld_r13_to_r20_ret)
222 ENDFUNC(__ld_r13_to_r21_ret)
223 ENDFUNC(__ld_r13_to_r22_ret)
224 ENDFUNC(__ld_r13_to_r23_ret)
225 ENDFUNC(__ld_r13_to_r24_ret)
226 ENDFUNC(__ld_r13_to_r25_ret)