Debian Codegraph @

gcc/testsuite/gcc.target/aarch64/sme/acle-asm/cntsd_s.c

raw
1 /* { dg-final { check-function-bodies "**" "" "-DCHECK_ASM" } } */
2
3 #define NO_SHARED_ZA
4 #include "test_sme_acle.h"
5
6 /*
7 ** cntd_1:
8 ** cntd x0
9 ** ret
10 */
11 PROTO (cntd_1, uint64_t, ()) { return svcntsd (); }
12
13 /*
14 ** cntd_2:
15 ** cntw x0
16 ** ret
17 */
18 PROTO (cntd_2, uint64_t, ()) { return svcntsd () * 2; }
19
20 /*
21 ** cntd_3:
22 ** cntd x0, all, mul #3
23 ** ret
24 */
25 PROTO (cntd_3, uint64_t, ()) { return svcntsd () * 3; }
26
27 /*
28 ** cntd_4:
29 ** cnth x0
30 ** ret
31 */
32 PROTO (cntd_4, uint64_t, ()) { return svcntsd () * 4; }
33
34 /*
35 ** cntd_8:
36 ** cntb x0
37 ** ret
38 */
39 PROTO (cntd_8, uint64_t, ()) { return svcntsd () * 8; }
40
41 /*
42 ** cntd_15:
43 ** cntd x0, all, mul #15
44 ** ret
45 */
46 PROTO (cntd_15, uint64_t, ()) { return svcntsd () * 15; }
47
48 /*
49 ** cntd_16:
50 ** cntb x0, all, mul #2
51 ** ret
52 */
53 PROTO (cntd_16, uint64_t, ()) { return svcntsd () * 16; }
54
55 /* Other sequences would be OK. */
56 /*
57 ** cntd_17:
58 ** rdvl (x[0-9]+), #17
59 ** asr x0, \1, 3
60 ** ret
61 */
62 PROTO (cntd_17, uint64_t, ()) { return svcntsd () * 17; }
63
64 /*
65 ** cntd_32:
66 ** cntb x0, all, mul #4
67 ** ret
68 */
69 PROTO (cntd_32, uint64_t, ()) { return svcntsd () * 32; }
70
71 /*
72 ** cntd_64:
73 ** cntb x0, all, mul #8
74 ** ret
75 */
76 PROTO (cntd_64, uint64_t, ()) { return svcntsd () * 64; }
77
78 /*
79 ** cntd_128:
80 ** cntb x0, all, mul #16
81 ** ret
82 */
83 PROTO (cntd_128, uint64_t, ()) { return svcntsd () * 128; }
84
85 /*
86 ** cntd_m1:
87 ** cntd (x[0-9]+)
88 ** neg x0, \1
89 ** ret
90 */
91 PROTO (cntd_m1, uint64_t, ()) { return -svcntsd (); }
92
93 /*
94 ** cntd_m13:
95 ** cntd (x[0-9]+), all, mul #13
96 ** neg x0, \1
97 ** ret
98 */
99 PROTO (cntd_m13, uint64_t, ()) { return -svcntsd () * 13; }
100
101 /*
102 ** cntd_m15:
103 ** cntd (x[0-9]+), all, mul #15
104 ** neg x0, \1
105 ** ret
106 */
107 PROTO (cntd_m15, uint64_t, ()) { return -svcntsd () * 15; }
108
109 /*
110 ** cntd_m16:
111 ** rdvl x0, #-2
112 ** ret
113 */
114 PROTO (cntd_m16, uint64_t, ()) { return -svcntsd () * 16; }
115
116 /* Other sequences would be OK. */
117 /*
118 ** cntd_m17:
119 ** rdvl (x[0-9]+), #-17
120 ** asr x0, \1, 3
121 ** ret
122 */
123 PROTO (cntd_m17, uint64_t, ()) { return -svcntsd () * 17; }
124
125 /*
126 ** incd_1:
127 ** incd x0
128 ** ret
129 */
130 PROTO (incd_1, uint64_t, (uint64_t x0)) { return x0 + svcntsd (); }
131
132 /*
133 ** incd_2:
134 ** incw x0
135 ** ret
136 */
137 PROTO (incd_2, uint64_t, (uint64_t x0)) { return x0 + svcntsd () * 2; }
138
139 /*
140 ** incd_3:
141 ** incd x0, all, mul #3
142 ** ret
143 */
144 PROTO (incd_3, uint64_t, (uint64_t x0)) { return x0 + svcntsd () * 3; }
145
146 /*
147 ** incd_4:
148 ** inch x0
149 ** ret
150 */
151 PROTO (incd_4, uint64_t, (uint64_t x0)) { return x0 + svcntsd () * 4; }
152
153 /*
154 ** incd_7:
155 ** incd x0, all, mul #7
156 ** ret
157 */
158 PROTO (incd_7, uint64_t, (uint64_t x0)) { return x0 + svcntsd () * 7; }
159
160 /*
161 ** incd_8:
162 ** incb x0
163 ** ret
164 */
165 PROTO (incd_8, uint64_t, (uint64_t x0)) { return x0 + svcntsd () * 8; }
166
167 /*
168 ** incd_9:
169 ** incd x0, all, mul #9
170 ** ret
171 */
172 PROTO (incd_9, uint64_t, (uint64_t x0)) { return x0 + svcntsd () * 9; }
173
174 /*
175 ** incd_15:
176 ** incd x0, all, mul #15
177 ** ret
178 */
179 PROTO (incd_15, uint64_t, (uint64_t x0)) { return x0 + svcntsd () * 15; }
180
181 /*
182 ** incd_16:
183 ** incb x0, all, mul #2
184 ** ret
185 */
186 PROTO (incd_16, uint64_t, (uint64_t x0)) { return x0 + svcntsd () * 16; }
187
188 /*
189 ** incd_18:
190 ** incw x0, all, mul #9
191 ** ret
192 */
193 PROTO (incd_18, uint64_t, (uint64_t x0)) { return x0 + svcntsd () * 18; }
194
195 /*
196 ** incd_30:
197 ** incw x0, all, mul #15
198 ** ret
199 */
200 PROTO (incd_30, uint64_t, (uint64_t x0)) { return x0 + svcntsd () * 30; }
201
202 /*
203 ** decd_1:
204 ** decd x0
205 ** ret
206 */
207 PROTO (decd_1, uint64_t, (uint64_t x0)) { return x0 - svcntsd (); }
208
209 /*
210 ** decd_2:
211 ** decw x0
212 ** ret
213 */
214 PROTO (decd_2, uint64_t, (uint64_t x0)) { return x0 - svcntsd () * 2; }
215
216 /*
217 ** decd_3:
218 ** decd x0, all, mul #3
219 ** ret
220 */
221 PROTO (decd_3, uint64_t, (uint64_t x0)) { return x0 - svcntsd () * 3; }
222
223 /*
224 ** decd_4:
225 ** dech x0
226 ** ret
227 */
228 PROTO (decd_4, uint64_t, (uint64_t x0)) { return x0 - svcntsd () * 4; }
229
230 /*
231 ** decd_7:
232 ** decd x0, all, mul #7
233 ** ret
234 */
235 PROTO (decd_7, uint64_t, (uint64_t x0)) { return x0 - svcntsd () * 7; }
236
237 /*
238 ** decd_8:
239 ** decb x0
240 ** ret
241 */
242 PROTO (decd_8, uint64_t, (uint64_t x0)) { return x0 - svcntsd () * 8; }
243
244 /*
245 ** decd_9:
246 ** decd x0, all, mul #9
247 ** ret
248 */
249 PROTO (decd_9, uint64_t, (uint64_t x0)) { return x0 - svcntsd () * 9; }
250
251 /*
252 ** decd_15:
253 ** decd x0, all, mul #15
254 ** ret
255 */
256 PROTO (decd_15, uint64_t, (uint64_t x0)) { return x0 - svcntsd () * 15; }
257
258 /*
259 ** decd_16:
260 ** decb x0, all, mul #2
261 ** ret
262 */
263 PROTO (decd_16, uint64_t, (uint64_t x0)) { return x0 - svcntsd () * 16; }
264
265 /*
266 ** decd_18:
267 ** decw x0, all, mul #9
268 ** ret
269 */
270 PROTO (decd_18, uint64_t, (uint64_t x0)) { return x0 - svcntsd () * 18; }
271
272 /*
273 ** decd_30:
274 ** decw x0, all, mul #15
275 ** ret
276 */
277 PROTO (decd_30, uint64_t, (uint64_t x0)) { return x0 - svcntsd () * 30; }