Debian Codegraph @

gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vstX_lane.c

raw
1 #include <arm_neon.h>
2 #include "arm-neon-ref.h"
3 #include "compute-ref-data.h"
4
5 /* Expected results for vst2, chunk 0. */
6 VECT_VAR_DECL(expected_st2_0,int,8,8) [] = { 0xf0, 0xf1, 0x0, 0x0,
7 0x0, 0x0, 0x0, 0x0 };
8 VECT_VAR_DECL(expected_st2_0,int,16,4) [] = { 0xfff0, 0xfff1, 0x0, 0x0 };
9 VECT_VAR_DECL(expected_st2_0,int,32,2) [] = { 0xfffffff0, 0xfffffff1 };
10 VECT_VAR_DECL(expected_st2_0,uint,8,8) [] = { 0xf0, 0xf1, 0x0, 0x0,
11 0x0, 0x0, 0x0, 0x0 };
12 VECT_VAR_DECL(expected_st2_0,uint,16,4) [] = { 0xfff0, 0xfff1, 0x0, 0x0 };
13 VECT_VAR_DECL(expected_st2_0,uint,32,2) [] = { 0xfffffff0, 0xfffffff1 };
14 VECT_VAR_DECL(expected_st2_0,poly,8,8) [] = { 0xf0, 0xf1, 0x0, 0x0,
15 0x0, 0x0, 0x0, 0x0 };
16 VECT_VAR_DECL(expected_st2_0,poly,16,4) [] = { 0xfff0, 0xfff1, 0x0, 0x0 };
17 #if MFLOAT8_SUPPORTED
18 VECT_VAR_DECL(expected_st2_0,hmfloat,8,8) [] = { 0xf0, 0xf1, 0x0, 0x0,
19 0x0, 0x0, 0x0, 0x0 };
20 #endif
21 VECT_VAR_DECL(expected_st2_0,hfloat,16,4) [] = { 0xcc00, 0xcb80, 0x0, 0x0 };
22 VECT_VAR_DECL(expected_st2_0,hfloat,32,2) [] = { 0xc1800000, 0xc1700000 };
23 VECT_VAR_DECL(expected_st2_0,int,16,8) [] = { 0xfff0, 0xfff1, 0x0, 0x0,
24 0x0, 0x0, 0x0, 0x0 };
25 VECT_VAR_DECL(expected_st2_0,int,32,4) [] = { 0xfffffff0, 0xfffffff1, 0x0, 0x0 };
26 VECT_VAR_DECL(expected_st2_0,uint,16,8) [] = { 0xfff0, 0xfff1, 0x0, 0x0,
27 0x0, 0x0, 0x0, 0x0 };
28 VECT_VAR_DECL(expected_st2_0,uint,32,4) [] = { 0xfffffff0, 0xfffffff1,
29 0x0, 0x0 };
30 VECT_VAR_DECL(expected_st2_0,poly,16,8) [] = { 0xfff0, 0xfff1, 0x0, 0x0,
31 0x0, 0x0, 0x0, 0x0 };
32 VECT_VAR_DECL(expected_st2_0,hfloat,16,8) [] = { 0xcc00, 0xcb80, 0x0, 0x0,
33 0x0, 0x0, 0x0, 0x0 };
34 VECT_VAR_DECL(expected_st2_0,hfloat,32,4) [] = { 0xc1800000, 0xc1700000,
35 0x0, 0x0 };
36
37 /* Expected results for vst2, chunk 1. */
38 VECT_VAR_DECL(expected_st2_1,int,8,8) [] = { 0x0, 0x0, 0x0, 0x0,
39 0x0, 0x0, 0x0, 0x0 };
40 VECT_VAR_DECL(expected_st2_1,int,16,4) [] = { 0x0, 0x0, 0x0, 0x0 };
41 VECT_VAR_DECL(expected_st2_1,int,32,2) [] = { 0x0, 0x0 };
42 VECT_VAR_DECL(expected_st2_1,uint,8,8) [] = { 0x0, 0x0, 0x0, 0x0,
43 0x0, 0x0, 0x0, 0x0 };
44 VECT_VAR_DECL(expected_st2_1,uint,16,4) [] = { 0x0, 0x0, 0x0, 0x0 };
45 VECT_VAR_DECL(expected_st2_1,uint,32,2) [] = { 0x0, 0x0 };
46 VECT_VAR_DECL(expected_st2_1,poly,8,8) [] = { 0x0, 0x0, 0x0, 0x0,
47 0x0, 0x0, 0x0, 0x0 };
48 VECT_VAR_DECL(expected_st2_1,poly,16,4) [] = { 0x0, 0x0, 0x0, 0x0 };
49 #if MFLOAT8_SUPPORTED
50 VECT_VAR_DECL(expected_st2_1,hmfloat,8,8) [] = { 0x0, 0x0, 0x0, 0x0,
51 0x0, 0x0, 0x0, 0x0 };
52 #endif
53 VECT_VAR_DECL(expected_st2_1,hfloat,16,4) [] = { 0x0, 0x0, 0x0, 0x0 };
54 VECT_VAR_DECL(expected_st2_1,hfloat,32,2) [] = { 0x0, 0x0 };
55 VECT_VAR_DECL(expected_st2_1,int,16,8) [] = { 0x0, 0x0, 0x0, 0x0,
56 0x0, 0x0, 0x0, 0x0 };
57 VECT_VAR_DECL(expected_st2_1,int,32,4) [] = { 0x0, 0x0, 0x0, 0x0 };
58 VECT_VAR_DECL(expected_st2_1,uint,16,8) [] = { 0x0, 0x0, 0x0, 0x0,
59 0x0, 0x0, 0x0, 0x0 };
60 VECT_VAR_DECL(expected_st2_1,uint,32,4) [] = { 0x0, 0x0, 0x0, 0x0 };
61 VECT_VAR_DECL(expected_st2_1,poly,16,8) [] = { 0x0, 0x0, 0x0, 0x0,
62 0x0, 0x0, 0x0, 0x0 };
63 VECT_VAR_DECL(expected_st2_1,hfloat,16,8) [] = { 0x0, 0x0, 0x0, 0x0,
64 0x0, 0x0, 0x0, 0x0 };
65 VECT_VAR_DECL(expected_st2_1,hfloat,32,4) [] = { 0x0, 0x0, 0x0, 0x0 };
66
67 /* Expected results for vst3, chunk 0. */
68 VECT_VAR_DECL(expected_st3_0,int,8,8) [] = { 0xf0, 0xf1, 0xf2, 0x0,
69 0x0, 0x0, 0x0, 0x0 };
70 VECT_VAR_DECL(expected_st3_0,int,16,4) [] = { 0xfff0, 0xfff1, 0xfff2, 0x0 };
71 VECT_VAR_DECL(expected_st3_0,int,32,2) [] = { 0xfffffff0, 0xfffffff1 };
72 VECT_VAR_DECL(expected_st3_0,uint,8,8) [] = { 0xf0, 0xf1, 0xf2, 0x0,
73 0x0, 0x0, 0x0, 0x0 };
74 VECT_VAR_DECL(expected_st3_0,uint,16,4) [] = { 0xfff0, 0xfff1, 0xfff2, 0x0 };
75 VECT_VAR_DECL(expected_st3_0,uint,32,2) [] = { 0xfffffff0, 0xfffffff1 };
76 VECT_VAR_DECL(expected_st3_0,poly,8,8) [] = { 0xf0, 0xf1, 0xf2, 0x0,
77 0x0, 0x0, 0x0, 0x0 };
78 VECT_VAR_DECL(expected_st3_0,poly,16,4) [] = { 0xfff0, 0xfff1, 0xfff2, 0x0 };
79 #if MFLOAT8_SUPPORTED
80 VECT_VAR_DECL(expected_st3_0,hmfloat,8,8) [] = { 0xf0, 0xf1, 0xf2, 0x0,
81 0x0, 0x0, 0x0, 0x0 };
82 #endif
83 VECT_VAR_DECL(expected_st3_0,hfloat,16,4) [] = { 0xcc00, 0xcb80, 0xcb00, 0x0 };
84 VECT_VAR_DECL(expected_st3_0,hfloat,32,2) [] = { 0xc1800000, 0xc1700000 };
85 VECT_VAR_DECL(expected_st3_0,int,16,8) [] = { 0xfff0, 0xfff1, 0xfff2, 0x0,
86 0x0, 0x0, 0x0, 0x0 };
87 VECT_VAR_DECL(expected_st3_0,int,32,4) [] = { 0xfffffff0, 0xfffffff1,
88 0xfffffff2, 0x0 };
89 VECT_VAR_DECL(expected_st3_0,uint,16,8) [] = { 0xfff0, 0xfff1, 0xfff2, 0x0,
90 0x0, 0x0, 0x0, 0x0 };
91 VECT_VAR_DECL(expected_st3_0,uint,32,4) [] = { 0xfffffff0, 0xfffffff1,
92 0xfffffff2, 0x0 };
93 VECT_VAR_DECL(expected_st3_0,poly,16,8) [] = { 0xfff0, 0xfff1, 0xfff2, 0x0,
94 0x0, 0x0, 0x0, 0x0 };
95 VECT_VAR_DECL(expected_st3_0,hfloat,16,8) [] = { 0xcc00, 0xcb80, 0xcb00, 0x0,
96 0x0, 0x0, 0x0, 0x0 };
97 VECT_VAR_DECL(expected_st3_0,hfloat,32,4) [] = { 0xc1800000, 0xc1700000,
98 0xc1600000, 0x0 };
99
100 /* Expected results for vst3, chunk 1. */
101 VECT_VAR_DECL(expected_st3_1,int,8,8) [] = { 0x0, 0x0, 0x0, 0x0,
102 0x0, 0x0, 0x0, 0x0 };
103 VECT_VAR_DECL(expected_st3_1,int,16,4) [] = { 0x0, 0x0, 0x0, 0x0 };
104 VECT_VAR_DECL(expected_st3_1,int,32,2) [] = { 0xfffffff2, 0x0 };
105 VECT_VAR_DECL(expected_st3_1,uint,8,8) [] = { 0x0, 0x0, 0x0, 0x0,
106 0x0, 0x0, 0x0, 0x0 };
107 VECT_VAR_DECL(expected_st3_1,uint,16,4) [] = { 0x0, 0x0, 0x0, 0x0 };
108 VECT_VAR_DECL(expected_st3_1,uint,32,2) [] = { 0xfffffff2, 0x0 };
109 VECT_VAR_DECL(expected_st3_1,poly,8,8) [] = { 0x0, 0x0, 0x0, 0x0,
110 0x0, 0x0, 0x0, 0x0 };
111 VECT_VAR_DECL(expected_st3_1,poly,16,4) [] = { 0x0, 0x0, 0x0, 0x0 };
112 #if MFLOAT8_SUPPORTED
113 VECT_VAR_DECL(expected_st3_1,hmfloat,8,8) [] = { 0x0, 0x0, 0x0, 0x0,
114 0x0, 0x0, 0x0, 0x0 };
115 #endif
116 VECT_VAR_DECL(expected_st3_1,hfloat,16,4) [] = { 0x0, 0x0, 0x0, 0x0 };
117 VECT_VAR_DECL(expected_st3_1,hfloat,32,2) [] = { 0xc1600000, 0x0 };
118 VECT_VAR_DECL(expected_st3_1,int,16,8) [] = { 0x0, 0x0, 0x0, 0x0,
119 0x0, 0x0, 0x0, 0x0 };
120 VECT_VAR_DECL(expected_st3_1,int,32,4) [] = { 0x0, 0x0, 0x0, 0x0 };
121 VECT_VAR_DECL(expected_st3_1,uint,16,8) [] = { 0x0, 0x0, 0x0, 0x0,
122 0x0, 0x0, 0x0, 0x0 };
123 VECT_VAR_DECL(expected_st3_1,uint,32,4) [] = { 0x0, 0x0, 0x0, 0x0 };
124 VECT_VAR_DECL(expected_st3_1,poly,16,8) [] = { 0x0, 0x0, 0x0, 0x0,
125 0x0, 0x0, 0x0, 0x0 };
126 VECT_VAR_DECL(expected_st3_1,hfloat,16,8) [] = { 0x0, 0x0, 0x0, 0x0,
127 0x0, 0x0, 0x0, 0x0 };
128 VECT_VAR_DECL(expected_st3_1,hfloat,32,4) [] = { 0x0, 0x0, 0x0, 0x0 };
129
130 /* Expected results for vst3, chunk 2. */
131 VECT_VAR_DECL(expected_st3_2,int,8,8) [] = { 0x0, 0x0, 0x0, 0x0,
132 0x0, 0x0, 0x0, 0x0 };
133 VECT_VAR_DECL(expected_st3_2,int,16,4) [] = { 0x0, 0x0, 0x0, 0x0 };
134 VECT_VAR_DECL(expected_st3_2,int,32,2) [] = { 0x0, 0x0 };
135 VECT_VAR_DECL(expected_st3_2,uint,8,8) [] = { 0x0, 0x0, 0x0, 0x0,
136 0x0, 0x0, 0x0, 0x0 };
137 VECT_VAR_DECL(expected_st3_2,uint,16,4) [] = { 0x0, 0x0, 0x0, 0x0 };
138 VECT_VAR_DECL(expected_st3_2,uint,32,2) [] = { 0x0, 0x0 };
139 VECT_VAR_DECL(expected_st3_2,poly,8,8) [] = { 0x0, 0x0, 0x0, 0x0,
140 0x0, 0x0, 0x0, 0x0 };
141 VECT_VAR_DECL(expected_st3_2,poly,16,4) [] = { 0x0, 0x0, 0x0, 0x0 };
142 #if MFLOAT8_SUPPORTED
143 VECT_VAR_DECL(expected_st3_2,hmfloat,8,8) [] = { 0x0, 0x0, 0x0, 0x0,
144 0x0, 0x0, 0x0, 0x0 };
145 #endif
146 VECT_VAR_DECL(expected_st3_2,hfloat,16,4) [] = { 0x0, 0x0, 0x0, 0x0 };
147 VECT_VAR_DECL(expected_st3_2,hfloat,32,2) [] = { 0x0, 0x0 };
148 VECT_VAR_DECL(expected_st3_2,int,16,8) [] = { 0x0, 0x0, 0x0, 0x0,
149 0x0, 0x0, 0x0, 0x0 };
150 VECT_VAR_DECL(expected_st3_2,int,32,4) [] = { 0x0, 0x0, 0x0, 0x0 };
151 VECT_VAR_DECL(expected_st3_2,uint,16,8) [] = { 0x0, 0x0, 0x0, 0x0,
152 0x0, 0x0, 0x0, 0x0 };
153 VECT_VAR_DECL(expected_st3_2,uint,32,4) [] = { 0x0, 0x0, 0x0, 0x0 };
154 VECT_VAR_DECL(expected_st3_2,poly,16,8) [] = { 0x0, 0x0, 0x0, 0x0,
155 0x0, 0x0, 0x0, 0x0 };
156 VECT_VAR_DECL(expected_st3_2,hfloat,16,8) [] = { 0x0, 0x0, 0x0, 0x0,
157 0x0, 0x0, 0x0, 0x0 };
158 VECT_VAR_DECL(expected_st3_2,hfloat,32,4) [] = { 0x0, 0x0, 0x0, 0x0 };
159
160 /* Expected results for vst4, chunk 0. */
161 VECT_VAR_DECL(expected_st4_0,int,8,8) [] = { 0xf0, 0xf1, 0xf2, 0xf3,
162 0x0, 0x0, 0x0, 0x0 };
163 VECT_VAR_DECL(expected_st4_0,int,16,4) [] = { 0xfff0, 0xfff1, 0xfff2, 0xfff3 };
164 VECT_VAR_DECL(expected_st4_0,int,32,2) [] = { 0xfffffff0, 0xfffffff1 };
165 VECT_VAR_DECL(expected_st4_0,uint,8,8) [] = { 0xf0, 0xf1, 0xf2, 0xf3,
166 0x0, 0x0, 0x0, 0x0 };
167 VECT_VAR_DECL(expected_st4_0,uint,16,4) [] = { 0xfff0, 0xfff1, 0xfff2, 0xfff3 };
168 VECT_VAR_DECL(expected_st4_0,uint,32,2) [] = { 0xfffffff0, 0xfffffff1 };
169 VECT_VAR_DECL(expected_st4_0,poly,8,8) [] = { 0xf0, 0xf1, 0xf2, 0xf3,
170 0x0, 0x0, 0x0, 0x0 };
171 VECT_VAR_DECL(expected_st4_0,poly,16,4) [] = { 0xfff0, 0xfff1, 0xfff2, 0xfff3 };
172 #if MFLOAT8_SUPPORTED
173 VECT_VAR_DECL(expected_st4_0,hmfloat,8,8) [] = { 0xf0, 0xf1, 0xf2, 0xf3,
174 0x0, 0x0, 0x0, 0x0 };
175 #endif
176 VECT_VAR_DECL(expected_st4_0,hfloat,16,4) [] = { 0xcc00, 0xcb80, 0xcb00, 0xca80 };
177 VECT_VAR_DECL(expected_st4_0,hfloat,32,2) [] = { 0xc1800000, 0xc1700000 };
178 VECT_VAR_DECL(expected_st4_0,int,16,8) [] = { 0xfff0, 0xfff1, 0xfff2, 0xfff3,
179 0x0, 0x0, 0x0, 0x0 };
180 VECT_VAR_DECL(expected_st4_0,int,32,4) [] = { 0xfffffff0, 0xfffffff1,
181 0xfffffff2, 0xfffffff3 };
182 VECT_VAR_DECL(expected_st4_0,uint,16,8) [] = { 0xfff0, 0xfff1, 0xfff2, 0xfff3,
183 0x0, 0x0, 0x0, 0x0 };
184 VECT_VAR_DECL(expected_st4_0,uint,32,4) [] = { 0xfffffff0, 0xfffffff1,
185 0xfffffff2, 0xfffffff3 };
186 VECT_VAR_DECL(expected_st4_0,poly,16,8) [] = { 0xfff0, 0xfff1, 0xfff2, 0xfff3,
187 0x0, 0x0, 0x0, 0x0 };
188 VECT_VAR_DECL(expected_st4_0,hfloat,16,8) [] = { 0xcc00, 0xcb80, 0xcb00, 0xca80,
189 0x0, 0x0, 0x0, 0x0 };
190 VECT_VAR_DECL(expected_st4_0,hfloat,32,4) [] = { 0xc1800000, 0xc1700000,
191 0xc1600000, 0xc1500000 };
192
193 /* Expected results for vst4, chunk 1. */
194 VECT_VAR_DECL(expected_st4_1,int,8,8) [] = { 0x0, 0x0, 0x0, 0x0,
195 0x0, 0x0, 0x0, 0x0 };
196 VECT_VAR_DECL(expected_st4_1,int,16,4) [] = { 0x0, 0x0, 0x0, 0x0 };
197 VECT_VAR_DECL(expected_st4_1,int,32,2) [] = { 0xfffffff2, 0xfffffff3 };
198 VECT_VAR_DECL(expected_st4_1,uint,8,8) [] = { 0x0, 0x0, 0x0, 0x0,
199 0x0, 0x0, 0x0, 0x0 };
200 VECT_VAR_DECL(expected_st4_1,uint,16,4) [] = { 0x0, 0x0, 0x0, 0x0 };
201 VECT_VAR_DECL(expected_st4_1,uint,32,2) [] = { 0xfffffff2, 0xfffffff3 };
202 VECT_VAR_DECL(expected_st4_1,poly,8,8) [] = { 0x0, 0x0, 0x0, 0x0,
203 0x0, 0x0, 0x0, 0x0 };
204 VECT_VAR_DECL(expected_st4_1,poly,16,4) [] = { 0x0, 0x0, 0x0, 0x0 };
205 #if MFLOAT8_SUPPORTED
206 VECT_VAR_DECL(expected_st4_1,hmfloat,8,8) [] = { 0x0, 0x0, 0x0, 0x0,
207 0x0, 0x0, 0x0, 0x0 };
208 #endif
209 VECT_VAR_DECL(expected_st4_1,hfloat,16,4) [] = { 0x0, 0x0, 0x0, 0x0 };
210 VECT_VAR_DECL(expected_st4_1,hfloat,32,2) [] = { 0xc1600000, 0xc1500000 };
211 VECT_VAR_DECL(expected_st4_1,int,16,8) [] = { 0x0, 0x0, 0x0, 0x0,
212 0x0, 0x0, 0x0, 0x0 };
213 VECT_VAR_DECL(expected_st4_1,int,32,4) [] = { 0x0, 0x0, 0x0, 0x0 };
214 VECT_VAR_DECL(expected_st4_1,uint,16,8) [] = { 0x0, 0x0, 0x0, 0x0,
215 0x0, 0x0, 0x0, 0x0 };
216 VECT_VAR_DECL(expected_st4_1,uint,32,4) [] = { 0x0, 0x0, 0x0, 0x0 };
217 VECT_VAR_DECL(expected_st4_1,poly,16,8) [] = { 0x0, 0x0, 0x0, 0x0,
218 0x0, 0x0, 0x0, 0x0 };
219 VECT_VAR_DECL(expected_st4_1,hfloat,16,8) [] = { 0x0, 0x0, 0x0, 0x0,
220 0x0, 0x0, 0x0, 0x0 };
221 VECT_VAR_DECL(expected_st4_1,hfloat,32,4) [] = { 0x0, 0x0, 0x0, 0x0 };
222
223 /* Expected results for vst4, chunk 2. */
224 VECT_VAR_DECL(expected_st4_2,int,8,8) [] = { 0x0, 0x0, 0x0, 0x0,
225 0x0, 0x0, 0x0, 0x0 };
226 VECT_VAR_DECL(expected_st4_2,int,16,4) [] = { 0x0, 0x0, 0x0, 0x0 };
227 VECT_VAR_DECL(expected_st4_2,int,32,2) [] = { 0x0, 0x0 };
228 VECT_VAR_DECL(expected_st4_2,uint,8,8) [] = { 0x0, 0x0, 0x0, 0x0,
229 0x0, 0x0, 0x0, 0x0 };
230 VECT_VAR_DECL(expected_st4_2,uint,16,4) [] = { 0x0, 0x0, 0x0, 0x0 };
231 VECT_VAR_DECL(expected_st4_2,uint,32,2) [] = { 0x0, 0x0 };
232 VECT_VAR_DECL(expected_st4_2,poly,8,8) [] = { 0x0, 0x0, 0x0, 0x0,
233 0x0, 0x0, 0x0, 0x0 };
234 VECT_VAR_DECL(expected_st4_2,poly,16,4) [] = { 0x0, 0x0, 0x0, 0x0 };
235 #if MFLOAT8_SUPPORTED
236 VECT_VAR_DECL(expected_st4_2,hmfloat,8,8) [] = { 0x0, 0x0, 0x0, 0x0,
237 0x0, 0x0, 0x0, 0x0 };
238 #endif
239 VECT_VAR_DECL(expected_st4_2,hfloat,16,4) [] = { 0x0, 0x0, 0x0, 0x0 };
240 VECT_VAR_DECL(expected_st4_2,hfloat,32,2) [] = { 0x0, 0x0 };
241 VECT_VAR_DECL(expected_st4_2,int,16,8) [] = { 0x0, 0x0, 0x0, 0x0,
242 0x0, 0x0, 0x0, 0x0 };
243 VECT_VAR_DECL(expected_st4_2,int,32,4) [] = { 0x0, 0x0, 0x0, 0x0 };
244 VECT_VAR_DECL(expected_st4_2,uint,16,8) [] = { 0x0, 0x0, 0x0, 0x0,
245 0x0, 0x0, 0x0, 0x0 };
246 VECT_VAR_DECL(expected_st4_2,uint,32,4) [] = { 0x0, 0x0, 0x0, 0x0 };
247 VECT_VAR_DECL(expected_st4_2,poly,16,8) [] = { 0x0, 0x0, 0x0, 0x0,
248 0x0, 0x0, 0x0, 0x0 };
249 VECT_VAR_DECL(expected_st4_2,hfloat,16,8) [] = { 0x0, 0x0, 0x0, 0x0,
250 0x0, 0x0, 0x0, 0x0 };
251 VECT_VAR_DECL(expected_st4_2,hfloat,32,4) [] = { 0x0, 0x0, 0x0, 0x0 };
252
253 /* Expected results for vst4, chunk 3. */
254 VECT_VAR_DECL(expected_st4_3,int,8,8) [] = { 0x0, 0x0, 0x0, 0x0,
255 0x0, 0x0, 0x0, 0x0 };
256 VECT_VAR_DECL(expected_st4_3,int,16,4) [] = { 0x0, 0x0, 0x0, 0x0 };
257 VECT_VAR_DECL(expected_st4_3,int,32,2) [] = { 0x0, 0x0 };
258 VECT_VAR_DECL(expected_st4_3,uint,8,8) [] = { 0x0, 0x0, 0x0, 0x0,
259 0x0, 0x0, 0x0, 0x0 };
260 VECT_VAR_DECL(expected_st4_3,uint,16,4) [] = { 0x0, 0x0, 0x0, 0x0 };
261 VECT_VAR_DECL(expected_st4_3,uint,32,2) [] = { 0x0, 0x0 };
262 VECT_VAR_DECL(expected_st4_3,poly,8,8) [] = { 0x0, 0x0, 0x0, 0x0,
263 0x0, 0x0, 0x0, 0x0 };
264 VECT_VAR_DECL(expected_st4_3,poly,16,4) [] = { 0x0, 0x0, 0x0, 0x0 };
265 #if MFLOAT8_SUPPORTED
266 VECT_VAR_DECL(expected_st4_3,hmfloat,8,8) [] = { 0x0, 0x0, 0x0, 0x0,
267 0x0, 0x0, 0x0, 0x0 };
268 #endif
269 VECT_VAR_DECL(expected_st4_3,hfloat,16,4) [] = { 0x0, 0x0, 0x0, 0x0 };
270 VECT_VAR_DECL(expected_st4_3,hfloat,32,2) [] = { 0x0, 0x0 };
271 VECT_VAR_DECL(expected_st4_3,int,16,8) [] = { 0x0, 0x0, 0x0, 0x0,
272 0x0, 0x0, 0x0, 0x0 };
273 VECT_VAR_DECL(expected_st4_3,int,32,4) [] = { 0x0, 0x0, 0x0, 0x0 };
274 VECT_VAR_DECL(expected_st4_3,uint,16,8) [] = { 0x0, 0x0, 0x0, 0x0,
275 0x0, 0x0, 0x0, 0x0 };
276 VECT_VAR_DECL(expected_st4_3,uint,32,4) [] = { 0x0, 0x0, 0x0, 0x0 };
277 VECT_VAR_DECL(expected_st4_3,poly,16,8) [] = { 0x0, 0x0, 0x0, 0x0,
278 0x0, 0x0, 0x0, 0x0 };
279 VECT_VAR_DECL(expected_st4_3,hfloat,16,8) [] = { 0x0, 0x0, 0x0, 0x0,
280 0x0, 0x0, 0x0, 0x0 };
281 VECT_VAR_DECL(expected_st4_3,hfloat,32,4) [] = { 0x0, 0x0, 0x0, 0x0 };
282
283 /* Declare additional input buffers as needed. */
284 /* Input buffers for vld2_lane. */
285 VECT_VAR_DECL_INIT(buffer_vld2_lane, int, 8, 2);
286 VECT_VAR_DECL_INIT(buffer_vld2_lane, int, 16, 2);
287 VECT_VAR_DECL_INIT(buffer_vld2_lane, int, 32, 2);
288 VECT_VAR_DECL_INIT(buffer_vld2_lane, int, 64, 2);
289 VECT_VAR_DECL_INIT(buffer_vld2_lane, uint, 8, 2);
290 VECT_VAR_DECL_INIT(buffer_vld2_lane, uint, 16, 2);
291 VECT_VAR_DECL_INIT(buffer_vld2_lane, uint, 32, 2);
292 VECT_VAR_DECL_INIT(buffer_vld2_lane, uint, 64, 2);
293 VECT_VAR_DECL_INIT(buffer_vld2_lane, poly, 8, 2);
294 VECT_VAR_DECL_INIT(buffer_vld2_lane, poly, 16, 2);
295 #if MFLOAT8_SUPPORTED
296 VECT_VAR_DECL(buffer_vld2_lane, mfloat, 8, 2)[2];
297 #endif
298 #if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE)
299 VECT_VAR_DECL_INIT(buffer_vld2_lane, float, 16, 2);
300 #endif
301 VECT_VAR_DECL_INIT(buffer_vld2_lane, float, 32, 2);
302
303 /* Input buffers for vld3_lane. */
304 VECT_VAR_DECL_INIT(buffer_vld3_lane, int, 8, 3);
305 VECT_VAR_DECL_INIT(buffer_vld3_lane, int, 16, 3);
306 VECT_VAR_DECL_INIT(buffer_vld3_lane, int, 32, 3);
307 VECT_VAR_DECL_INIT(buffer_vld3_lane, int, 64, 3);
308 VECT_VAR_DECL_INIT(buffer_vld3_lane, uint, 8, 3);
309 VECT_VAR_DECL_INIT(buffer_vld3_lane, uint, 16, 3);
310 VECT_VAR_DECL_INIT(buffer_vld3_lane, uint, 32, 3);
311 VECT_VAR_DECL_INIT(buffer_vld3_lane, uint, 64, 3);
312 VECT_VAR_DECL_INIT(buffer_vld3_lane, poly, 8, 3);
313 VECT_VAR_DECL_INIT(buffer_vld3_lane, poly, 16, 3);
314 #if MFLOAT8_SUPPORTED
315 VECT_VAR_DECL(buffer_vld3_lane, mfloat, 8, 3)[3];
316 #endif
317 #if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE)
318 VECT_VAR_DECL_INIT(buffer_vld3_lane, float, 16, 3);
319 #endif
320 VECT_VAR_DECL_INIT(buffer_vld3_lane, float, 32, 3);
321
322 /* Input buffers for vld4_lane. */
323 VECT_VAR_DECL_INIT(buffer_vld4_lane, int, 8, 4);
324 VECT_VAR_DECL_INIT(buffer_vld4_lane, int, 16, 4);
325 VECT_VAR_DECL_INIT(buffer_vld4_lane, int, 32, 4);
326 VECT_VAR_DECL_INIT(buffer_vld4_lane, int, 64, 4);
327 VECT_VAR_DECL_INIT(buffer_vld4_lane, uint, 8, 4);
328 VECT_VAR_DECL_INIT(buffer_vld4_lane, uint, 16, 4);
329 VECT_VAR_DECL_INIT(buffer_vld4_lane, uint, 32, 4);
330 VECT_VAR_DECL_INIT(buffer_vld4_lane, uint, 64, 4);
331 VECT_VAR_DECL_INIT(buffer_vld4_lane, poly, 8, 4);
332 VECT_VAR_DECL_INIT(buffer_vld4_lane, poly, 16, 4);
333 #if MFLOAT8_SUPPORTED
334 VECT_VAR_DECL(buffer_vld4_lane, mfloat, 8, 4)[4];
335 #endif
336 #if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE)
337 VECT_VAR_DECL_INIT(buffer_vld4_lane, float, 16, 4);
338 #endif
339 VECT_VAR_DECL_INIT(buffer_vld4_lane, float, 32, 4);
340
341 void exec_vstX_lane (void)
342 {
343 /* In this case, input variables are arrays of vectors. */
344 #define DECL_VSTX_LANE(T1, W, N, X) \
345 VECT_ARRAY_TYPE(T1, W, N, X) VECT_ARRAY_VAR(vector, T1, W, N, X); \
346 VECT_ARRAY_TYPE(T1, W, N, X) VECT_ARRAY_VAR(vector_src, T1, W, N, X); \
347 VECT_VAR_DECL(result_bis_##X, T1, W, N)[X * N]
348
349 /* We need to use a temporary result buffer (result_bis), because
350 the one used for other tests is not large enough. A subset of the
351 result data is moved from result_bis to result, and it is this
352 subset which is used to check the actual behavior. The next
353 macro enables to move another chunk of data from result_bis to
354 result. */
355 /* We also use another extra input buffer (buffer_src), which we
356 fill with 0xAA, and which it used to load a vector from which we
357 read a given lane. */
358 #define TEST_VSTX_LANE(Q, T1, T2, W, N, X, L) \
359 memset (VECT_VAR(buffer_src, T1, W, N), 0xAA, \
360 sizeof(VECT_VAR(buffer_src, T1, W, N))); \
361 memset (VECT_VAR(result_bis_##X, T1, W, N), 0, \
362 sizeof(VECT_VAR(result_bis_##X, T1, W, N))); \
363 \
364 VECT_ARRAY_VAR(vector_src, T1, W, N, X) = \
365 vld##X##Q##_##T2##W(VECT_VAR(buffer_src, T1, W, N)); \
366 \
367 VECT_ARRAY_VAR(vector, T1, W, N, X) = \
368 /* Use dedicated init buffer, of size X. */ \
369 vld##X##Q##_lane_##T2##W(VECT_VAR(buffer_vld##X##_lane, T1, W, X), \
370 VECT_ARRAY_VAR(vector_src, T1, W, N, X), \
371 L); \
372 vst##X##Q##_lane_##T2##W(VECT_VAR(result_bis_##X, T1, W, N), \
373 VECT_ARRAY_VAR(vector, T1, W, N, X), \
374 L); \
375 memcpy(VECT_VAR(result, T1, W, N), VECT_VAR(result_bis_##X, T1, W, N), \
376 sizeof(VECT_VAR(result, T1, W, N)));
377
378 /* Overwrite "result" with the contents of "result_bis"[Y]. */
379 #define TEST_EXTRA_CHUNK(T1, W, N, X, Y) \
380 memcpy(VECT_VAR(result, T1, W, N), \
381 &(VECT_VAR(result_bis_##X, T1, W, N)[Y*N]), \
382 sizeof(VECT_VAR(result, T1, W, N)));
383
384 /* We need all variants in 64 bits, but there is no 64x2 variant,
385 nor 128 bits vectors of int8/uint8/poly8. */
386 #define DECL_ALL_VSTX_LANE_NO_FP16(X) \
387 DECL_VSTX_LANE(int, 8, 8, X); \
388 DECL_VSTX_LANE(int, 16, 4, X); \
389 DECL_VSTX_LANE(int, 32, 2, X); \
390 DECL_VSTX_LANE(uint, 8, 8, X); \
391 DECL_VSTX_LANE(uint, 16, 4, X); \
392 DECL_VSTX_LANE(uint, 32, 2, X); \
393 DECL_VSTX_LANE(poly, 8, 8, X); \
394 DECL_VSTX_LANE(poly, 16, 4, X); \
395 MFLOAT8_ONLY(DECL_VSTX_LANE(mfloat, 8, 8, X);) \
396 DECL_VSTX_LANE(float, 32, 2, X); \
397 DECL_VSTX_LANE(int, 16, 8, X); \
398 DECL_VSTX_LANE(int, 32, 4, X); \
399 DECL_VSTX_LANE(uint, 16, 8, X); \
400 DECL_VSTX_LANE(uint, 32, 4, X); \
401 DECL_VSTX_LANE(poly, 16, 8, X); \
402 DECL_VSTX_LANE(float, 32, 4, X)
403
404 #if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE)
405 #define DECL_ALL_VSTX_LANE(X) \
406 DECL_ALL_VSTX_LANE_NO_FP16(X); \
407 DECL_VSTX_LANE(float, 16, 4, X); \
408 DECL_VSTX_LANE(float, 16, 8, X)
409 #else
410 #define DECL_ALL_VSTX_LANE(X) DECL_ALL_VSTX_LANE_NO_FP16(X)
411 #endif
412
413 #define DUMMY_ARRAY(V, T, W, N, L) VECT_VAR_DECL(V,T,W,N)[N*L]
414
415 /* Use the same lanes regardless of the size of the array (X), for
416 simplicity. */
417 #define TEST_ALL_VSTX_LANE_NO_FP16(X) \
418 TEST_VSTX_LANE(, int, s, 8, 8, X, 7); \
419 TEST_VSTX_LANE(, int, s, 16, 4, X, 2); \
420 TEST_VSTX_LANE(, int, s, 32, 2, X, 0); \
421 TEST_VSTX_LANE(, float, f, 32, 2, X, 0); \
422 TEST_VSTX_LANE(, uint, u, 8, 8, X, 4); \
423 TEST_VSTX_LANE(, uint, u, 16, 4, X, 3); \
424 TEST_VSTX_LANE(, uint, u, 32, 2, X, 1); \
425 TEST_VSTX_LANE(, poly, p, 8, 8, X, 4); \
426 TEST_VSTX_LANE(, poly, p, 16, 4, X, 3); \
427 MFLOAT8_ONLY(TEST_VSTX_LANE(, mfloat, mf, 8, 8, X, 5)); \
428 TEST_VSTX_LANE(q, int, s, 16, 8, X, 6); \
429 TEST_VSTX_LANE(q, int, s, 32, 4, X, 2); \
430 TEST_VSTX_LANE(q, uint, u, 16, 8, X, 5); \
431 TEST_VSTX_LANE(q, uint, u, 32, 4, X, 0); \
432 TEST_VSTX_LANE(q, poly, p, 16, 8, X, 5); \
433 TEST_VSTX_LANE(q, float, f, 32, 4, X, 2)
434
435 #if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE)
436 #define TEST_ALL_VSTX_LANE(X) \
437 TEST_ALL_VSTX_LANE_NO_FP16(X); \
438 TEST_VSTX_LANE(, float, f, 16, 4, X, 2); \
439 TEST_VSTX_LANE(q, float, f, 16, 8, X, 6)
440 #else
441 #define TEST_ALL_VSTX_LANE(X) TEST_ALL_VSTX_LANE_NO_FP16(X)
442 #endif
443
444 #define TEST_ALL_EXTRA_CHUNKS_NO_FP16(X, Y) \
445 TEST_EXTRA_CHUNK(int, 8, 8, X, Y); \
446 TEST_EXTRA_CHUNK(int, 16, 4, X, Y); \
447 TEST_EXTRA_CHUNK(int, 32, 2, X, Y); \
448 TEST_EXTRA_CHUNK(uint, 8, 8, X, Y); \
449 TEST_EXTRA_CHUNK(uint, 16, 4, X, Y); \
450 TEST_EXTRA_CHUNK(uint, 32, 2, X, Y); \
451 TEST_EXTRA_CHUNK(poly, 8, 8, X, Y); \
452 TEST_EXTRA_CHUNK(poly, 16, 4, X, Y); \
453 MFLOAT8_ONLY(TEST_EXTRA_CHUNK(mfloat, 8, 8, X, Y)); \
454 TEST_EXTRA_CHUNK(float, 32, 2, X, Y); \
455 TEST_EXTRA_CHUNK(int, 16, 8, X, Y); \
456 TEST_EXTRA_CHUNK(int, 32, 4, X, Y); \
457 TEST_EXTRA_CHUNK(uint, 16, 8, X, Y); \
458 TEST_EXTRA_CHUNK(uint, 32, 4, X, Y); \
459 TEST_EXTRA_CHUNK(poly, 16, 8, X, Y); \
460 TEST_EXTRA_CHUNK(float, 32, 4, X, Y)
461
462 #if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE)
463 #define TEST_ALL_EXTRA_CHUNKS(X,Y) \
464 TEST_ALL_EXTRA_CHUNKS_NO_FP16(X, Y); \
465 TEST_EXTRA_CHUNK(float, 16, 4, X, Y); \
466 TEST_EXTRA_CHUNK(float, 16, 8, X, Y)
467 #else
468 #define TEST_ALL_EXTRA_CHUNKS(X,Y) TEST_ALL_EXTRA_CHUNKS_NO_FP16(X, Y)
469 #endif
470
471 #if MFLOAT8_SUPPORTED
472 __builtin_memcpy (VECT_VAR(buffer_vld2_lane, mfloat, 8, 2),
473 VECT_VAR(buffer_vld2_lane, int, 8, 2), 2);
474 __builtin_memcpy (VECT_VAR(buffer_vld3_lane, mfloat, 8, 3),
475 VECT_VAR(buffer_vld3_lane, int, 8, 3), 3);
476 __builtin_memcpy (VECT_VAR(buffer_vld4_lane, mfloat, 8, 4),
477 VECT_VAR(buffer_vld4_lane, int, 8, 4), 4);
478 #endif
479
480 /* Declare the temporary buffers / variables. */
481 DECL_ALL_VSTX_LANE(2);
482 DECL_ALL_VSTX_LANE(3);
483 DECL_ALL_VSTX_LANE(4);
484
485 /* Define dummy input arrays, large enough for x4 vectors. */
486 DUMMY_ARRAY(buffer_src, int, 8, 8, 4);
487 DUMMY_ARRAY(buffer_src, int, 16, 4, 4);
488 DUMMY_ARRAY(buffer_src, int, 32, 2, 4);
489 DUMMY_ARRAY(buffer_src, uint, 8, 8, 4);
490 DUMMY_ARRAY(buffer_src, uint, 16, 4, 4);
491 DUMMY_ARRAY(buffer_src, uint, 32, 2, 4);
492 DUMMY_ARRAY(buffer_src, poly, 8, 8, 4);
493 DUMMY_ARRAY(buffer_src, poly, 16, 4, 4);
494 #if MFLOAT8_SUPPORTED
495 DUMMY_ARRAY(buffer_src, mfloat, 8, 8, 4);
496 #endif
497 #if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE)
498 DUMMY_ARRAY(buffer_src, float, 16, 4, 4);
499 #endif
500 DUMMY_ARRAY(buffer_src, float, 32, 2, 4);
501 DUMMY_ARRAY(buffer_src, int, 16, 8, 4);
502 DUMMY_ARRAY(buffer_src, int, 32, 4, 4);
503 DUMMY_ARRAY(buffer_src, uint, 16, 8, 4);
504 DUMMY_ARRAY(buffer_src, uint, 32, 4, 4);
505 DUMMY_ARRAY(buffer_src, poly, 16, 8, 4);
506 #if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE)
507 DUMMY_ARRAY(buffer_src, float, 16, 8, 4);
508 #endif
509 DUMMY_ARRAY(buffer_src, float, 32, 4, 4);
510
511 /* Check vst2_lane/vst2q_lane. */
512 clean_results ();
513 #define TEST_MSG "VST2_LANE/VST2Q_LANE"
514 TEST_ALL_VSTX_LANE(2);
515
516 #define CMT " (chunk 0)"
517 CHECK(TEST_MSG, int, 8, 8, PRIx8, expected_st2_0, CMT);
518 CHECK(TEST_MSG, int, 16, 4, PRIx16, expected_st2_0, CMT);
519 CHECK(TEST_MSG, int, 32, 2, PRIx32, expected_st2_0, CMT);
520 CHECK(TEST_MSG, uint, 8, 8, PRIx8, expected_st2_0, CMT);
521 CHECK(TEST_MSG, uint, 16, 4, PRIx16, expected_st2_0, CMT);
522 CHECK(TEST_MSG, uint, 32, 2, PRIx32, expected_st2_0, CMT);
523 CHECK_POLY(TEST_MSG, poly, 8, 8, PRIx8, expected_st2_0, CMT);
524 CHECK_POLY(TEST_MSG, poly, 16, 4, PRIx16, expected_st2_0, CMT);
525 MFLOAT8_ONLY(CHECK_FP(TEST_MSG, mfloat, 8, 8, PRIx8, expected_st2_0, CMT));
526 CHECK_FP(TEST_MSG, float, 32, 2, PRIx32, expected_st2_0, CMT);
527 CHECK(TEST_MSG, int, 16, 8, PRIx16, expected_st2_0, CMT);
528 CHECK(TEST_MSG, int, 32, 4, PRIx32, expected_st2_0, CMT);
529 CHECK(TEST_MSG, uint, 16, 8, PRIx16, expected_st2_0, CMT);
530 CHECK(TEST_MSG, uint, 32, 4, PRIx32, expected_st2_0, CMT);
531 CHECK_POLY(TEST_MSG, poly, 16, 8, PRIx16, expected_st2_0, CMT);
532 CHECK_FP(TEST_MSG, float, 32, 4, PRIx32, expected_st2_0, CMT);
533 #if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE)
534 CHECK_FP(TEST_MSG, float, 16, 4, PRIx16, expected_st2_0, CMT);
535 CHECK_FP(TEST_MSG, float, 16, 8, PRIx16, expected_st2_0, CMT);
536 #endif
537
538 TEST_ALL_EXTRA_CHUNKS(2, 1);
539 #undef CMT
540 #define CMT " (chunk 1)"
541 CHECK(TEST_MSG, int, 8, 8, PRIx8, expected_st2_1, CMT);
542 CHECK(TEST_MSG, int, 16, 4, PRIx16, expected_st2_1, CMT);
543 CHECK(TEST_MSG, int, 32, 2, PRIx32, expected_st2_1, CMT);
544 CHECK(TEST_MSG, uint, 8, 8, PRIx8, expected_st2_1, CMT);
545 CHECK(TEST_MSG, uint, 16, 4, PRIx16, expected_st2_1, CMT);
546 CHECK(TEST_MSG, uint, 32, 2, PRIx32, expected_st2_1, CMT);
547 CHECK_POLY(TEST_MSG, poly, 8, 8, PRIx8, expected_st2_1, CMT);
548 CHECK_POLY(TEST_MSG, poly, 16, 4, PRIx16, expected_st2_1, CMT);
549 MFLOAT8_ONLY(CHECK_FP(TEST_MSG, mfloat, 8, 8, PRIx8, expected_st2_1, CMT));
550 CHECK_FP(TEST_MSG, float, 32, 2, PRIx32, expected_st2_1, CMT);
551 CHECK(TEST_MSG, int, 16, 8, PRIx16, expected_st2_1, CMT);
552 CHECK(TEST_MSG, int, 32, 4, PRIx32, expected_st2_1, CMT);
553 CHECK(TEST_MSG, uint, 16, 8, PRIx16, expected_st2_1, CMT);
554 CHECK(TEST_MSG, uint, 32, 4, PRIx32, expected_st2_1, CMT);
555 CHECK_POLY(TEST_MSG, poly, 16, 8, PRIx16, expected_st2_1, CMT);
556 CHECK_FP(TEST_MSG, float, 32, 4, PRIx32, expected_st2_1, CMT);
557 #if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE)
558 CHECK_FP(TEST_MSG, float, 16, 4, PRIx16, expected_st2_1, CMT);
559 CHECK_FP(TEST_MSG, float, 16, 8, PRIx16, expected_st2_1, CMT);
560 #endif
561
562
563 /* Check vst3_lane/vst3q_lane. */
564 clean_results ();
565 #undef TEST_MSG
566 #define TEST_MSG "VST3_LANE/VST3Q_LANE"
567 TEST_ALL_VSTX_LANE(3);
568
569 #undef CMT
570 #define CMT " (chunk 0)"
571 CHECK(TEST_MSG, int, 8, 8, PRIx8, expected_st3_0, CMT);
572 CHECK(TEST_MSG, int, 16, 4, PRIx16, expected_st3_0, CMT);
573 CHECK(TEST_MSG, int, 32, 2, PRIx32, expected_st3_0, CMT);
574 CHECK(TEST_MSG, uint, 8, 8, PRIx8, expected_st3_0, CMT);
575 CHECK(TEST_MSG, uint, 16, 4, PRIx16, expected_st3_0, CMT);
576 CHECK(TEST_MSG, uint, 32, 2, PRIx32, expected_st3_0, CMT);
577 CHECK_POLY(TEST_MSG, poly, 8, 8, PRIx8, expected_st3_0, CMT);
578 CHECK_POLY(TEST_MSG, poly, 16, 4, PRIx16, expected_st3_0, CMT);
579 MFLOAT8_ONLY(CHECK_FP(TEST_MSG, mfloat, 8, 8, PRIx8, expected_st3_0, CMT));
580 CHECK_FP(TEST_MSG, float, 32, 2, PRIx32, expected_st3_0, CMT);
581 CHECK(TEST_MSG, int, 16, 8, PRIx16, expected_st3_0, CMT);
582 CHECK(TEST_MSG, int, 32, 4, PRIx32, expected_st3_0, CMT);
583 CHECK(TEST_MSG, uint, 16, 8, PRIx16, expected_st3_0, CMT);
584 CHECK(TEST_MSG, uint, 32, 4, PRIx32, expected_st3_0, CMT);
585 CHECK_POLY(TEST_MSG, poly, 16, 8, PRIx16, expected_st3_0, CMT);
586 CHECK_FP(TEST_MSG, float, 32, 4, PRIx32, expected_st3_0, CMT);
587 #if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE)
588 CHECK_FP(TEST_MSG, float, 16, 4, PRIx16, expected_st3_0, CMT);
589 CHECK_FP(TEST_MSG, float, 16, 8, PRIx16, expected_st3_0, CMT);
590 #endif
591
592 TEST_ALL_EXTRA_CHUNKS(3, 1);
593
594 #undef CMT
595 #define CMT " (chunk 1)"
596 CHECK(TEST_MSG, int, 8, 8, PRIx8, expected_st3_1, CMT);
597 CHECK(TEST_MSG, int, 16, 4, PRIx16, expected_st3_1, CMT);
598 CHECK(TEST_MSG, int, 32, 2, PRIx32, expected_st3_1, CMT);
599 CHECK(TEST_MSG, uint, 8, 8, PRIx8, expected_st3_1, CMT);
600 CHECK(TEST_MSG, uint, 16, 4, PRIx16, expected_st3_1, CMT);
601 CHECK(TEST_MSG, uint, 32, 2, PRIx32, expected_st3_1, CMT);
602 CHECK_POLY(TEST_MSG, poly, 8, 8, PRIx8, expected_st3_1, CMT);
603 CHECK_POLY(TEST_MSG, poly, 16, 4, PRIx16, expected_st3_1, CMT);
604 MFLOAT8_ONLY(CHECK_FP(TEST_MSG, mfloat, 8, 8, PRIx8, expected_st3_1, CMT));
605 CHECK_FP(TEST_MSG, float, 32, 2, PRIx32, expected_st3_1, CMT);
606 CHECK(TEST_MSG, int, 16, 8, PRIx16, expected_st3_1, CMT);
607 CHECK(TEST_MSG, int, 32, 4, PRIx32, expected_st3_1, CMT);
608 CHECK(TEST_MSG, uint, 16, 8, PRIx16, expected_st3_1, CMT);
609 CHECK(TEST_MSG, uint, 32, 4, PRIx32, expected_st3_1, CMT);
610 CHECK_POLY(TEST_MSG, poly, 16, 8, PRIx16, expected_st3_1, CMT);
611 CHECK_FP(TEST_MSG, float, 32, 4, PRIx32, expected_st3_1, CMT);
612 #if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE)
613 CHECK_FP(TEST_MSG, float, 16, 4, PRIx16, expected_st3_1, CMT);
614 CHECK_FP(TEST_MSG, float, 16, 8, PRIx16, expected_st3_1, CMT);
615 #endif
616
617 TEST_ALL_EXTRA_CHUNKS(3, 2);
618
619 #undef CMT
620 #define CMT " (chunk 2)"
621 CHECK(TEST_MSG, int, 8, 8, PRIx8, expected_st3_2, CMT);
622 CHECK(TEST_MSG, int, 16, 4, PRIx16, expected_st3_2, CMT);
623 CHECK(TEST_MSG, int, 32, 2, PRIx32, expected_st3_2, CMT);
624 CHECK(TEST_MSG, uint, 8, 8, PRIx8, expected_st3_2, CMT);
625 CHECK(TEST_MSG, uint, 16, 4, PRIx16, expected_st3_2, CMT);
626 CHECK(TEST_MSG, uint, 32, 2, PRIx32, expected_st3_2, CMT);
627 CHECK_POLY(TEST_MSG, poly, 8, 8, PRIx8, expected_st3_2, CMT);
628 CHECK_POLY(TEST_MSG, poly, 16, 4, PRIx16, expected_st3_2, CMT);
629 MFLOAT8_ONLY(CHECK_FP(TEST_MSG, mfloat, 8, 8, PRIx8, expected_st3_2, CMT));
630 CHECK_FP(TEST_MSG, float, 32, 2, PRIx32, expected_st3_2, CMT);
631 CHECK(TEST_MSG, int, 16, 8, PRIx16, expected_st3_2, CMT);
632 CHECK(TEST_MSG, int, 32, 4, PRIx32, expected_st3_2, CMT);
633 CHECK(TEST_MSG, uint, 16, 8, PRIx16, expected_st3_2, CMT);
634 CHECK(TEST_MSG, uint, 32, 4, PRIx32, expected_st3_2, CMT);
635 CHECK_POLY(TEST_MSG, poly, 16, 8, PRIx16, expected_st3_2, CMT);
636 CHECK_FP(TEST_MSG, float, 32, 4, PRIx32, expected_st3_2, CMT);
637 #if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE)
638 CHECK_FP(TEST_MSG, float, 16, 4, PRIx16, expected_st3_2, CMT);
639 CHECK_FP(TEST_MSG, float, 16, 8, PRIx16, expected_st3_2, CMT);
640 #endif
641
642
643 /* Check vst4_lane/vst4q_lane. */
644 clean_results ();
645 #undef TEST_MSG
646 #define TEST_MSG "VST4_LANE/VST4Q_LANE"
647 TEST_ALL_VSTX_LANE(4);
648
649 #undef CMT
650 #define CMT " (chunk 0)"
651 CHECK(TEST_MSG, int, 8, 8, PRIx8, expected_st4_0, CMT);
652 CHECK(TEST_MSG, int, 16, 4, PRIx16, expected_st4_0, CMT);
653 CHECK(TEST_MSG, int, 32, 2, PRIx32, expected_st4_0, CMT);
654 CHECK(TEST_MSG, uint, 8, 8, PRIx8, expected_st4_0, CMT);
655 CHECK(TEST_MSG, uint, 16, 4, PRIx16, expected_st4_0, CMT);
656 CHECK(TEST_MSG, uint, 32, 2, PRIx32, expected_st4_0, CMT);
657 CHECK_POLY(TEST_MSG, poly, 8, 8, PRIx8, expected_st4_0, CMT);
658 CHECK_POLY(TEST_MSG, poly, 16, 4, PRIx16, expected_st4_0, CMT);
659 MFLOAT8_ONLY(CHECK_FP(TEST_MSG, mfloat, 8, 8, PRIx8, expected_st4_0, CMT));
660 CHECK_FP(TEST_MSG, float, 32, 2, PRIx32, expected_st4_0, CMT);
661 CHECK(TEST_MSG, int, 16, 8, PRIx16, expected_st4_0, CMT);
662 CHECK(TEST_MSG, int, 32, 4, PRIx32, expected_st4_0, CMT);
663 CHECK(TEST_MSG, uint, 16, 8, PRIx16, expected_st4_0, CMT);
664 CHECK(TEST_MSG, uint, 32, 4, PRIx32, expected_st4_0, CMT);
665 CHECK_POLY(TEST_MSG, poly, 16, 8, PRIx16, expected_st4_0, CMT);
666 CHECK_FP(TEST_MSG, float, 32, 4, PRIx32, expected_st4_0, CMT);
667 #if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE)
668 CHECK_FP(TEST_MSG, float, 16, 4, PRIx16, expected_st4_0, CMT);
669 CHECK_FP(TEST_MSG, float, 16, 8, PRIx16, expected_st4_0, CMT);
670 #endif
671
672 TEST_ALL_EXTRA_CHUNKS(4, 1);
673
674 #undef CMT
675 #define CMT " (chunk 1)"
676 CHECK(TEST_MSG, int, 8, 8, PRIx8, expected_st4_1, CMT);
677 CHECK(TEST_MSG, int, 16, 4, PRIx16, expected_st4_1, CMT);
678 CHECK(TEST_MSG, int, 32, 2, PRIx32, expected_st4_1, CMT);
679 CHECK(TEST_MSG, uint, 8, 8, PRIx8, expected_st4_1, CMT);
680 CHECK(TEST_MSG, uint, 16, 4, PRIx16, expected_st4_1, CMT);
681 CHECK(TEST_MSG, uint, 32, 2, PRIx32, expected_st4_1, CMT);
682 CHECK_POLY(TEST_MSG, poly, 8, 8, PRIx8, expected_st4_1, CMT);
683 CHECK_POLY(TEST_MSG, poly, 16, 4, PRIx16, expected_st4_1, CMT);
684 MFLOAT8_ONLY(CHECK_FP(TEST_MSG, mfloat, 8, 8, PRIx8, expected_st4_1, CMT));
685 CHECK_FP(TEST_MSG, float, 32, 2, PRIx32, expected_st4_1, CMT);
686 CHECK(TEST_MSG, int, 16, 8, PRIx16, expected_st4_1, CMT);
687 CHECK(TEST_MSG, int, 32, 4, PRIx32, expected_st4_1, CMT);
688 CHECK(TEST_MSG, uint, 16, 8, PRIx16, expected_st4_1, CMT);
689 CHECK(TEST_MSG, uint, 32, 4, PRIx32, expected_st4_1, CMT);
690 CHECK_POLY(TEST_MSG, poly, 16, 8, PRIx16, expected_st4_1, CMT);
691 CHECK_FP(TEST_MSG, float, 32, 4, PRIx32, expected_st4_1, CMT);
692 #if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE)
693 CHECK_FP(TEST_MSG, float, 16, 4, PRIx16, expected_st4_1, CMT);
694 CHECK_FP(TEST_MSG, float, 16, 8, PRIx16, expected_st4_1, CMT);
695 #endif
696
697 TEST_ALL_EXTRA_CHUNKS(4, 2);
698
699 #undef CMT
700 #define CMT " (chunk 2)"
701 CHECK(TEST_MSG, int, 8, 8, PRIx8, expected_st4_2, CMT);
702 CHECK(TEST_MSG, int, 16, 4, PRIx16, expected_st4_2, CMT);
703 CHECK(TEST_MSG, int, 32, 2, PRIx32, expected_st4_2, CMT);
704 CHECK(TEST_MSG, uint, 8, 8, PRIx8, expected_st4_2, CMT);
705 CHECK(TEST_MSG, uint, 16, 4, PRIx16, expected_st4_2, CMT);
706 CHECK(TEST_MSG, uint, 32, 2, PRIx32, expected_st4_2, CMT);
707 CHECK_POLY(TEST_MSG, poly, 8, 8, PRIx8, expected_st4_2, CMT);
708 CHECK_POLY(TEST_MSG, poly, 16, 4, PRIx16, expected_st4_2, CMT);
709 MFLOAT8_ONLY(CHECK_FP(TEST_MSG, mfloat, 8, 8, PRIx8, expected_st4_2, CMT));
710 CHECK_FP(TEST_MSG, float, 32, 2, PRIx32, expected_st4_2, CMT);
711 CHECK(TEST_MSG, int, 16, 8, PRIx16, expected_st4_2, CMT);
712 CHECK(TEST_MSG, int, 32, 4, PRIx32, expected_st4_2, CMT);
713 CHECK(TEST_MSG, uint, 16, 8, PRIx16, expected_st4_2, CMT);
714 CHECK(TEST_MSG, uint, 32, 4, PRIx32, expected_st4_2, CMT);
715 CHECK_POLY(TEST_MSG, poly, 16, 8, PRIx16, expected_st4_2, CMT);
716 CHECK_FP(TEST_MSG, float, 32, 4, PRIx32, expected_st4_2, CMT);
717 #if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE)
718 CHECK_FP(TEST_MSG, float, 16, 4, PRIx16, expected_st4_2, CMT);
719 CHECK_FP(TEST_MSG, float, 16, 8, PRIx16, expected_st4_2, CMT);
720 #endif
721
722 TEST_ALL_EXTRA_CHUNKS(4, 3);
723
724 #undef CMT
725 #define CMT " (chunk 3)"
726 CHECK(TEST_MSG, int, 8, 8, PRIx8, expected_st4_3, CMT);
727 CHECK(TEST_MSG, int, 16, 4, PRIx16, expected_st4_3, CMT);
728 CHECK(TEST_MSG, int, 32, 2, PRIx32, expected_st4_3, CMT);
729 CHECK(TEST_MSG, uint, 8, 8, PRIx8, expected_st4_3, CMT);
730 CHECK(TEST_MSG, uint, 16, 4, PRIx16, expected_st4_3, CMT);
731 CHECK(TEST_MSG, uint, 32, 2, PRIx32, expected_st4_3, CMT);
732 CHECK_POLY(TEST_MSG, poly, 8, 8, PRIx8, expected_st4_3, CMT);
733 CHECK_POLY(TEST_MSG, poly, 16, 4, PRIx16, expected_st4_3, CMT);
734 MFLOAT8_ONLY(CHECK_FP(TEST_MSG, mfloat, 8, 8, PRIx8, expected_st4_3, CMT));
735 CHECK_FP(TEST_MSG, float, 32, 2, PRIx32, expected_st4_3, CMT);
736 CHECK(TEST_MSG, int, 16, 8, PRIx16, expected_st4_3, CMT);
737 CHECK(TEST_MSG, int, 32, 4, PRIx32, expected_st4_3, CMT);
738 CHECK(TEST_MSG, uint, 16, 8, PRIx16, expected_st4_3, CMT);
739 CHECK(TEST_MSG, uint, 32, 4, PRIx32, expected_st4_3, CMT);
740 CHECK_POLY(TEST_MSG, poly, 16, 8, PRIx16, expected_st4_3, CMT);
741 CHECK_FP(TEST_MSG, float, 32, 4, PRIx32, expected_st4_3, CMT);
742 #if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE)
743 CHECK_FP(TEST_MSG, float, 16, 4, PRIx16, expected_st4_3, CMT);
744 CHECK_FP(TEST_MSG, float, 16, 8, PRIx16, expected_st4_3, CMT);
745 #endif
746 }
747
748 int main (void)
749 {
750 exec_vstX_lane ();
751 return 0;
752 }