1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple riscv32-unknown-elf -o - %s \
3 ; RUN: 2>&1 | FileCheck %s -check-prefix CHECK -check-prefix CHECK-RV32
4 ; RUN: llc -mtriple riscv32-unknown-elf -mattr=+f -o - %s \
5 ; RUN: 2>&1 | FileCheck %s -check-prefix CHECK -check-prefix CHECK-RV32-F
6 ; RUN: llc -mtriple riscv32-unknown-elf -mattr=+f,+d -o - %s \
7 ; RUN: 2>&1 | FileCheck %s -check-prefix CHECK -check-prefix CHECK-RV32-FD
9 ; RUN: llc -mtriple riscv64-unknown-elf -o - %s \
10 ; RUN: 2>&1 | FileCheck %s -check-prefix CHECK -check-prefix CHECK-RV64
11 ; RUN: llc -mtriple riscv64-unknown-elf -mattr=+f -o - %s \
12 ; RUN: 2>&1 | FileCheck %s -check-prefix CHECK -check-prefix CHECK-RV64-F
13 ; RUN: llc -mtriple riscv64-unknown-elf -mattr=+f,+d -o - %s \
14 ; RUN: 2>&1 | FileCheck %s -check-prefix CHECK -check-prefix CHECK-RV64-FD
17 ; Checking for special return instructions (uret, sret, mret).
19 define void @foo_user() #0 {
20 ; CHECK-LABEL: foo_user:
26 define void @foo_supervisor() #1 {
27 ; CHECK-LABEL: foo_supervisor:
33 define void @foo_machine() #2 {
34 ; CHECK-LABEL: foo_machine:
41 ; Checking all Caller saved registers (arguments and temps)
42 ; and FP registers are all saved when the handler calls another function.
44 ; extern int otherfoo();
46 ; __attribute__((interrupt)) void foo_with_call() {
51 declare i32 @otherfoo(...)
52 define void @foo_with_call() #2 {
54 ; CHECK-RV32-LABEL: foo_with_call:
55 ; CHECK-RV32: # %bb.0:
56 ; CHECK-RV32-NEXT: addi sp, sp, -64
57 ; CHECK-RV32-NEXT: sw ra, 60(sp)
58 ; CHECK-RV32-NEXT: sw t0, 56(sp)
59 ; CHECK-RV32-NEXT: sw t1, 52(sp)
60 ; CHECK-RV32-NEXT: sw t2, 48(sp)
61 ; CHECK-RV32-NEXT: sw a0, 44(sp)
62 ; CHECK-RV32-NEXT: sw a1, 40(sp)
63 ; CHECK-RV32-NEXT: sw a2, 36(sp)
64 ; CHECK-RV32-NEXT: sw a3, 32(sp)
65 ; CHECK-RV32-NEXT: sw a4, 28(sp)
66 ; CHECK-RV32-NEXT: sw a5, 24(sp)
67 ; CHECK-RV32-NEXT: sw a6, 20(sp)
68 ; CHECK-RV32-NEXT: sw a7, 16(sp)
69 ; CHECK-RV32-NEXT: sw t3, 12(sp)
70 ; CHECK-RV32-NEXT: sw t4, 8(sp)
71 ; CHECK-RV32-NEXT: sw t5, 4(sp)
72 ; CHECK-RV32-NEXT: sw t6, 0(sp)
73 ; CHECK-RV32-NEXT: call otherfoo
74 ; CHECK-RV32-NEXT: lw t6, 0(sp)
75 ; CHECK-RV32-NEXT: lw t5, 4(sp)
76 ; CHECK-RV32-NEXT: lw t4, 8(sp)
77 ; CHECK-RV32-NEXT: lw t3, 12(sp)
78 ; CHECK-RV32-NEXT: lw a7, 16(sp)
79 ; CHECK-RV32-NEXT: lw a6, 20(sp)
80 ; CHECK-RV32-NEXT: lw a5, 24(sp)
81 ; CHECK-RV32-NEXT: lw a4, 28(sp)
82 ; CHECK-RV32-NEXT: lw a3, 32(sp)
83 ; CHECK-RV32-NEXT: lw a2, 36(sp)
84 ; CHECK-RV32-NEXT: lw a1, 40(sp)
85 ; CHECK-RV32-NEXT: lw a0, 44(sp)
86 ; CHECK-RV32-NEXT: lw t2, 48(sp)
87 ; CHECK-RV32-NEXT: lw t1, 52(sp)
88 ; CHECK-RV32-NEXT: lw t0, 56(sp)
89 ; CHECK-RV32-NEXT: lw ra, 60(sp)
90 ; CHECK-RV32-NEXT: addi sp, sp, 64
91 ; CHECK-RV32-NEXT: mret
93 ; CHECK-RV32-F-LABEL: foo_with_call:
94 ; CHECK-RV32-F: # %bb.0:
95 ; CHECK-RV32-F-NEXT: addi sp, sp, -192
96 ; CHECK-RV32-F-NEXT: sw ra, 188(sp)
97 ; CHECK-RV32-F-NEXT: sw t0, 184(sp)
98 ; CHECK-RV32-F-NEXT: sw t1, 180(sp)
99 ; CHECK-RV32-F-NEXT: sw t2, 176(sp)
100 ; CHECK-RV32-F-NEXT: sw a0, 172(sp)
101 ; CHECK-RV32-F-NEXT: sw a1, 168(sp)
102 ; CHECK-RV32-F-NEXT: sw a2, 164(sp)
103 ; CHECK-RV32-F-NEXT: sw a3, 160(sp)
104 ; CHECK-RV32-F-NEXT: sw a4, 156(sp)
105 ; CHECK-RV32-F-NEXT: sw a5, 152(sp)
106 ; CHECK-RV32-F-NEXT: sw a6, 148(sp)
107 ; CHECK-RV32-F-NEXT: sw a7, 144(sp)
108 ; CHECK-RV32-F-NEXT: sw t3, 140(sp)
109 ; CHECK-RV32-F-NEXT: sw t4, 136(sp)
110 ; CHECK-RV32-F-NEXT: sw t5, 132(sp)
111 ; CHECK-RV32-F-NEXT: sw t6, 128(sp)
112 ; CHECK-RV32-F-NEXT: fsw ft0, 124(sp)
113 ; CHECK-RV32-F-NEXT: fsw ft1, 120(sp)
114 ; CHECK-RV32-F-NEXT: fsw ft2, 116(sp)
115 ; CHECK-RV32-F-NEXT: fsw ft3, 112(sp)
116 ; CHECK-RV32-F-NEXT: fsw ft4, 108(sp)
117 ; CHECK-RV32-F-NEXT: fsw ft5, 104(sp)
118 ; CHECK-RV32-F-NEXT: fsw ft6, 100(sp)
119 ; CHECK-RV32-F-NEXT: fsw ft7, 96(sp)
120 ; CHECK-RV32-F-NEXT: fsw fa0, 92(sp)
121 ; CHECK-RV32-F-NEXT: fsw fa1, 88(sp)
122 ; CHECK-RV32-F-NEXT: fsw fa2, 84(sp)
123 ; CHECK-RV32-F-NEXT: fsw fa3, 80(sp)
124 ; CHECK-RV32-F-NEXT: fsw fa4, 76(sp)
125 ; CHECK-RV32-F-NEXT: fsw fa5, 72(sp)
126 ; CHECK-RV32-F-NEXT: fsw fa6, 68(sp)
127 ; CHECK-RV32-F-NEXT: fsw fa7, 64(sp)
128 ; CHECK-RV32-F-NEXT: fsw ft8, 60(sp)
129 ; CHECK-RV32-F-NEXT: fsw ft9, 56(sp)
130 ; CHECK-RV32-F-NEXT: fsw ft10, 52(sp)
131 ; CHECK-RV32-F-NEXT: fsw ft11, 48(sp)
132 ; CHECK-RV32-F-NEXT: fsw fs0, 44(sp)
133 ; CHECK-RV32-F-NEXT: fsw fs1, 40(sp)
134 ; CHECK-RV32-F-NEXT: fsw fs2, 36(sp)
135 ; CHECK-RV32-F-NEXT: fsw fs3, 32(sp)
136 ; CHECK-RV32-F-NEXT: fsw fs4, 28(sp)
137 ; CHECK-RV32-F-NEXT: fsw fs5, 24(sp)
138 ; CHECK-RV32-F-NEXT: fsw fs6, 20(sp)
139 ; CHECK-RV32-F-NEXT: fsw fs7, 16(sp)
140 ; CHECK-RV32-F-NEXT: fsw fs8, 12(sp)
141 ; CHECK-RV32-F-NEXT: fsw fs9, 8(sp)
142 ; CHECK-RV32-F-NEXT: fsw fs10, 4(sp)
143 ; CHECK-RV32-F-NEXT: fsw fs11, 0(sp)
144 ; CHECK-RV32-F-NEXT: call otherfoo
145 ; CHECK-RV32-F-NEXT: flw fs11, 0(sp)
146 ; CHECK-RV32-F-NEXT: flw fs10, 4(sp)
147 ; CHECK-RV32-F-NEXT: flw fs9, 8(sp)
148 ; CHECK-RV32-F-NEXT: flw fs8, 12(sp)
149 ; CHECK-RV32-F-NEXT: flw fs7, 16(sp)
150 ; CHECK-RV32-F-NEXT: flw fs6, 20(sp)
151 ; CHECK-RV32-F-NEXT: flw fs5, 24(sp)
152 ; CHECK-RV32-F-NEXT: flw fs4, 28(sp)
153 ; CHECK-RV32-F-NEXT: flw fs3, 32(sp)
154 ; CHECK-RV32-F-NEXT: flw fs2, 36(sp)
155 ; CHECK-RV32-F-NEXT: flw fs1, 40(sp)
156 ; CHECK-RV32-F-NEXT: flw fs0, 44(sp)
157 ; CHECK-RV32-F-NEXT: flw ft11, 48(sp)
158 ; CHECK-RV32-F-NEXT: flw ft10, 52(sp)
159 ; CHECK-RV32-F-NEXT: flw ft9, 56(sp)
160 ; CHECK-RV32-F-NEXT: flw ft8, 60(sp)
161 ; CHECK-RV32-F-NEXT: flw fa7, 64(sp)
162 ; CHECK-RV32-F-NEXT: flw fa6, 68(sp)
163 ; CHECK-RV32-F-NEXT: flw fa5, 72(sp)
164 ; CHECK-RV32-F-NEXT: flw fa4, 76(sp)
165 ; CHECK-RV32-F-NEXT: flw fa3, 80(sp)
166 ; CHECK-RV32-F-NEXT: flw fa2, 84(sp)
167 ; CHECK-RV32-F-NEXT: flw fa1, 88(sp)
168 ; CHECK-RV32-F-NEXT: flw fa0, 92(sp)
169 ; CHECK-RV32-F-NEXT: flw ft7, 96(sp)
170 ; CHECK-RV32-F-NEXT: flw ft6, 100(sp)
171 ; CHECK-RV32-F-NEXT: flw ft5, 104(sp)
172 ; CHECK-RV32-F-NEXT: flw ft4, 108(sp)
173 ; CHECK-RV32-F-NEXT: flw ft3, 112(sp)
174 ; CHECK-RV32-F-NEXT: flw ft2, 116(sp)
175 ; CHECK-RV32-F-NEXT: flw ft1, 120(sp)
176 ; CHECK-RV32-F-NEXT: flw ft0, 124(sp)
177 ; CHECK-RV32-F-NEXT: lw t6, 128(sp)
178 ; CHECK-RV32-F-NEXT: lw t5, 132(sp)
179 ; CHECK-RV32-F-NEXT: lw t4, 136(sp)
180 ; CHECK-RV32-F-NEXT: lw t3, 140(sp)
181 ; CHECK-RV32-F-NEXT: lw a7, 144(sp)
182 ; CHECK-RV32-F-NEXT: lw a6, 148(sp)
183 ; CHECK-RV32-F-NEXT: lw a5, 152(sp)
184 ; CHECK-RV32-F-NEXT: lw a4, 156(sp)
185 ; CHECK-RV32-F-NEXT: lw a3, 160(sp)
186 ; CHECK-RV32-F-NEXT: lw a2, 164(sp)
187 ; CHECK-RV32-F-NEXT: lw a1, 168(sp)
188 ; CHECK-RV32-F-NEXT: lw a0, 172(sp)
189 ; CHECK-RV32-F-NEXT: lw t2, 176(sp)
190 ; CHECK-RV32-F-NEXT: lw t1, 180(sp)
191 ; CHECK-RV32-F-NEXT: lw t0, 184(sp)
192 ; CHECK-RV32-F-NEXT: lw ra, 188(sp)
193 ; CHECK-RV32-F-NEXT: addi sp, sp, 192
194 ; CHECK-RV32-F-NEXT: mret
196 ; CHECK-RV32-FD-LABEL: foo_with_call:
197 ; CHECK-RV32-FD: # %bb.0:
198 ; CHECK-RV32-FD-NEXT: addi sp, sp, -320
199 ; CHECK-RV32-FD-NEXT: sw ra, 316(sp)
200 ; CHECK-RV32-FD-NEXT: sw t0, 312(sp)
201 ; CHECK-RV32-FD-NEXT: sw t1, 308(sp)
202 ; CHECK-RV32-FD-NEXT: sw t2, 304(sp)
203 ; CHECK-RV32-FD-NEXT: sw a0, 300(sp)
204 ; CHECK-RV32-FD-NEXT: sw a1, 296(sp)
205 ; CHECK-RV32-FD-NEXT: sw a2, 292(sp)
206 ; CHECK-RV32-FD-NEXT: sw a3, 288(sp)
207 ; CHECK-RV32-FD-NEXT: sw a4, 284(sp)
208 ; CHECK-RV32-FD-NEXT: sw a5, 280(sp)
209 ; CHECK-RV32-FD-NEXT: sw a6, 276(sp)
210 ; CHECK-RV32-FD-NEXT: sw a7, 272(sp)
211 ; CHECK-RV32-FD-NEXT: sw t3, 268(sp)
212 ; CHECK-RV32-FD-NEXT: sw t4, 264(sp)
213 ; CHECK-RV32-FD-NEXT: sw t5, 260(sp)
214 ; CHECK-RV32-FD-NEXT: sw t6, 256(sp)
215 ; CHECK-RV32-FD-NEXT: fsd ft0, 248(sp)
216 ; CHECK-RV32-FD-NEXT: fsd ft1, 240(sp)
217 ; CHECK-RV32-FD-NEXT: fsd ft2, 232(sp)
218 ; CHECK-RV32-FD-NEXT: fsd ft3, 224(sp)
219 ; CHECK-RV32-FD-NEXT: fsd ft4, 216(sp)
220 ; CHECK-RV32-FD-NEXT: fsd ft5, 208(sp)
221 ; CHECK-RV32-FD-NEXT: fsd ft6, 200(sp)
222 ; CHECK-RV32-FD-NEXT: fsd ft7, 192(sp)
223 ; CHECK-RV32-FD-NEXT: fsd fa0, 184(sp)
224 ; CHECK-RV32-FD-NEXT: fsd fa1, 176(sp)
225 ; CHECK-RV32-FD-NEXT: fsd fa2, 168(sp)
226 ; CHECK-RV32-FD-NEXT: fsd fa3, 160(sp)
227 ; CHECK-RV32-FD-NEXT: fsd fa4, 152(sp)
228 ; CHECK-RV32-FD-NEXT: fsd fa5, 144(sp)
229 ; CHECK-RV32-FD-NEXT: fsd fa6, 136(sp)
230 ; CHECK-RV32-FD-NEXT: fsd fa7, 128(sp)
231 ; CHECK-RV32-FD-NEXT: fsd ft8, 120(sp)
232 ; CHECK-RV32-FD-NEXT: fsd ft9, 112(sp)
233 ; CHECK-RV32-FD-NEXT: fsd ft10, 104(sp)
234 ; CHECK-RV32-FD-NEXT: fsd ft11, 96(sp)
235 ; CHECK-RV32-FD-NEXT: fsd fs0, 88(sp)
236 ; CHECK-RV32-FD-NEXT: fsd fs1, 80(sp)
237 ; CHECK-RV32-FD-NEXT: fsd fs2, 72(sp)
238 ; CHECK-RV32-FD-NEXT: fsd fs3, 64(sp)
239 ; CHECK-RV32-FD-NEXT: fsd fs4, 56(sp)
240 ; CHECK-RV32-FD-NEXT: fsd fs5, 48(sp)
241 ; CHECK-RV32-FD-NEXT: fsd fs6, 40(sp)
242 ; CHECK-RV32-FD-NEXT: fsd fs7, 32(sp)
243 ; CHECK-RV32-FD-NEXT: fsd fs8, 24(sp)
244 ; CHECK-RV32-FD-NEXT: fsd fs9, 16(sp)
245 ; CHECK-RV32-FD-NEXT: fsd fs10, 8(sp)
246 ; CHECK-RV32-FD-NEXT: fsd fs11, 0(sp)
247 ; CHECK-RV32-FD-NEXT: call otherfoo
248 ; CHECK-RV32-FD-NEXT: fld fs11, 0(sp)
249 ; CHECK-RV32-FD-NEXT: fld fs10, 8(sp)
250 ; CHECK-RV32-FD-NEXT: fld fs9, 16(sp)
251 ; CHECK-RV32-FD-NEXT: fld fs8, 24(sp)
252 ; CHECK-RV32-FD-NEXT: fld fs7, 32(sp)
253 ; CHECK-RV32-FD-NEXT: fld fs6, 40(sp)
254 ; CHECK-RV32-FD-NEXT: fld fs5, 48(sp)
255 ; CHECK-RV32-FD-NEXT: fld fs4, 56(sp)
256 ; CHECK-RV32-FD-NEXT: fld fs3, 64(sp)
257 ; CHECK-RV32-FD-NEXT: fld fs2, 72(sp)
258 ; CHECK-RV32-FD-NEXT: fld fs1, 80(sp)
259 ; CHECK-RV32-FD-NEXT: fld fs0, 88(sp)
260 ; CHECK-RV32-FD-NEXT: fld ft11, 96(sp)
261 ; CHECK-RV32-FD-NEXT: fld ft10, 104(sp)
262 ; CHECK-RV32-FD-NEXT: fld ft9, 112(sp)
263 ; CHECK-RV32-FD-NEXT: fld ft8, 120(sp)
264 ; CHECK-RV32-FD-NEXT: fld fa7, 128(sp)
265 ; CHECK-RV32-FD-NEXT: fld fa6, 136(sp)
266 ; CHECK-RV32-FD-NEXT: fld fa5, 144(sp)
267 ; CHECK-RV32-FD-NEXT: fld fa4, 152(sp)
268 ; CHECK-RV32-FD-NEXT: fld fa3, 160(sp)
269 ; CHECK-RV32-FD-NEXT: fld fa2, 168(sp)
270 ; CHECK-RV32-FD-NEXT: fld fa1, 176(sp)
271 ; CHECK-RV32-FD-NEXT: fld fa0, 184(sp)
272 ; CHECK-RV32-FD-NEXT: fld ft7, 192(sp)
273 ; CHECK-RV32-FD-NEXT: fld ft6, 200(sp)
274 ; CHECK-RV32-FD-NEXT: fld ft5, 208(sp)
275 ; CHECK-RV32-FD-NEXT: fld ft4, 216(sp)
276 ; CHECK-RV32-FD-NEXT: fld ft3, 224(sp)
277 ; CHECK-RV32-FD-NEXT: fld ft2, 232(sp)
278 ; CHECK-RV32-FD-NEXT: fld ft1, 240(sp)
279 ; CHECK-RV32-FD-NEXT: fld ft0, 248(sp)
280 ; CHECK-RV32-FD-NEXT: lw t6, 256(sp)
281 ; CHECK-RV32-FD-NEXT: lw t5, 260(sp)
282 ; CHECK-RV32-FD-NEXT: lw t4, 264(sp)
283 ; CHECK-RV32-FD-NEXT: lw t3, 268(sp)
284 ; CHECK-RV32-FD-NEXT: lw a7, 272(sp)
285 ; CHECK-RV32-FD-NEXT: lw a6, 276(sp)
286 ; CHECK-RV32-FD-NEXT: lw a5, 280(sp)
287 ; CHECK-RV32-FD-NEXT: lw a4, 284(sp)
288 ; CHECK-RV32-FD-NEXT: lw a3, 288(sp)
289 ; CHECK-RV32-FD-NEXT: lw a2, 292(sp)
290 ; CHECK-RV32-FD-NEXT: lw a1, 296(sp)
291 ; CHECK-RV32-FD-NEXT: lw a0, 300(sp)
292 ; CHECK-RV32-FD-NEXT: lw t2, 304(sp)
293 ; CHECK-RV32-FD-NEXT: lw t1, 308(sp)
294 ; CHECK-RV32-FD-NEXT: lw t0, 312(sp)
295 ; CHECK-RV32-FD-NEXT: lw ra, 316(sp)
296 ; CHECK-RV32-FD-NEXT: addi sp, sp, 320
297 ; CHECK-RV32-FD-NEXT: mret
299 ; CHECK-RV64-LABEL: foo_with_call:
300 ; CHECK-RV64: # %bb.0:
301 ; CHECK-RV64-NEXT: addi sp, sp, -128
302 ; CHECK-RV64-NEXT: sd ra, 120(sp)
303 ; CHECK-RV64-NEXT: sd t0, 112(sp)
304 ; CHECK-RV64-NEXT: sd t1, 104(sp)
305 ; CHECK-RV64-NEXT: sd t2, 96(sp)
306 ; CHECK-RV64-NEXT: sd a0, 88(sp)
307 ; CHECK-RV64-NEXT: sd a1, 80(sp)
308 ; CHECK-RV64-NEXT: sd a2, 72(sp)
309 ; CHECK-RV64-NEXT: sd a3, 64(sp)
310 ; CHECK-RV64-NEXT: sd a4, 56(sp)
311 ; CHECK-RV64-NEXT: sd a5, 48(sp)
312 ; CHECK-RV64-NEXT: sd a6, 40(sp)
313 ; CHECK-RV64-NEXT: sd a7, 32(sp)
314 ; CHECK-RV64-NEXT: sd t3, 24(sp)
315 ; CHECK-RV64-NEXT: sd t4, 16(sp)
316 ; CHECK-RV64-NEXT: sd t5, 8(sp)
317 ; CHECK-RV64-NEXT: sd t6, 0(sp)
318 ; CHECK-RV64-NEXT: call otherfoo
319 ; CHECK-RV64-NEXT: ld t6, 0(sp)
320 ; CHECK-RV64-NEXT: ld t5, 8(sp)
321 ; CHECK-RV64-NEXT: ld t4, 16(sp)
322 ; CHECK-RV64-NEXT: ld t3, 24(sp)
323 ; CHECK-RV64-NEXT: ld a7, 32(sp)
324 ; CHECK-RV64-NEXT: ld a6, 40(sp)
325 ; CHECK-RV64-NEXT: ld a5, 48(sp)
326 ; CHECK-RV64-NEXT: ld a4, 56(sp)
327 ; CHECK-RV64-NEXT: ld a3, 64(sp)
328 ; CHECK-RV64-NEXT: ld a2, 72(sp)
329 ; CHECK-RV64-NEXT: ld a1, 80(sp)
330 ; CHECK-RV64-NEXT: ld a0, 88(sp)
331 ; CHECK-RV64-NEXT: ld t2, 96(sp)
332 ; CHECK-RV64-NEXT: ld t1, 104(sp)
333 ; CHECK-RV64-NEXT: ld t0, 112(sp)
334 ; CHECK-RV64-NEXT: ld ra, 120(sp)
335 ; CHECK-RV64-NEXT: addi sp, sp, 128
336 ; CHECK-RV64-NEXT: mret
338 ; CHECK-RV64-F-LABEL: foo_with_call:
339 ; CHECK-RV64-F: # %bb.0:
340 ; CHECK-RV64-F-NEXT: addi sp, sp, -256
341 ; CHECK-RV64-F-NEXT: sd ra, 248(sp)
342 ; CHECK-RV64-F-NEXT: sd t0, 240(sp)
343 ; CHECK-RV64-F-NEXT: sd t1, 232(sp)
344 ; CHECK-RV64-F-NEXT: sd t2, 224(sp)
345 ; CHECK-RV64-F-NEXT: sd a0, 216(sp)
346 ; CHECK-RV64-F-NEXT: sd a1, 208(sp)
347 ; CHECK-RV64-F-NEXT: sd a2, 200(sp)
348 ; CHECK-RV64-F-NEXT: sd a3, 192(sp)
349 ; CHECK-RV64-F-NEXT: sd a4, 184(sp)
350 ; CHECK-RV64-F-NEXT: sd a5, 176(sp)
351 ; CHECK-RV64-F-NEXT: sd a6, 168(sp)
352 ; CHECK-RV64-F-NEXT: sd a7, 160(sp)
353 ; CHECK-RV64-F-NEXT: sd t3, 152(sp)
354 ; CHECK-RV64-F-NEXT: sd t4, 144(sp)
355 ; CHECK-RV64-F-NEXT: sd t5, 136(sp)
356 ; CHECK-RV64-F-NEXT: sd t6, 128(sp)
357 ; CHECK-RV64-F-NEXT: fsw ft0, 124(sp)
358 ; CHECK-RV64-F-NEXT: fsw ft1, 120(sp)
359 ; CHECK-RV64-F-NEXT: fsw ft2, 116(sp)
360 ; CHECK-RV64-F-NEXT: fsw ft3, 112(sp)
361 ; CHECK-RV64-F-NEXT: fsw ft4, 108(sp)
362 ; CHECK-RV64-F-NEXT: fsw ft5, 104(sp)
363 ; CHECK-RV64-F-NEXT: fsw ft6, 100(sp)
364 ; CHECK-RV64-F-NEXT: fsw ft7, 96(sp)
365 ; CHECK-RV64-F-NEXT: fsw fa0, 92(sp)
366 ; CHECK-RV64-F-NEXT: fsw fa1, 88(sp)
367 ; CHECK-RV64-F-NEXT: fsw fa2, 84(sp)
368 ; CHECK-RV64-F-NEXT: fsw fa3, 80(sp)
369 ; CHECK-RV64-F-NEXT: fsw fa4, 76(sp)
370 ; CHECK-RV64-F-NEXT: fsw fa5, 72(sp)
371 ; CHECK-RV64-F-NEXT: fsw fa6, 68(sp)
372 ; CHECK-RV64-F-NEXT: fsw fa7, 64(sp)
373 ; CHECK-RV64-F-NEXT: fsw ft8, 60(sp)
374 ; CHECK-RV64-F-NEXT: fsw ft9, 56(sp)
375 ; CHECK-RV64-F-NEXT: fsw ft10, 52(sp)
376 ; CHECK-RV64-F-NEXT: fsw ft11, 48(sp)
377 ; CHECK-RV64-F-NEXT: fsw fs0, 44(sp)
378 ; CHECK-RV64-F-NEXT: fsw fs1, 40(sp)
379 ; CHECK-RV64-F-NEXT: fsw fs2, 36(sp)
380 ; CHECK-RV64-F-NEXT: fsw fs3, 32(sp)
381 ; CHECK-RV64-F-NEXT: fsw fs4, 28(sp)
382 ; CHECK-RV64-F-NEXT: fsw fs5, 24(sp)
383 ; CHECK-RV64-F-NEXT: fsw fs6, 20(sp)
384 ; CHECK-RV64-F-NEXT: fsw fs7, 16(sp)
385 ; CHECK-RV64-F-NEXT: fsw fs8, 12(sp)
386 ; CHECK-RV64-F-NEXT: fsw fs9, 8(sp)
387 ; CHECK-RV64-F-NEXT: fsw fs10, 4(sp)
388 ; CHECK-RV64-F-NEXT: fsw fs11, 0(sp)
389 ; CHECK-RV64-F-NEXT: call otherfoo
390 ; CHECK-RV64-F-NEXT: flw fs11, 0(sp)
391 ; CHECK-RV64-F-NEXT: flw fs10, 4(sp)
392 ; CHECK-RV64-F-NEXT: flw fs9, 8(sp)
393 ; CHECK-RV64-F-NEXT: flw fs8, 12(sp)
394 ; CHECK-RV64-F-NEXT: flw fs7, 16(sp)
395 ; CHECK-RV64-F-NEXT: flw fs6, 20(sp)
396 ; CHECK-RV64-F-NEXT: flw fs5, 24(sp)
397 ; CHECK-RV64-F-NEXT: flw fs4, 28(sp)
398 ; CHECK-RV64-F-NEXT: flw fs3, 32(sp)
399 ; CHECK-RV64-F-NEXT: flw fs2, 36(sp)
400 ; CHECK-RV64-F-NEXT: flw fs1, 40(sp)
401 ; CHECK-RV64-F-NEXT: flw fs0, 44(sp)
402 ; CHECK-RV64-F-NEXT: flw ft11, 48(sp)
403 ; CHECK-RV64-F-NEXT: flw ft10, 52(sp)
404 ; CHECK-RV64-F-NEXT: flw ft9, 56(sp)
405 ; CHECK-RV64-F-NEXT: flw ft8, 60(sp)
406 ; CHECK-RV64-F-NEXT: flw fa7, 64(sp)
407 ; CHECK-RV64-F-NEXT: flw fa6, 68(sp)
408 ; CHECK-RV64-F-NEXT: flw fa5, 72(sp)
409 ; CHECK-RV64-F-NEXT: flw fa4, 76(sp)
410 ; CHECK-RV64-F-NEXT: flw fa3, 80(sp)
411 ; CHECK-RV64-F-NEXT: flw fa2, 84(sp)
412 ; CHECK-RV64-F-NEXT: flw fa1, 88(sp)
413 ; CHECK-RV64-F-NEXT: flw fa0, 92(sp)
414 ; CHECK-RV64-F-NEXT: flw ft7, 96(sp)
415 ; CHECK-RV64-F-NEXT: flw ft6, 100(sp)
416 ; CHECK-RV64-F-NEXT: flw ft5, 104(sp)
417 ; CHECK-RV64-F-NEXT: flw ft4, 108(sp)
418 ; CHECK-RV64-F-NEXT: flw ft3, 112(sp)
419 ; CHECK-RV64-F-NEXT: flw ft2, 116(sp)
420 ; CHECK-RV64-F-NEXT: flw ft1, 120(sp)
421 ; CHECK-RV64-F-NEXT: flw ft0, 124(sp)
422 ; CHECK-RV64-F-NEXT: ld t6, 128(sp)
423 ; CHECK-RV64-F-NEXT: ld t5, 136(sp)
424 ; CHECK-RV64-F-NEXT: ld t4, 144(sp)
425 ; CHECK-RV64-F-NEXT: ld t3, 152(sp)
426 ; CHECK-RV64-F-NEXT: ld a7, 160(sp)
427 ; CHECK-RV64-F-NEXT: ld a6, 168(sp)
428 ; CHECK-RV64-F-NEXT: ld a5, 176(sp)
429 ; CHECK-RV64-F-NEXT: ld a4, 184(sp)
430 ; CHECK-RV64-F-NEXT: ld a3, 192(sp)
431 ; CHECK-RV64-F-NEXT: ld a2, 200(sp)
432 ; CHECK-RV64-F-NEXT: ld a1, 208(sp)
433 ; CHECK-RV64-F-NEXT: ld a0, 216(sp)
434 ; CHECK-RV64-F-NEXT: ld t2, 224(sp)
435 ; CHECK-RV64-F-NEXT: ld t1, 232(sp)
436 ; CHECK-RV64-F-NEXT: ld t0, 240(sp)
437 ; CHECK-RV64-F-NEXT: ld ra, 248(sp)
438 ; CHECK-RV64-F-NEXT: addi sp, sp, 256
439 ; CHECK-RV64-F-NEXT: mret
441 ; CHECK-RV64-FD-LABEL: foo_with_call:
442 ; CHECK-RV64-FD: # %bb.0:
443 ; CHECK-RV64-FD-NEXT: addi sp, sp, -384
444 ; CHECK-RV64-FD-NEXT: sd ra, 376(sp)
445 ; CHECK-RV64-FD-NEXT: sd t0, 368(sp)
446 ; CHECK-RV64-FD-NEXT: sd t1, 360(sp)
447 ; CHECK-RV64-FD-NEXT: sd t2, 352(sp)
448 ; CHECK-RV64-FD-NEXT: sd a0, 344(sp)
449 ; CHECK-RV64-FD-NEXT: sd a1, 336(sp)
450 ; CHECK-RV64-FD-NEXT: sd a2, 328(sp)
451 ; CHECK-RV64-FD-NEXT: sd a3, 320(sp)
452 ; CHECK-RV64-FD-NEXT: sd a4, 312(sp)
453 ; CHECK-RV64-FD-NEXT: sd a5, 304(sp)
454 ; CHECK-RV64-FD-NEXT: sd a6, 296(sp)
455 ; CHECK-RV64-FD-NEXT: sd a7, 288(sp)
456 ; CHECK-RV64-FD-NEXT: sd t3, 280(sp)
457 ; CHECK-RV64-FD-NEXT: sd t4, 272(sp)
458 ; CHECK-RV64-FD-NEXT: sd t5, 264(sp)
459 ; CHECK-RV64-FD-NEXT: sd t6, 256(sp)
460 ; CHECK-RV64-FD-NEXT: fsd ft0, 248(sp)
461 ; CHECK-RV64-FD-NEXT: fsd ft1, 240(sp)
462 ; CHECK-RV64-FD-NEXT: fsd ft2, 232(sp)
463 ; CHECK-RV64-FD-NEXT: fsd ft3, 224(sp)
464 ; CHECK-RV64-FD-NEXT: fsd ft4, 216(sp)
465 ; CHECK-RV64-FD-NEXT: fsd ft5, 208(sp)
466 ; CHECK-RV64-FD-NEXT: fsd ft6, 200(sp)
467 ; CHECK-RV64-FD-NEXT: fsd ft7, 192(sp)
468 ; CHECK-RV64-FD-NEXT: fsd fa0, 184(sp)
469 ; CHECK-RV64-FD-NEXT: fsd fa1, 176(sp)
470 ; CHECK-RV64-FD-NEXT: fsd fa2, 168(sp)
471 ; CHECK-RV64-FD-NEXT: fsd fa3, 160(sp)
472 ; CHECK-RV64-FD-NEXT: fsd fa4, 152(sp)
473 ; CHECK-RV64-FD-NEXT: fsd fa5, 144(sp)
474 ; CHECK-RV64-FD-NEXT: fsd fa6, 136(sp)
475 ; CHECK-RV64-FD-NEXT: fsd fa7, 128(sp)
476 ; CHECK-RV64-FD-NEXT: fsd ft8, 120(sp)
477 ; CHECK-RV64-FD-NEXT: fsd ft9, 112(sp)
478 ; CHECK-RV64-FD-NEXT: fsd ft10, 104(sp)
479 ; CHECK-RV64-FD-NEXT: fsd ft11, 96(sp)
480 ; CHECK-RV64-FD-NEXT: fsd fs0, 88(sp)
481 ; CHECK-RV64-FD-NEXT: fsd fs1, 80(sp)
482 ; CHECK-RV64-FD-NEXT: fsd fs2, 72(sp)
483 ; CHECK-RV64-FD-NEXT: fsd fs3, 64(sp)
484 ; CHECK-RV64-FD-NEXT: fsd fs4, 56(sp)
485 ; CHECK-RV64-FD-NEXT: fsd fs5, 48(sp)
486 ; CHECK-RV64-FD-NEXT: fsd fs6, 40(sp)
487 ; CHECK-RV64-FD-NEXT: fsd fs7, 32(sp)
488 ; CHECK-RV64-FD-NEXT: fsd fs8, 24(sp)
489 ; CHECK-RV64-FD-NEXT: fsd fs9, 16(sp)
490 ; CHECK-RV64-FD-NEXT: fsd fs10, 8(sp)
491 ; CHECK-RV64-FD-NEXT: fsd fs11, 0(sp)
492 ; CHECK-RV64-FD-NEXT: call otherfoo
493 ; CHECK-RV64-FD-NEXT: fld fs11, 0(sp)
494 ; CHECK-RV64-FD-NEXT: fld fs10, 8(sp)
495 ; CHECK-RV64-FD-NEXT: fld fs9, 16(sp)
496 ; CHECK-RV64-FD-NEXT: fld fs8, 24(sp)
497 ; CHECK-RV64-FD-NEXT: fld fs7, 32(sp)
498 ; CHECK-RV64-FD-NEXT: fld fs6, 40(sp)
499 ; CHECK-RV64-FD-NEXT: fld fs5, 48(sp)
500 ; CHECK-RV64-FD-NEXT: fld fs4, 56(sp)
501 ; CHECK-RV64-FD-NEXT: fld fs3, 64(sp)
502 ; CHECK-RV64-FD-NEXT: fld fs2, 72(sp)
503 ; CHECK-RV64-FD-NEXT: fld fs1, 80(sp)
504 ; CHECK-RV64-FD-NEXT: fld fs0, 88(sp)
505 ; CHECK-RV64-FD-NEXT: fld ft11, 96(sp)
506 ; CHECK-RV64-FD-NEXT: fld ft10, 104(sp)
507 ; CHECK-RV64-FD-NEXT: fld ft9, 112(sp)
508 ; CHECK-RV64-FD-NEXT: fld ft8, 120(sp)
509 ; CHECK-RV64-FD-NEXT: fld fa7, 128(sp)
510 ; CHECK-RV64-FD-NEXT: fld fa6, 136(sp)
511 ; CHECK-RV64-FD-NEXT: fld fa5, 144(sp)
512 ; CHECK-RV64-FD-NEXT: fld fa4, 152(sp)
513 ; CHECK-RV64-FD-NEXT: fld fa3, 160(sp)
514 ; CHECK-RV64-FD-NEXT: fld fa2, 168(sp)
515 ; CHECK-RV64-FD-NEXT: fld fa1, 176(sp)
516 ; CHECK-RV64-FD-NEXT: fld fa0, 184(sp)
517 ; CHECK-RV64-FD-NEXT: fld ft7, 192(sp)
518 ; CHECK-RV64-FD-NEXT: fld ft6, 200(sp)
519 ; CHECK-RV64-FD-NEXT: fld ft5, 208(sp)
520 ; CHECK-RV64-FD-NEXT: fld ft4, 216(sp)
521 ; CHECK-RV64-FD-NEXT: fld ft3, 224(sp)
522 ; CHECK-RV64-FD-NEXT: fld ft2, 232(sp)
523 ; CHECK-RV64-FD-NEXT: fld ft1, 240(sp)
524 ; CHECK-RV64-FD-NEXT: fld ft0, 248(sp)
525 ; CHECK-RV64-FD-NEXT: ld t6, 256(sp)
526 ; CHECK-RV64-FD-NEXT: ld t5, 264(sp)
527 ; CHECK-RV64-FD-NEXT: ld t4, 272(sp)
528 ; CHECK-RV64-FD-NEXT: ld t3, 280(sp)
529 ; CHECK-RV64-FD-NEXT: ld a7, 288(sp)
530 ; CHECK-RV64-FD-NEXT: ld a6, 296(sp)
531 ; CHECK-RV64-FD-NEXT: ld a5, 304(sp)
532 ; CHECK-RV64-FD-NEXT: ld a4, 312(sp)
533 ; CHECK-RV64-FD-NEXT: ld a3, 320(sp)
534 ; CHECK-RV64-FD-NEXT: ld a2, 328(sp)
535 ; CHECK-RV64-FD-NEXT: ld a1, 336(sp)
536 ; CHECK-RV64-FD-NEXT: ld a0, 344(sp)
537 ; CHECK-RV64-FD-NEXT: ld t2, 352(sp)
538 ; CHECK-RV64-FD-NEXT: ld t1, 360(sp)
539 ; CHECK-RV64-FD-NEXT: ld t0, 368(sp)
540 ; CHECK-RV64-FD-NEXT: ld ra, 376(sp)
541 ; CHECK-RV64-FD-NEXT: addi sp, sp, 384
542 ; CHECK-RV64-FD-NEXT: mret
543 %call = call i32 bitcast (i32 (...)* @otherfoo to i32 ()*)()
548 ; Additionally check frame pointer and return address are properly saved.
550 define void @foo_fp_with_call() #3 {
552 ; CHECK-RV32-LABEL: foo_fp_with_call:
553 ; CHECK-RV32: # %bb.0:
554 ; CHECK-RV32-NEXT: addi sp, sp, -80
555 ; CHECK-RV32-NEXT: sw ra, 76(sp)
556 ; CHECK-RV32-NEXT: sw t0, 72(sp)
557 ; CHECK-RV32-NEXT: sw t1, 68(sp)
558 ; CHECK-RV32-NEXT: sw t2, 64(sp)
559 ; CHECK-RV32-NEXT: sw s0, 60(sp)
560 ; CHECK-RV32-NEXT: sw a0, 56(sp)
561 ; CHECK-RV32-NEXT: sw a1, 52(sp)
562 ; CHECK-RV32-NEXT: sw a2, 48(sp)
563 ; CHECK-RV32-NEXT: sw a3, 44(sp)
564 ; CHECK-RV32-NEXT: sw a4, 40(sp)
565 ; CHECK-RV32-NEXT: sw a5, 36(sp)
566 ; CHECK-RV32-NEXT: sw a6, 32(sp)
567 ; CHECK-RV32-NEXT: sw a7, 28(sp)
568 ; CHECK-RV32-NEXT: sw t3, 24(sp)
569 ; CHECK-RV32-NEXT: sw t4, 20(sp)
570 ; CHECK-RV32-NEXT: sw t5, 16(sp)
571 ; CHECK-RV32-NEXT: sw t6, 12(sp)
572 ; CHECK-RV32-NEXT: addi s0, sp, 80
573 ; CHECK-RV32-NEXT: call otherfoo
574 ; CHECK-RV32-NEXT: lw t6, 12(sp)
575 ; CHECK-RV32-NEXT: lw t5, 16(sp)
576 ; CHECK-RV32-NEXT: lw t4, 20(sp)
577 ; CHECK-RV32-NEXT: lw t3, 24(sp)
578 ; CHECK-RV32-NEXT: lw a7, 28(sp)
579 ; CHECK-RV32-NEXT: lw a6, 32(sp)
580 ; CHECK-RV32-NEXT: lw a5, 36(sp)
581 ; CHECK-RV32-NEXT: lw a4, 40(sp)
582 ; CHECK-RV32-NEXT: lw a3, 44(sp)
583 ; CHECK-RV32-NEXT: lw a2, 48(sp)
584 ; CHECK-RV32-NEXT: lw a1, 52(sp)
585 ; CHECK-RV32-NEXT: lw a0, 56(sp)
586 ; CHECK-RV32-NEXT: lw s0, 60(sp)
587 ; CHECK-RV32-NEXT: lw t2, 64(sp)
588 ; CHECK-RV32-NEXT: lw t1, 68(sp)
589 ; CHECK-RV32-NEXT: lw t0, 72(sp)
590 ; CHECK-RV32-NEXT: lw ra, 76(sp)
591 ; CHECK-RV32-NEXT: addi sp, sp, 80
592 ; CHECK-RV32-NEXT: mret
594 ; CHECK-RV32-F-LABEL: foo_fp_with_call:
595 ; CHECK-RV32-F: # %bb.0:
596 ; CHECK-RV32-F-NEXT: addi sp, sp, -208
597 ; CHECK-RV32-F-NEXT: sw ra, 204(sp)
598 ; CHECK-RV32-F-NEXT: sw t0, 200(sp)
599 ; CHECK-RV32-F-NEXT: sw t1, 196(sp)
600 ; CHECK-RV32-F-NEXT: sw t2, 192(sp)
601 ; CHECK-RV32-F-NEXT: sw s0, 188(sp)
602 ; CHECK-RV32-F-NEXT: sw a0, 184(sp)
603 ; CHECK-RV32-F-NEXT: sw a1, 180(sp)
604 ; CHECK-RV32-F-NEXT: sw a2, 176(sp)
605 ; CHECK-RV32-F-NEXT: sw a3, 172(sp)
606 ; CHECK-RV32-F-NEXT: sw a4, 168(sp)
607 ; CHECK-RV32-F-NEXT: sw a5, 164(sp)
608 ; CHECK-RV32-F-NEXT: sw a6, 160(sp)
609 ; CHECK-RV32-F-NEXT: sw a7, 156(sp)
610 ; CHECK-RV32-F-NEXT: sw t3, 152(sp)
611 ; CHECK-RV32-F-NEXT: sw t4, 148(sp)
612 ; CHECK-RV32-F-NEXT: sw t5, 144(sp)
613 ; CHECK-RV32-F-NEXT: sw t6, 140(sp)
614 ; CHECK-RV32-F-NEXT: fsw ft0, 136(sp)
615 ; CHECK-RV32-F-NEXT: fsw ft1, 132(sp)
616 ; CHECK-RV32-F-NEXT: fsw ft2, 128(sp)
617 ; CHECK-RV32-F-NEXT: fsw ft3, 124(sp)
618 ; CHECK-RV32-F-NEXT: fsw ft4, 120(sp)
619 ; CHECK-RV32-F-NEXT: fsw ft5, 116(sp)
620 ; CHECK-RV32-F-NEXT: fsw ft6, 112(sp)
621 ; CHECK-RV32-F-NEXT: fsw ft7, 108(sp)
622 ; CHECK-RV32-F-NEXT: fsw fa0, 104(sp)
623 ; CHECK-RV32-F-NEXT: fsw fa1, 100(sp)
624 ; CHECK-RV32-F-NEXT: fsw fa2, 96(sp)
625 ; CHECK-RV32-F-NEXT: fsw fa3, 92(sp)
626 ; CHECK-RV32-F-NEXT: fsw fa4, 88(sp)
627 ; CHECK-RV32-F-NEXT: fsw fa5, 84(sp)
628 ; CHECK-RV32-F-NEXT: fsw fa6, 80(sp)
629 ; CHECK-RV32-F-NEXT: fsw fa7, 76(sp)
630 ; CHECK-RV32-F-NEXT: fsw ft8, 72(sp)
631 ; CHECK-RV32-F-NEXT: fsw ft9, 68(sp)
632 ; CHECK-RV32-F-NEXT: fsw ft10, 64(sp)
633 ; CHECK-RV32-F-NEXT: fsw ft11, 60(sp)
634 ; CHECK-RV32-F-NEXT: fsw fs0, 56(sp)
635 ; CHECK-RV32-F-NEXT: fsw fs1, 52(sp)
636 ; CHECK-RV32-F-NEXT: fsw fs2, 48(sp)
637 ; CHECK-RV32-F-NEXT: fsw fs3, 44(sp)
638 ; CHECK-RV32-F-NEXT: fsw fs4, 40(sp)
639 ; CHECK-RV32-F-NEXT: fsw fs5, 36(sp)
640 ; CHECK-RV32-F-NEXT: fsw fs6, 32(sp)
641 ; CHECK-RV32-F-NEXT: fsw fs7, 28(sp)
642 ; CHECK-RV32-F-NEXT: fsw fs8, 24(sp)
643 ; CHECK-RV32-F-NEXT: fsw fs9, 20(sp)
644 ; CHECK-RV32-F-NEXT: fsw fs10, 16(sp)
645 ; CHECK-RV32-F-NEXT: fsw fs11, 12(sp)
646 ; CHECK-RV32-F-NEXT: addi s0, sp, 208
647 ; CHECK-RV32-F-NEXT: call otherfoo
648 ; CHECK-RV32-F-NEXT: flw fs11, 12(sp)
649 ; CHECK-RV32-F-NEXT: flw fs10, 16(sp)
650 ; CHECK-RV32-F-NEXT: flw fs9, 20(sp)
651 ; CHECK-RV32-F-NEXT: flw fs8, 24(sp)
652 ; CHECK-RV32-F-NEXT: flw fs7, 28(sp)
653 ; CHECK-RV32-F-NEXT: flw fs6, 32(sp)
654 ; CHECK-RV32-F-NEXT: flw fs5, 36(sp)
655 ; CHECK-RV32-F-NEXT: flw fs4, 40(sp)
656 ; CHECK-RV32-F-NEXT: flw fs3, 44(sp)
657 ; CHECK-RV32-F-NEXT: flw fs2, 48(sp)
658 ; CHECK-RV32-F-NEXT: flw fs1, 52(sp)
659 ; CHECK-RV32-F-NEXT: flw fs0, 56(sp)
660 ; CHECK-RV32-F-NEXT: flw ft11, 60(sp)
661 ; CHECK-RV32-F-NEXT: flw ft10, 64(sp)
662 ; CHECK-RV32-F-NEXT: flw ft9, 68(sp)
663 ; CHECK-RV32-F-NEXT: flw ft8, 72(sp)
664 ; CHECK-RV32-F-NEXT: flw fa7, 76(sp)
665 ; CHECK-RV32-F-NEXT: flw fa6, 80(sp)
666 ; CHECK-RV32-F-NEXT: flw fa5, 84(sp)
667 ; CHECK-RV32-F-NEXT: flw fa4, 88(sp)
668 ; CHECK-RV32-F-NEXT: flw fa3, 92(sp)
669 ; CHECK-RV32-F-NEXT: flw fa2, 96(sp)
670 ; CHECK-RV32-F-NEXT: flw fa1, 100(sp)
671 ; CHECK-RV32-F-NEXT: flw fa0, 104(sp)
672 ; CHECK-RV32-F-NEXT: flw ft7, 108(sp)
673 ; CHECK-RV32-F-NEXT: flw ft6, 112(sp)
674 ; CHECK-RV32-F-NEXT: flw ft5, 116(sp)
675 ; CHECK-RV32-F-NEXT: flw ft4, 120(sp)
676 ; CHECK-RV32-F-NEXT: flw ft3, 124(sp)
677 ; CHECK-RV32-F-NEXT: flw ft2, 128(sp)
678 ; CHECK-RV32-F-NEXT: flw ft1, 132(sp)
679 ; CHECK-RV32-F-NEXT: flw ft0, 136(sp)
680 ; CHECK-RV32-F-NEXT: lw t6, 140(sp)
681 ; CHECK-RV32-F-NEXT: lw t5, 144(sp)
682 ; CHECK-RV32-F-NEXT: lw t4, 148(sp)
683 ; CHECK-RV32-F-NEXT: lw t3, 152(sp)
684 ; CHECK-RV32-F-NEXT: lw a7, 156(sp)
685 ; CHECK-RV32-F-NEXT: lw a6, 160(sp)
686 ; CHECK-RV32-F-NEXT: lw a5, 164(sp)
687 ; CHECK-RV32-F-NEXT: lw a4, 168(sp)
688 ; CHECK-RV32-F-NEXT: lw a3, 172(sp)
689 ; CHECK-RV32-F-NEXT: lw a2, 176(sp)
690 ; CHECK-RV32-F-NEXT: lw a1, 180(sp)
691 ; CHECK-RV32-F-NEXT: lw a0, 184(sp)
692 ; CHECK-RV32-F-NEXT: lw s0, 188(sp)
693 ; CHECK-RV32-F-NEXT: lw t2, 192(sp)
694 ; CHECK-RV32-F-NEXT: lw t1, 196(sp)
695 ; CHECK-RV32-F-NEXT: lw t0, 200(sp)
696 ; CHECK-RV32-F-NEXT: lw ra, 204(sp)
697 ; CHECK-RV32-F-NEXT: addi sp, sp, 208
698 ; CHECK-RV32-F-NEXT: mret
700 ; CHECK-RV32-FD-LABEL: foo_fp_with_call:
701 ; CHECK-RV32-FD: # %bb.0:
702 ; CHECK-RV32-FD-NEXT: addi sp, sp, -336
703 ; CHECK-RV32-FD-NEXT: sw ra, 332(sp)
704 ; CHECK-RV32-FD-NEXT: sw t0, 328(sp)
705 ; CHECK-RV32-FD-NEXT: sw t1, 324(sp)
706 ; CHECK-RV32-FD-NEXT: sw t2, 320(sp)
707 ; CHECK-RV32-FD-NEXT: sw s0, 316(sp)
708 ; CHECK-RV32-FD-NEXT: sw a0, 312(sp)
709 ; CHECK-RV32-FD-NEXT: sw a1, 308(sp)
710 ; CHECK-RV32-FD-NEXT: sw a2, 304(sp)
711 ; CHECK-RV32-FD-NEXT: sw a3, 300(sp)
712 ; CHECK-RV32-FD-NEXT: sw a4, 296(sp)
713 ; CHECK-RV32-FD-NEXT: sw a5, 292(sp)
714 ; CHECK-RV32-FD-NEXT: sw a6, 288(sp)
715 ; CHECK-RV32-FD-NEXT: sw a7, 284(sp)
716 ; CHECK-RV32-FD-NEXT: sw t3, 280(sp)
717 ; CHECK-RV32-FD-NEXT: sw t4, 276(sp)
718 ; CHECK-RV32-FD-NEXT: sw t5, 272(sp)
719 ; CHECK-RV32-FD-NEXT: sw t6, 268(sp)
720 ; CHECK-RV32-FD-NEXT: fsd ft0, 256(sp)
721 ; CHECK-RV32-FD-NEXT: fsd ft1, 248(sp)
722 ; CHECK-RV32-FD-NEXT: fsd ft2, 240(sp)
723 ; CHECK-RV32-FD-NEXT: fsd ft3, 232(sp)
724 ; CHECK-RV32-FD-NEXT: fsd ft4, 224(sp)
725 ; CHECK-RV32-FD-NEXT: fsd ft5, 216(sp)
726 ; CHECK-RV32-FD-NEXT: fsd ft6, 208(sp)
727 ; CHECK-RV32-FD-NEXT: fsd ft7, 200(sp)
728 ; CHECK-RV32-FD-NEXT: fsd fa0, 192(sp)
729 ; CHECK-RV32-FD-NEXT: fsd fa1, 184(sp)
730 ; CHECK-RV32-FD-NEXT: fsd fa2, 176(sp)
731 ; CHECK-RV32-FD-NEXT: fsd fa3, 168(sp)
732 ; CHECK-RV32-FD-NEXT: fsd fa4, 160(sp)
733 ; CHECK-RV32-FD-NEXT: fsd fa5, 152(sp)
734 ; CHECK-RV32-FD-NEXT: fsd fa6, 144(sp)
735 ; CHECK-RV32-FD-NEXT: fsd fa7, 136(sp)
736 ; CHECK-RV32-FD-NEXT: fsd ft8, 128(sp)
737 ; CHECK-RV32-FD-NEXT: fsd ft9, 120(sp)
738 ; CHECK-RV32-FD-NEXT: fsd ft10, 112(sp)
739 ; CHECK-RV32-FD-NEXT: fsd ft11, 104(sp)
740 ; CHECK-RV32-FD-NEXT: fsd fs0, 96(sp)
741 ; CHECK-RV32-FD-NEXT: fsd fs1, 88(sp)
742 ; CHECK-RV32-FD-NEXT: fsd fs2, 80(sp)
743 ; CHECK-RV32-FD-NEXT: fsd fs3, 72(sp)
744 ; CHECK-RV32-FD-NEXT: fsd fs4, 64(sp)
745 ; CHECK-RV32-FD-NEXT: fsd fs5, 56(sp)
746 ; CHECK-RV32-FD-NEXT: fsd fs6, 48(sp)
747 ; CHECK-RV32-FD-NEXT: fsd fs7, 40(sp)
748 ; CHECK-RV32-FD-NEXT: fsd fs8, 32(sp)
749 ; CHECK-RV32-FD-NEXT: fsd fs9, 24(sp)
750 ; CHECK-RV32-FD-NEXT: fsd fs10, 16(sp)
751 ; CHECK-RV32-FD-NEXT: fsd fs11, 8(sp)
752 ; CHECK-RV32-FD-NEXT: addi s0, sp, 336
753 ; CHECK-RV32-FD-NEXT: call otherfoo
754 ; CHECK-RV32-FD-NEXT: fld fs11, 8(sp)
755 ; CHECK-RV32-FD-NEXT: fld fs10, 16(sp)
756 ; CHECK-RV32-FD-NEXT: fld fs9, 24(sp)
757 ; CHECK-RV32-FD-NEXT: fld fs8, 32(sp)
758 ; CHECK-RV32-FD-NEXT: fld fs7, 40(sp)
759 ; CHECK-RV32-FD-NEXT: fld fs6, 48(sp)
760 ; CHECK-RV32-FD-NEXT: fld fs5, 56(sp)
761 ; CHECK-RV32-FD-NEXT: fld fs4, 64(sp)
762 ; CHECK-RV32-FD-NEXT: fld fs3, 72(sp)
763 ; CHECK-RV32-FD-NEXT: fld fs2, 80(sp)
764 ; CHECK-RV32-FD-NEXT: fld fs1, 88(sp)
765 ; CHECK-RV32-FD-NEXT: fld fs0, 96(sp)
766 ; CHECK-RV32-FD-NEXT: fld ft11, 104(sp)
767 ; CHECK-RV32-FD-NEXT: fld ft10, 112(sp)
768 ; CHECK-RV32-FD-NEXT: fld ft9, 120(sp)
769 ; CHECK-RV32-FD-NEXT: fld ft8, 128(sp)
770 ; CHECK-RV32-FD-NEXT: fld fa7, 136(sp)
771 ; CHECK-RV32-FD-NEXT: fld fa6, 144(sp)
772 ; CHECK-RV32-FD-NEXT: fld fa5, 152(sp)
773 ; CHECK-RV32-FD-NEXT: fld fa4, 160(sp)
774 ; CHECK-RV32-FD-NEXT: fld fa3, 168(sp)
775 ; CHECK-RV32-FD-NEXT: fld fa2, 176(sp)
776 ; CHECK-RV32-FD-NEXT: fld fa1, 184(sp)
777 ; CHECK-RV32-FD-NEXT: fld fa0, 192(sp)
778 ; CHECK-RV32-FD-NEXT: fld ft7, 200(sp)
779 ; CHECK-RV32-FD-NEXT: fld ft6, 208(sp)
780 ; CHECK-RV32-FD-NEXT: fld ft5, 216(sp)
781 ; CHECK-RV32-FD-NEXT: fld ft4, 224(sp)
782 ; CHECK-RV32-FD-NEXT: fld ft3, 232(sp)
783 ; CHECK-RV32-FD-NEXT: fld ft2, 240(sp)
784 ; CHECK-RV32-FD-NEXT: fld ft1, 248(sp)
785 ; CHECK-RV32-FD-NEXT: fld ft0, 256(sp)
786 ; CHECK-RV32-FD-NEXT: lw t6, 268(sp)
787 ; CHECK-RV32-FD-NEXT: lw t5, 272(sp)
788 ; CHECK-RV32-FD-NEXT: lw t4, 276(sp)
789 ; CHECK-RV32-FD-NEXT: lw t3, 280(sp)
790 ; CHECK-RV32-FD-NEXT: lw a7, 284(sp)
791 ; CHECK-RV32-FD-NEXT: lw a6, 288(sp)
792 ; CHECK-RV32-FD-NEXT: lw a5, 292(sp)
793 ; CHECK-RV32-FD-NEXT: lw a4, 296(sp)
794 ; CHECK-RV32-FD-NEXT: lw a3, 300(sp)
795 ; CHECK-RV32-FD-NEXT: lw a2, 304(sp)
796 ; CHECK-RV32-FD-NEXT: lw a1, 308(sp)
797 ; CHECK-RV32-FD-NEXT: lw a0, 312(sp)
798 ; CHECK-RV32-FD-NEXT: lw s0, 316(sp)
799 ; CHECK-RV32-FD-NEXT: lw t2, 320(sp)
800 ; CHECK-RV32-FD-NEXT: lw t1, 324(sp)
801 ; CHECK-RV32-FD-NEXT: lw t0, 328(sp)
802 ; CHECK-RV32-FD-NEXT: lw ra, 332(sp)
803 ; CHECK-RV32-FD-NEXT: addi sp, sp, 336
804 ; CHECK-RV32-FD-NEXT: mret
806 ; CHECK-RV64-LABEL: foo_fp_with_call:
807 ; CHECK-RV64: # %bb.0:
808 ; CHECK-RV64-NEXT: addi sp, sp, -144
809 ; CHECK-RV64-NEXT: sd ra, 136(sp)
810 ; CHECK-RV64-NEXT: sd t0, 128(sp)
811 ; CHECK-RV64-NEXT: sd t1, 120(sp)
812 ; CHECK-RV64-NEXT: sd t2, 112(sp)
813 ; CHECK-RV64-NEXT: sd s0, 104(sp)
814 ; CHECK-RV64-NEXT: sd a0, 96(sp)
815 ; CHECK-RV64-NEXT: sd a1, 88(sp)
816 ; CHECK-RV64-NEXT: sd a2, 80(sp)
817 ; CHECK-RV64-NEXT: sd a3, 72(sp)
818 ; CHECK-RV64-NEXT: sd a4, 64(sp)
819 ; CHECK-RV64-NEXT: sd a5, 56(sp)
820 ; CHECK-RV64-NEXT: sd a6, 48(sp)
821 ; CHECK-RV64-NEXT: sd a7, 40(sp)
822 ; CHECK-RV64-NEXT: sd t3, 32(sp)
823 ; CHECK-RV64-NEXT: sd t4, 24(sp)
824 ; CHECK-RV64-NEXT: sd t5, 16(sp)
825 ; CHECK-RV64-NEXT: sd t6, 8(sp)
826 ; CHECK-RV64-NEXT: addi s0, sp, 144
827 ; CHECK-RV64-NEXT: call otherfoo
828 ; CHECK-RV64-NEXT: ld t6, 8(sp)
829 ; CHECK-RV64-NEXT: ld t5, 16(sp)
830 ; CHECK-RV64-NEXT: ld t4, 24(sp)
831 ; CHECK-RV64-NEXT: ld t3, 32(sp)
832 ; CHECK-RV64-NEXT: ld a7, 40(sp)
833 ; CHECK-RV64-NEXT: ld a6, 48(sp)
834 ; CHECK-RV64-NEXT: ld a5, 56(sp)
835 ; CHECK-RV64-NEXT: ld a4, 64(sp)
836 ; CHECK-RV64-NEXT: ld a3, 72(sp)
837 ; CHECK-RV64-NEXT: ld a2, 80(sp)
838 ; CHECK-RV64-NEXT: ld a1, 88(sp)
839 ; CHECK-RV64-NEXT: ld a0, 96(sp)
840 ; CHECK-RV64-NEXT: ld s0, 104(sp)
841 ; CHECK-RV64-NEXT: ld t2, 112(sp)
842 ; CHECK-RV64-NEXT: ld t1, 120(sp)
843 ; CHECK-RV64-NEXT: ld t0, 128(sp)
844 ; CHECK-RV64-NEXT: ld ra, 136(sp)
845 ; CHECK-RV64-NEXT: addi sp, sp, 144
846 ; CHECK-RV64-NEXT: mret
848 ; CHECK-RV64-F-LABEL: foo_fp_with_call:
849 ; CHECK-RV64-F: # %bb.0:
850 ; CHECK-RV64-F-NEXT: addi sp, sp, -272
851 ; CHECK-RV64-F-NEXT: sd ra, 264(sp)
852 ; CHECK-RV64-F-NEXT: sd t0, 256(sp)
853 ; CHECK-RV64-F-NEXT: sd t1, 248(sp)
854 ; CHECK-RV64-F-NEXT: sd t2, 240(sp)
855 ; CHECK-RV64-F-NEXT: sd s0, 232(sp)
856 ; CHECK-RV64-F-NEXT: sd a0, 224(sp)
857 ; CHECK-RV64-F-NEXT: sd a1, 216(sp)
858 ; CHECK-RV64-F-NEXT: sd a2, 208(sp)
859 ; CHECK-RV64-F-NEXT: sd a3, 200(sp)
860 ; CHECK-RV64-F-NEXT: sd a4, 192(sp)
861 ; CHECK-RV64-F-NEXT: sd a5, 184(sp)
862 ; CHECK-RV64-F-NEXT: sd a6, 176(sp)
863 ; CHECK-RV64-F-NEXT: sd a7, 168(sp)
864 ; CHECK-RV64-F-NEXT: sd t3, 160(sp)
865 ; CHECK-RV64-F-NEXT: sd t4, 152(sp)
866 ; CHECK-RV64-F-NEXT: sd t5, 144(sp)
867 ; CHECK-RV64-F-NEXT: sd t6, 136(sp)
868 ; CHECK-RV64-F-NEXT: fsw ft0, 132(sp)
869 ; CHECK-RV64-F-NEXT: fsw ft1, 128(sp)
870 ; CHECK-RV64-F-NEXT: fsw ft2, 124(sp)
871 ; CHECK-RV64-F-NEXT: fsw ft3, 120(sp)
872 ; CHECK-RV64-F-NEXT: fsw ft4, 116(sp)
873 ; CHECK-RV64-F-NEXT: fsw ft5, 112(sp)
874 ; CHECK-RV64-F-NEXT: fsw ft6, 108(sp)
875 ; CHECK-RV64-F-NEXT: fsw ft7, 104(sp)
876 ; CHECK-RV64-F-NEXT: fsw fa0, 100(sp)
877 ; CHECK-RV64-F-NEXT: fsw fa1, 96(sp)
878 ; CHECK-RV64-F-NEXT: fsw fa2, 92(sp)
879 ; CHECK-RV64-F-NEXT: fsw fa3, 88(sp)
880 ; CHECK-RV64-F-NEXT: fsw fa4, 84(sp)
881 ; CHECK-RV64-F-NEXT: fsw fa5, 80(sp)
882 ; CHECK-RV64-F-NEXT: fsw fa6, 76(sp)
883 ; CHECK-RV64-F-NEXT: fsw fa7, 72(sp)
884 ; CHECK-RV64-F-NEXT: fsw ft8, 68(sp)
885 ; CHECK-RV64-F-NEXT: fsw ft9, 64(sp)
886 ; CHECK-RV64-F-NEXT: fsw ft10, 60(sp)
887 ; CHECK-RV64-F-NEXT: fsw ft11, 56(sp)
888 ; CHECK-RV64-F-NEXT: fsw fs0, 52(sp)
889 ; CHECK-RV64-F-NEXT: fsw fs1, 48(sp)
890 ; CHECK-RV64-F-NEXT: fsw fs2, 44(sp)
891 ; CHECK-RV64-F-NEXT: fsw fs3, 40(sp)
892 ; CHECK-RV64-F-NEXT: fsw fs4, 36(sp)
893 ; CHECK-RV64-F-NEXT: fsw fs5, 32(sp)
894 ; CHECK-RV64-F-NEXT: fsw fs6, 28(sp)
895 ; CHECK-RV64-F-NEXT: fsw fs7, 24(sp)
896 ; CHECK-RV64-F-NEXT: fsw fs8, 20(sp)
897 ; CHECK-RV64-F-NEXT: fsw fs9, 16(sp)
898 ; CHECK-RV64-F-NEXT: fsw fs10, 12(sp)
899 ; CHECK-RV64-F-NEXT: fsw fs11, 8(sp)
900 ; CHECK-RV64-F-NEXT: addi s0, sp, 272
901 ; CHECK-RV64-F-NEXT: call otherfoo
902 ; CHECK-RV64-F-NEXT: flw fs11, 8(sp)
903 ; CHECK-RV64-F-NEXT: flw fs10, 12(sp)
904 ; CHECK-RV64-F-NEXT: flw fs9, 16(sp)
905 ; CHECK-RV64-F-NEXT: flw fs8, 20(sp)
906 ; CHECK-RV64-F-NEXT: flw fs7, 24(sp)
907 ; CHECK-RV64-F-NEXT: flw fs6, 28(sp)
908 ; CHECK-RV64-F-NEXT: flw fs5, 32(sp)
909 ; CHECK-RV64-F-NEXT: flw fs4, 36(sp)
910 ; CHECK-RV64-F-NEXT: flw fs3, 40(sp)
911 ; CHECK-RV64-F-NEXT: flw fs2, 44(sp)
912 ; CHECK-RV64-F-NEXT: flw fs1, 48(sp)
913 ; CHECK-RV64-F-NEXT: flw fs0, 52(sp)
914 ; CHECK-RV64-F-NEXT: flw ft11, 56(sp)
915 ; CHECK-RV64-F-NEXT: flw ft10, 60(sp)
916 ; CHECK-RV64-F-NEXT: flw ft9, 64(sp)
917 ; CHECK-RV64-F-NEXT: flw ft8, 68(sp)
918 ; CHECK-RV64-F-NEXT: flw fa7, 72(sp)
919 ; CHECK-RV64-F-NEXT: flw fa6, 76(sp)
920 ; CHECK-RV64-F-NEXT: flw fa5, 80(sp)
921 ; CHECK-RV64-F-NEXT: flw fa4, 84(sp)
922 ; CHECK-RV64-F-NEXT: flw fa3, 88(sp)
923 ; CHECK-RV64-F-NEXT: flw fa2, 92(sp)
924 ; CHECK-RV64-F-NEXT: flw fa1, 96(sp)
925 ; CHECK-RV64-F-NEXT: flw fa0, 100(sp)
926 ; CHECK-RV64-F-NEXT: flw ft7, 104(sp)
927 ; CHECK-RV64-F-NEXT: flw ft6, 108(sp)
928 ; CHECK-RV64-F-NEXT: flw ft5, 112(sp)
929 ; CHECK-RV64-F-NEXT: flw ft4, 116(sp)
930 ; CHECK-RV64-F-NEXT: flw ft3, 120(sp)
931 ; CHECK-RV64-F-NEXT: flw ft2, 124(sp)
932 ; CHECK-RV64-F-NEXT: flw ft1, 128(sp)
933 ; CHECK-RV64-F-NEXT: flw ft0, 132(sp)
934 ; CHECK-RV64-F-NEXT: ld t6, 136(sp)
935 ; CHECK-RV64-F-NEXT: ld t5, 144(sp)
936 ; CHECK-RV64-F-NEXT: ld t4, 152(sp)
937 ; CHECK-RV64-F-NEXT: ld t3, 160(sp)
938 ; CHECK-RV64-F-NEXT: ld a7, 168(sp)
939 ; CHECK-RV64-F-NEXT: ld a6, 176(sp)
940 ; CHECK-RV64-F-NEXT: ld a5, 184(sp)
941 ; CHECK-RV64-F-NEXT: ld a4, 192(sp)
942 ; CHECK-RV64-F-NEXT: ld a3, 200(sp)
943 ; CHECK-RV64-F-NEXT: ld a2, 208(sp)
944 ; CHECK-RV64-F-NEXT: ld a1, 216(sp)
945 ; CHECK-RV64-F-NEXT: ld a0, 224(sp)
946 ; CHECK-RV64-F-NEXT: ld s0, 232(sp)
947 ; CHECK-RV64-F-NEXT: ld t2, 240(sp)
948 ; CHECK-RV64-F-NEXT: ld t1, 248(sp)
949 ; CHECK-RV64-F-NEXT: ld t0, 256(sp)
950 ; CHECK-RV64-F-NEXT: ld ra, 264(sp)
951 ; CHECK-RV64-F-NEXT: addi sp, sp, 272
952 ; CHECK-RV64-F-NEXT: mret
954 ; CHECK-RV64-FD-LABEL: foo_fp_with_call:
955 ; CHECK-RV64-FD: # %bb.0:
956 ; CHECK-RV64-FD-NEXT: addi sp, sp, -400
957 ; CHECK-RV64-FD-NEXT: sd ra, 392(sp)
958 ; CHECK-RV64-FD-NEXT: sd t0, 384(sp)
959 ; CHECK-RV64-FD-NEXT: sd t1, 376(sp)
960 ; CHECK-RV64-FD-NEXT: sd t2, 368(sp)
961 ; CHECK-RV64-FD-NEXT: sd s0, 360(sp)
962 ; CHECK-RV64-FD-NEXT: sd a0, 352(sp)
963 ; CHECK-RV64-FD-NEXT: sd a1, 344(sp)
964 ; CHECK-RV64-FD-NEXT: sd a2, 336(sp)
965 ; CHECK-RV64-FD-NEXT: sd a3, 328(sp)
966 ; CHECK-RV64-FD-NEXT: sd a4, 320(sp)
967 ; CHECK-RV64-FD-NEXT: sd a5, 312(sp)
968 ; CHECK-RV64-FD-NEXT: sd a6, 304(sp)
969 ; CHECK-RV64-FD-NEXT: sd a7, 296(sp)
970 ; CHECK-RV64-FD-NEXT: sd t3, 288(sp)
971 ; CHECK-RV64-FD-NEXT: sd t4, 280(sp)
972 ; CHECK-RV64-FD-NEXT: sd t5, 272(sp)
973 ; CHECK-RV64-FD-NEXT: sd t6, 264(sp)
974 ; CHECK-RV64-FD-NEXT: fsd ft0, 256(sp)
975 ; CHECK-RV64-FD-NEXT: fsd ft1, 248(sp)
976 ; CHECK-RV64-FD-NEXT: fsd ft2, 240(sp)
977 ; CHECK-RV64-FD-NEXT: fsd ft3, 232(sp)
978 ; CHECK-RV64-FD-NEXT: fsd ft4, 224(sp)
979 ; CHECK-RV64-FD-NEXT: fsd ft5, 216(sp)
980 ; CHECK-RV64-FD-NEXT: fsd ft6, 208(sp)
981 ; CHECK-RV64-FD-NEXT: fsd ft7, 200(sp)
982 ; CHECK-RV64-FD-NEXT: fsd fa0, 192(sp)
983 ; CHECK-RV64-FD-NEXT: fsd fa1, 184(sp)
984 ; CHECK-RV64-FD-NEXT: fsd fa2, 176(sp)
985 ; CHECK-RV64-FD-NEXT: fsd fa3, 168(sp)
986 ; CHECK-RV64-FD-NEXT: fsd fa4, 160(sp)
987 ; CHECK-RV64-FD-NEXT: fsd fa5, 152(sp)
988 ; CHECK-RV64-FD-NEXT: fsd fa6, 144(sp)
989 ; CHECK-RV64-FD-NEXT: fsd fa7, 136(sp)
990 ; CHECK-RV64-FD-NEXT: fsd ft8, 128(sp)
991 ; CHECK-RV64-FD-NEXT: fsd ft9, 120(sp)
992 ; CHECK-RV64-FD-NEXT: fsd ft10, 112(sp)
993 ; CHECK-RV64-FD-NEXT: fsd ft11, 104(sp)
994 ; CHECK-RV64-FD-NEXT: fsd fs0, 96(sp)
995 ; CHECK-RV64-FD-NEXT: fsd fs1, 88(sp)
996 ; CHECK-RV64-FD-NEXT: fsd fs2, 80(sp)
997 ; CHECK-RV64-FD-NEXT: fsd fs3, 72(sp)
998 ; CHECK-RV64-FD-NEXT: fsd fs4, 64(sp)
999 ; CHECK-RV64-FD-NEXT: fsd fs5, 56(sp)
1000 ; CHECK-RV64-FD-NEXT: fsd fs6, 48(sp)
1001 ; CHECK-RV64-FD-NEXT: fsd fs7, 40(sp)
1002 ; CHECK-RV64-FD-NEXT: fsd fs8, 32(sp)
1003 ; CHECK-RV64-FD-NEXT: fsd fs9, 24(sp)
1004 ; CHECK-RV64-FD-NEXT: fsd fs10, 16(sp)
1005 ; CHECK-RV64-FD-NEXT: fsd fs11, 8(sp)
1006 ; CHECK-RV64-FD-NEXT: addi s0, sp, 400
1007 ; CHECK-RV64-FD-NEXT: call otherfoo
1008 ; CHECK-RV64-FD-NEXT: fld fs11, 8(sp)
1009 ; CHECK-RV64-FD-NEXT: fld fs10, 16(sp)
1010 ; CHECK-RV64-FD-NEXT: fld fs9, 24(sp)
1011 ; CHECK-RV64-FD-NEXT: fld fs8, 32(sp)
1012 ; CHECK-RV64-FD-NEXT: fld fs7, 40(sp)
1013 ; CHECK-RV64-FD-NEXT: fld fs6, 48(sp)
1014 ; CHECK-RV64-FD-NEXT: fld fs5, 56(sp)
1015 ; CHECK-RV64-FD-NEXT: fld fs4, 64(sp)
1016 ; CHECK-RV64-FD-NEXT: fld fs3, 72(sp)
1017 ; CHECK-RV64-FD-NEXT: fld fs2, 80(sp)
1018 ; CHECK-RV64-FD-NEXT: fld fs1, 88(sp)
1019 ; CHECK-RV64-FD-NEXT: fld fs0, 96(sp)
1020 ; CHECK-RV64-FD-NEXT: fld ft11, 104(sp)
1021 ; CHECK-RV64-FD-NEXT: fld ft10, 112(sp)
1022 ; CHECK-RV64-FD-NEXT: fld ft9, 120(sp)
1023 ; CHECK-RV64-FD-NEXT: fld ft8, 128(sp)
1024 ; CHECK-RV64-FD-NEXT: fld fa7, 136(sp)
1025 ; CHECK-RV64-FD-NEXT: fld fa6, 144(sp)
1026 ; CHECK-RV64-FD-NEXT: fld fa5, 152(sp)
1027 ; CHECK-RV64-FD-NEXT: fld fa4, 160(sp)
1028 ; CHECK-RV64-FD-NEXT: fld fa3, 168(sp)
1029 ; CHECK-RV64-FD-NEXT: fld fa2, 176(sp)
1030 ; CHECK-RV64-FD-NEXT: fld fa1, 184(sp)
1031 ; CHECK-RV64-FD-NEXT: fld fa0, 192(sp)
1032 ; CHECK-RV64-FD-NEXT: fld ft7, 200(sp)
1033 ; CHECK-RV64-FD-NEXT: fld ft6, 208(sp)
1034 ; CHECK-RV64-FD-NEXT: fld ft5, 216(sp)
1035 ; CHECK-RV64-FD-NEXT: fld ft4, 224(sp)
1036 ; CHECK-RV64-FD-NEXT: fld ft3, 232(sp)
1037 ; CHECK-RV64-FD-NEXT: fld ft2, 240(sp)
1038 ; CHECK-RV64-FD-NEXT: fld ft1, 248(sp)
1039 ; CHECK-RV64-FD-NEXT: fld ft0, 256(sp)
1040 ; CHECK-RV64-FD-NEXT: ld t6, 264(sp)
1041 ; CHECK-RV64-FD-NEXT: ld t5, 272(sp)
1042 ; CHECK-RV64-FD-NEXT: ld t4, 280(sp)
1043 ; CHECK-RV64-FD-NEXT: ld t3, 288(sp)
1044 ; CHECK-RV64-FD-NEXT: ld a7, 296(sp)
1045 ; CHECK-RV64-FD-NEXT: ld a6, 304(sp)
1046 ; CHECK-RV64-FD-NEXT: ld a5, 312(sp)
1047 ; CHECK-RV64-FD-NEXT: ld a4, 320(sp)
1048 ; CHECK-RV64-FD-NEXT: ld a3, 328(sp)
1049 ; CHECK-RV64-FD-NEXT: ld a2, 336(sp)
1050 ; CHECK-RV64-FD-NEXT: ld a1, 344(sp)
1051 ; CHECK-RV64-FD-NEXT: ld a0, 352(sp)
1052 ; CHECK-RV64-FD-NEXT: ld s0, 360(sp)
1053 ; CHECK-RV64-FD-NEXT: ld t2, 368(sp)
1054 ; CHECK-RV64-FD-NEXT: ld t1, 376(sp)
1055 ; CHECK-RV64-FD-NEXT: ld t0, 384(sp)
1056 ; CHECK-RV64-FD-NEXT: ld ra, 392(sp)
1057 ; CHECK-RV64-FD-NEXT: addi sp, sp, 400
1058 ; CHECK-RV64-FD-NEXT: mret
1059 %call = call i32 bitcast (i32 (...)* @otherfoo to i32 ()*)()
1063 attributes #0 = { nounwind "interrupt"="user" }
1064 attributes #1 = { nounwind "interrupt"="supervisor" }
1065 attributes #2 = { nounwind "interrupt"="machine" }
1066 attributes #3 = { nounwind "interrupt"="machine" "no-frame-pointer-elim"="true" }