i386: Fix AVX512 intrin macro typo
[official-gcc.git] / gcc / testsuite / gcc.target / arm / mve / mve_store_memory_modes.c
blob11df1144064c2cc20d629f970f25e6436cc70f05
1 /* { dg-require-effective-target arm_v8_1m_mve_fp_ok } */
2 /* { dg-add-options arm_v8_1m_mve_fp } */
3 /* { dg-additional-options "-O2" } */
4 /* { dg-final { check-function-bodies "**" "" } } */
6 #include "arm_mve.h"
7 /*
8 **off_store8_0:
9 ** ...
10 ** vstrb.8 q[0-7], \[r0, #16\]
11 ** ...
13 uint8_t *off_store8_0 (uint8_t * a, uint8x16_t v)
15 vst1q_u8 (a + 16, v);
16 return a;
20 **off_store8_1:
21 ** ...
22 ** vstrb.16 q[0-7], \[r0, #-1\]
23 ** ...
25 int8_t *off_store8_1 (int8_t * a, int16x8_t v)
27 vstrbq_s16 (a - 1, v);
28 return a;
32 **off_store8_2:
33 ** ...
34 ** vstrb.32 q[0-7], \[r0, #-127\]
35 ** ...
37 uint8_t *off_store8_2 (uint8_t * a, uint32x4_t v)
39 vstrbq_u32 (a - 127, v);
40 return a;
44 **off_store8_3:
45 ** ...
46 ** vstrb.8 q[0-7], \[r0, #127\]
47 ** ...
49 int8_t *off_store8_3 (int8_t * a, int8x16_t v)
51 vstrbq_s8 (a + 127, v);
52 return a;
56 **not_off_store8_0:
57 ** ...
58 ** vstrb.8 q[0-7], \[r[0-7]+\]
59 ** ...
61 uint8_t *not_off_store8_0 (uint8_t * a, uint8x16_t v)
63 vst1q_u8 (a - 128, v);
64 return a;
68 **off_storefp16_0:
69 ** ...
70 ** vstrh.16 q[0-7], \[r0, #250\]
71 ** ...
73 float16_t *off_storefp16_0 (float16_t *a, float16x8_t v)
75 vst1q_f16 (a + 125, v);
76 return a;
80 **off_store16_0:
81 ** ...
82 ** vstrh.16 q[0-7], \[r0, #4\]
83 ** ...
85 int16_t *off_store16_0 (int16_t * a, int16x8_t v)
87 vst1q_s16 (a + 2, v);
88 return a;
92 **off_store16_1:
93 ** ...
94 ** vstrh.32 q[0-7], \[r0, #-254\]
95 ** ...
97 int16_t *off_store16_1 (int16_t * a, int32x4_t v)
99 vstrhq_s32 (a - 127, v);
100 return a;
104 **not_off_store16_0:
105 ** ...
106 ** vstrh.16 q[0-7], \[r[0-7]+\]
107 ** ...
109 uint8_t *not_off_store16_0 (uint8_t * a, uint16x8_t v)
111 vst1q_u16 ((uint16_t *)(a - 1), v);
112 return a;
116 **not_off_store16_1:
117 ** ...
118 ** vstrh.32 q[0-7], \[r[0-7]+\]
119 ** ...
121 int16_t *not_off_store16_1 (int16_t * a, int32x4_t v)
123 vstrhq_s32 ((a + 128), v);
124 return a;
128 **off_storefp32_0:
129 ** ...
130 ** vstrw.32 q[0-7], \[r0, #-412\]
131 ** ...
133 float32_t *off_storefp32_0 (float32_t *a, float32x4_t v)
135 vst1q_f32 (a - 103, v);
136 return a;
140 **off_store32_0:
141 ** ...
142 ** vstrw.32 q[0-7], \[r0, #-4\]
143 ** ...
145 int32_t *off_store32_0 (int32_t * a, int32x4_t v)
147 vst1q_s32 (a - 1, v);
148 return a;
152 **off_store32_1:
153 ** ...
154 ** vstrw.32 q[0-7], \[r0, #508\]
155 ** ...
157 uint32_t *off_store32_1 (uint32_t * a, uint32x4_t v)
159 vstrwq_u32 (a + 127, v);
160 return a;
164 **pre_store8_0:
165 ** ...
166 ** vstrb.8 q[0-7], \[r0, #-16\]!
167 ** ...
169 uint8_t* pre_store8_0 (uint8_t * a, uint8x16_t v)
171 a -= 16;
172 vst1q_u8 (a, v);
173 return a;
177 **pre_store8_1:
178 ** ...
179 ** vstrb.16 q[0-7], \[r0, #4\]!
180 ** ...
182 int8_t* pre_store8_1 (int8_t * a, int16x8_t v)
184 a += 4;
185 vstrbq_s16 (a, v);
186 return a;
190 **pre_storefp16_0:
191 ** ...
192 ** vstrh.16 q[0-7], \[r0, #8\]!
193 ** ...
195 float16_t *pre_storefp16_0 (float16_t *a, float16x8_t v)
197 a += 4;
198 vst1q_f16 (a, v);
199 return a;
203 **pre_store16_0:
204 ** ...
205 ** vstrh.16 q[0-7], \[r0, #254\]!
206 ** ...
208 uint16_t* pre_store16_0 (uint16_t * a, uint16x8_t v)
210 a += 127;
211 vstrhq_u16 (a, v);
212 return a;
216 **pre_store16_1:
217 ** ...
218 ** vstrh.32 q[0-7], \[r0, #-52\]!
219 ** ...
221 int16_t* pre_store16_1 (int16_t * a, int32x4_t v)
223 a -= 26;
224 vstrhq_s32 (a, v);
225 return a;
229 **pre_storefp32_0:
230 ** ...
231 ** vstrw.32 q[0-7], \[r0, #-4\]!
232 ** ...
234 float32_t *pre_storefp32_0 (float32_t *a, float32x4_t v)
236 a--;
237 vst1q_f32 (a, v);
238 return a;
242 **pre_store32_0:
243 ** ...
244 ** vstrw.32 q[0-7], \[r0, #4\]!
245 ** ...
247 int32_t* pre_store32_0 (int32_t * a, int32x4_t v)
249 a += 1;
250 vst1q_s32 (a, v);
251 return a;
256 **post_store8_0:
257 ** ...
258 ** vstrb.8 q[0-7], \[r0\], #-26
259 ** ...
261 int8_t* post_store8_0 (int8_t * a, int8x16_t v)
263 vst1q_s8 (a, v);
264 a -= 26;
265 return a;
269 **post_store8_1:
270 ** ...
271 ** vstrb.16 q[0-7], \[r0\], #1
272 ** ...
274 uint8_t* post_store8_1 (uint8_t * a, uint16x8_t v)
276 vstrbq_u16 (a, v);
277 a++;
278 return a;
282 **post_store8_2:
283 ** ...
284 ** vstrb.8 q[0-7], \[r0\], #-26
285 ** ...
287 int8_t* post_store8_2 (int8_t * a, int8x16_t v)
289 vst1q_s8 (a, v);
290 a -= 26;
291 return a;
295 **post_store8_3:
296 ** ...
297 ** vstrb.16 q[0-7], \[r0\], #7
298 ** ...
300 uint8_t* post_store8_3 (uint8_t * a, uint16x8_t v)
302 vstrbq_u16 (a, v);
303 a += 7;
304 return a;
308 **post_storefp16_0:
309 ** ...
310 ** vstrh.16 q[0-7], \[r0\], #-16
311 ** ...
313 float16_t *post_storefp16_0 (float16_t *a, float16x8_t v)
315 vst1q_f16 (a, v);
316 a -= 8;
317 return a;
321 **post_store16_0:
322 ** ...
323 ** vstrh.16 q[0-7], \[r0\], #126
324 ** ...
326 int16_t* post_store16_0 (int16_t * a, int16x8_t v)
328 vstrhq_s16 (a, v);
329 a += 63;
330 return a;
334 **post_store16_1:
335 ** ...
336 ** vstrh.32 q[0-7], \[r0\], #-16
337 ** ...
339 uint16_t* post_store16_1 (uint16_t * a, uint32x4_t v)
341 vstrhq_u32 (a, v);
342 a -= 8;
343 return a;
347 **post_storefp32_0:
348 ** ...
349 ** vstrw.32 q[0-7], \[r0\], #-16
350 ** ...
352 float32_t* post_storefp32_0 (float32_t * a, float32x4_t v)
354 vst1q_f32 (a, v);
355 a -= 4;
356 return a;
360 **post_store32_0:
361 ** ...
362 ** vstrw.32 q[0-7], \[r0\], #16
363 ** ...
365 int32_t* post_store32_0 (int32_t * a, int32x4_t v)
367 vst1q_s32 (a, v);
368 a += 4;
369 return a;