1 #include <arm_neon.h>
2 #include "arm-neon-ref.h"
3 #include "compute-ref-data.h"
4
5 /* Expected results for vreinterpret_s8_xx. */
6 VECT_VAR_DECL(expected_s8_1,int,8,8) [] = { 0xf0, 0xff, 0xf1, 0xff,
7 0xf2, 0xff, 0xf3, 0xff };
8 VECT_VAR_DECL(expected_s8_2,int,8,8) [] = { 0xf0, 0xff, 0xff, 0xff,
9 0xf1, 0xff, 0xff, 0xff };
10 VECT_VAR_DECL(expected_s8_3,int,8,8) [] = { 0xf0, 0xff, 0xff, 0xff,
11 0xff, 0xff, 0xff, 0xff };
12 VECT_VAR_DECL(expected_s8_4,int,8,8) [] = { 0xf0, 0xf1, 0xf2, 0xf3,
13 0xf4, 0xf5, 0xf6, 0xf7 };
14 VECT_VAR_DECL(expected_s8_5,int,8,8) [] = { 0xf0, 0xff, 0xf1, 0xff,
15 0xf2, 0xff, 0xf3, 0xff };
16 VECT_VAR_DECL(expected_s8_6,int,8,8) [] = { 0xf0, 0xff, 0xff, 0xff,
17 0xf1, 0xff, 0xff, 0xff };
18 VECT_VAR_DECL(expected_s8_7,int,8,8) [] = { 0xf0, 0xff, 0xff, 0xff,
19 0xff, 0xff, 0xff, 0xff };
20 VECT_VAR_DECL(expected_s8_8,int,8,8) [] = { 0xf0, 0xf1, 0xf2, 0xf3,
21 0xf4, 0xf5, 0xf6, 0xf7 };
22 VECT_VAR_DECL(expected_s8_9,int,8,8) [] = { 0xf0, 0xff, 0xf1, 0xff,
23 0xf2, 0xff, 0xf3, 0xff };
24 VECT_VAR_DECL(expected_s8_10,int,8,8) [] = { 0x00, 0xcc, 0x80, 0xcb,
25 0x00, 0xcb, 0x80, 0xca };
26
27 /* Expected results for vreinterpret_s16_xx. */
28 VECT_VAR_DECL(expected_s16_1,int,16,4) [] = { 0xf1f0, 0xf3f2, 0xf5f4, 0xf7f6 };
29 VECT_VAR_DECL(expected_s16_2,int,16,4) [] = { 0xfff0, 0xffff, 0xfff1, 0xffff };
30 VECT_VAR_DECL(expected_s16_3,int,16,4) [] = { 0xfff0, 0xffff, 0xffff, 0xffff };
31 VECT_VAR_DECL(expected_s16_4,int,16,4) [] = { 0xf1f0, 0xf3f2, 0xf5f4, 0xf7f6 };
32 VECT_VAR_DECL(expected_s16_5,int,16,4) [] = { 0xfff0, 0xfff1, 0xfff2, 0xfff3 };
33 VECT_VAR_DECL(expected_s16_6,int,16,4) [] = { 0xfff0, 0xffff, 0xfff1, 0xffff };
34 VECT_VAR_DECL(expected_s16_7,int,16,4) [] = { 0xfff0, 0xffff, 0xffff, 0xffff };
35 VECT_VAR_DECL(expected_s16_8,int,16,4) [] = { 0xf1f0, 0xf3f2, 0xf5f4, 0xf7f6 };
36 VECT_VAR_DECL(expected_s16_9,int,16,4) [] = { 0xfff0, 0xfff1, 0xfff2, 0xfff3 };
37 VECT_VAR_DECL(expected_s16_10,int,16,4) [] = { 0xcc00, 0xcb80, 0xcb00, 0xca80 };
38
39 /* Expected results for vreinterpret_s32_xx. */
40 VECT_VAR_DECL(expected_s32_1,int,32,2) [] = { 0xf3f2f1f0, 0xf7f6f5f4 };
41 VECT_VAR_DECL(expected_s32_2,int,32,2) [] = { 0xfff1fff0, 0xfff3fff2 };
42 VECT_VAR_DECL(expected_s32_3,int,32,2) [] = { 0xfffffff0, 0xffffffff };
43 VECT_VAR_DECL(expected_s32_4,int,32,2) [] = { 0xf3f2f1f0, 0xf7f6f5f4 };
44 VECT_VAR_DECL(expected_s32_5,int,32,2) [] = { 0xfff1fff0, 0xfff3fff2 };
45 VECT_VAR_DECL(expected_s32_6,int,32,2) [] = { 0xfffffff0, 0xfffffff1 };
46 VECT_VAR_DECL(expected_s32_7,int,32,2) [] = { 0xfffffff0, 0xffffffff };
47 VECT_VAR_DECL(expected_s32_8,int,32,2) [] = { 0xf3f2f1f0, 0xf7f6f5f4 };
48 VECT_VAR_DECL(expected_s32_9,int,32,2) [] = { 0xfff1fff0, 0xfff3fff2 };
49 VECT_VAR_DECL(expected_s32_10,int,32,2) [] = { 0xcb80cc00, 0xca80cb00 };
50
51 /* Expected results for vreinterpret_s64_xx. */
52 VECT_VAR_DECL(expected_s64_1,int,64,1) [] = { 0xf7f6f5f4f3f2f1f0 };
53 VECT_VAR_DECL(expected_s64_2,int,64,1) [] = { 0xfff3fff2fff1fff0 };
54 VECT_VAR_DECL(expected_s64_3,int,64,1) [] = { 0xfffffff1fffffff0 };
55 VECT_VAR_DECL(expected_s64_4,int,64,1) [] = { 0xf7f6f5f4f3f2f1f0 };
56 VECT_VAR_DECL(expected_s64_5,int,64,1) [] = { 0xfff3fff2fff1fff0 };
57 VECT_VAR_DECL(expected_s64_6,int,64,1) [] = { 0xfffffff1fffffff0 };
58 VECT_VAR_DECL(expected_s64_7,int,64,1) [] = { 0xfffffffffffffff0 };
59 VECT_VAR_DECL(expected_s64_8,int,64,1) [] = { 0xf7f6f5f4f3f2f1f0 };
60 VECT_VAR_DECL(expected_s64_9,int,64,1) [] = { 0xfff3fff2fff1fff0 };
61 VECT_VAR_DECL(expected_s64_10,int,64,1) [] = { 0xca80cb00cb80cc00 };
62
63 /* Expected results for vreinterpret_u8_xx. */
64 VECT_VAR_DECL(expected_u8_1,uint,8,8) [] = { 0xf0, 0xf1, 0xf2, 0xf3,
65 0xf4, 0xf5, 0xf6, 0xf7 };
66 VECT_VAR_DECL(expected_u8_2,uint,8,8) [] = { 0xf0, 0xff, 0xf1, 0xff,
67 0xf2, 0xff, 0xf3, 0xff };
68 VECT_VAR_DECL(expected_u8_3,uint,8,8) [] = { 0xf0, 0xff, 0xff, 0xff,
69 0xf1, 0xff, 0xff, 0xff };
70 VECT_VAR_DECL(expected_u8_4,uint,8,8) [] = { 0xf0, 0xff, 0xff, 0xff,
71 0xff, 0xff, 0xff, 0xff };
72 VECT_VAR_DECL(expected_u8_5,uint,8,8) [] = { 0xf0, 0xff, 0xf1, 0xff,
73 0xf2, 0xff, 0xf3, 0xff };
74 VECT_VAR_DECL(expected_u8_6,uint,8,8) [] = { 0xf0, 0xff, 0xff, 0xff,
75 0xf1, 0xff, 0xff, 0xff };
76 VECT_VAR_DECL(expected_u8_7,uint,8,8) [] = { 0xf0, 0xff, 0xff, 0xff,
77 0xff, 0xff, 0xff, 0xff };
78 VECT_VAR_DECL(expected_u8_8,uint,8,8) [] = { 0xf0, 0xf1, 0xf2, 0xf3,
79 0xf4, 0xf5, 0xf6, 0xf7 };
80 VECT_VAR_DECL(expected_u8_9,uint,8,8) [] = { 0xf0, 0xff, 0xf1, 0xff,
81 0xf2, 0xff, 0xf3, 0xff };
82 VECT_VAR_DECL(expected_u8_10,uint,8,8) [] = { 0x00, 0xcc, 0x80, 0xcb,
83 0x00, 0xcb, 0x80, 0xca };
84
85 /* Expected results for vreinterpret_u16_xx. */
86 VECT_VAR_DECL(expected_u16_1,uint,16,4) [] = { 0xf1f0, 0xf3f2, 0xf5f4, 0xf7f6 };
87 VECT_VAR_DECL(expected_u16_2,uint,16,4) [] = { 0xfff0, 0xfff1, 0xfff2, 0xfff3 };
88 VECT_VAR_DECL(expected_u16_3,uint,16,4) [] = { 0xfff0, 0xffff, 0xfff1, 0xffff };
89 VECT_VAR_DECL(expected_u16_4,uint,16,4) [] = { 0xfff0, 0xffff, 0xffff, 0xffff };
90 VECT_VAR_DECL(expected_u16_5,uint,16,4) [] = { 0xf1f0, 0xf3f2, 0xf5f4, 0xf7f6 };
91 VECT_VAR_DECL(expected_u16_6,uint,16,4) [] = { 0xfff0, 0xffff, 0xfff1, 0xffff };
92 VECT_VAR_DECL(expected_u16_7,uint,16,4) [] = { 0xfff0, 0xffff, 0xffff, 0xffff };
93 VECT_VAR_DECL(expected_u16_8,uint,16,4) [] = { 0xf1f0, 0xf3f2, 0xf5f4, 0xf7f6 };
94 VECT_VAR_DECL(expected_u16_9,uint,16,4) [] = { 0xfff0, 0xfff1, 0xfff2, 0xfff3 };
95 VECT_VAR_DECL(expected_u16_10,uint,16,4) [] = { 0xcc00, 0xcb80, 0xcb00, 0xca80 };
96
97 /* Expected results for vreinterpret_u32_xx. */
98 VECT_VAR_DECL(expected_u32_1,uint,32,2) [] = { 0xf3f2f1f0, 0xf7f6f5f4 };
99 VECT_VAR_DECL(expected_u32_2,uint,32,2) [] = { 0xfff1fff0, 0xfff3fff2 };
100 VECT_VAR_DECL(expected_u32_3,uint,32,2) [] = { 0xfffffff0, 0xfffffff1 };
101 VECT_VAR_DECL(expected_u32_4,uint,32,2) [] = { 0xfffffff0, 0xffffffff };
102 VECT_VAR_DECL(expected_u32_5,uint,32,2) [] = { 0xf3f2f1f0, 0xf7f6f5f4 };
103 VECT_VAR_DECL(expected_u32_6,uint,32,2) [] = { 0xfff1fff0, 0xfff3fff2 };
104 VECT_VAR_DECL(expected_u32_7,uint,32,2) [] = { 0xfffffff0, 0xffffffff };
105 VECT_VAR_DECL(expected_u32_8,uint,32,2) [] = { 0xf3f2f1f0, 0xf7f6f5f4 };
106 VECT_VAR_DECL(expected_u32_9,uint,32,2) [] = { 0xfff1fff0, 0xfff3fff2 };
107 VECT_VAR_DECL(expected_u32_10,uint,32,2) [] = { 0xcb80cc00, 0xca80cb00 };
108
109 /* Expected results for vreinterpret_u64_xx. */
110 VECT_VAR_DECL(expected_u64_1,uint,64,1) [] = { 0xf7f6f5f4f3f2f1f0 };
111 VECT_VAR_DECL(expected_u64_2,uint,64,1) [] = { 0xfff3fff2fff1fff0 };
112 VECT_VAR_DECL(expected_u64_3,uint,64,1) [] = { 0xfffffff1fffffff0 };
113 VECT_VAR_DECL(expected_u64_4,uint,64,1) [] = { 0xfffffffffffffff0 };
114 VECT_VAR_DECL(expected_u64_5,uint,64,1) [] = { 0xf7f6f5f4f3f2f1f0 };
115 VECT_VAR_DECL(expected_u64_6,uint,64,1) [] = { 0xfff3fff2fff1fff0 };
116 VECT_VAR_DECL(expected_u64_7,uint,64,1) [] = { 0xfffffff1fffffff0 };
117 VECT_VAR_DECL(expected_u64_8,uint,64,1) [] = { 0xf7f6f5f4f3f2f1f0 };
118 VECT_VAR_DECL(expected_u64_9,uint,64,1) [] = { 0xfff3fff2fff1fff0 };
119 VECT_VAR_DECL(expected_u64_10,uint,64,1) [] = { 0xca80cb00cb80cc00 };
120
121 /* Expected results for vreinterpret_p8_xx. */
122 VECT_VAR_DECL(expected_p8_1,poly,8,8) [] = { 0xf0, 0xf1, 0xf2, 0xf3,
123 0xf4, 0xf5, 0xf6, 0xf7 };
124 VECT_VAR_DECL(expected_p8_2,poly,8,8) [] = { 0xf0, 0xff, 0xf1, 0xff,
125 0xf2, 0xff, 0xf3, 0xff };
126 VECT_VAR_DECL(expected_p8_3,poly,8,8) [] = { 0xf0, 0xff, 0xff, 0xff,
127 0xf1, 0xff, 0xff, 0xff };
128 VECT_VAR_DECL(expected_p8_4,poly,8,8) [] = { 0xf0, 0xff, 0xff, 0xff,
129 0xff, 0xff, 0xff, 0xff };
130 VECT_VAR_DECL(expected_p8_5,poly,8,8) [] = { 0xf0, 0xf1, 0xf2, 0xf3,
131 0xf4, 0xf5, 0xf6, 0xf7 };
132 VECT_VAR_DECL(expected_p8_6,poly,8,8) [] = { 0xf0, 0xff, 0xf1, 0xff,
133 0xf2, 0xff, 0xf3, 0xff };
134 VECT_VAR_DECL(expected_p8_7,poly,8,8) [] = { 0xf0, 0xff, 0xff, 0xff,
135 0xf1, 0xff, 0xff, 0xff };
136 VECT_VAR_DECL(expected_p8_8,poly,8,8) [] = { 0xf0, 0xff, 0xff, 0xff,
137 0xff, 0xff, 0xff, 0xff };
138 VECT_VAR_DECL(expected_p8_9,poly,8,8) [] = { 0xf0, 0xff, 0xf1, 0xff,
139 0xf2, 0xff, 0xf3, 0xff };
140 VECT_VAR_DECL(expected_p8_10,poly,8,8) [] = { 0x00, 0xcc, 0x80, 0xcb,
141 0x00, 0xcb, 0x80, 0xca };
142
143 /* Expected results for vreinterpret_p16_xx. */
144 VECT_VAR_DECL(expected_p16_1,poly,16,4) [] = { 0xf1f0, 0xf3f2, 0xf5f4, 0xf7f6 };
145 VECT_VAR_DECL(expected_p16_2,poly,16,4) [] = { 0xfff0, 0xfff1, 0xfff2, 0xfff3 };
146 VECT_VAR_DECL(expected_p16_3,poly,16,4) [] = { 0xfff0, 0xffff, 0xfff1, 0xffff };
147 VECT_VAR_DECL(expected_p16_4,poly,16,4) [] = { 0xfff0, 0xffff, 0xffff, 0xffff };
148 VECT_VAR_DECL(expected_p16_5,poly,16,4) [] = { 0xf1f0, 0xf3f2, 0xf5f4, 0xf7f6 };
149 VECT_VAR_DECL(expected_p16_6,poly,16,4) [] = { 0xfff0, 0xfff1, 0xfff2, 0xfff3 };
150 VECT_VAR_DECL(expected_p16_7,poly,16,4) [] = { 0xfff0, 0xffff, 0xfff1, 0xffff };
151 VECT_VAR_DECL(expected_p16_8,poly,16,4) [] = { 0xfff0, 0xffff, 0xffff, 0xffff };
152 VECT_VAR_DECL(expected_p16_9,poly,16,4) [] = { 0xf1f0, 0xf3f2, 0xf5f4, 0xf7f6 };
153 VECT_VAR_DECL(expected_p16_10,poly,16,4) [] = { 0xcc00, 0xcb80, 0xcb00, 0xca80 };
154
155 /* Expected results for vreinterpretq_s8_xx. */
156 VECT_VAR_DECL(expected_q_s8_1,int,8,16) [] = { 0xf0, 0xff, 0xf1, 0xff,
157 0xf2, 0xff, 0xf3, 0xff,
158 0xf4, 0xff, 0xf5, 0xff,
159 0xf6, 0xff, 0xf7, 0xff };
160 VECT_VAR_DECL(expected_q_s8_2,int,8,16) [] = { 0xf0, 0xff, 0xff, 0xff,
161 0xf1, 0xff, 0xff, 0xff,
162 0xf2, 0xff, 0xff, 0xff,
163 0xf3, 0xff, 0xff, 0xff };
164 VECT_VAR_DECL(expected_q_s8_3,int,8,16) [] = { 0xf0, 0xff, 0xff, 0xff,
165 0xff, 0xff, 0xff, 0xff,
166 0xf1, 0xff, 0xff, 0xff,
167 0xff, 0xff, 0xff, 0xff };
168 VECT_VAR_DECL(expected_q_s8_4,int,8,16) [] = { 0xf0, 0xf1, 0xf2, 0xf3,
169 0xf4, 0xf5, 0xf6, 0xf7,
170 0xf8, 0xf9, 0xfa, 0xfb,
171 0xfc, 0xfd, 0xfe, 0xff };
172 VECT_VAR_DECL(expected_q_s8_5,int,8,16) [] = { 0xf0, 0xff, 0xf1, 0xff,
173 0xf2, 0xff, 0xf3, 0xff,
174 0xf4, 0xff, 0xf5, 0xff,
175 0xf6, 0xff, 0xf7, 0xff };
176 VECT_VAR_DECL(expected_q_s8_6,int,8,16) [] = { 0xf0, 0xff, 0xff, 0xff,
177 0xf1, 0xff, 0xff, 0xff,
178 0xf2, 0xff, 0xff, 0xff,
179 0xf3, 0xff, 0xff, 0xff };
180 VECT_VAR_DECL(expected_q_s8_7,int,8,16) [] = { 0xf0, 0xff, 0xff, 0xff,
181 0xff, 0xff, 0xff, 0xff,
182 0xf1, 0xff, 0xff, 0xff,
183 0xff, 0xff, 0xff, 0xff };
184 VECT_VAR_DECL(expected_q_s8_8,int,8,16) [] = { 0xf0, 0xf1, 0xf2, 0xf3,
185 0xf4, 0xf5, 0xf6, 0xf7,
186 0xf8, 0xf9, 0xfa, 0xfb,
187 0xfc, 0xfd, 0xfe, 0xff };
188 VECT_VAR_DECL(expected_q_s8_9,int,8,16) [] = { 0xf0, 0xff, 0xf1, 0xff,
189 0xf2, 0xff, 0xf3, 0xff,
190 0xf4, 0xff, 0xf5, 0xff,
191 0xf6, 0xff, 0xf7, 0xff };
192 VECT_VAR_DECL(expected_q_s8_10,int,8,16) [] = { 0x00, 0xcc, 0x80, 0xcb,
193 0x00, 0xcb, 0x80, 0xca,
194 0x00, 0xca, 0x80, 0xc9,
195 0x00, 0xc9, 0x80, 0xc8 };
196
197 /* Expected results for vreinterpretq_s16_xx. */
198 VECT_VAR_DECL(expected_q_s16_1,int,16,8) [] = { 0xf1f0, 0xf3f2,
199 0xf5f4, 0xf7f6,
200 0xf9f8, 0xfbfa,
201 0xfdfc, 0xfffe };
202 VECT_VAR_DECL(expected_q_s16_2,int,16,8) [] = { 0xfff0, 0xffff,
203 0xfff1, 0xffff,
204 0xfff2, 0xffff,
205 0xfff3, 0xffff };
206 VECT_VAR_DECL(expected_q_s16_3,int,16,8) [] = { 0xfff0, 0xffff,
207 0xffff, 0xffff,
208 0xfff1, 0xffff,
209 0xffff, 0xffff };
210 VECT_VAR_DECL(expected_q_s16_4,int,16,8) [] = { 0xf1f0, 0xf3f2,
211 0xf5f4, 0xf7f6,
212 0xf9f8, 0xfbfa,
213 0xfdfc, 0xfffe };
214 VECT_VAR_DECL(expected_q_s16_5,int,16,8) [] = { 0xfff0, 0xfff1,
215 0xfff2, 0xfff3,
216 0xfff4, 0xfff5,
217 0xfff6, 0xfff7 };
218 VECT_VAR_DECL(expected_q_s16_6,int,16,8) [] = { 0xfff0, 0xffff,
219 0xfff1, 0xffff,
220 0xfff2, 0xffff,
221 0xfff3, 0xffff };
222 VECT_VAR_DECL(expected_q_s16_7,int,16,8) [] = { 0xfff0, 0xffff,
223 0xffff, 0xffff,
224 0xfff1, 0xffff,
225 0xffff, 0xffff };
226 VECT_VAR_DECL(expected_q_s16_8,int,16,8) [] = { 0xf1f0, 0xf3f2,
227 0xf5f4, 0xf7f6,
228 0xf9f8, 0xfbfa,
229 0xfdfc, 0xfffe };
230 VECT_VAR_DECL(expected_q_s16_9,int,16,8) [] = { 0xfff0, 0xfff1,
231 0xfff2, 0xfff3,
232 0xfff4, 0xfff5,
233 0xfff6, 0xfff7 };
234 VECT_VAR_DECL(expected_q_s16_10,int,16,8) [] = { 0xcc00, 0xcb80,
235 0xcb00, 0xca80,
236 0xca00, 0xc980,
237 0xc900, 0xc880 };
238
239 /* Expected results for vreinterpretq_s32_xx. */
240 VECT_VAR_DECL(expected_q_s32_1,int,32,4) [] = { 0xf3f2f1f0, 0xf7f6f5f4,
241 0xfbfaf9f8, 0xfffefdfc };
242 VECT_VAR_DECL(expected_q_s32_2,int,32,4) [] = { 0xfff1fff0, 0xfff3fff2,
243 0xfff5fff4, 0xfff7fff6 };
244 VECT_VAR_DECL(expected_q_s32_3,int,32,4) [] = { 0xfffffff0, 0xffffffff,
245 0xfffffff1, 0xffffffff };
246 VECT_VAR_DECL(expected_q_s32_4,int,32,4) [] = { 0xf3f2f1f0, 0xf7f6f5f4,
247 0xfbfaf9f8, 0xfffefdfc };
248 VECT_VAR_DECL(expected_q_s32_5,int,32,4) [] = { 0xfff1fff0, 0xfff3fff2,
249 0xfff5fff4, 0xfff7fff6 };
250 VECT_VAR_DECL(expected_q_s32_6,int,32,4) [] = { 0xfffffff0, 0xfffffff1,
251 0xfffffff2, 0xfffffff3 };
252 VECT_VAR_DECL(expected_q_s32_7,int,32,4) [] = { 0xfffffff0, 0xffffffff,
253 0xfffffff1, 0xffffffff };
254 VECT_VAR_DECL(expected_q_s32_8,int,32,4) [] = { 0xf3f2f1f0, 0xf7f6f5f4,
255 0xfbfaf9f8, 0xfffefdfc };
256 VECT_VAR_DECL(expected_q_s32_9,int,32,4) [] = { 0xfff1fff0, 0xfff3fff2,
257 0xfff5fff4, 0xfff7fff6 };
258 VECT_VAR_DECL(expected_q_s32_10,int,32,4) [] = { 0xcb80cc00, 0xca80cb00,
259 0xc980ca00, 0xc880c900 };
260
261 /* Expected results for vreinterpretq_s64_xx. */
262 VECT_VAR_DECL(expected_q_s64_1,int,64,2) [] = { 0xf7f6f5f4f3f2f1f0,
263 0xfffefdfcfbfaf9f8 };
264 VECT_VAR_DECL(expected_q_s64_2,int,64,2) [] = { 0xfff3fff2fff1fff0,
265 0xfff7fff6fff5fff4 };
266 VECT_VAR_DECL(expected_q_s64_3,int,64,2) [] = { 0xfffffff1fffffff0,
267 0xfffffff3fffffff2 };
268 VECT_VAR_DECL(expected_q_s64_4,int,64,2) [] = { 0xf7f6f5f4f3f2f1f0,
269 0xfffefdfcfbfaf9f8 };
270 VECT_VAR_DECL(expected_q_s64_5,int,64,2) [] = { 0xfff3fff2fff1fff0,
271 0xfff7fff6fff5fff4 };
272 VECT_VAR_DECL(expected_q_s64_6,int,64,2) [] = { 0xfffffff1fffffff0,
273 0xfffffff3fffffff2 };
274 VECT_VAR_DECL(expected_q_s64_7,int,64,2) [] = { 0xfffffffffffffff0,
275 0xfffffffffffffff1 };
276 VECT_VAR_DECL(expected_q_s64_8,int,64,2) [] = { 0xf7f6f5f4f3f2f1f0,
277 0xfffefdfcfbfaf9f8 };
278 VECT_VAR_DECL(expected_q_s64_9,int,64,2) [] = { 0xfff3fff2fff1fff0,
279 0xfff7fff6fff5fff4 };
280 VECT_VAR_DECL(expected_q_s64_10,int,64,2) [] = { 0xca80cb00cb80cc00,
281 0xc880c900c980ca00 };
282
283 /* Expected results for vreinterpretq_u8_xx. */
284 VECT_VAR_DECL(expected_q_u8_1,uint,8,16) [] = { 0xf0, 0xf1, 0xf2, 0xf3,
285 0xf4, 0xf5, 0xf6, 0xf7,
286 0xf8, 0xf9, 0xfa, 0xfb,
287 0xfc, 0xfd, 0xfe, 0xff };
288 VECT_VAR_DECL(expected_q_u8_2,uint,8,16) [] = { 0xf0, 0xff, 0xf1, 0xff,
289 0xf2, 0xff, 0xf3, 0xff,
290 0xf4, 0xff, 0xf5, 0xff,
291 0xf6, 0xff, 0xf7, 0xff };
292 VECT_VAR_DECL(expected_q_u8_3,uint,8,16) [] = { 0xf0, 0xff, 0xff, 0xff,
293 0xf1, 0xff, 0xff, 0xff,
294 0xf2, 0xff, 0xff, 0xff,
295 0xf3, 0xff, 0xff, 0xff };
296 VECT_VAR_DECL(expected_q_u8_4,uint,8,16) [] = { 0xf0, 0xff, 0xff, 0xff,
297 0xff, 0xff, 0xff, 0xff,
298 0xf1, 0xff, 0xff, 0xff,
299 0xff, 0xff, 0xff, 0xff };
300 VECT_VAR_DECL(expected_q_u8_5,uint,8,16) [] = { 0xf0, 0xff, 0xf1, 0xff,
301 0xf2, 0xff, 0xf3, 0xff,
302 0xf4, 0xff, 0xf5, 0xff,
303 0xf6, 0xff, 0xf7, 0xff };
304 VECT_VAR_DECL(expected_q_u8_6,uint,8,16) [] = { 0xf0, 0xff, 0xff, 0xff,
305 0xf1, 0xff, 0xff, 0xff,
306 0xf2, 0xff, 0xff, 0xff,
307 0xf3, 0xff, 0xff, 0xff };
308 VECT_VAR_DECL(expected_q_u8_7,uint,8,16) [] = { 0xf0, 0xff, 0xff, 0xff,
309 0xff, 0xff, 0xff, 0xff,
310 0xf1, 0xff, 0xff, 0xff,
311 0xff, 0xff, 0xff, 0xff };
312 VECT_VAR_DECL(expected_q_u8_8,uint,8,16) [] = { 0xf0, 0xf1, 0xf2, 0xf3,
313 0xf4, 0xf5, 0xf6, 0xf7,
314 0xf8, 0xf9, 0xfa, 0xfb,
315 0xfc, 0xfd, 0xfe, 0xff };
316 VECT_VAR_DECL(expected_q_u8_9,uint,8,16) [] = { 0xf0, 0xff, 0xf1, 0xff,
317 0xf2, 0xff, 0xf3, 0xff,
318 0xf4, 0xff, 0xf5, 0xff,
319 0xf6, 0xff, 0xf7, 0xff };
320 VECT_VAR_DECL(expected_q_u8_10,uint,8,16) [] = { 0x00, 0xcc, 0x80, 0xcb,
321 0x00, 0xcb, 0x80, 0xca,
322 0x00, 0xca, 0x80, 0xc9,
323 0x00, 0xc9, 0x80, 0xc8 };
324
325 /* Expected results for vreinterpretq_u16_xx. */
326 VECT_VAR_DECL(expected_q_u16_1,uint,16,8) [] = { 0xf1f0, 0xf3f2,
327 0xf5f4, 0xf7f6,
328 0xf9f8, 0xfbfa,
329 0xfdfc, 0xfffe };
330 VECT_VAR_DECL(expected_q_u16_2,uint,16,8) [] = { 0xfff0, 0xfff1,
331 0xfff2, 0xfff3,
332 0xfff4, 0xfff5,
333 0xfff6, 0xfff7 };
334 VECT_VAR_DECL(expected_q_u16_3,uint,16,8) [] = { 0xfff0, 0xffff,
335 0xfff1, 0xffff,
336 0xfff2, 0xffff,
337 0xfff3, 0xffff };
338 VECT_VAR_DECL(expected_q_u16_4,uint,16,8) [] = { 0xfff0, 0xffff,
339 0xffff, 0xffff,
340 0xfff1, 0xffff,
341 0xffff, 0xffff };
342 VECT_VAR_DECL(expected_q_u16_5,uint,16,8) [] = { 0xf1f0, 0xf3f2,
343 0xf5f4, 0xf7f6,
344 0xf9f8, 0xfbfa,
345 0xfdfc, 0xfffe };
346 VECT_VAR_DECL(expected_q_u16_6,uint,16,8) [] = { 0xfff0, 0xffff,
347 0xfff1, 0xffff,
348 0xfff2, 0xffff,
349 0xfff3, 0xffff };
350 VECT_VAR_DECL(expected_q_u16_7,uint,16,8) [] = { 0xfff0, 0xffff,
351 0xffff, 0xffff,
352 0xfff1, 0xffff,
353 0xffff, 0xffff };
354 VECT_VAR_DECL(expected_q_u16_8,uint,16,8) [] = { 0xf1f0, 0xf3f2,
355 0xf5f4, 0xf7f6,
356 0xf9f8, 0xfbfa,
357 0xfdfc, 0xfffe };
358 VECT_VAR_DECL(expected_q_u16_9,uint,16,8) [] = { 0xfff0, 0xfff1,
359 0xfff2, 0xfff3,
360 0xfff4, 0xfff5,
361 0xfff6, 0xfff7 };
362 VECT_VAR_DECL(expected_q_u16_10,uint,16,8) [] = { 0xcc00, 0xcb80,
363 0xcb00, 0xca80,
364 0xca00, 0xc980,
365 0xc900, 0xc880 };
366
367 /* Expected results for vreinterpretq_u32_xx. */
368 VECT_VAR_DECL(expected_q_u32_1,uint,32,4) [] = { 0xf3f2f1f0, 0xf7f6f5f4,
369 0xfbfaf9f8, 0xfffefdfc };
370 VECT_VAR_DECL(expected_q_u32_2,uint,32,4) [] = { 0xfff1fff0, 0xfff3fff2,
371 0xfff5fff4, 0xfff7fff6 };
372 VECT_VAR_DECL(expected_q_u32_3,uint,32,4) [] = { 0xfffffff0, 0xfffffff1,
373 0xfffffff2, 0xfffffff3 };
374 VECT_VAR_DECL(expected_q_u32_4,uint,32,4) [] = { 0xfffffff0, 0xffffffff,
375 0xfffffff1, 0xffffffff };
376 VECT_VAR_DECL(expected_q_u32_5,uint,32,4) [] = { 0xf3f2f1f0, 0xf7f6f5f4,
377 0xfbfaf9f8, 0xfffefdfc };
378 VECT_VAR_DECL(expected_q_u32_6,uint,32,4) [] = { 0xfff1fff0, 0xfff3fff2,
379 0xfff5fff4, 0xfff7fff6 };
380 VECT_VAR_DECL(expected_q_u32_7,uint,32,4) [] = { 0xfffffff0, 0xffffffff,
381 0xfffffff1, 0xffffffff };
382 VECT_VAR_DECL(expected_q_u32_8,uint,32,4) [] = { 0xf3f2f1f0, 0xf7f6f5f4,
383 0xfbfaf9f8, 0xfffefdfc };
384 VECT_VAR_DECL(expected_q_u32_9,uint,32,4) [] = { 0xfff1fff0, 0xfff3fff2,
385 0xfff5fff4, 0xfff7fff6 };
386 VECT_VAR_DECL(expected_q_u32_10,uint,32,4) [] = { 0xcb80cc00, 0xca80cb00,
387 0xc980ca00, 0xc880c900 };
388
389 /* Expected results for vreinterpretq_u64_xx. */
390 VECT_VAR_DECL(expected_q_u64_1,uint,64,2) [] = { 0xf7f6f5f4f3f2f1f0,
391 0xfffefdfcfbfaf9f8 };
392 VECT_VAR_DECL(expected_q_u64_2,uint,64,2) [] = { 0xfff3fff2fff1fff0,
393 0xfff7fff6fff5fff4 };
394 VECT_VAR_DECL(expected_q_u64_3,uint,64,2) [] = { 0xfffffff1fffffff0,
395 0xfffffff3fffffff2 };
396 VECT_VAR_DECL(expected_q_u64_4,uint,64,2) [] = { 0xfffffffffffffff0,
397 0xfffffffffffffff1 };
398 VECT_VAR_DECL(expected_q_u64_5,uint,64,2) [] = { 0xf7f6f5f4f3f2f1f0,
399 0xfffefdfcfbfaf9f8 };
400 VECT_VAR_DECL(expected_q_u64_6,uint,64,2) [] = { 0xfff3fff2fff1fff0,
401 0xfff7fff6fff5fff4 };
402 VECT_VAR_DECL(expected_q_u64_7,uint,64,2) [] = { 0xfffffff1fffffff0,
403 0xfffffff3fffffff2 };
404 VECT_VAR_DECL(expected_q_u64_8,uint,64,2) [] = { 0xf7f6f5f4f3f2f1f0,
405 0xfffefdfcfbfaf9f8 };
406 VECT_VAR_DECL(expected_q_u64_9,uint,64,2) [] = { 0xfff3fff2fff1fff0,
407 0xfff7fff6fff5fff4 };
408 VECT_VAR_DECL(expected_q_u64_10,uint,64,2) [] = { 0xca80cb00cb80cc00,
409 0xc880c900c980ca00 };
410
411 /* Expected results for vreinterpretq_p8_xx. */
412 VECT_VAR_DECL(expected_q_p8_1,poly,8,16) [] = { 0xf0, 0xf1, 0xf2, 0xf3,
413 0xf4, 0xf5, 0xf6, 0xf7,
414 0xf8, 0xf9, 0xfa, 0xfb,
415 0xfc, 0xfd, 0xfe, 0xff };
416 VECT_VAR_DECL(expected_q_p8_2,poly,8,16) [] = { 0xf0, 0xff, 0xf1, 0xff,
417 0xf2, 0xff, 0xf3, 0xff,
418 0xf4, 0xff, 0xf5, 0xff,
419 0xf6, 0xff, 0xf7, 0xff };
420 VECT_VAR_DECL(expected_q_p8_3,poly,8,16) [] = { 0xf0, 0xff, 0xff, 0xff,
421 0xf1, 0xff, 0xff, 0xff,
422 0xf2, 0xff, 0xff, 0xff,
423 0xf3, 0xff, 0xff, 0xff };
424 VECT_VAR_DECL(expected_q_p8_4,poly,8,16) [] = { 0xf0, 0xff, 0xff, 0xff,
425 0xff, 0xff, 0xff, 0xff,
426 0xf1, 0xff, 0xff, 0xff,
427 0xff, 0xff, 0xff, 0xff };
428 VECT_VAR_DECL(expected_q_p8_5,poly,8,16) [] = { 0xf0, 0xf1, 0xf2, 0xf3,
429 0xf4, 0xf5, 0xf6, 0xf7,
430 0xf8, 0xf9, 0xfa, 0xfb,
431 0xfc, 0xfd, 0xfe, 0xff };
432 VECT_VAR_DECL(expected_q_p8_6,poly,8,16) [] = { 0xf0, 0xff, 0xf1, 0xff,
433 0xf2, 0xff, 0xf3, 0xff,
434 0xf4, 0xff, 0xf5, 0xff,
435 0xf6, 0xff, 0xf7, 0xff };
436 VECT_VAR_DECL(expected_q_p8_7,poly,8,16) [] = { 0xf0, 0xff, 0xff, 0xff,
437 0xf1, 0xff, 0xff, 0xff,
438 0xf2, 0xff, 0xff, 0xff,
439 0xf3, 0xff, 0xff, 0xff };
440 VECT_VAR_DECL(expected_q_p8_8,poly,8,16) [] = { 0xf0, 0xff, 0xff, 0xff,
441 0xff, 0xff, 0xff, 0xff,
442 0xf1, 0xff, 0xff, 0xff,
443 0xff, 0xff, 0xff, 0xff };
444 VECT_VAR_DECL(expected_q_p8_9,poly,8,16) [] = { 0xf0, 0xff, 0xf1, 0xff,
445 0xf2, 0xff, 0xf3, 0xff,
446 0xf4, 0xff, 0xf5, 0xff,
447 0xf6, 0xff, 0xf7, 0xff };
448 VECT_VAR_DECL(expected_q_p8_10,poly,8,16) [] = { 0x00, 0xcc, 0x80, 0xcb,
449 0x00, 0xcb, 0x80, 0xca,
450 0x00, 0xca, 0x80, 0xc9,
451 0x00, 0xc9, 0x80, 0xc8 };
452
453 /* Expected results for vreinterpretq_p16_xx. */
454 VECT_VAR_DECL(expected_q_p16_1,poly,16,8) [] = { 0xf1f0, 0xf3f2,
455 0xf5f4, 0xf7f6,
456 0xf9f8, 0xfbfa,
457 0xfdfc, 0xfffe };
458 VECT_VAR_DECL(expected_q_p16_2,poly,16,8) [] = { 0xfff0, 0xfff1,
459 0xfff2, 0xfff3,
460 0xfff4, 0xfff5,
461 0xfff6, 0xfff7 };
462 VECT_VAR_DECL(expected_q_p16_3,poly,16,8) [] = { 0xfff0, 0xffff,
463 0xfff1, 0xffff,
464 0xfff2, 0xffff,
465 0xfff3, 0xffff };
466 VECT_VAR_DECL(expected_q_p16_4,poly,16,8) [] = { 0xfff0, 0xffff,
467 0xffff, 0xffff,
468 0xfff1, 0xffff,
469 0xffff, 0xffff };
470 VECT_VAR_DECL(expected_q_p16_5,poly,16,8) [] = { 0xf1f0, 0xf3f2,
471 0xf5f4, 0xf7f6,
472 0xf9f8, 0xfbfa,
473 0xfdfc, 0xfffe };
474 VECT_VAR_DECL(expected_q_p16_6,poly,16,8) [] = { 0xfff0, 0xfff1,
475 0xfff2, 0xfff3,
476 0xfff4, 0xfff5,
477 0xfff6, 0xfff7 };
478 VECT_VAR_DECL(expected_q_p16_7,poly,16,8) [] = { 0xfff0, 0xffff,
479 0xfff1, 0xffff,
480 0xfff2, 0xffff,
481 0xfff3, 0xffff };
482 VECT_VAR_DECL(expected_q_p16_8,poly,16,8) [] = { 0xfff0, 0xffff,
483 0xffff, 0xffff,
484 0xfff1, 0xffff,
485 0xffff, 0xffff };
486 VECT_VAR_DECL(expected_q_p16_9,poly,16,8) [] = { 0xf1f0, 0xf3f2,
487 0xf5f4, 0xf7f6,
488 0xf9f8, 0xfbfa,
489 0xfdfc, 0xfffe };
490 VECT_VAR_DECL(expected_q_p16_10,poly,16,8) [] = { 0xcc00, 0xcb80,
491 0xcb00, 0xca80,
492 0xca00, 0xc980,
493 0xc900, 0xc880 };
494
495 /* Expected results for vreinterpret_f32_xx. */
496 VECT_VAR_DECL(expected_f32_1,hfloat,32,2) [] = { 0xf3f2f1f0, 0xf7f6f5f4 };
497 VECT_VAR_DECL(expected_f32_2,hfloat,32,2) [] = { 0xfff1fff0, 0xfff3fff2 };
498 VECT_VAR_DECL(expected_f32_3,hfloat,32,2) [] = { 0xfffffff0, 0xfffffff1 };
499 VECT_VAR_DECL(expected_f32_4,hfloat,32,2) [] = { 0xfffffff0, 0xffffffff };
500 VECT_VAR_DECL(expected_f32_5,hfloat,32,2) [] = { 0xf3f2f1f0, 0xf7f6f5f4 };
501 VECT_VAR_DECL(expected_f32_6,hfloat,32,2) [] = { 0xfff1fff0, 0xfff3fff2 };
502 VECT_VAR_DECL(expected_f32_7,hfloat,32,2) [] = { 0xfffffff0, 0xfffffff1 };
503 VECT_VAR_DECL(expected_f32_8,hfloat,32,2) [] = { 0xfffffff0, 0xffffffff };
504 VECT_VAR_DECL(expected_f32_9,hfloat,32,2) [] = { 0xf3f2f1f0, 0xf7f6f5f4 };
505 VECT_VAR_DECL(expected_f32_10,hfloat,32,2) [] = { 0xfff1fff0, 0xfff3fff2 };
506 VECT_VAR_DECL(expected_f32_11,hfloat,32,2) [] = { 0xcb80cc00, 0xca80cb00 };
507
508 /* Expected results for vreinterpretq_f32_xx. */
509 VECT_VAR_DECL(expected_q_f32_1,hfloat,32,4) [] = { 0xf3f2f1f0, 0xf7f6f5f4,
510 0xfbfaf9f8, 0xfffefdfc };
511 VECT_VAR_DECL(expected_q_f32_2,hfloat,32,4) [] = { 0xfff1fff0, 0xfff3fff2,
512 0xfff5fff4, 0xfff7fff6 };
513 VECT_VAR_DECL(expected_q_f32_3,hfloat,32,4) [] = { 0xfffffff0, 0xfffffff1,
514 0xfffffff2, 0xfffffff3 };
515 VECT_VAR_DECL(expected_q_f32_4,hfloat,32,4) [] = { 0xfffffff0, 0xffffffff,
516 0xfffffff1, 0xffffffff };
517 VECT_VAR_DECL(expected_q_f32_5,hfloat,32,4) [] = { 0xf3f2f1f0, 0xf7f6f5f4,
518 0xfbfaf9f8, 0xfffefdfc };
519 VECT_VAR_DECL(expected_q_f32_6,hfloat,32,4) [] = { 0xfff1fff0, 0xfff3fff2,
520 0xfff5fff4, 0xfff7fff6 };
521 VECT_VAR_DECL(expected_q_f32_7,hfloat,32,4) [] = { 0xfffffff0, 0xfffffff1,
522 0xfffffff2, 0xfffffff3 };
523 VECT_VAR_DECL(expected_q_f32_8,hfloat,32,4) [] = { 0xfffffff0, 0xffffffff,
524 0xfffffff1, 0xffffffff };
525 VECT_VAR_DECL(expected_q_f32_9,hfloat,32,4) [] = { 0xf3f2f1f0, 0xf7f6f5f4,
526 0xfbfaf9f8, 0xfffefdfc };
527 VECT_VAR_DECL(expected_q_f32_10,hfloat,32,4) [] = { 0xfff1fff0, 0xfff3fff2,
528 0xfff5fff4, 0xfff7fff6 };
529 VECT_VAR_DECL(expected_q_f32_11,hfloat,32,4) [] = { 0xcb80cc00, 0xca80cb00,
530 0xc980ca00, 0xc880c900 };
531
532 /* Expected results for vreinterpret_xx_f32. */
533 VECT_VAR_DECL(expected_xx_f32_1,int,8,8) [] = { 0x0, 0x0, 0x80, 0xc1,
534 0x0, 0x0, 0x70, 0xc1 };
535 VECT_VAR_DECL(expected_xx_f32_2,int,16,4) [] = { 0x0, 0xc180, 0x0, 0xc170 };
536 VECT_VAR_DECL(expected_xx_f32_3,int,32,2) [] = { 0xc1800000, 0xc1700000 };
537 VECT_VAR_DECL(expected_xx_f32_4,int,64,1) [] = { 0xc1700000c1800000 };
538 VECT_VAR_DECL(expected_xx_f32_5,uint,8,8) [] = { 0x0, 0x0, 0x80, 0xc1,
539 0x0, 0x0, 0x70, 0xc1 };
540 VECT_VAR_DECL(expected_xx_f32_6,uint,16,4) [] = { 0x0, 0xc180, 0x0, 0xc170 };
541 VECT_VAR_DECL(expected_xx_f32_7,uint,32,2) [] = { 0xc1800000, 0xc1700000 };
542 VECT_VAR_DECL(expected_xx_f32_8,uint,64,1) [] = { 0xc1700000c1800000 };
543 VECT_VAR_DECL(expected_xx_f32_9,poly,8,8) [] = { 0x0, 0x0, 0x80, 0xc1,
544 0x0, 0x0, 0x70, 0xc1 };
545 VECT_VAR_DECL(expected_xx_f32_10,poly,16,4) [] = { 0x0, 0xc180, 0x0, 0xc170 };
546 VECT_VAR_DECL(expected_xx_f32_11,hfloat,16,4) [] = { 0x0, 0xc180, 0x0, 0xc170 };
547
548 /* Expected results for vreinterpretq_xx_f32. */
549 VECT_VAR_DECL(expected_q_xx_f32_1,int,8,16) [] = { 0x0, 0x0, 0x80, 0xc1,
550 0x0, 0x0, 0x70, 0xc1,
551 0x0, 0x0, 0x60, 0xc1,
552 0x0, 0x0, 0x50, 0xc1 };
553 VECT_VAR_DECL(expected_q_xx_f32_2,int,16,8) [] = { 0x0, 0xc180, 0x0, 0xc170,
554 0x0, 0xc160, 0x0, 0xc150 };
555 VECT_VAR_DECL(expected_q_xx_f32_3,int,32,4) [] = { 0xc1800000, 0xc1700000,
556 0xc1600000, 0xc1500000 };
557 VECT_VAR_DECL(expected_q_xx_f32_4,int,64,2) [] = { 0xc1700000c1800000,
558 0xc1500000c1600000 };
559 VECT_VAR_DECL(expected_q_xx_f32_5,uint,8,16) [] = { 0x0, 0x0, 0x80, 0xc1,
560 0x0, 0x0, 0x70, 0xc1,
561 0x0, 0x0, 0x60, 0xc1,
562 0x0, 0x0, 0x50, 0xc1 };
563 VECT_VAR_DECL(expected_q_xx_f32_6,uint,16,8) [] = { 0x0, 0xc180, 0x0, 0xc170,
564 0x0, 0xc160, 0x0, 0xc150 };
565 VECT_VAR_DECL(expected_q_xx_f32_7,uint,32,4) [] = { 0xc1800000, 0xc1700000,
566 0xc1600000, 0xc1500000 };
567 VECT_VAR_DECL(expected_q_xx_f32_8,uint,64,2) [] = { 0xc1700000c1800000,
568 0xc1500000c1600000 };
569 VECT_VAR_DECL(expected_q_xx_f32_9,poly,8,16) [] = { 0x0, 0x0, 0x80, 0xc1,
570 0x0, 0x0, 0x70, 0xc1,
571 0x0, 0x0, 0x60, 0xc1,
572 0x0, 0x0, 0x50, 0xc1 };
573 VECT_VAR_DECL(expected_q_xx_f32_10,poly,16,8) [] = { 0x0, 0xc180, 0x0, 0xc170,
574 0x0, 0xc160, 0x0, 0xc150 };
575 VECT_VAR_DECL(expected_q_xx_f32_11,hfloat,16,8) [] = { 0x0, 0xc180, 0x0, 0xc170,
576 0x0, 0xc160, 0x0, 0xc150 };
577
578 /* Expected results for vreinterpret_f16_xx. */
579 VECT_VAR_DECL(expected_f16_1,hfloat,16,4) [] = { 0xf1f0, 0xf3f2, 0xf5f4, 0xf7f6 };
580 VECT_VAR_DECL(expected_f16_2,hfloat,16,4) [] = { 0xfff0, 0xfff1, 0xfff2, 0xfff3 };
581 VECT_VAR_DECL(expected_f16_3,hfloat,16,4) [] = { 0xfff0, 0xffff, 0xfff1, 0xffff };
582 VECT_VAR_DECL(expected_f16_4,hfloat,16,4) [] = { 0xfff0, 0xffff, 0xffff, 0xffff };
583 VECT_VAR_DECL(expected_f16_5,hfloat,16,4) [] = { 0xf1f0, 0xf3f2, 0xf5f4, 0xf7f6 };
584 VECT_VAR_DECL(expected_f16_6,hfloat,16,4) [] = { 0xfff0, 0xfff1, 0xfff2, 0xfff3 };
585 VECT_VAR_DECL(expected_f16_7,hfloat,16,4) [] = { 0xfff0, 0xffff, 0xfff1, 0xffff };
586 VECT_VAR_DECL(expected_f16_8,hfloat,16,4) [] = { 0xfff0, 0xffff, 0xffff, 0xffff };
587 VECT_VAR_DECL(expected_f16_9,hfloat,16,4) [] = { 0xf1f0, 0xf3f2, 0xf5f4, 0xf7f6 };
588 VECT_VAR_DECL(expected_f16_10,hfloat,16,4) [] = { 0xfff0, 0xfff1, 0xfff2, 0xfff3 };
589
590 /* Expected results for vreinterpretq_f16_xx. */
591 VECT_VAR_DECL(expected_q_f16_1,hfloat,16,8) [] = { 0xf1f0, 0xf3f2,
592 0xf5f4, 0xf7f6,
593 0xf9f8, 0xfbfa,
594 0xfdfc, 0xfffe };
595 VECT_VAR_DECL(expected_q_f16_2,hfloat,16,8) [] = { 0xfff0, 0xfff1,
596 0xfff2, 0xfff3,
597 0xfff4, 0xfff5,
598 0xfff6, 0xfff7 };
599 VECT_VAR_DECL(expected_q_f16_3,hfloat,16,8) [] = { 0xfff0, 0xffff,
600 0xfff1, 0xffff,
601 0xfff2, 0xffff,
602 0xfff3, 0xffff };
603 VECT_VAR_DECL(expected_q_f16_4,hfloat,16,8) [] = { 0xfff0, 0xffff,
604 0xffff, 0xffff,
605 0xfff1, 0xffff,
606 0xffff, 0xffff };
607 VECT_VAR_DECL(expected_q_f16_5,hfloat,16,8) [] = { 0xf1f0, 0xf3f2,
608 0xf5f4, 0xf7f6,
609 0xf9f8, 0xfbfa,
610 0xfdfc, 0xfffe };
611 VECT_VAR_DECL(expected_q_f16_6,hfloat,16,8) [] = { 0xfff0, 0xfff1,
612 0xfff2, 0xfff3,
613 0xfff4, 0xfff5,
614 0xfff6, 0xfff7 };
615 VECT_VAR_DECL(expected_q_f16_7,hfloat,16,8) [] = { 0xfff0, 0xffff,
616 0xfff1, 0xffff,
617 0xfff2, 0xffff,
618 0xfff3, 0xffff };
619 VECT_VAR_DECL(expected_q_f16_8,hfloat,16,8) [] = { 0xfff0, 0xffff,
620 0xffff, 0xffff,
621 0xfff1, 0xffff,
622 0xffff, 0xffff };
623 VECT_VAR_DECL(expected_q_f16_9,hfloat,16,8) [] = { 0xf1f0, 0xf3f2,
624 0xf5f4, 0xf7f6,
625 0xf9f8, 0xfbfa,
626 0xfdfc, 0xfffe };
627 VECT_VAR_DECL(expected_q_f16_10,hfloat,16,8) [] = { 0xfff0, 0xfff1,
628 0xfff2, 0xfff3,
629 0xfff4, 0xfff5,
630 0xfff6, 0xfff7 };
631
632 #define TEST_MSG "VREINTERPRET/VREINTERPRETQ"
633
exec_vreinterpret(void)634 void exec_vreinterpret (void)
635 {
636 int i;
637
638 /* Basic test: y=vreinterpret(x), then store the result. */
639 #define TEST_VREINTERPRET(Q, T1, T2, W, N, TS1, TS2, WS, NS, EXPECTED) \
640 VECT_VAR(vector_res, T1, W, N) = \
641 vreinterpret##Q##_##T2##W##_##TS2##WS(VECT_VAR(vector, TS1, WS, NS)); \
642 vst1##Q##_##T2##W(VECT_VAR(result, T1, W, N), \
643 VECT_VAR(vector_res, T1, W, N)); \
644 CHECK(TEST_MSG, T1, W, N, PRIx##W, EXPECTED, "");
645
646 #define TEST_VREINTERPRET_POLY(Q, T1, T2, W, N, TS1, TS2, WS, NS, EXPECTED) \
647 VECT_VAR(vector_res, T1, W, N) = \
648 vreinterpret##Q##_##T2##W##_##TS2##WS(VECT_VAR(vector, TS1, WS, NS)); \
649 vst1##Q##_##T2##W(VECT_VAR(result, T1, W, N), \
650 VECT_VAR(vector_res, T1, W, N)); \
651 CHECK(TEST_MSG, T1, W, N, PRIx##W, EXPECTED, "");
652
653 #define TEST_VREINTERPRET_FP(Q, T1, T2, W, N, TS1, TS2, WS, NS, EXPECTED) \
654 VECT_VAR(vector_res, T1, W, N) = \
655 vreinterpret##Q##_##T2##W##_##TS2##WS(VECT_VAR(vector, TS1, WS, NS)); \
656 vst1##Q##_##T2##W(VECT_VAR(result, T1, W, N), \
657 VECT_VAR(vector_res, T1, W, N)); \
658 CHECK_FP(TEST_MSG, T1, W, N, PRIx##W, EXPECTED, "");
659
660 DECL_VARIABLE_ALL_VARIANTS(vector);
661 DECL_VARIABLE_ALL_VARIANTS(vector_res);
662
663 clean_results ();
664
665
666 /* Initialize input "vector" from "buffer". */
667 TEST_MACRO_ALL_VARIANTS_2_5(VLOAD, vector, buffer);
668 #if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE)
669 VLOAD(vector, buffer, , float, f, 16, 4);
670 VLOAD(vector, buffer, q, float, f, 16, 8);
671 #endif
672 VLOAD(vector, buffer, , float, f, 32, 2);
673 VLOAD(vector, buffer, q, float, f, 32, 4);
674
675 /* vreinterpret_s8_xx. */
676 TEST_VREINTERPRET(, int, s, 8, 8, int, s, 16, 4, expected_s8_1);
677 TEST_VREINTERPRET(, int, s, 8, 8, int, s, 32, 2, expected_s8_2);
678 TEST_VREINTERPRET(, int, s, 8, 8, int, s, 64, 1, expected_s8_3);
679 TEST_VREINTERPRET(, int, s, 8, 8, uint, u, 8, 8, expected_s8_4);
680 TEST_VREINTERPRET(, int, s, 8, 8, uint, u, 16, 4, expected_s8_5);
681 TEST_VREINTERPRET(, int, s, 8, 8, uint, u, 32, 2, expected_s8_6);
682 TEST_VREINTERPRET(, int, s, 8, 8, uint, u, 64, 1, expected_s8_7);
683 TEST_VREINTERPRET(, int, s, 8, 8, poly, p, 8, 8, expected_s8_8);
684 TEST_VREINTERPRET(, int, s, 8, 8, poly, p, 16, 4, expected_s8_9);
685 #if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE)
686 TEST_VREINTERPRET(, int, s, 8, 8, float, f, 16, 4, expected_s8_10);
687 #endif
688
689 /* vreinterpret_s16_xx. */
690 TEST_VREINTERPRET(, int, s, 16, 4, int, s, 8, 8, expected_s16_1);
691 TEST_VREINTERPRET(, int, s, 16, 4, int, s, 32, 2, expected_s16_2);
692 TEST_VREINTERPRET(, int, s, 16, 4, int, s, 64, 1, expected_s16_3);
693 TEST_VREINTERPRET(, int, s, 16, 4, uint, u, 8, 8, expected_s16_4);
694 TEST_VREINTERPRET(, int, s, 16, 4, uint, u, 16, 4, expected_s16_5);
695 TEST_VREINTERPRET(, int, s, 16, 4, uint, u, 32, 2, expected_s16_6);
696 TEST_VREINTERPRET(, int, s, 16, 4, uint, u, 64, 1, expected_s16_7);
697 TEST_VREINTERPRET(, int, s, 16, 4, poly, p, 8, 8, expected_s16_8);
698 TEST_VREINTERPRET(, int, s, 16, 4, poly, p, 16, 4, expected_s16_9);
699 #if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE)
700 TEST_VREINTERPRET(, int, s, 16, 4, float, f, 16, 4, expected_s16_10);
701 #endif
702
703 /* vreinterpret_s32_xx. */
704 TEST_VREINTERPRET(, int, s, 32, 2, int, s, 8, 8, expected_s32_1);
705 TEST_VREINTERPRET(, int, s, 32, 2, int, s, 16, 4, expected_s32_2);
706 TEST_VREINTERPRET(, int, s, 32, 2, int, s, 64, 1, expected_s32_3);
707 TEST_VREINTERPRET(, int, s, 32, 2, uint, u, 8, 8, expected_s32_4);
708 TEST_VREINTERPRET(, int, s, 32, 2, uint, u, 16, 4, expected_s32_5);
709 TEST_VREINTERPRET(, int, s, 32, 2, uint, u, 32, 2, expected_s32_6);
710 TEST_VREINTERPRET(, int, s, 32, 2, uint, u, 64, 1, expected_s32_7);
711 TEST_VREINTERPRET(, int, s, 32, 2, poly, p, 8, 8, expected_s32_8);
712 TEST_VREINTERPRET(, int, s, 32, 2, poly, p, 16, 4, expected_s32_9);
713 #if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE)
714 TEST_VREINTERPRET(, int, s, 32, 2, float, f, 16, 4, expected_s32_10);
715 #endif
716
717 /* vreinterpret_s64_xx. */
718 TEST_VREINTERPRET(, int, s, 64, 1, int, s, 8, 8, expected_s64_1);
719 TEST_VREINTERPRET(, int, s, 64, 1, int, s, 16, 4, expected_s64_2);
720 TEST_VREINTERPRET(, int, s, 64, 1, int, s, 32, 2, expected_s64_3);
721 TEST_VREINTERPRET(, int, s, 64, 1, uint, u, 8, 8, expected_s64_4);
722 TEST_VREINTERPRET(, int, s, 64, 1, uint, u, 16, 4, expected_s64_5);
723 TEST_VREINTERPRET(, int, s, 64, 1, uint, u, 32, 2, expected_s64_6);
724 TEST_VREINTERPRET(, int, s, 64, 1, uint, u, 64, 1, expected_s64_7);
725 TEST_VREINTERPRET(, int, s, 64, 1, poly, p, 8, 8, expected_s64_8);
726 TEST_VREINTERPRET(, int, s, 64, 1, poly, p, 16, 4, expected_s64_9);
727 #if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE)
728 TEST_VREINTERPRET(, int, s, 64, 1, float, f, 16, 4, expected_s64_10);
729 #endif
730
731 /* vreinterpret_u8_xx. */
732 TEST_VREINTERPRET(, uint, u, 8, 8, int, s, 8, 8, expected_u8_1);
733 TEST_VREINTERPRET(, uint, u, 8, 8, int, s, 16, 4, expected_u8_2);
734 TEST_VREINTERPRET(, uint, u, 8, 8, int, s, 32, 2, expected_u8_3);
735 TEST_VREINTERPRET(, uint, u, 8, 8, int, s, 64, 1, expected_u8_4);
736 TEST_VREINTERPRET(, uint, u, 8, 8, uint, u, 16, 4, expected_u8_5);
737 TEST_VREINTERPRET(, uint, u, 8, 8, uint, u, 32, 2, expected_u8_6);
738 TEST_VREINTERPRET(, uint, u, 8, 8, uint, u, 64, 1, expected_u8_7);
739 TEST_VREINTERPRET(, uint, u, 8, 8, poly, p, 8, 8, expected_u8_8);
740 TEST_VREINTERPRET(, uint, u, 8, 8, poly, p, 16, 4, expected_u8_9);
741 #if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE)
742 TEST_VREINTERPRET(, uint, u, 8, 8, float, f, 16, 4, expected_u8_10);
743 #endif
744
745 /* vreinterpret_u16_xx. */
746 TEST_VREINTERPRET(, uint, u, 16, 4, int, s, 8, 8, expected_u16_1);
747 TEST_VREINTERPRET(, uint, u, 16, 4, int, s, 16, 4, expected_u16_2);
748 TEST_VREINTERPRET(, uint, u, 16, 4, int, s, 32, 2, expected_u16_3);
749 TEST_VREINTERPRET(, uint, u, 16, 4, int, s, 64, 1, expected_u16_4);
750 TEST_VREINTERPRET(, uint, u, 16, 4, uint, u, 8, 8, expected_u16_5);
751 TEST_VREINTERPRET(, uint, u, 16, 4, uint, u, 32, 2, expected_u16_6);
752 TEST_VREINTERPRET(, uint, u, 16, 4, uint, u, 64, 1, expected_u16_7);
753 TEST_VREINTERPRET(, uint, u, 16, 4, poly, p, 8, 8, expected_u16_8);
754 TEST_VREINTERPRET(, uint, u, 16, 4, poly, p, 16, 4, expected_u16_9);
755 #if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE)
756 TEST_VREINTERPRET(, uint, u, 16, 4, float, f, 16, 4, expected_u16_10);
757 #endif
758
759 /* vreinterpret_u32_xx. */
760 TEST_VREINTERPRET(, uint, u, 32, 2, int, s, 8, 8, expected_u32_1);
761 TEST_VREINTERPRET(, uint, u, 32, 2, int, s, 16, 4, expected_u32_2);
762 TEST_VREINTERPRET(, uint, u, 32, 2, int, s, 32, 2, expected_u32_3);
763 TEST_VREINTERPRET(, uint, u, 32, 2, int, s, 64, 1, expected_u32_4);
764 TEST_VREINTERPRET(, uint, u, 32, 2, uint, u, 8, 8, expected_u32_5);
765 TEST_VREINTERPRET(, uint, u, 32, 2, uint, u, 16, 4, expected_u32_6);
766 TEST_VREINTERPRET(, uint, u, 32, 2, uint, u, 64, 1, expected_u32_7);
767 TEST_VREINTERPRET(, uint, u, 32, 2, poly, p, 8, 8, expected_u32_8);
768 TEST_VREINTERPRET(, uint, u, 32, 2, poly, p, 16, 4, expected_u32_9);
769 #if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE)
770 TEST_VREINTERPRET(, uint, u, 32, 2, float, f, 16, 4, expected_u32_10);
771 #endif
772
773 /* vreinterpret_u64_xx. */
774 TEST_VREINTERPRET(, uint, u, 64, 1, int, s, 8, 8, expected_u64_1);
775 TEST_VREINTERPRET(, uint, u, 64, 1, int, s, 16, 4, expected_u64_2);
776 TEST_VREINTERPRET(, uint, u, 64, 1, int, s, 32, 2, expected_u64_3);
777 TEST_VREINTERPRET(, uint, u, 64, 1, int, s, 64, 1, expected_u64_4);
778 TEST_VREINTERPRET(, uint, u, 64, 1, uint, u, 8, 8, expected_u64_5);
779 TEST_VREINTERPRET(, uint, u, 64, 1, uint, u, 16, 4, expected_u64_6);
780 TEST_VREINTERPRET(, uint, u, 64, 1, uint, u, 32, 2, expected_u64_7);
781 TEST_VREINTERPRET(, uint, u, 64, 1, poly, p, 8, 8, expected_u64_8);
782 TEST_VREINTERPRET(, uint, u, 64, 1, poly, p, 16, 4, expected_u64_9);
783 #if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE)
784 TEST_VREINTERPRET(, uint, u, 64, 1, float, f, 16, 4, expected_u64_10);
785 #endif
786
787 /* vreinterpret_p8_xx. */
788 TEST_VREINTERPRET_POLY(, poly, p, 8, 8, int, s, 8, 8, expected_p8_1);
789 TEST_VREINTERPRET_POLY(, poly, p, 8, 8, int, s, 16, 4, expected_p8_2);
790 TEST_VREINTERPRET_POLY(, poly, p, 8, 8, int, s, 32, 2, expected_p8_3);
791 TEST_VREINTERPRET_POLY(, poly, p, 8, 8, int, s, 64, 1, expected_p8_4);
792 TEST_VREINTERPRET_POLY(, poly, p, 8, 8, uint, u, 8, 8, expected_p8_5);
793 TEST_VREINTERPRET_POLY(, poly, p, 8, 8, uint, u, 16, 4, expected_p8_6);
794 TEST_VREINTERPRET_POLY(, poly, p, 8, 8, uint, u, 32, 2, expected_p8_7);
795 TEST_VREINTERPRET_POLY(, poly, p, 8, 8, uint, u, 64, 1, expected_p8_8);
796 TEST_VREINTERPRET_POLY(, poly, p, 8, 8, poly, p, 16, 4, expected_p8_9);
797 #if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE)
798 TEST_VREINTERPRET_POLY(, poly, p, 8, 8, float, f, 16, 4, expected_p8_10);
799 #endif
800
801 /* vreinterpret_p16_xx. */
802 TEST_VREINTERPRET_POLY(, poly, p, 16, 4, int, s, 8, 8, expected_p16_1);
803 TEST_VREINTERPRET_POLY(, poly, p, 16, 4, int, s, 16, 4, expected_p16_2);
804 TEST_VREINTERPRET_POLY(, poly, p, 16, 4, int, s, 32, 2, expected_p16_3);
805 TEST_VREINTERPRET_POLY(, poly, p, 16, 4, int, s, 64, 1, expected_p16_4);
806 TEST_VREINTERPRET_POLY(, poly, p, 16, 4, uint, u, 8, 8, expected_p16_5);
807 TEST_VREINTERPRET_POLY(, poly, p, 16, 4, uint, u, 16, 4, expected_p16_6);
808 TEST_VREINTERPRET_POLY(, poly, p, 16, 4, uint, u, 32, 2, expected_p16_7);
809 TEST_VREINTERPRET_POLY(, poly, p, 16, 4, uint, u, 64, 1, expected_p16_8);
810 TEST_VREINTERPRET_POLY(, poly, p, 16, 4, poly, p, 8, 8, expected_p16_9);
811 #if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE)
812 TEST_VREINTERPRET_POLY(, poly, p, 16, 4, float, f, 16, 4, expected_p16_10);
813 #endif
814
815 /* vreinterpretq_s8_xx. */
816 TEST_VREINTERPRET(q, int, s, 8, 16, int, s, 16, 8, expected_q_s8_1);
817 TEST_VREINTERPRET(q, int, s, 8, 16, int, s, 32, 4, expected_q_s8_2);
818 TEST_VREINTERPRET(q, int, s, 8, 16, int, s, 64, 2, expected_q_s8_3);
819 TEST_VREINTERPRET(q, int, s, 8, 16, uint, u, 8, 16, expected_q_s8_4);
820 TEST_VREINTERPRET(q, int, s, 8, 16, uint, u, 16, 8, expected_q_s8_5);
821 TEST_VREINTERPRET(q, int, s, 8, 16, uint, u, 32, 4, expected_q_s8_6);
822 TEST_VREINTERPRET(q, int, s, 8, 16, uint, u, 64, 2, expected_q_s8_7);
823 TEST_VREINTERPRET(q, int, s, 8, 16, poly, p, 8, 16, expected_q_s8_8);
824 TEST_VREINTERPRET(q, int, s, 8, 16, poly, p, 16, 8, expected_q_s8_9);
825 #if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE)
826 TEST_VREINTERPRET(q, int, s, 8, 16, float, f, 16, 8, expected_q_s8_10);
827 #endif
828
829 /* vreinterpretq_s16_xx. */
830 TEST_VREINTERPRET(q, int, s, 16, 8, int, s, 8, 16, expected_q_s16_1);
831 TEST_VREINTERPRET(q, int, s, 16, 8, int, s, 32, 4, expected_q_s16_2);
832 TEST_VREINTERPRET(q, int, s, 16, 8, int, s, 64, 2, expected_q_s16_3);
833 TEST_VREINTERPRET(q, int, s, 16, 8, uint, u, 8, 16, expected_q_s16_4);
834 TEST_VREINTERPRET(q, int, s, 16, 8, uint, u, 16, 8, expected_q_s16_5);
835 TEST_VREINTERPRET(q, int, s, 16, 8, uint, u, 32, 4, expected_q_s16_6);
836 TEST_VREINTERPRET(q, int, s, 16, 8, uint, u, 64, 2, expected_q_s16_7);
837 TEST_VREINTERPRET(q, int, s, 16, 8, poly, p, 8, 16, expected_q_s16_8);
838 TEST_VREINTERPRET(q, int, s, 16, 8, poly, p, 16, 8, expected_q_s16_9);
839 #if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE)
840 TEST_VREINTERPRET(q, int, s, 16, 8, float, f, 16, 8, expected_q_s16_10);
841 #endif
842
843 /* vreinterpretq_s32_xx. */
844 TEST_VREINTERPRET(q, int, s, 32, 4, int, s, 8, 16, expected_q_s32_1);
845 TEST_VREINTERPRET(q, int, s, 32, 4, int, s, 16, 8, expected_q_s32_2);
846 TEST_VREINTERPRET(q, int, s, 32, 4, int, s, 64, 2, expected_q_s32_3);
847 TEST_VREINTERPRET(q, int, s, 32, 4, uint, u, 8, 16, expected_q_s32_4);
848 TEST_VREINTERPRET(q, int, s, 32, 4, uint, u, 16, 8, expected_q_s32_5);
849 TEST_VREINTERPRET(q, int, s, 32, 4, uint, u, 32, 4, expected_q_s32_6);
850 TEST_VREINTERPRET(q, int, s, 32, 4, uint, u, 64, 2, expected_q_s32_7);
851 TEST_VREINTERPRET(q, int, s, 32, 4, poly, p, 8, 16, expected_q_s32_8);
852 TEST_VREINTERPRET(q, int, s, 32, 4, poly, p, 16, 8, expected_q_s32_9);
853 #if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE)
854 TEST_VREINTERPRET(q, int, s, 32, 4, float, f, 16, 8, expected_q_s32_10);
855 #endif
856
857 /* vreinterpretq_s64_xx. */
858 TEST_VREINTERPRET(q, int, s, 64, 2, int, s, 8, 16, expected_q_s64_1);
859 TEST_VREINTERPRET(q, int, s, 64, 2, int, s, 16, 8, expected_q_s64_2);
860 TEST_VREINTERPRET(q, int, s, 64, 2, int, s, 32, 4, expected_q_s64_3);
861 TEST_VREINTERPRET(q, int, s, 64, 2, uint, u, 8, 16, expected_q_s64_4);
862 TEST_VREINTERPRET(q, int, s, 64, 2, uint, u, 16, 8, expected_q_s64_5);
863 TEST_VREINTERPRET(q, int, s, 64, 2, uint, u, 32, 4, expected_q_s64_6);
864 TEST_VREINTERPRET(q, int, s, 64, 2, uint, u, 64, 2, expected_q_s64_7);
865 TEST_VREINTERPRET(q, int, s, 64, 2, poly, p, 8, 16, expected_q_s64_8);
866 TEST_VREINTERPRET(q, int, s, 64, 2, poly, p, 16, 8, expected_q_s64_9);
867 #if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE)
868 TEST_VREINTERPRET(q, int, s, 64, 2, float, f, 16, 8, expected_q_s64_10);
869 #endif
870
871 /* vreinterpretq_u8_xx. */
872 TEST_VREINTERPRET(q, uint, u, 8, 16, int, s, 8, 16, expected_q_u8_1);
873 TEST_VREINTERPRET(q, uint, u, 8, 16, int, s, 16, 8, expected_q_u8_2);
874 TEST_VREINTERPRET(q, uint, u, 8, 16, int, s, 32, 4, expected_q_u8_3);
875 TEST_VREINTERPRET(q, uint, u, 8, 16, int, s, 64, 2, expected_q_u8_4);
876 TEST_VREINTERPRET(q, uint, u, 8, 16, uint, u, 16, 8, expected_q_u8_5);
877 TEST_VREINTERPRET(q, uint, u, 8, 16, uint, u, 32, 4, expected_q_u8_6);
878 TEST_VREINTERPRET(q, uint, u, 8, 16, uint, u, 64, 2, expected_q_u8_7);
879 TEST_VREINTERPRET(q, uint, u, 8, 16, poly, p, 8, 16, expected_q_u8_8);
880 TEST_VREINTERPRET(q, uint, u, 8, 16, poly, p, 16, 8, expected_q_u8_9);
881 #if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE)
882 TEST_VREINTERPRET(q, uint, u, 8, 16, float, f, 16, 8, expected_q_u8_10);
883 #endif
884
885 /* vreinterpretq_u16_xx. */
886 TEST_VREINTERPRET(q, uint, u, 16, 8, int, s, 8, 16, expected_q_u16_1);
887 TEST_VREINTERPRET(q, uint, u, 16, 8, int, s, 16, 8, expected_q_u16_2);
888 TEST_VREINTERPRET(q, uint, u, 16, 8, int, s, 32, 4, expected_q_u16_3);
889 TEST_VREINTERPRET(q, uint, u, 16, 8, int, s, 64, 2, expected_q_u16_4);
890 TEST_VREINTERPRET(q, uint, u, 16, 8, uint, u, 8, 16, expected_q_u16_5);
891 TEST_VREINTERPRET(q, uint, u, 16, 8, uint, u, 32, 4, expected_q_u16_6);
892 TEST_VREINTERPRET(q, uint, u, 16, 8, uint, u, 64, 2, expected_q_u16_7);
893 TEST_VREINTERPRET(q, uint, u, 16, 8, poly, p, 8, 16, expected_q_u16_8);
894 TEST_VREINTERPRET(q, uint, u, 16, 8, poly, p, 16, 8, expected_q_u16_9);
895 #if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE)
896 TEST_VREINTERPRET(q, uint, u, 16, 8, float, f, 16, 8, expected_q_u16_10);
897 #endif
898
899 /* vreinterpretq_u32_xx. */
900 TEST_VREINTERPRET(q, uint, u, 32, 4, int, s, 8, 16, expected_q_u32_1);
901 TEST_VREINTERPRET(q, uint, u, 32, 4, int, s, 16, 8, expected_q_u32_2);
902 TEST_VREINTERPRET(q, uint, u, 32, 4, int, s, 32, 4, expected_q_u32_3);
903 TEST_VREINTERPRET(q, uint, u, 32, 4, int, s, 64, 2, expected_q_u32_4);
904 TEST_VREINTERPRET(q, uint, u, 32, 4, uint, u, 8, 16, expected_q_u32_5);
905 TEST_VREINTERPRET(q, uint, u, 32, 4, uint, u, 16, 8, expected_q_u32_6);
906 TEST_VREINTERPRET(q, uint, u, 32, 4, uint, u, 64, 2, expected_q_u32_7);
907 TEST_VREINTERPRET(q, uint, u, 32, 4, poly, p, 8, 16, expected_q_u32_8);
908 TEST_VREINTERPRET(q, uint, u, 32, 4, poly, p, 16, 8, expected_q_u32_9);
909 #if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE)
910 TEST_VREINTERPRET(q, uint, u, 32, 4, float, f, 16, 8, expected_q_u32_10);
911 #endif
912
913 /* vreinterpretq_u64_xx. */
914 TEST_VREINTERPRET(q, uint, u, 64, 2, int, s, 8, 16, expected_q_u64_1);
915 TEST_VREINTERPRET(q, uint, u, 64, 2, int, s, 16, 8, expected_q_u64_2);
916 TEST_VREINTERPRET(q, uint, u, 64, 2, int, s, 32, 4, expected_q_u64_3);
917 TEST_VREINTERPRET(q, uint, u, 64, 2, int, s, 64, 2, expected_q_u64_4);
918 TEST_VREINTERPRET(q, uint, u, 64, 2, uint, u, 8, 16, expected_q_u64_5);
919 TEST_VREINTERPRET(q, uint, u, 64, 2, uint, u, 16, 8, expected_q_u64_6);
920 TEST_VREINTERPRET(q, uint, u, 64, 2, uint, u, 32, 4, expected_q_u64_7);
921 TEST_VREINTERPRET(q, uint, u, 64, 2, poly, p, 8, 16, expected_q_u64_8);
922 TEST_VREINTERPRET(q, uint, u, 64, 2, poly, p, 16, 8, expected_q_u64_9);
923 #if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE)
924 TEST_VREINTERPRET(q, uint, u, 64, 2, float, f, 16, 8, expected_q_u64_10);
925 #endif
926
927 /* vreinterpretq_p8_xx. */
928 TEST_VREINTERPRET_POLY(q, poly, p, 8, 16, int, s, 8, 16, expected_q_p8_1);
929 TEST_VREINTERPRET_POLY(q, poly, p, 8, 16, int, s, 16, 8, expected_q_p8_2);
930 TEST_VREINTERPRET_POLY(q, poly, p, 8, 16, int, s, 32, 4, expected_q_p8_3);
931 TEST_VREINTERPRET_POLY(q, poly, p, 8, 16, int, s, 64, 2, expected_q_p8_4);
932 TEST_VREINTERPRET_POLY(q, poly, p, 8, 16, uint, u, 8, 16, expected_q_p8_5);
933 TEST_VREINTERPRET_POLY(q, poly, p, 8, 16, uint, u, 16, 8, expected_q_p8_6);
934 TEST_VREINTERPRET_POLY(q, poly, p, 8, 16, uint, u, 32, 4, expected_q_p8_7);
935 TEST_VREINTERPRET_POLY(q, poly, p, 8, 16, uint, u, 64, 2, expected_q_p8_8);
936 TEST_VREINTERPRET_POLY(q, poly, p, 8, 16, poly, p, 16, 8, expected_q_p8_9);
937 #if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE)
938 TEST_VREINTERPRET_POLY(q, poly, p, 8, 16, float, f, 16, 8, expected_q_p8_10);
939 #endif
940
941 /* vreinterpretq_p16_xx. */
942 TEST_VREINTERPRET_POLY(q, poly, p, 16, 8, int, s, 8, 16, expected_q_p16_1);
943 TEST_VREINTERPRET_POLY(q, poly, p, 16, 8, int, s, 16, 8, expected_q_p16_2);
944 TEST_VREINTERPRET_POLY(q, poly, p, 16, 8, int, s, 32, 4, expected_q_p16_3);
945 TEST_VREINTERPRET_POLY(q, poly, p, 16, 8, int, s, 64, 2, expected_q_p16_4);
946 TEST_VREINTERPRET_POLY(q, poly, p, 16, 8, uint, u, 8, 16, expected_q_p16_5);
947 TEST_VREINTERPRET_POLY(q, poly, p, 16, 8, uint, u, 16, 8, expected_q_p16_6);
948 TEST_VREINTERPRET_POLY(q, poly, p, 16, 8, uint, u, 32, 4, expected_q_p16_7);
949 TEST_VREINTERPRET_POLY(q, poly, p, 16, 8, uint, u, 64, 2, expected_q_p16_8);
950 TEST_VREINTERPRET_POLY(q, poly, p, 16, 8, poly, p, 8, 16, expected_q_p16_9);
951 #if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE)
952 TEST_VREINTERPRET_POLY(q, poly, p, 16, 8, float, f, 16, 8, expected_q_p16_10);
953 #endif
954
955 /* vreinterpret_f32_xx. */
956 TEST_VREINTERPRET_FP(, float, f, 32, 2, int, s, 8, 8, expected_f32_1);
957 TEST_VREINTERPRET_FP(, float, f, 32, 2, int, s, 16, 4, expected_f32_2);
958 TEST_VREINTERPRET_FP(, float, f, 32, 2, int, s, 32, 2, expected_f32_3);
959 TEST_VREINTERPRET_FP(, float, f, 32, 2, int, s, 64, 1, expected_f32_4);
960 TEST_VREINTERPRET_FP(, float, f, 32, 2, uint, u, 8, 8, expected_f32_5);
961 TEST_VREINTERPRET_FP(, float, f, 32, 2, uint, u, 16, 4, expected_f32_6);
962 TEST_VREINTERPRET_FP(, float, f, 32, 2, uint, u, 32, 2, expected_f32_7);
963 TEST_VREINTERPRET_FP(, float, f, 32, 2, uint, u, 64, 1, expected_f32_8);
964 TEST_VREINTERPRET_FP(, float, f, 32, 2, poly, p, 8, 8, expected_f32_9);
965 TEST_VREINTERPRET_FP(, float, f, 32, 2, poly, p, 16, 4, expected_f32_10);
966 #if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE)
967 TEST_VREINTERPRET_FP(, float, f, 32, 2, float, f, 16, 4, expected_f32_11);
968 #endif
969
970 /* vreinterpretq_f32_xx. */
971 TEST_VREINTERPRET_FP(q, float, f, 32, 4, int, s, 8, 16, expected_q_f32_1);
972 TEST_VREINTERPRET_FP(q, float, f, 32, 4, int, s, 16, 8, expected_q_f32_2);
973 TEST_VREINTERPRET_FP(q, float, f, 32, 4, int, s, 32, 4, expected_q_f32_3);
974 TEST_VREINTERPRET_FP(q, float, f, 32, 4, int, s, 64, 2, expected_q_f32_4);
975 TEST_VREINTERPRET_FP(q, float, f, 32, 4, uint, u, 8, 16, expected_q_f32_5);
976 TEST_VREINTERPRET_FP(q, float, f, 32, 4, uint, u, 16, 8, expected_q_f32_6);
977 TEST_VREINTERPRET_FP(q, float, f, 32, 4, uint, u, 32, 4, expected_q_f32_7);
978 TEST_VREINTERPRET_FP(q, float, f, 32, 4, uint, u, 64, 2, expected_q_f32_8);
979 TEST_VREINTERPRET_FP(q, float, f, 32, 4, poly, p, 8, 16, expected_q_f32_9);
980 TEST_VREINTERPRET_FP(q, float, f, 32, 4, poly, p, 16, 8, expected_q_f32_10);
981 #if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE)
982 TEST_VREINTERPRET_FP(q, float, f, 32, 4, float, f, 16, 8, expected_q_f32_11);
983 #endif
984
985 /* vreinterpret_xx_f32. */
986 TEST_VREINTERPRET(, int, s, 8, 8, float, f, 32, 2, expected_xx_f32_1);
987 TEST_VREINTERPRET(, int, s, 16, 4, float, f, 32, 2, expected_xx_f32_2);
988 TEST_VREINTERPRET(, int, s, 32, 2, float, f, 32, 2, expected_xx_f32_3);
989 TEST_VREINTERPRET(, int, s, 64, 1, float, f, 32, 2, expected_xx_f32_4);
990 TEST_VREINTERPRET(, uint, u, 8, 8, float, f, 32, 2, expected_xx_f32_5);
991 TEST_VREINTERPRET(, uint, u, 16, 4, float, f, 32, 2, expected_xx_f32_6);
992 TEST_VREINTERPRET(, uint, u, 32, 2, float, f, 32, 2, expected_xx_f32_7);
993 TEST_VREINTERPRET(, uint, u, 64, 1, float, f, 32, 2, expected_xx_f32_8);
994 TEST_VREINTERPRET_POLY(, poly, p, 8, 8, float, f, 32, 2, expected_xx_f32_9);
995 TEST_VREINTERPRET_POLY(, poly, p, 16, 4, float, f, 32, 2, expected_xx_f32_10);
996 #if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE)
997 TEST_VREINTERPRET_FP(, float, f, 16, 4, float, f, 32, 2, expected_xx_f32_11);
998 #endif
999
1000 /* vreinterpretq_xx_f32. */
1001 TEST_VREINTERPRET(q, int, s, 8, 16, float, f, 32, 4, expected_q_xx_f32_1);
1002 TEST_VREINTERPRET(q, int, s, 16, 8, float, f, 32, 4, expected_q_xx_f32_2);
1003 TEST_VREINTERPRET(q, int, s, 32, 4, float, f, 32, 4, expected_q_xx_f32_3);
1004 TEST_VREINTERPRET(q, int, s, 64, 2, float, f, 32, 4, expected_q_xx_f32_4);
1005 TEST_VREINTERPRET(q, uint, u, 8, 16, float, f, 32, 4, expected_q_xx_f32_5);
1006 TEST_VREINTERPRET(q, uint, u, 16, 8, float, f, 32, 4, expected_q_xx_f32_6);
1007 TEST_VREINTERPRET(q, uint, u, 32, 4, float, f, 32, 4, expected_q_xx_f32_7);
1008 TEST_VREINTERPRET(q, uint, u, 64, 2, float, f, 32, 4, expected_q_xx_f32_8);
1009 TEST_VREINTERPRET_POLY(q, poly, p, 8, 16, float, f, 32, 4, expected_q_xx_f32_9);
1010 TEST_VREINTERPRET_POLY(q, poly, p, 16, 8, float, f, 32, 4, expected_q_xx_f32_10);
1011 #if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE)
1012 TEST_VREINTERPRET_FP(q, float, f, 16, 8, float, f, 32, 4, expected_q_xx_f32_11);
1013
1014 /* vreinterpret_f16_xx. */
1015 TEST_VREINTERPRET_FP(, float, f, 16, 4, int, s, 8, 8, expected_f16_1);
1016 TEST_VREINTERPRET_FP(, float, f, 16, 4, int, s, 16, 4, expected_f16_2);
1017 TEST_VREINTERPRET_FP(, float, f, 16, 4, int, s, 32, 2, expected_f16_3);
1018 TEST_VREINTERPRET_FP(, float, f, 16, 4, int, s, 64, 1, expected_f16_4);
1019 TEST_VREINTERPRET_FP(, float, f, 16, 4, uint, u, 8, 8, expected_f16_5);
1020 TEST_VREINTERPRET_FP(, float, f, 16, 4, uint, u, 16, 4, expected_f16_6);
1021 TEST_VREINTERPRET_FP(, float, f, 16, 4, uint, u, 32, 2, expected_f16_7);
1022 TEST_VREINTERPRET_FP(, float, f, 16, 4, uint, u, 64, 1, expected_f16_8);
1023 TEST_VREINTERPRET_FP(, float, f, 16, 4, poly, p, 8, 8, expected_f16_9);
1024 TEST_VREINTERPRET_FP(, float, f, 16, 4, poly, p, 16, 4, expected_f16_10);
1025
1026 /* vreinterpretq_f16_xx. */
1027 TEST_VREINTERPRET_FP(q, float, f, 16, 8, int, s, 8, 16, expected_q_f16_1);
1028 TEST_VREINTERPRET_FP(q, float, f, 16, 8, int, s, 16, 8, expected_q_f16_2);
1029 TEST_VREINTERPRET_FP(q, float, f, 16, 8, int, s, 32, 4, expected_q_f16_3);
1030 TEST_VREINTERPRET_FP(q, float, f, 16, 8, int, s, 64, 2, expected_q_f16_4);
1031 TEST_VREINTERPRET_FP(q, float, f, 16, 8, uint, u, 8, 16, expected_q_f16_5);
1032 TEST_VREINTERPRET_FP(q, float, f, 16, 8, uint, u, 16, 8, expected_q_f16_6);
1033 TEST_VREINTERPRET_FP(q, float, f, 16, 8, uint, u, 32, 4, expected_q_f16_7);
1034 TEST_VREINTERPRET_FP(q, float, f, 16, 8, uint, u, 64, 2, expected_q_f16_8);
1035 TEST_VREINTERPRET_FP(q, float, f, 16, 8, poly, p, 8, 16, expected_q_f16_9);
1036 TEST_VREINTERPRET_FP(q, float, f, 16, 8, poly, p, 16, 8, expected_q_f16_10);
1037 #endif
1038 }
1039
main(void)1040 int main (void)
1041 {
1042 exec_vreinterpret ();
1043 return 0;
1044 }
1045