1*f3782652STreehugger Robot /*
2*f3782652STreehugger Robot
3*f3782652STreehugger Robot Copyright (c) 2009, 2010, 2011, 2013 STMicroelectronics
4*f3782652STreehugger Robot Written by Christophe Lyon
5*f3782652STreehugger Robot
6*f3782652STreehugger Robot Permission is hereby granted, free of charge, to any person obtaining a copy
7*f3782652STreehugger Robot of this software and associated documentation files (the "Software"), to deal
8*f3782652STreehugger Robot in the Software without restriction, including without limitation the rights
9*f3782652STreehugger Robot to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10*f3782652STreehugger Robot copies of the Software, and to permit persons to whom the Software is
11*f3782652STreehugger Robot furnished to do so, subject to the following conditions:
12*f3782652STreehugger Robot
13*f3782652STreehugger Robot The above copyright notice and this permission notice shall be included in
14*f3782652STreehugger Robot all copies or substantial portions of the Software.
15*f3782652STreehugger Robot
16*f3782652STreehugger Robot THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17*f3782652STreehugger Robot IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18*f3782652STreehugger Robot FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19*f3782652STreehugger Robot AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20*f3782652STreehugger Robot LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21*f3782652STreehugger Robot OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22*f3782652STreehugger Robot THE SOFTWARE.
23*f3782652STreehugger Robot
24*f3782652STreehugger Robot */
25*f3782652STreehugger Robot
26*f3782652STreehugger Robot #if defined(__arm__) || defined(__aarch64__)
27*f3782652STreehugger Robot #include <arm_neon.h>
28*f3782652STreehugger Robot #else
29*f3782652STreehugger Robot #include "stm-arm-neon.h"
30*f3782652STreehugger Robot #endif
31*f3782652STreehugger Robot
32*f3782652STreehugger Robot #include "stm-arm-neon-ref.h"
33*f3782652STreehugger Robot
34*f3782652STreehugger Robot #define TEST_MSG "VREINTERPRET/VREINTERPRETQ"
35*f3782652STreehugger Robot
exec_vreinterpret(void)36*f3782652STreehugger Robot void exec_vreinterpret (void)
37*f3782652STreehugger Robot {
38*f3782652STreehugger Robot int i;
39*f3782652STreehugger Robot
40*f3782652STreehugger Robot /* Basic test: y=vreinterpret(x), then store the result. */
41*f3782652STreehugger Robot #define TEST_VREINTERPRET(Q, T1, T2, W, N, TS1, TS2, WS, NS) \
42*f3782652STreehugger Robot VECT_VAR(vector_res, T1, W, N) = \
43*f3782652STreehugger Robot vreinterpret##Q##_##T2##W##_##TS2##WS(VECT_VAR(vector, TS1, WS, NS)); \
44*f3782652STreehugger Robot vst1##Q##_##T2##W(VECT_VAR(result, T1, W, N), \
45*f3782652STreehugger Robot VECT_VAR(vector_res, T1, W, N)); \
46*f3782652STreehugger Robot DUMP(TEST_MSG, T1, W, N, PRIx##W);
47*f3782652STreehugger Robot
48*f3782652STreehugger Robot #define TEST_VREINTERPRET_POLY(Q, T1, T2, W, N, TS1, TS2, WS, NS) \
49*f3782652STreehugger Robot VECT_VAR(vector_res, T1, W, N) = \
50*f3782652STreehugger Robot vreinterpret##Q##_##T2##W##_##TS2##WS(VECT_VAR(vector, TS1, WS, NS)); \
51*f3782652STreehugger Robot vst1##Q##_##T2##W(VECT_VAR(result, T1, W, N), \
52*f3782652STreehugger Robot VECT_VAR(vector_res, T1, W, N)); \
53*f3782652STreehugger Robot DUMP_POLY(TEST_MSG, T1, W, N, PRIx##W);
54*f3782652STreehugger Robot
55*f3782652STreehugger Robot #define TEST_VREINTERPRET_FP(Q, T1, T2, W, N, TS1, TS2, WS, NS) \
56*f3782652STreehugger Robot VECT_VAR(vector_res, T1, W, N) = \
57*f3782652STreehugger Robot vreinterpret##Q##_##T2##W##_##TS2##WS(VECT_VAR(vector, TS1, WS, NS)); \
58*f3782652STreehugger Robot vst1##Q##_##T2##W(VECT_VAR(result, T1, W, N), \
59*f3782652STreehugger Robot VECT_VAR(vector_res, T1, W, N)); \
60*f3782652STreehugger Robot DUMP_FP(TEST_MSG, T1, W, N, PRIx##W);
61*f3782652STreehugger Robot
62*f3782652STreehugger Robot #if defined(__ARM_FP16_FORMAT_IEEE) && ( ((__ARM_FP & 0x2) != 0) || ((__ARM_NEON_FP16_INTRINSICS & 1) != 0) )
63*f3782652STreehugger Robot #define TEST_VREINTERPRET_FP16(Q, T1, T2, W, N, TS1, TS2, WS, NS) \
64*f3782652STreehugger Robot VECT_VAR(vector_res, T1, W, N) = \
65*f3782652STreehugger Robot vreinterpret##Q##_##T2##W##_##TS2##WS(VECT_VAR(vector, TS1, WS, NS)); \
66*f3782652STreehugger Robot vst1##Q##_##T2##W(VECT_VAR(result, T1, W, N), \
67*f3782652STreehugger Robot VECT_VAR(vector_res, T1, W, N)); \
68*f3782652STreehugger Robot DUMP_FP16(TEST_MSG, T1, W, N, PRIx##W);
69*f3782652STreehugger Robot #endif
70*f3782652STreehugger Robot
71*f3782652STreehugger Robot /* With ARM RVCT, we need to declare variables before any executable
72*f3782652STreehugger Robot statement */
73*f3782652STreehugger Robot DECL_VARIABLE_ALL_VARIANTS(vector);
74*f3782652STreehugger Robot DECL_VARIABLE_ALL_VARIANTS(vector_res);
75*f3782652STreehugger Robot #if defined(__ARM_FP16_FORMAT_IEEE) && ( ((__ARM_FP & 0x2) != 0) || ((__ARM_NEON_FP16_INTRINSICS & 1) != 0) )
76*f3782652STreehugger Robot DECL_VARIABLE(vector, float, 16, 4);
77*f3782652STreehugger Robot DECL_VARIABLE(vector_res, float, 16, 4);
78*f3782652STreehugger Robot DECL_VARIABLE(vector, float, 16, 8);
79*f3782652STreehugger Robot DECL_VARIABLE(vector_res, float, 16, 8);
80*f3782652STreehugger Robot #endif
81*f3782652STreehugger Robot
82*f3782652STreehugger Robot clean_results ();
83*f3782652STreehugger Robot
84*f3782652STreehugger Robot
85*f3782652STreehugger Robot /* Initialize input "vector" from "buffer" */
86*f3782652STreehugger Robot TEST_MACRO_ALL_VARIANTS_2_5(VLOAD, vector, buffer);
87*f3782652STreehugger Robot VLOAD(vector, buffer, , float, f, 32, 2);
88*f3782652STreehugger Robot VLOAD(vector, buffer, q, float, f, 32, 4);
89*f3782652STreehugger Robot #if defined(__ARM_FP16_FORMAT_IEEE) && ( ((__ARM_FP & 0x2) != 0) || ((__ARM_NEON_FP16_INTRINSICS & 1) != 0) )
90*f3782652STreehugger Robot VLOAD(vector, buffer, , float, f, 16, 4);
91*f3782652STreehugger Robot VLOAD(vector, buffer, q, float, f, 16, 8);
92*f3782652STreehugger Robot #endif
93*f3782652STreehugger Robot
94*f3782652STreehugger Robot /* The same result buffers are used multiple times, so output them
95*f3782652STreehugger Robot before overwriting them */
96*f3782652STreehugger Robot fprintf(ref_file, "\n%s output:\n", TEST_MSG);
97*f3782652STreehugger Robot fprintf(gcc_tests_file, "\n%s output:\n", TEST_MSG);
98*f3782652STreehugger Robot
99*f3782652STreehugger Robot /* vreinterpret_s8_xx */
100*f3782652STreehugger Robot TEST_VREINTERPRET(, int, s, 8, 8, int, s, 16, 4);
101*f3782652STreehugger Robot TEST_VREINTERPRET(, int, s, 8, 8, int, s, 32, 2);
102*f3782652STreehugger Robot TEST_VREINTERPRET(, int, s, 8, 8, int, s, 64, 1);
103*f3782652STreehugger Robot TEST_VREINTERPRET(, int, s, 8, 8, uint, u, 8, 8);
104*f3782652STreehugger Robot TEST_VREINTERPRET(, int, s, 8, 8, uint, u, 16, 4);
105*f3782652STreehugger Robot TEST_VREINTERPRET(, int, s, 8, 8, uint, u, 32, 2);
106*f3782652STreehugger Robot TEST_VREINTERPRET(, int, s, 8, 8, uint, u, 64, 1);
107*f3782652STreehugger Robot TEST_VREINTERPRET(, int, s, 8, 8, poly, p, 8, 8);
108*f3782652STreehugger Robot TEST_VREINTERPRET(, int, s, 8, 8, poly, p, 16, 4);
109*f3782652STreehugger Robot
110*f3782652STreehugger Robot /* vreinterpret_s16_xx */
111*f3782652STreehugger Robot TEST_VREINTERPRET(, int, s, 16, 4, int, s, 8, 8);
112*f3782652STreehugger Robot TEST_VREINTERPRET(, int, s, 16, 4, int, s, 32, 2);
113*f3782652STreehugger Robot TEST_VREINTERPRET(, int, s, 16, 4, int, s, 64, 1);
114*f3782652STreehugger Robot TEST_VREINTERPRET(, int, s, 16, 4, uint, u, 8, 8);
115*f3782652STreehugger Robot TEST_VREINTERPRET(, int, s, 16, 4, uint, u, 16, 4);
116*f3782652STreehugger Robot TEST_VREINTERPRET(, int, s, 16, 4, uint, u, 32, 2);
117*f3782652STreehugger Robot TEST_VREINTERPRET(, int, s, 16, 4, uint, u, 64, 1);
118*f3782652STreehugger Robot TEST_VREINTERPRET(, int, s, 16, 4, poly, p, 8, 8);
119*f3782652STreehugger Robot TEST_VREINTERPRET(, int, s, 16, 4, poly, p, 16, 4);
120*f3782652STreehugger Robot
121*f3782652STreehugger Robot /* vreinterpret_s32_xx */
122*f3782652STreehugger Robot TEST_VREINTERPRET(, int, s, 32, 2, int, s, 8, 8);
123*f3782652STreehugger Robot TEST_VREINTERPRET(, int, s, 32, 2, int, s, 16, 4);
124*f3782652STreehugger Robot TEST_VREINTERPRET(, int, s, 32, 2, int, s, 64, 1);
125*f3782652STreehugger Robot TEST_VREINTERPRET(, int, s, 32, 2, uint, u, 8, 8);
126*f3782652STreehugger Robot TEST_VREINTERPRET(, int, s, 32, 2, uint, u, 16, 4);
127*f3782652STreehugger Robot TEST_VREINTERPRET(, int, s, 32, 2, uint, u, 32, 2);
128*f3782652STreehugger Robot TEST_VREINTERPRET(, int, s, 32, 2, uint, u, 64, 1);
129*f3782652STreehugger Robot TEST_VREINTERPRET(, int, s, 32, 2, poly, p, 8, 8);
130*f3782652STreehugger Robot TEST_VREINTERPRET(, int, s, 32, 2, poly, p, 16, 4);
131*f3782652STreehugger Robot
132*f3782652STreehugger Robot /* vreinterpret_s64_xx */
133*f3782652STreehugger Robot TEST_VREINTERPRET(, int, s, 64, 1, int, s, 8, 8);
134*f3782652STreehugger Robot TEST_VREINTERPRET(, int, s, 64, 1, int, s, 16, 4);
135*f3782652STreehugger Robot TEST_VREINTERPRET(, int, s, 64, 1, int, s, 32, 2);
136*f3782652STreehugger Robot TEST_VREINTERPRET(, int, s, 64, 1, uint, u, 8, 8);
137*f3782652STreehugger Robot TEST_VREINTERPRET(, int, s, 64, 1, uint, u, 16, 4);
138*f3782652STreehugger Robot TEST_VREINTERPRET(, int, s, 64, 1, uint, u, 32, 2);
139*f3782652STreehugger Robot TEST_VREINTERPRET(, int, s, 64, 1, uint, u, 64, 1);
140*f3782652STreehugger Robot TEST_VREINTERPRET(, int, s, 64, 1, poly, p, 8, 8);
141*f3782652STreehugger Robot TEST_VREINTERPRET(, int, s, 64, 1, poly, p, 16, 4);
142*f3782652STreehugger Robot
143*f3782652STreehugger Robot /* vreinterpret_u8_xx */
144*f3782652STreehugger Robot TEST_VREINTERPRET(, uint, u, 8, 8, int, s, 8, 8);
145*f3782652STreehugger Robot TEST_VREINTERPRET(, uint, u, 8, 8, int, s, 16, 4);
146*f3782652STreehugger Robot TEST_VREINTERPRET(, uint, u, 8, 8, int, s, 32, 2);
147*f3782652STreehugger Robot TEST_VREINTERPRET(, uint, u, 8, 8, int, s, 64, 1);
148*f3782652STreehugger Robot TEST_VREINTERPRET(, uint, u, 8, 8, uint, u, 16, 4);
149*f3782652STreehugger Robot TEST_VREINTERPRET(, uint, u, 8, 8, uint, u, 32, 2);
150*f3782652STreehugger Robot TEST_VREINTERPRET(, uint, u, 8, 8, uint, u, 64, 1);
151*f3782652STreehugger Robot TEST_VREINTERPRET(, uint, u, 8, 8, poly, p, 8, 8);
152*f3782652STreehugger Robot TEST_VREINTERPRET(, uint, u, 8, 8, poly, p, 16, 4);
153*f3782652STreehugger Robot
154*f3782652STreehugger Robot /* vreinterpret_u16_xx */
155*f3782652STreehugger Robot TEST_VREINTERPRET(, uint, u, 16, 4, int, s, 8, 8);
156*f3782652STreehugger Robot TEST_VREINTERPRET(, uint, u, 16, 4, int, s, 16, 4);
157*f3782652STreehugger Robot TEST_VREINTERPRET(, uint, u, 16, 4, int, s, 32, 2);
158*f3782652STreehugger Robot TEST_VREINTERPRET(, uint, u, 16, 4, int, s, 64, 1);
159*f3782652STreehugger Robot TEST_VREINTERPRET(, uint, u, 16, 4, uint, u, 8, 8);
160*f3782652STreehugger Robot TEST_VREINTERPRET(, uint, u, 16, 4, uint, u, 32, 2);
161*f3782652STreehugger Robot TEST_VREINTERPRET(, uint, u, 16, 4, uint, u, 64, 1);
162*f3782652STreehugger Robot TEST_VREINTERPRET(, uint, u, 16, 4, poly, p, 8, 8);
163*f3782652STreehugger Robot TEST_VREINTERPRET(, uint, u, 16, 4, poly, p, 16, 4);
164*f3782652STreehugger Robot
165*f3782652STreehugger Robot /* vreinterpret_u32_xx */
166*f3782652STreehugger Robot TEST_VREINTERPRET(, uint, u, 32, 2, int, s, 8, 8);
167*f3782652STreehugger Robot TEST_VREINTERPRET(, uint, u, 32, 2, int, s, 16, 4);
168*f3782652STreehugger Robot TEST_VREINTERPRET(, uint, u, 32, 2, int, s, 32, 2);
169*f3782652STreehugger Robot TEST_VREINTERPRET(, uint, u, 32, 2, int, s, 64, 1);
170*f3782652STreehugger Robot TEST_VREINTERPRET(, uint, u, 32, 2, uint, u, 8, 8);
171*f3782652STreehugger Robot TEST_VREINTERPRET(, uint, u, 32, 2, uint, u, 16, 4);
172*f3782652STreehugger Robot TEST_VREINTERPRET(, uint, u, 32, 2, uint, u, 64, 1);
173*f3782652STreehugger Robot TEST_VREINTERPRET(, uint, u, 32, 2, poly, p, 8, 8);
174*f3782652STreehugger Robot TEST_VREINTERPRET(, uint, u, 32, 2, poly, p, 16, 4);
175*f3782652STreehugger Robot
176*f3782652STreehugger Robot /* vreinterpret_u64_xx */
177*f3782652STreehugger Robot TEST_VREINTERPRET(, uint, u, 64, 1, int, s, 8, 8);
178*f3782652STreehugger Robot TEST_VREINTERPRET(, uint, u, 64, 1, int, s, 16, 4);
179*f3782652STreehugger Robot TEST_VREINTERPRET(, uint, u, 64, 1, int, s, 32, 2);
180*f3782652STreehugger Robot TEST_VREINTERPRET(, uint, u, 64, 1, int, s, 64, 1);
181*f3782652STreehugger Robot TEST_VREINTERPRET(, uint, u, 64, 1, uint, u, 8, 8);
182*f3782652STreehugger Robot TEST_VREINTERPRET(, uint, u, 64, 1, uint, u, 16, 4);
183*f3782652STreehugger Robot TEST_VREINTERPRET(, uint, u, 64, 1, uint, u, 32, 2);
184*f3782652STreehugger Robot TEST_VREINTERPRET(, uint, u, 64, 1, poly, p, 8, 8);
185*f3782652STreehugger Robot TEST_VREINTERPRET(, uint, u, 64, 1, poly, p, 16, 4);
186*f3782652STreehugger Robot
187*f3782652STreehugger Robot /* vreinterpret_p8_xx */
188*f3782652STreehugger Robot TEST_VREINTERPRET_POLY(, poly, p, 8, 8, int, s, 8, 8);
189*f3782652STreehugger Robot TEST_VREINTERPRET_POLY(, poly, p, 8, 8, int, s, 16, 4);
190*f3782652STreehugger Robot TEST_VREINTERPRET_POLY(, poly, p, 8, 8, int, s, 32, 2);
191*f3782652STreehugger Robot TEST_VREINTERPRET_POLY(, poly, p, 8, 8, int, s, 64, 1);
192*f3782652STreehugger Robot TEST_VREINTERPRET_POLY(, poly, p, 8, 8, uint, u, 8, 8);
193*f3782652STreehugger Robot TEST_VREINTERPRET_POLY(, poly, p, 8, 8, uint, u, 16, 4);
194*f3782652STreehugger Robot TEST_VREINTERPRET_POLY(, poly, p, 8, 8, uint, u, 32, 2);
195*f3782652STreehugger Robot TEST_VREINTERPRET_POLY(, poly, p, 8, 8, uint, u, 64, 1);
196*f3782652STreehugger Robot TEST_VREINTERPRET_POLY(, poly, p, 8, 8, poly, p, 16, 4);
197*f3782652STreehugger Robot
198*f3782652STreehugger Robot /* vreinterpret_p16_xx */
199*f3782652STreehugger Robot TEST_VREINTERPRET_POLY(, poly, p, 16, 4, int, s, 8, 8);
200*f3782652STreehugger Robot TEST_VREINTERPRET_POLY(, poly, p, 16, 4, int, s, 16, 4);
201*f3782652STreehugger Robot TEST_VREINTERPRET_POLY(, poly, p, 16, 4, int, s, 32, 2);
202*f3782652STreehugger Robot TEST_VREINTERPRET_POLY(, poly, p, 16, 4, int, s, 64, 1);
203*f3782652STreehugger Robot TEST_VREINTERPRET_POLY(, poly, p, 16, 4, uint, u, 8, 8);
204*f3782652STreehugger Robot TEST_VREINTERPRET_POLY(, poly, p, 16, 4, uint, u, 16, 4);
205*f3782652STreehugger Robot TEST_VREINTERPRET_POLY(, poly, p, 16, 4, uint, u, 32, 2);
206*f3782652STreehugger Robot TEST_VREINTERPRET_POLY(, poly, p, 16, 4, uint, u, 64, 1);
207*f3782652STreehugger Robot TEST_VREINTERPRET_POLY(, poly, p, 16, 4, poly, p, 8, 8);
208*f3782652STreehugger Robot
209*f3782652STreehugger Robot /* vreinterpretq_s8_xx */
210*f3782652STreehugger Robot TEST_VREINTERPRET(q, int, s, 8, 16, int, s, 16, 8);
211*f3782652STreehugger Robot TEST_VREINTERPRET(q, int, s, 8, 16, int, s, 32, 4);
212*f3782652STreehugger Robot TEST_VREINTERPRET(q, int, s, 8, 16, int, s, 64, 2);
213*f3782652STreehugger Robot TEST_VREINTERPRET(q, int, s, 8, 16, uint, u, 8, 16);
214*f3782652STreehugger Robot TEST_VREINTERPRET(q, int, s, 8, 16, uint, u, 16, 8);
215*f3782652STreehugger Robot TEST_VREINTERPRET(q, int, s, 8, 16, uint, u, 32, 4);
216*f3782652STreehugger Robot TEST_VREINTERPRET(q, int, s, 8, 16, uint, u, 64, 2);
217*f3782652STreehugger Robot TEST_VREINTERPRET(q, int, s, 8, 16, poly, p, 8, 16);
218*f3782652STreehugger Robot TEST_VREINTERPRET(q, int, s, 8, 16, poly, p, 16, 8);
219*f3782652STreehugger Robot
220*f3782652STreehugger Robot /* vreinterpretq_s16_xx */
221*f3782652STreehugger Robot TEST_VREINTERPRET(q, int, s, 16, 8, int, s, 8, 16);
222*f3782652STreehugger Robot TEST_VREINTERPRET(q, int, s, 16, 8, int, s, 32, 4);
223*f3782652STreehugger Robot TEST_VREINTERPRET(q, int, s, 16, 8, int, s, 64, 2);
224*f3782652STreehugger Robot TEST_VREINTERPRET(q, int, s, 16, 8, uint, u, 8, 16);
225*f3782652STreehugger Robot TEST_VREINTERPRET(q, int, s, 16, 8, uint, u, 16, 8);
226*f3782652STreehugger Robot TEST_VREINTERPRET(q, int, s, 16, 8, uint, u, 32, 4);
227*f3782652STreehugger Robot TEST_VREINTERPRET(q, int, s, 16, 8, uint, u, 64, 2);
228*f3782652STreehugger Robot TEST_VREINTERPRET(q, int, s, 16, 8, poly, p, 8, 16);
229*f3782652STreehugger Robot TEST_VREINTERPRET(q, int, s, 16, 8, poly, p, 16, 8);
230*f3782652STreehugger Robot
231*f3782652STreehugger Robot /* vreinterpretq_s32_xx */
232*f3782652STreehugger Robot TEST_VREINTERPRET(q, int, s, 32, 4, int, s, 8, 16);
233*f3782652STreehugger Robot TEST_VREINTERPRET(q, int, s, 32, 4, int, s, 16, 8);
234*f3782652STreehugger Robot TEST_VREINTERPRET(q, int, s, 32, 4, int, s, 64, 2);
235*f3782652STreehugger Robot TEST_VREINTERPRET(q, int, s, 32, 4, uint, u, 8, 16);
236*f3782652STreehugger Robot TEST_VREINTERPRET(q, int, s, 32, 4, uint, u, 16, 8);
237*f3782652STreehugger Robot TEST_VREINTERPRET(q, int, s, 32, 4, uint, u, 32, 4);
238*f3782652STreehugger Robot TEST_VREINTERPRET(q, int, s, 32, 4, uint, u, 64, 2);
239*f3782652STreehugger Robot TEST_VREINTERPRET(q, int, s, 32, 4, poly, p, 8, 16);
240*f3782652STreehugger Robot TEST_VREINTERPRET(q, int, s, 32, 4, poly, p, 16, 8);
241*f3782652STreehugger Robot
242*f3782652STreehugger Robot /* vreinterpretq_s64_xx */
243*f3782652STreehugger Robot TEST_VREINTERPRET(q, int, s, 64, 2, int, s, 8, 16);
244*f3782652STreehugger Robot TEST_VREINTERPRET(q, int, s, 64, 2, int, s, 16, 8);
245*f3782652STreehugger Robot TEST_VREINTERPRET(q, int, s, 64, 2, int, s, 32, 4);
246*f3782652STreehugger Robot TEST_VREINTERPRET(q, int, s, 64, 2, uint, u, 8, 16);
247*f3782652STreehugger Robot TEST_VREINTERPRET(q, int, s, 64, 2, uint, u, 16, 8);
248*f3782652STreehugger Robot TEST_VREINTERPRET(q, int, s, 64, 2, uint, u, 32, 4);
249*f3782652STreehugger Robot TEST_VREINTERPRET(q, int, s, 64, 2, uint, u, 64, 2);
250*f3782652STreehugger Robot TEST_VREINTERPRET(q, int, s, 64, 2, poly, p, 8, 16);
251*f3782652STreehugger Robot TEST_VREINTERPRET(q, int, s, 64, 2, poly, p, 16, 8);
252*f3782652STreehugger Robot
253*f3782652STreehugger Robot /* vreinterpretq_u16_xx */
254*f3782652STreehugger Robot TEST_VREINTERPRET(q, uint, u, 16, 8, int, s, 8, 16);
255*f3782652STreehugger Robot TEST_VREINTERPRET(q, uint, u, 16, 8, int, s, 16, 8);
256*f3782652STreehugger Robot TEST_VREINTERPRET(q, uint, u, 16, 8, int, s, 32, 4);
257*f3782652STreehugger Robot TEST_VREINTERPRET(q, uint, u, 16, 8, int, s, 64, 2);
258*f3782652STreehugger Robot TEST_VREINTERPRET(q, uint, u, 16, 8, uint, u, 8, 16);
259*f3782652STreehugger Robot TEST_VREINTERPRET(q, uint, u, 16, 8, uint, u, 32, 4);
260*f3782652STreehugger Robot TEST_VREINTERPRET(q, uint, u, 16, 8, uint, u, 64, 2);
261*f3782652STreehugger Robot TEST_VREINTERPRET(q, uint, u, 16, 8, poly, p, 8, 16);
262*f3782652STreehugger Robot TEST_VREINTERPRET(q, uint, u, 16, 8, poly, p, 16, 8);
263*f3782652STreehugger Robot
264*f3782652STreehugger Robot /* vreinterpretq_u32_xx */
265*f3782652STreehugger Robot TEST_VREINTERPRET(q, uint, u, 32, 4, int, s, 8, 16);
266*f3782652STreehugger Robot TEST_VREINTERPRET(q, uint, u, 32, 4, int, s, 16, 8);
267*f3782652STreehugger Robot TEST_VREINTERPRET(q, uint, u, 32, 4, int, s, 32, 4);
268*f3782652STreehugger Robot TEST_VREINTERPRET(q, uint, u, 32, 4, int, s, 64, 2);
269*f3782652STreehugger Robot TEST_VREINTERPRET(q, uint, u, 32, 4, uint, u, 8, 16);
270*f3782652STreehugger Robot TEST_VREINTERPRET(q, uint, u, 32, 4, uint, u, 16, 8);
271*f3782652STreehugger Robot TEST_VREINTERPRET(q, uint, u, 32, 4, uint, u, 64, 2);
272*f3782652STreehugger Robot TEST_VREINTERPRET(q, uint, u, 32, 4, poly, p, 8, 16);
273*f3782652STreehugger Robot TEST_VREINTERPRET(q, uint, u, 32, 4, poly, p, 16, 8);
274*f3782652STreehugger Robot
275*f3782652STreehugger Robot /* vreinterpretq_u64_xx */
276*f3782652STreehugger Robot TEST_VREINTERPRET(q, uint, u, 64, 2, int, s, 8, 16);
277*f3782652STreehugger Robot TEST_VREINTERPRET(q, uint, u, 64, 2, int, s, 16, 8);
278*f3782652STreehugger Robot TEST_VREINTERPRET(q, uint, u, 64, 2, int, s, 32, 4);
279*f3782652STreehugger Robot TEST_VREINTERPRET(q, uint, u, 64, 2, int, s, 64, 2);
280*f3782652STreehugger Robot TEST_VREINTERPRET(q, uint, u, 64, 2, uint, u, 8, 16);
281*f3782652STreehugger Robot TEST_VREINTERPRET(q, uint, u, 64, 2, uint, u, 16, 8);
282*f3782652STreehugger Robot TEST_VREINTERPRET(q, uint, u, 64, 2, uint, u, 32, 4);
283*f3782652STreehugger Robot TEST_VREINTERPRET(q, uint, u, 64, 2, poly, p, 8, 16);
284*f3782652STreehugger Robot TEST_VREINTERPRET(q, uint, u, 64, 2, poly, p, 16, 8);
285*f3782652STreehugger Robot
286*f3782652STreehugger Robot /* vreinterpretq_u8_xx */
287*f3782652STreehugger Robot TEST_VREINTERPRET(q, uint, u, 8, 16, int, s, 8, 16);
288*f3782652STreehugger Robot TEST_VREINTERPRET(q, uint, u, 8, 16, int, s, 16, 8);
289*f3782652STreehugger Robot TEST_VREINTERPRET(q, uint, u, 8, 16, int, s, 32, 4);
290*f3782652STreehugger Robot TEST_VREINTERPRET(q, uint, u, 8, 16, int, s, 64, 2);
291*f3782652STreehugger Robot TEST_VREINTERPRET(q, uint, u, 8, 16, uint, u, 16, 8);
292*f3782652STreehugger Robot TEST_VREINTERPRET(q, uint, u, 8, 16, uint, u, 32, 4);
293*f3782652STreehugger Robot TEST_VREINTERPRET(q, uint, u, 8, 16, uint, u, 64, 2);
294*f3782652STreehugger Robot TEST_VREINTERPRET(q, uint, u, 8, 16, poly, p, 8, 16);
295*f3782652STreehugger Robot TEST_VREINTERPRET(q, uint, u, 8, 16, poly, p, 16, 8);
296*f3782652STreehugger Robot
297*f3782652STreehugger Robot /* vreinterpret_f32_xx */
298*f3782652STreehugger Robot TEST_VREINTERPRET_FP(, float, f, 32, 2, int, s, 8, 8);
299*f3782652STreehugger Robot TEST_VREINTERPRET_FP(, float, f, 32, 2, int, s, 16, 4);
300*f3782652STreehugger Robot TEST_VREINTERPRET_FP(, float, f, 32, 2, int, s, 32, 2);
301*f3782652STreehugger Robot TEST_VREINTERPRET_FP(, float, f, 32, 2, int, s, 64, 1);
302*f3782652STreehugger Robot TEST_VREINTERPRET_FP(, float, f, 32, 2, uint, u, 8, 8);
303*f3782652STreehugger Robot TEST_VREINTERPRET_FP(, float, f, 32, 2, uint, u, 16, 4);
304*f3782652STreehugger Robot TEST_VREINTERPRET_FP(, float, f, 32, 2, uint, u, 32, 2);
305*f3782652STreehugger Robot TEST_VREINTERPRET_FP(, float, f, 32, 2, uint, u, 64, 1);
306*f3782652STreehugger Robot TEST_VREINTERPRET_FP(, float, f, 32, 2, poly, p, 8, 8);
307*f3782652STreehugger Robot TEST_VREINTERPRET_FP(, float, f, 32, 2, poly, p, 16, 4);
308*f3782652STreehugger Robot
309*f3782652STreehugger Robot /* vreinterpretq_f32_xx */
310*f3782652STreehugger Robot TEST_VREINTERPRET_FP(q, float, f, 32, 4, int, s, 8, 16);
311*f3782652STreehugger Robot TEST_VREINTERPRET_FP(q, float, f, 32, 4, int, s, 16, 8);
312*f3782652STreehugger Robot TEST_VREINTERPRET_FP(q, float, f, 32, 4, int, s, 32, 4);
313*f3782652STreehugger Robot TEST_VREINTERPRET_FP(q, float, f, 32, 4, int, s, 64, 2);
314*f3782652STreehugger Robot TEST_VREINTERPRET_FP(q, float, f, 32, 4, uint, u, 8, 16);
315*f3782652STreehugger Robot TEST_VREINTERPRET_FP(q, float, f, 32, 4, uint, u, 16, 8);
316*f3782652STreehugger Robot TEST_VREINTERPRET_FP(q, float, f, 32, 4, uint, u, 32, 4);
317*f3782652STreehugger Robot TEST_VREINTERPRET_FP(q, float, f, 32, 4, uint, u, 64, 2);
318*f3782652STreehugger Robot TEST_VREINTERPRET_FP(q, float, f, 32, 4, poly, p, 8, 16);
319*f3782652STreehugger Robot TEST_VREINTERPRET_FP(q, float, f, 32, 4, poly, p, 16, 8);
320*f3782652STreehugger Robot
321*f3782652STreehugger Robot /* vreinterpret_xx_f32 */
322*f3782652STreehugger Robot TEST_VREINTERPRET(, int, s, 8, 8, float, f, 32, 2);
323*f3782652STreehugger Robot TEST_VREINTERPRET(, int, s, 16, 4, float, f, 32, 2);
324*f3782652STreehugger Robot TEST_VREINTERPRET(, int, s, 32, 2, float, f, 32, 2);
325*f3782652STreehugger Robot TEST_VREINTERPRET(, int, s, 64, 1, float, f, 32, 2);
326*f3782652STreehugger Robot TEST_VREINTERPRET(, uint, u, 8, 8, float, f, 32, 2);
327*f3782652STreehugger Robot TEST_VREINTERPRET(, uint, u, 16, 4, float, f, 32, 2);
328*f3782652STreehugger Robot TEST_VREINTERPRET(, uint, u, 32, 2, float, f, 32, 2);
329*f3782652STreehugger Robot TEST_VREINTERPRET(, uint, u, 64, 1, float, f, 32, 2);
330*f3782652STreehugger Robot TEST_VREINTERPRET_POLY(, poly, p, 8, 8, float, f, 32, 2);
331*f3782652STreehugger Robot TEST_VREINTERPRET_POLY(, poly, p, 16, 4, float, f, 32, 2);
332*f3782652STreehugger Robot
333*f3782652STreehugger Robot /* vreinterpretq_xx_f32 */
334*f3782652STreehugger Robot TEST_VREINTERPRET(q, int, s, 8, 16, float, f, 32, 4);
335*f3782652STreehugger Robot TEST_VREINTERPRET(q, int, s, 16, 8, float, f, 32, 4);
336*f3782652STreehugger Robot TEST_VREINTERPRET(q, int, s, 32, 4, float, f, 32, 4);
337*f3782652STreehugger Robot TEST_VREINTERPRET(q, int, s, 64, 2, float, f, 32, 4);
338*f3782652STreehugger Robot TEST_VREINTERPRET(q, uint, u, 8, 16, float, f, 32, 4);
339*f3782652STreehugger Robot TEST_VREINTERPRET(q, uint, u, 16, 8, float, f, 32, 4);
340*f3782652STreehugger Robot TEST_VREINTERPRET(q, uint, u, 32, 4, float, f, 32, 4);
341*f3782652STreehugger Robot TEST_VREINTERPRET(q, uint, u, 64, 2, float, f, 32, 4);
342*f3782652STreehugger Robot TEST_VREINTERPRET_POLY(q, poly, p, 8, 16, float, f, 32, 4);
343*f3782652STreehugger Robot TEST_VREINTERPRET_POLY(q, poly, p, 16, 8, float, f, 32, 4);
344*f3782652STreehugger Robot
345*f3782652STreehugger Robot #if defined(__ARM_FP16_FORMAT_IEEE) && ( ((__ARM_FP & 0x2) != 0) || ((__ARM_NEON_FP16_INTRINSICS & 1) != 0) )
346*f3782652STreehugger Robot /* vreinterpret_f16_xx */
347*f3782652STreehugger Robot TEST_VREINTERPRET_FP16(, float, f, 16, 4, int, s, 8, 8);
348*f3782652STreehugger Robot TEST_VREINTERPRET_FP16(, float, f, 16, 4, int, s, 16, 4);
349*f3782652STreehugger Robot TEST_VREINTERPRET_FP16(, float, f, 16, 4, int, s, 32, 2);
350*f3782652STreehugger Robot TEST_VREINTERPRET_FP16(, float, f, 16, 4, int, s, 64, 1);
351*f3782652STreehugger Robot TEST_VREINTERPRET_FP16(, float, f, 16, 4, uint, u, 8, 8);
352*f3782652STreehugger Robot TEST_VREINTERPRET_FP16(, float, f, 16, 4, uint, u, 16, 4);
353*f3782652STreehugger Robot TEST_VREINTERPRET_FP16(, float, f, 16, 4, uint, u, 32, 2);
354*f3782652STreehugger Robot TEST_VREINTERPRET_FP16(, float, f, 16, 4, uint, u, 64, 1);
355*f3782652STreehugger Robot TEST_VREINTERPRET_FP16(, float, f, 16, 4, poly, p, 8, 8);
356*f3782652STreehugger Robot TEST_VREINTERPRET_FP16(, float, f, 16, 4, poly, p, 16, 4);
357*f3782652STreehugger Robot TEST_VREINTERPRET_FP16(, float, f, 16, 4, float, f, 32, 2);
358*f3782652STreehugger Robot
359*f3782652STreehugger Robot /* vreinterpretq_f16_xx */
360*f3782652STreehugger Robot TEST_VREINTERPRET_FP16(q, float, f, 16, 8, int, s, 8, 16);
361*f3782652STreehugger Robot TEST_VREINTERPRET_FP16(q, float, f, 16, 8, int, s, 16, 8);
362*f3782652STreehugger Robot TEST_VREINTERPRET_FP16(q, float, f, 16, 8, int, s, 32, 4);
363*f3782652STreehugger Robot TEST_VREINTERPRET_FP16(q, float, f, 16, 8, int, s, 64, 2);
364*f3782652STreehugger Robot TEST_VREINTERPRET_FP16(q, float, f, 16, 8, uint, u, 8, 16);
365*f3782652STreehugger Robot TEST_VREINTERPRET_FP16(q, float, f, 16, 8, uint, u, 16, 8);
366*f3782652STreehugger Robot TEST_VREINTERPRET_FP16(q, float, f, 16, 8, uint, u, 32, 4);
367*f3782652STreehugger Robot TEST_VREINTERPRET_FP16(q, float, f, 16, 8, uint, u, 64, 2);
368*f3782652STreehugger Robot TEST_VREINTERPRET_FP16(q, float, f, 16, 8, poly, p, 8, 16);
369*f3782652STreehugger Robot TEST_VREINTERPRET_FP16(q, float, f, 16, 8, poly, p, 16, 8);
370*f3782652STreehugger Robot TEST_VREINTERPRET_FP16(q, float, f, 16, 8, float, f, 32, 4);
371*f3782652STreehugger Robot
372*f3782652STreehugger Robot /* vreinterpret_xx_f16 */
373*f3782652STreehugger Robot TEST_VREINTERPRET(, int, s, 8, 8, float, f, 16, 4);
374*f3782652STreehugger Robot TEST_VREINTERPRET(, int, s, 16, 4, float, f, 16, 4);
375*f3782652STreehugger Robot TEST_VREINTERPRET(, int, s, 32, 2, float, f, 16, 4);
376*f3782652STreehugger Robot TEST_VREINTERPRET(, int, s, 64, 1, float, f, 16, 4);
377*f3782652STreehugger Robot TEST_VREINTERPRET(, uint, u, 8, 8, float, f, 16, 4);
378*f3782652STreehugger Robot TEST_VREINTERPRET(, uint, u, 16, 4, float, f, 16, 4);
379*f3782652STreehugger Robot TEST_VREINTERPRET(, uint, u, 32, 2, float, f, 16, 4);
380*f3782652STreehugger Robot TEST_VREINTERPRET(, uint, u, 64, 1, float, f, 16, 4);
381*f3782652STreehugger Robot TEST_VREINTERPRET_POLY(, poly, p, 8, 8, float, f, 16, 4);
382*f3782652STreehugger Robot TEST_VREINTERPRET_POLY(, poly, p, 16, 4, float, f, 16, 4);
383*f3782652STreehugger Robot TEST_VREINTERPRET_FP(, float, f, 32, 2, float, f, 16, 4);
384*f3782652STreehugger Robot
385*f3782652STreehugger Robot /* vreinterpretq_xx_f16 */
386*f3782652STreehugger Robot TEST_VREINTERPRET(q, int, s, 8, 16, float, f, 16, 8);
387*f3782652STreehugger Robot TEST_VREINTERPRET(q, int, s, 16, 8, float, f, 16, 8);
388*f3782652STreehugger Robot TEST_VREINTERPRET(q, int, s, 32, 4, float, f, 16, 8);
389*f3782652STreehugger Robot TEST_VREINTERPRET(q, int, s, 64, 2, float, f, 16, 8);
390*f3782652STreehugger Robot TEST_VREINTERPRET(q, uint, u, 8, 16, float, f, 16, 8);
391*f3782652STreehugger Robot TEST_VREINTERPRET(q, uint, u, 16, 8, float, f, 16, 8);
392*f3782652STreehugger Robot TEST_VREINTERPRET(q, uint, u, 32, 4, float, f, 16, 8);
393*f3782652STreehugger Robot TEST_VREINTERPRET(q, uint, u, 64, 2, float, f, 16, 8);
394*f3782652STreehugger Robot TEST_VREINTERPRET_POLY(q, poly, p, 8, 16, float, f, 16, 8);
395*f3782652STreehugger Robot TEST_VREINTERPRET_POLY(q, poly, p, 16, 8, float, f, 16, 8);
396*f3782652STreehugger Robot TEST_VREINTERPRET_FP(q, float, f, 32, 4, float, f, 16, 8);
397*f3782652STreehugger Robot #endif
398*f3782652STreehugger Robot }
399