Debian Codegraph @

gcc/testsuite/gcc.target/aarch64/sme/acle-asm/cntsh_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 ** cnth_1:
8 ** cnth x0
9 ** ret
10 */
11 PROTO (cnth_1, uint64_t, ()) { return svcntsh (); }
12
13 /*
14 ** cnth_2:
15 ** cntb x0
16 ** ret
17 */
18 PROTO (cnth_2, uint64_t, ()) { return svcntsh () * 2; }
19
20 /*
21 ** cnth_3:
22 ** cnth x0, all, mul #3
23 ** ret
24 */
25 PROTO (cnth_3, uint64_t, ()) { return svcntsh () * 3; }
26
27 /*
28 ** cnth_4:
29 ** cntb x0, all, mul #2
30 ** ret
31 */
32 PROTO (cnth_4, uint64_t, ()) { return svcntsh () * 4; }
33
34 /*
35 ** cnth_8:
36 ** cntb x0, all, mul #4
37 ** ret
38 */
39 PROTO (cnth_8, uint64_t, ()) { return svcntsh () * 8; }
40
41 /*
42 ** cnth_15:
43 ** cnth x0, all, mul #15
44 ** ret
45 */
46 PROTO (cnth_15, uint64_t, ()) { return svcntsh () * 15; }
47
48 /*
49 ** cnth_16:
50 ** cntb x0, all, mul #8
51 ** ret
52 */
53 PROTO (cnth_16, uint64_t, ()) { return svcntsh () * 16; }
54
55 /* Other sequences would be OK. */
56 /*
57 ** cnth_17:
58 ** rdvl (x[0-9]+), #17
59 ** asr x0, \1, 1
60 ** ret
61 */
62 PROTO (cnth_17, uint64_t, ()) { return svcntsh () * 17; }
63
64 /*
65 ** cnth_32:
66 ** cntb x0, all, mul #16
67 ** ret
68 */
69 PROTO (cnth_32, uint64_t, ()) { return svcntsh () * 32; }
70
71 /*
72 ** cnth_64:
73 ** cntb (x[0-9]+)
74 ** lsl x0, \1, 5
75 ** ret
76 */
77 PROTO (cnth_64, uint64_t, ()) { return svcntsh () * 64; }
78
79 /*
80 ** cnth_128:
81 ** cntb (x[0-9]+)
82 ** lsl x0, \1, 6
83 ** ret
84 */
85 PROTO (cnth_128, uint64_t, ()) { return svcntsh () * 128; }
86
87 /*
88 ** cnth_m1:
89 ** cnth (x[0-9]+)
90 ** neg x0, \1
91 ** ret
92 */
93 PROTO (cnth_m1, uint64_t, ()) { return -svcntsh (); }
94
95 /*
96 ** cnth_m13:
97 ** cnth (x[0-9]+), all, mul #13
98 ** neg x0, \1
99 ** ret
100 */
101 PROTO (cnth_m13, uint64_t, ()) { return -svcntsh () * 13; }
102
103 /*
104 ** cnth_m15:
105 ** cnth (x[0-9]+), all, mul #15
106 ** neg x0, \1
107 ** ret
108 */
109 PROTO (cnth_m15, uint64_t, ()) { return -svcntsh () * 15; }
110
111 /*
112 ** cnth_m16:
113 ** rdvl x0, #-8
114 ** ret
115 */
116 PROTO (cnth_m16, uint64_t, ()) { return -svcntsh () * 16; }
117
118 /* Other sequences would be OK. */
119 /*
120 ** cnth_m17:
121 ** rdvl (x[0-9]+), #-17
122 ** asr x0, \1, 1
123 ** ret
124 */
125 PROTO (cnth_m17, uint64_t, ()) { return -svcntsh () * 17; }
126
127 /*
128 ** inch_1:
129 ** inch x0
130 ** ret
131 */
132 PROTO (inch_1, uint64_t, (uint64_t x0)) { return x0 + svcntsh (); }
133
134 /*
135 ** inch_2:
136 ** incb x0
137 ** ret
138 */
139 PROTO (inch_2, uint64_t, (uint64_t x0)) { return x0 + svcntsh () * 2; }
140
141 /*
142 ** inch_3:
143 ** inch x0, all, mul #3
144 ** ret
145 */
146 PROTO (inch_3, uint64_t, (uint64_t x0)) { return x0 + svcntsh () * 3; }
147
148 /*
149 ** inch_4:
150 ** incb x0, all, mul #2
151 ** ret
152 */
153 PROTO (inch_4, uint64_t, (uint64_t x0)) { return x0 + svcntsh () * 4; }
154
155 /*
156 ** inch_7:
157 ** inch x0, all, mul #7
158 ** ret
159 */
160 PROTO (inch_7, uint64_t, (uint64_t x0)) { return x0 + svcntsh () * 7; }
161
162 /*
163 ** inch_8:
164 ** incb x0, all, mul #4
165 ** ret
166 */
167 PROTO (inch_8, uint64_t, (uint64_t x0)) { return x0 + svcntsh () * 8; }
168
169 /*
170 ** inch_9:
171 ** inch x0, all, mul #9
172 ** ret
173 */
174 PROTO (inch_9, uint64_t, (uint64_t x0)) { return x0 + svcntsh () * 9; }
175
176 /*
177 ** inch_15:
178 ** inch x0, all, mul #15
179 ** ret
180 */
181 PROTO (inch_15, uint64_t, (uint64_t x0)) { return x0 + svcntsh () * 15; }
182
183 /*
184 ** inch_16:
185 ** incb x0, all, mul #8
186 ** ret
187 */
188 PROTO (inch_16, uint64_t, (uint64_t x0)) { return x0 + svcntsh () * 16; }
189
190 /*
191 ** inch_18:
192 ** incb x0, all, mul #9
193 ** ret
194 */
195 PROTO (inch_18, uint64_t, (uint64_t x0)) { return x0 + svcntsh () * 18; }
196
197 /*
198 ** inch_30:
199 ** incb x0, all, mul #15
200 ** ret
201 */
202 PROTO (inch_30, uint64_t, (uint64_t x0)) { return x0 + svcntsh () * 30; }
203
204 /*
205 ** dech_1:
206 ** dech x0
207 ** ret
208 */
209 PROTO (dech_1, uint64_t, (uint64_t x0)) { return x0 - svcntsh (); }
210
211 /*
212 ** dech_2:
213 ** decb x0
214 ** ret
215 */
216 PROTO (dech_2, uint64_t, (uint64_t x0)) { return x0 - svcntsh () * 2; }
217
218 /*
219 ** dech_3:
220 ** dech x0, all, mul #3
221 ** ret
222 */
223 PROTO (dech_3, uint64_t, (uint64_t x0)) { return x0 - svcntsh () * 3; }
224
225 /*
226 ** dech_4:
227 ** decb x0, all, mul #2
228 ** ret
229 */
230 PROTO (dech_4, uint64_t, (uint64_t x0)) { return x0 - svcntsh () * 4; }
231
232 /*
233 ** dech_7:
234 ** dech x0, all, mul #7
235 ** ret
236 */
237 PROTO (dech_7, uint64_t, (uint64_t x0)) { return x0 - svcntsh () * 7; }
238
239 /*
240 ** dech_8:
241 ** decb x0, all, mul #4
242 ** ret
243 */
244 PROTO (dech_8, uint64_t, (uint64_t x0)) { return x0 - svcntsh () * 8; }
245
246 /*
247 ** dech_9:
248 ** dech x0, all, mul #9
249 ** ret
250 */
251 PROTO (dech_9, uint64_t, (uint64_t x0)) { return x0 - svcntsh () * 9; }
252
253 /*
254 ** dech_15:
255 ** dech x0, all, mul #15
256 ** ret
257 */
258 PROTO (dech_15, uint64_t, (uint64_t x0)) { return x0 - svcntsh () * 15; }
259
260 /*
261 ** dech_16:
262 ** decb x0, all, mul #8
263 ** ret
264 */
265 PROTO (dech_16, uint64_t, (uint64_t x0)) { return x0 - svcntsh () * 16; }
266
267 /*
268 ** dech_18:
269 ** decb x0, all, mul #9
270 ** ret
271 */
272 PROTO (dech_18, uint64_t, (uint64_t x0)) { return x0 - svcntsh () * 18; }
273
274 /*
275 ** dech_30:
276 ** decb x0, all, mul #15
277 ** ret
278 */
279 PROTO (dech_30, uint64_t, (uint64_t x0)) { return x0 - svcntsh () * 30; }