Debian Codegraph @

gcc/testsuite/gcc.target/riscv/rvv/base/abi-callee-saved-2.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O1 -march=rv64gcv_zfh -mabi=lp64d" } */
3 /* { dg-final { check-function-bodies "**" "" } } */
4
5 #include "riscv_vector.h"
6
7 void bar1 (vint8m1_t a);
8 void bar2 ();
9
10 /*
11 ** foo1:
12 ** addi\tsp,sp,-16
13 ** sd\tra,8\(sp\)
14 ** call\tbar1(?:@plt)?
15 ** ld\tra,8\(sp\)
16 ** addi\tsp,sp,16
17 ** jr\tra
18 */
19 void
20 foo1 (vint8m1_t a)
21 {
22 bar1 (a);
23 }
24
25 /*
26 ** foo2:
27 ** addi\tsp,sp,-16
28 ** sd\tra,8\(sp\)
29 ** csrr\tt0,vlenb
30 ** sub\tsp,sp,t0
31 ** vs1r\.v\tv1,0\(sp\)
32 ** sub\tsp,sp,t0
33 ** vs1r\.v\tv2,0\(sp\)
34 ** sub\tsp,sp,t0
35 ** vs1r\.v\tv3,0\(sp\)
36 ** sub\tsp,sp,t0
37 ** vs1r\.v\tv4,0\(sp\)
38 ** sub\tsp,sp,t0
39 ** vs1r\.v\tv5,0\(sp\)
40 ** sub\tsp,sp,t0
41 ** vs1r\.v\tv6,0\(sp\)
42 ** sub\tsp,sp,t0
43 ** vs1r\.v\tv7,0\(sp\)
44 ** sub\tsp,sp,t0
45 ** vs1r\.v\tv24,0\(sp\)
46 ** sub\tsp,sp,t0
47 ** vs1r\.v\tv25,0\(sp\)
48 ** sub\tsp,sp,t0
49 ** vs1r\.v\tv26,0\(sp\)
50 ** sub\tsp,sp,t0
51 ** vs1r\.v\tv27,0\(sp\)
52 ** sub\tsp,sp,t0
53 ** vs1r\.v\tv28,0\(sp\)
54 ** sub\tsp,sp,t0
55 ** vs1r\.v\tv29,0\(sp\)
56 ** sub\tsp,sp,t0
57 ** vs1r\.v\tv30,0\(sp\)
58 ** sub\tsp,sp,t0
59 ** vs1r\.v\tv31,0\(sp\)
60 ** call\tbar2(?:@plt)?
61 ** csrr\tt0,vlenb
62 ** vl1re64\.v\tv31,0\(sp\)
63 ** add\tsp,sp,t0
64 ** vl1re64\.v\tv30,0\(sp\)
65 ** add\tsp,sp,t0
66 ** vl1re64\.v\tv29,0\(sp\)
67 ** add\tsp,sp,t0
68 ** vl1re64\.v\tv28,0\(sp\)
69 ** add\tsp,sp,t0
70 ** vl1re64\.v\tv27,0\(sp\)
71 ** add\tsp,sp,t0
72 ** vl1re64\.v\tv26,0\(sp\)
73 ** add\tsp,sp,t0
74 ** vl1re64\.v\tv25,0\(sp\)
75 ** add\tsp,sp,t0
76 ** vl1re64\.v\tv24,0\(sp\)
77 ** add\tsp,sp,t0
78 ** vl1re64\.v\tv7,0\(sp\)
79 ** add\tsp,sp,t0
80 ** vl1re64\.v\tv6,0\(sp\)
81 ** add\tsp,sp,t0
82 ** vl1re64\.v\tv5,0\(sp\)
83 ** add\tsp,sp,t0
84 ** vl1re64\.v\tv4,0\(sp\)
85 ** add\tsp,sp,t0
86 ** vl1re64\.v\tv3,0\(sp\)
87 ** add\tsp,sp,t0
88 ** vl1re64\.v\tv2,0\(sp\)
89 ** add\tsp,sp,t0
90 ** vl1re64\.v\tv1,0\(sp\)
91 ** add\tsp,sp,t0
92 ** ld\tra,8\(sp\)
93 ** addi\tsp,sp,16
94 ** jr\tra
95
96 */
97 void
98 foo2 (vint8m1_t a)
99 {
100 bar2 ();
101 }
102
103 /*
104 ** foo3:
105 ** addi\tsp,sp,-16
106 ** sd\tra,8\(sp\)
107 ** vl1re8\.v\tv8,0\(a0\)
108 ** call\tbar1(?:@plt)?
109 ** ld\tra,8\(sp\)
110 ** addi\tsp,sp,16
111 ** jr\tra
112 */
113 void
114 foo3 (vint8m1_t *a)
115 {
116 bar1 (*a);
117 }