Debian Codegraph @

gcc/testsuite/gcc.target/riscv/rvv/base/spill-12.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-march=rv32gcv -mabi=ilp32 -msave-restore -fno-schedule-insns -fno-schedule-insns2 -O3" } */
3 /* { dg-final { check-function-bodies "**" "" } } */
4
5
6 void fn2 (float a1, float a2, float a3, float a4,
7 float a5, float a6, float a7, float a8);
8 void fn3 (char*);
9
10
11 /*
12 ** stack_save_restore_1:
13 ** call\tt0,__riscv_save_0
14 ** li\tt0,-8192
15 ** addi\tt0,t0,192
16 ** add\tsp,sp,t0
17 ** ...
18 ** mv\ta0,sp
19 ** ...
20 ** tail\t__riscv_restore_0
21 */
22 int stack_save_restore_1 (float a1, float a2, float a3, float a4,
23 float a5, float a6, float a7, float a8)
24 {
25 char d[8000];
26 float f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13;
27 asm volatile ("nop"
28 : "=f" (f1), "=f" (f2), "=f" (f3), "=f" (f4), "=f" (f5), "=f" (f6),
29 "=f" (f7), "=f" (f8), "=f" (f9), "=f" (f10), "=f" (f11),
30 "=f" (f12), "=f" (f13)
31 :
32 :);
33 asm volatile ("nop"
34 :
35 : "f" (f1), "f" (f2), "f" (f3), "f" (f4), "f" (f5), "f" (f6),
36 "f" (f7), "f" (f8), "f" (f9), "f" (f10), "f" (f11),
37 "f" (f12), "f" (f13)
38 :);
39 fn2 (a1, a2, a3, a4, a5, a6, a7, a8);
40 fn3(d);
41 return 0;
42 }