1// RUN: llvm-mc -triple=arm64 -mattr=+neon,+fullfp16 -show-encoding < %s | FileCheck %s
2
3// Check that the assembler can handle the documented syntax for AArch64
4
5
6//------------------------------------------------------------------------------
7// Element reverse
8//------------------------------------------------------------------------------
9         rev64 v0.16b, v31.16b
10         rev64 v2.8h, v4.8h
11         rev64 v6.4s, v8.4s
12         rev64 v1.8b, v9.8b
13         rev64 v13.4h, v21.4h
14         rev64 v4.2s, v0.2s
15
16// CHECK:	rev64	v0.16b, v31.16b         // encoding: [0xe0,0x0b,0x20,0x4e]
17// CHECK:	rev64	v2.8h, v4.8h            // encoding: [0x82,0x08,0x60,0x4e]
18// CHECK:	rev64	v6.4s, v8.4s            // encoding: [0x06,0x09,0xa0,0x4e]
19// CHECK:	rev64	v1.8b, v9.8b            // encoding: [0x21,0x09,0x20,0x0e]
20// CHECK:	rev64	v13.4h, v21.4h          // encoding: [0xad,0x0a,0x60,0x0e]
21// CHECK:	rev64	v4.2s, v0.2s            // encoding: [0x04,0x08,0xa0,0x0e]
22
23         rev32 v30.16b, v31.16b
24         rev32 v4.8h, v7.8h
25         rev32 v21.8b, v1.8b
26         rev32 v0.4h, v9.4h
27
28// CHECK:	rev32	v30.16b, v31.16b        // encoding: [0xfe,0x0b,0x20,0x6e]
29// CHECK:	rev32	v4.8h, v7.8h            // encoding: [0xe4,0x08,0x60,0x6e]
30// CHECK:	rev32	v21.8b, v1.8b           // encoding: [0x35,0x08,0x20,0x2e]
31// CHECK:	rev32	v0.4h, v9.4h            // encoding: [0x20,0x09,0x60,0x2e]
32
33         rev16 v30.16b, v31.16b
34         rev16 v21.8b, v1.8b
35
36// CHECK:	rev16	v30.16b, v31.16b        // encoding: [0xfe,0x1b,0x20,0x4e]
37// CHECK:	rev16	v21.8b, v1.8b           // encoding: [0x35,0x18,0x20,0x0e]
38
39//------------------------------------------------------------------------------
40// Signed integer pairwise add long
41//------------------------------------------------------------------------------
42
43         saddlp v3.8h, v21.16b
44         saddlp v8.4h, v5.8b
45         saddlp v9.4s, v1.8h
46         saddlp v0.2s, v1.4h
47         saddlp v12.2d, v4.4s
48         saddlp v17.1d, v28.2s
49
50// CHECK:	saddlp	v3.8h, v21.16b          // encoding: [0xa3,0x2a,0x20,0x4e]
51// CHECK:	saddlp	v8.4h, v5.8b            // encoding: [0xa8,0x28,0x20,0x0e]
52// CHECK:	saddlp	v9.4s, v1.8h            // encoding: [0x29,0x28,0x60,0x4e]
53// CHECK:	saddlp	v0.2s, v1.4h            // encoding: [0x20,0x28,0x60,0x0e]
54// CHECK:	saddlp	v12.2d, v4.4s           // encoding: [0x8c,0x28,0xa0,0x4e]
55// CHECK:	saddlp	v17.1d, v28.2s          // encoding: [0x91,0x2b,0xa0,0x0e]
56
57//------------------------------------------------------------------------------
58// Unsigned integer pairwise add long
59//------------------------------------------------------------------------------
60
61         uaddlp v3.8h, v21.16b
62         uaddlp v8.4h, v5.8b
63         uaddlp v9.4s, v1.8h
64         uaddlp v0.2s, v1.4h
65         uaddlp v12.2d, v4.4s
66         uaddlp v17.1d, v28.2s
67
68// CHECK:	uaddlp	v3.8h, v21.16b          // encoding: [0xa3,0x2a,0x20,0x6e]
69// CHECK:	uaddlp	v8.4h, v5.8b            // encoding: [0xa8,0x28,0x20,0x2e]
70// CHECK:	uaddlp	v9.4s, v1.8h            // encoding: [0x29,0x28,0x60,0x6e]
71// CHECK:	uaddlp	v0.2s, v1.4h            // encoding: [0x20,0x28,0x60,0x2e]
72// CHECK:	uaddlp	v12.2d, v4.4s           // encoding: [0x8c,0x28,0xa0,0x6e]
73// CHECK:	uaddlp	v17.1d, v28.2s          // encoding: [0x91,0x2b,0xa0,0x2e]
74
75//------------------------------------------------------------------------------
76// Signed integer pairwise add and accumulate long
77//------------------------------------------------------------------------------
78
79         sadalp v3.8h, v21.16b
80         sadalp v8.4h, v5.8b
81         sadalp v9.4s, v1.8h
82         sadalp v0.2s, v1.4h
83         sadalp v12.2d, v4.4s
84         sadalp v17.1d, v28.2s
85
86// CHECK:	sadalp	v3.8h, v21.16b          // encoding: [0xa3,0x6a,0x20,0x4e]
87// CHECK:	sadalp	v8.4h, v5.8b            // encoding: [0xa8,0x68,0x20,0x0e]
88// CHECK:	sadalp	v9.4s, v1.8h            // encoding: [0x29,0x68,0x60,0x4e]
89// CHECK:	sadalp	v0.2s, v1.4h            // encoding: [0x20,0x68,0x60,0x0e]
90// CHECK:	sadalp	v12.2d, v4.4s           // encoding: [0x8c,0x68,0xa0,0x4e]
91// CHECK:	sadalp	v17.1d, v28.2s          // encoding: [0x91,0x6b,0xa0,0x0e]
92
93//------------------------------------------------------------------------------
94// Unsigned integer pairwise add and accumulate long
95//------------------------------------------------------------------------------
96
97         uadalp v3.8h, v21.16b
98         uadalp v8.4h, v5.8b
99         uadalp v9.4s, v1.8h
100         uadalp v0.2s, v1.4h
101         uadalp v12.2d, v4.4s
102         uadalp v17.1d, v28.2s
103
104// CHECK:	uadalp	v3.8h, v21.16b          // encoding: [0xa3,0x6a,0x20,0x6e]
105// CHECK:	uadalp	v8.4h, v5.8b            // encoding: [0xa8,0x68,0x20,0x2e]
106// CHECK:	uadalp	v9.4s, v1.8h            // encoding: [0x29,0x68,0x60,0x6e]
107// CHECK:	uadalp	v0.2s, v1.4h            // encoding: [0x20,0x68,0x60,0x2e]
108// CHECK:	uadalp	v12.2d, v4.4s           // encoding: [0x8c,0x68,0xa0,0x6e]
109// CHECK:	uadalp	v17.1d, v28.2s          // encoding: [0x91,0x6b,0xa0,0x2e]
110
111//------------------------------------------------------------------------------
112// Signed integer saturating accumulate of unsigned value
113//------------------------------------------------------------------------------
114
115         suqadd v0.16b, v31.16b
116         suqadd v2.8h, v4.8h
117         suqadd v6.4s, v8.4s
118         suqadd v6.2d, v8.2d
119         suqadd v1.8b, v9.8b
120         suqadd v13.4h, v21.4h
121         suqadd v4.2s, v0.2s
122
123// CHECK:	suqadd	v0.16b, v31.16b         // encoding: [0xe0,0x3b,0x20,0x4e]
124// CHECK:	suqadd	v2.8h, v4.8h            // encoding: [0x82,0x38,0x60,0x4e]
125// CHECK:	suqadd	v6.4s, v8.4s            // encoding: [0x06,0x39,0xa0,0x4e]
126// CHECK:	suqadd	v6.2d, v8.2d            // encoding: [0x06,0x39,0xe0,0x4e]
127// CHECK:	suqadd	v1.8b, v9.8b            // encoding: [0x21,0x39,0x20,0x0e]
128// CHECK:	suqadd	v13.4h, v21.4h          // encoding: [0xad,0x3a,0x60,0x0e]
129// CHECK:	suqadd	v4.2s, v0.2s            // encoding: [0x04,0x38,0xa0,0x0e]
130
131//------------------------------------------------------------------------------
132// Unsigned integer saturating accumulate of signed value
133//------------------------------------------------------------------------------
134
135         usqadd v0.16b, v31.16b
136         usqadd v2.8h, v4.8h
137         usqadd v6.4s, v8.4s
138         usqadd v6.2d, v8.2d
139         usqadd v1.8b, v9.8b
140         usqadd v13.4h, v21.4h
141         usqadd v4.2s, v0.2s
142
143// CHECK:	usqadd	v0.16b, v31.16b         // encoding: [0xe0,0x3b,0x20,0x6e]
144// CHECK:	usqadd	v2.8h, v4.8h            // encoding: [0x82,0x38,0x60,0x6e]
145// CHECK:	usqadd	v6.4s, v8.4s            // encoding: [0x06,0x39,0xa0,0x6e]
146// CHECK:	usqadd	v6.2d, v8.2d            // encoding: [0x06,0x39,0xe0,0x6e]
147// CHECK:	usqadd	v1.8b, v9.8b            // encoding: [0x21,0x39,0x20,0x2e]
148// CHECK:	usqadd	v13.4h, v21.4h          // encoding: [0xad,0x3a,0x60,0x2e]
149// CHECK:	usqadd	v4.2s, v0.2s            // encoding: [0x04,0x38,0xa0,0x2e]
150
151//------------------------------------------------------------------------------
152// Integer saturating absolute
153//------------------------------------------------------------------------------
154
155         sqabs v0.16b, v31.16b
156         sqabs v2.8h, v4.8h
157         sqabs v6.4s, v8.4s
158         sqabs v6.2d, v8.2d
159         sqabs v1.8b, v9.8b
160         sqabs v13.4h, v21.4h
161         sqabs v4.2s, v0.2s
162
163// CHECK:	sqabs	v0.16b, v31.16b         // encoding: [0xe0,0x7b,0x20,0x4e]
164// CHECK:	sqabs	v2.8h, v4.8h            // encoding: [0x82,0x78,0x60,0x4e]
165// CHECK:	sqabs	v6.4s, v8.4s            // encoding: [0x06,0x79,0xa0,0x4e]
166// CHECK:	sqabs	v6.2d, v8.2d            // encoding: [0x06,0x79,0xe0,0x4e]
167// CHECK:	sqabs	v1.8b, v9.8b            // encoding: [0x21,0x79,0x20,0x0e]
168// CHECK:	sqabs	v13.4h, v21.4h          // encoding: [0xad,0x7a,0x60,0x0e]
169// CHECK:	sqabs	v4.2s, v0.2s            // encoding: [0x04,0x78,0xa0,0x0e]
170
171//------------------------------------------------------------------------------
172// Signed integer saturating negate
173//------------------------------------------------------------------------------
174
175         sqneg v0.16b, v31.16b
176         sqneg v2.8h, v4.8h
177         sqneg v6.4s, v8.4s
178         sqneg v6.2d, v8.2d
179         sqneg v1.8b, v9.8b
180         sqneg v13.4h, v21.4h
181         sqneg v4.2s, v0.2s
182
183// CHECK:	sqneg	v0.16b, v31.16b         // encoding: [0xe0,0x7b,0x20,0x6e]
184// CHECK:	sqneg	v2.8h, v4.8h            // encoding: [0x82,0x78,0x60,0x6e]
185// CHECK:	sqneg	v6.4s, v8.4s            // encoding: [0x06,0x79,0xa0,0x6e]
186// CHECK:	sqneg	v6.2d, v8.2d            // encoding: [0x06,0x79,0xe0,0x6e]
187// CHECK:	sqneg	v1.8b, v9.8b            // encoding: [0x21,0x79,0x20,0x2e]
188// CHECK:	sqneg	v13.4h, v21.4h          // encoding: [0xad,0x7a,0x60,0x2e]
189// CHECK:	sqneg	v4.2s, v0.2s            // encoding: [0x04,0x78,0xa0,0x2e]
190
191//------------------------------------------------------------------------------
192// Integer absolute
193//------------------------------------------------------------------------------
194
195         abs v0.16b, v31.16b
196         abs v2.8h, v4.8h
197         abs v6.4s, v8.4s
198         abs v6.2d, v8.2d
199         abs v1.8b, v9.8b
200         abs v13.4h, v21.4h
201         abs v4.2s, v0.2s
202
203// CHECK:	abs	v0.16b, v31.16b         // encoding: [0xe0,0xbb,0x20,0x4e]
204// CHECK:	abs	v2.8h, v4.8h            // encoding: [0x82,0xb8,0x60,0x4e]
205// CHECK:	abs	v6.4s, v8.4s            // encoding: [0x06,0xb9,0xa0,0x4e]
206// CHECK:	abs	v6.2d, v8.2d            // encoding: [0x06,0xb9,0xe0,0x4e]
207// CHECK:	abs	v1.8b, v9.8b            // encoding: [0x21,0xb9,0x20,0x0e]
208// CHECK:	abs	v13.4h, v21.4h          // encoding: [0xad,0xba,0x60,0x0e]
209// CHECK:	abs	v4.2s, v0.2s            // encoding: [0x04,0xb8,0xa0,0x0e]
210
211//------------------------------------------------------------------------------
212// Integer negate
213//------------------------------------------------------------------------------
214
215         neg v0.16b, v31.16b
216         neg v2.8h, v4.8h
217         neg v6.4s, v8.4s
218         neg v6.2d, v8.2d
219         neg v1.8b, v9.8b
220         neg v13.4h, v21.4h
221         neg v4.2s, v0.2s
222
223// CHECK:	neg	v0.16b, v31.16b         // encoding: [0xe0,0xbb,0x20,0x6e]
224// CHECK:	neg	v2.8h, v4.8h            // encoding: [0x82,0xb8,0x60,0x6e]
225// CHECK:	neg	v6.4s, v8.4s            // encoding: [0x06,0xb9,0xa0,0x6e]
226// CHECK:	neg	v6.2d, v8.2d            // encoding: [0x06,0xb9,0xe0,0x6e]
227// CHECK:	neg	v1.8b, v9.8b            // encoding: [0x21,0xb9,0x20,0x2e]
228// CHECK:	neg	v13.4h, v21.4h          // encoding: [0xad,0xba,0x60,0x2e]
229// CHECK:	neg	v4.2s, v0.2s            // encoding: [0x04,0xb8,0xa0,0x2e]
230
231//------------------------------------------------------------------------------
232// Integer count leading sign bits
233//------------------------------------------------------------------------------
234
235         cls v0.16b, v31.16b
236         cls v2.8h, v4.8h
237         cls v6.4s, v8.4s
238         cls v1.8b, v9.8b
239         cls v13.4h, v21.4h
240         cls v4.2s, v0.2s
241
242// CHECK:	cls	v0.16b, v31.16b         // encoding: [0xe0,0x4b,0x20,0x4e]
243// CHECK:	cls	v2.8h, v4.8h            // encoding: [0x82,0x48,0x60,0x4e]
244// CHECK:	cls	v6.4s, v8.4s            // encoding: [0x06,0x49,0xa0,0x4e]
245// CHECK:	cls	v1.8b, v9.8b            // encoding: [0x21,0x49,0x20,0x0e]
246// CHECK:	cls	v13.4h, v21.4h          // encoding: [0xad,0x4a,0x60,0x0e]
247// CHECK:	cls	v4.2s, v0.2s            // encoding: [0x04,0x48,0xa0,0x0e]
248
249//------------------------------------------------------------------------------
250// Integer count leading zeros
251//------------------------------------------------------------------------------
252
253         clz v0.16b, v31.16b
254         clz v2.8h, v4.8h
255         clz v6.4s, v8.4s
256         clz v1.8b, v9.8b
257         clz v13.4h, v21.4h
258         clz v4.2s, v0.2s
259
260// CHECK:	clz	v0.16b, v31.16b         // encoding: [0xe0,0x4b,0x20,0x6e]
261// CHECK:	clz	v2.8h, v4.8h            // encoding: [0x82,0x48,0x60,0x6e]
262// CHECK:	clz	v6.4s, v8.4s            // encoding: [0x06,0x49,0xa0,0x6e]
263// CHECK:	clz	v1.8b, v9.8b            // encoding: [0x21,0x49,0x20,0x2e]
264// CHECK:	clz	v13.4h, v21.4h          // encoding: [0xad,0x4a,0x60,0x2e]
265// CHECK:	clz	v4.2s, v0.2s            // encoding: [0x04,0x48,0xa0,0x2e]
266
267//------------------------------------------------------------------------------
268// Population count
269//------------------------------------------------------------------------------
270
271         cnt v0.16b, v31.16b
272         cnt v1.8b, v9.8b
273
274// CHECK:	cnt	v0.16b, v31.16b         // encoding: [0xe0,0x5b,0x20,0x4e]
275// CHECK:	cnt	v1.8b, v9.8b            // encoding: [0x21,0x59,0x20,0x0e]
276
277//------------------------------------------------------------------------------
278// Bitwise NOT
279//------------------------------------------------------------------------------
280
281         not v0.16b, v31.16b
282         not v1.8b, v9.8b
283
284// CHECK: {{mvn|not}} v0.16b, v31.16b         // encoding: [0xe0,0x5b,0x20,0x6e]
285// CHECK: {{mvn|not}} v1.8b, v9.8b            // encoding: [0x21,0x59,0x20,0x2e]
286
287//------------------------------------------------------------------------------
288// Bitwise reverse
289//------------------------------------------------------------------------------
290
291         rbit v0.16b, v31.16b
292         rbit v1.8b, v9.8b
293
294// CHECK:	rbit	v0.16b, v31.16b         // encoding: [0xe0,0x5b,0x60,0x6e]
295// CHECK:	rbit	v1.8b, v9.8b            // encoding: [0x21,0x59,0x60,0x2e]
296
297//------------------------------------------------------------------------------
298// Floating-point absolute
299//------------------------------------------------------------------------------
300
301         fabs v4.4h, v0.4h
302         fabs v6.8h, v8.8h
303         fabs v6.4s, v8.4s
304         fabs v6.2d, v8.2d
305         fabs v4.2s, v0.2s
306
307// CHECK: fabs    v4.4h, v0.4h            // encoding: [0x04,0xf8,0xf8,0x0e]
308// CHECK: fabs    v6.8h, v8.8h            // encoding: [0x06,0xf9,0xf8,0x4e]
309// CHECK:	fabs	v6.4s, v8.4s            // encoding: [0x06,0xf9,0xa0,0x4e]
310// CHECK:	fabs	v6.2d, v8.2d            // encoding: [0x06,0xf9,0xe0,0x4e]
311// CHECK:	fabs	v4.2s, v0.2s            // encoding: [0x04,0xf8,0xa0,0x0e]
312
313//------------------------------------------------------------------------------
314// Floating-point negate
315//------------------------------------------------------------------------------
316
317         fneg v4.4h, v0.4h
318         fneg v6.8h, v8.8h
319         fneg v6.4s, v8.4s
320         fneg v6.2d, v8.2d
321         fneg v4.2s, v0.2s
322
323// CHECK: fneg    v4.4h, v0.4h            // encoding: [0x04,0xf8,0xf8,0x2e]
324// CHECK: fneg    v6.8h, v8.8h            // encoding: [0x06,0xf9,0xf8,0x6e]
325// CHECK:	fneg	v6.4s, v8.4s            // encoding: [0x06,0xf9,0xa0,0x6e]
326// CHECK:	fneg	v6.2d, v8.2d            // encoding: [0x06,0xf9,0xe0,0x6e]
327// CHECK:	fneg	v4.2s, v0.2s            // encoding: [0x04,0xf8,0xa0,0x2e]
328
329//------------------------------------------------------------------------------
330// Integer extract and narrow
331//------------------------------------------------------------------------------
332
333         xtn2 v0.16b, v31.8h
334         xtn2 v2.8h, v4.4s
335         xtn2 v6.4s, v8.2d
336         xtn v1.8b, v9.8h
337         xtn v13.4h, v21.4s
338         xtn v4.2s, v0.2d
339
340// CHECK:	xtn2	v0.16b, v31.8h          // encoding: [0xe0,0x2b,0x21,0x4e]
341// CHECK:	xtn2	v2.8h, v4.4s            // encoding: [0x82,0x28,0x61,0x4e]
342// CHECK:	xtn2	v6.4s, v8.2d            // encoding: [0x06,0x29,0xa1,0x4e]
343// CHECK:	xtn	v1.8b, v9.8h            // encoding: [0x21,0x29,0x21,0x0e]
344// CHECK:	xtn	v13.4h, v21.4s          // encoding: [0xad,0x2a,0x61,0x0e]
345// CHECK:	xtn	v4.2s, v0.2d            // encoding: [0x04,0x28,0xa1,0x0e]
346
347//------------------------------------------------------------------------------
348// Signed integer saturating extract and unsigned narrow
349//------------------------------------------------------------------------------
350
351         sqxtun2 v0.16b, v31.8h
352         sqxtun2 v2.8h, v4.4s
353         sqxtun2 v6.4s, v8.2d
354         sqxtun v1.8b, v9.8h
355         sqxtun v13.4h, v21.4s
356         sqxtun v4.2s, v0.2d
357
358// CHECK:	sqxtun2	v0.16b, v31.8h          // encoding: [0xe0,0x2b,0x21,0x6e]
359// CHECK:	sqxtun2	v2.8h, v4.4s            // encoding: [0x82,0x28,0x61,0x6e]
360// CHECK:	sqxtun2	v6.4s, v8.2d            // encoding: [0x06,0x29,0xa1,0x6e]
361// CHECK:	sqxtun	v1.8b, v9.8h            // encoding: [0x21,0x29,0x21,0x2e]
362// CHECK:	sqxtun	v13.4h, v21.4s          // encoding: [0xad,0x2a,0x61,0x2e]
363// CHECK:	sqxtun	v4.2s, v0.2d            // encoding: [0x04,0x28,0xa1,0x2e]
364
365//------------------------------------------------------------------------------
366// Signed integer saturating extract and narrow
367//------------------------------------------------------------------------------
368
369         sqxtn2 v0.16b, v31.8h
370         sqxtn2 v2.8h, v4.4s
371         sqxtn2 v6.4s, v8.2d
372         sqxtn v1.8b, v9.8h
373         sqxtn v13.4h, v21.4s
374         sqxtn v4.2s, v0.2d
375
376// CHECK:	sqxtn2	v0.16b, v31.8h          // encoding: [0xe0,0x4b,0x21,0x4e]
377// CHECK:	sqxtn2	v2.8h, v4.4s            // encoding: [0x82,0x48,0x61,0x4e]
378// CHECK:	sqxtn2	v6.4s, v8.2d            // encoding: [0x06,0x49,0xa1,0x4e]
379// CHECK:	sqxtn	v1.8b, v9.8h            // encoding: [0x21,0x49,0x21,0x0e]
380// CHECK:	sqxtn	v13.4h, v21.4s          // encoding: [0xad,0x4a,0x61,0x0e]
381// CHECK:	sqxtn	v4.2s, v0.2d            // encoding: [0x04,0x48,0xa1,0x0e]
382
383//------------------------------------------------------------------------------
384// Unsigned integer saturating extract and narrow
385//------------------------------------------------------------------------------
386
387         uqxtn2 v0.16b, v31.8h
388         uqxtn2 v2.8h, v4.4s
389         uqxtn2 v6.4s, v8.2d
390         uqxtn v1.8b, v9.8h
391         uqxtn v13.4h, v21.4s
392         uqxtn v4.2s, v0.2d
393
394// CHECK:	uqxtn2	v0.16b, v31.8h          // encoding: [0xe0,0x4b,0x21,0x6e]
395// CHECK:	uqxtn2	v2.8h, v4.4s            // encoding: [0x82,0x48,0x61,0x6e]
396// CHECK:	uqxtn2	v6.4s, v8.2d            // encoding: [0x06,0x49,0xa1,0x6e]
397// CHECK:	uqxtn	v1.8b, v9.8h            // encoding: [0x21,0x49,0x21,0x2e]
398// CHECK:	uqxtn	v13.4h, v21.4s          // encoding: [0xad,0x4a,0x61,0x2e]
399// CHECK:	uqxtn	v4.2s, v0.2d            // encoding: [0x04,0x48,0xa1,0x2e]
400
401//------------------------------------------------------------------------------
402// Integer shift left long
403//------------------------------------------------------------------------------
404
405         shll2 v2.8h, v4.16b, #8
406         shll2 v6.4s, v8.8h, #16
407         shll2 v6.2d, v8.4s, #32
408         shll v2.8h, v4.8b, #8
409         shll v6.4s, v8.4h, #16
410         shll v6.2d, v8.2s, #32
411
412// CHECK:	shll2	v2.8h, v4.16b, #8      // encoding: [0x82,0x38,0x21,0x6e]
413// CHECK:	shll2	v6.4s, v8.8h, #16      // encoding: [0x06,0x39,0x61,0x6e]
414// CHECK:	shll2	v6.2d, v8.4s, #32      // encoding: [0x06,0x39,0xa1,0x6e]
415// CHECK:	shll	v2.8h, v4.8b, #8       // encoding: [0x82,0x38,0x21,0x2e]
416// CHECK:	shll	v6.4s, v8.4h, #16      // encoding: [0x06,0x39,0x61,0x2e]
417// CHECK:	shll	v6.2d, v8.2s, #32      // encoding: [0x06,0x39,0xa1,0x2e]
418
419//------------------------------------------------------------------------------
420// Floating-point convert downsize
421//------------------------------------------------------------------------------
422
423         fcvtn2 v2.8h, v4.4s
424         fcvtn2 v6.4s, v8.2d
425         fcvtn v13.4h, v21.4s
426         fcvtn v4.2s, v0.2d
427
428// CHECK:	fcvtn2	v2.8h, v4.4s            // encoding: [0x82,0x68,0x21,0x4e]
429// CHECK:	fcvtn2	v6.4s, v8.2d            // encoding: [0x06,0x69,0x61,0x4e]
430// CHECK:	fcvtn	v13.4h, v21.4s          // encoding: [0xad,0x6a,0x21,0x0e]
431// CHECK:	fcvtn	v4.2s, v0.2d            // encoding: [0x04,0x68,0x61,0x0e]
432
433//------------------------------------------------------------------------------
434// Floating-point convert downsize with inexact
435//------------------------------------------------------------------------------
436
437         fcvtxn2 v6.4s, v8.2d
438         fcvtxn v4.2s, v0.2d
439
440// CHECK:	fcvtxn2	v6.4s, v8.2d            // encoding: [0x06,0x69,0x61,0x6e]
441// CHECK:	fcvtxn	v4.2s, v0.2d            // encoding: [0x04,0x68,0x61,0x2e]
442
443//------------------------------------------------------------------------------
444// Floating-point convert upsize
445//------------------------------------------------------------------------------
446
447         fcvtl v9.4s, v1.4h
448         fcvtl v0.2d, v1.2s
449         fcvtl2 v12.4s, v4.8h
450         fcvtl2 v17.2d, v28.4s
451
452// CHECK:	fcvtl	v9.4s, v1.4h            // encoding: [0x29,0x78,0x21,0x0e]
453// CHECK:	fcvtl	v0.2d, v1.2s            // encoding: [0x20,0x78,0x61,0x0e]
454// CHECK:	fcvtl2	v12.4s, v4.8h           // encoding: [0x8c,0x78,0x21,0x4e]
455// CHECK:	fcvtl2	v17.2d, v28.4s          // encoding: [0x91,0x7b,0x61,0x4e]
456
457//------------------------------------------------------------------------------
458// Floating-point round to integral
459//------------------------------------------------------------------------------
460
461         frintn v4.4h, v0.4h
462         frintn v6.8h, v8.8h
463         frintn v6.4s, v8.4s
464         frintn v6.2d, v8.2d
465         frintn v4.2s, v0.2s
466
467// CHECK: frintn  v4.4h, v0.4h            // encoding: [0x04,0x88,0x79,0x0e]
468// CHECK: frintn  v6.8h, v8.8h            // encoding: [0x06,0x89,0x79,0x4e]
469// CHECK:	frintn	v6.4s, v8.4s            // encoding: [0x06,0x89,0x21,0x4e]
470// CHECK:	frintn	v6.2d, v8.2d            // encoding: [0x06,0x89,0x61,0x4e]
471// CHECK:	frintn	v4.2s, v0.2s            // encoding: [0x04,0x88,0x21,0x0e]
472
473         frinta v4.4h, v0.4h
474         frinta v6.8h, v8.8h
475         frinta v6.4s, v8.4s
476         frinta v6.2d, v8.2d
477         frinta v4.2s, v0.2s
478
479// CHECK: frinta  v4.4h, v0.4h            // encoding: [0x04,0x88,0x79,0x2e]
480// CHECK: frinta  v6.8h, v8.8h            // encoding: [0x06,0x89,0x79,0x6e]
481// CHECK:	frinta	v6.4s, v8.4s            // encoding: [0x06,0x89,0x21,0x6e]
482// CHECK:	frinta	v6.2d, v8.2d            // encoding: [0x06,0x89,0x61,0x6e]
483// CHECK:	frinta	v4.2s, v0.2s            // encoding: [0x04,0x88,0x21,0x2e]
484
485         frintp v4.4h, v0.4h
486         frintp v6.8h, v8.8h
487         frintp v6.4s, v8.4s
488         frintp v6.2d, v8.2d
489         frintp v4.2s, v0.2s
490
491// CHECK: frintp  v4.4h, v0.4h            // encoding: [0x04,0x88,0xf9,0x0e]
492// CHECK: frintp  v6.8h, v8.8h            // encoding: [0x06,0x89,0xf9,0x4e]
493// CHECK:	frintp	v6.4s, v8.4s            // encoding: [0x06,0x89,0xa1,0x4e]
494// CHECK:	frintp	v6.2d, v8.2d            // encoding: [0x06,0x89,0xe1,0x4e]
495// CHECK:	frintp	v4.2s, v0.2s            // encoding: [0x04,0x88,0xa1,0x0e]
496
497         frintm v4.4h, v0.4h
498         frintm v6.8h, v8.8h
499         frintm v6.4s, v8.4s
500         frintm v6.2d, v8.2d
501         frintm v4.2s, v0.2s
502
503// CHECK: frintm  v4.4h, v0.4h            // encoding: [0x04,0x98,0x79,0x0e]
504// CHECK: frintm  v6.8h, v8.8h            // encoding: [0x06,0x99,0x79,0x4e]
505// CHECK:	frintm	v6.4s, v8.4s            // encoding: [0x06,0x99,0x21,0x4e]
506// CHECK:	frintm	v6.2d, v8.2d            // encoding: [0x06,0x99,0x61,0x4e]
507// CHECK:	frintm	v4.2s, v0.2s            // encoding: [0x04,0x98,0x21,0x0e]
508
509         frintx v4.4h, v0.4h
510         frintx v6.8h, v8.8h
511         frintx v6.4s, v8.4s
512         frintx v6.2d, v8.2d
513         frintx v4.2s, v0.2s
514
515// CHECK: frintx  v4.4h, v0.4h            // encoding: [0x04,0x98,0x79,0x2e]
516// CHECK: frintx  v6.8h, v8.8h            // encoding: [0x06,0x99,0x79,0x6e]
517// CHECK:	frintx	v6.4s, v8.4s            // encoding: [0x06,0x99,0x21,0x6e]
518// CHECK:	frintx	v6.2d, v8.2d            // encoding: [0x06,0x99,0x61,0x6e]
519// CHECK:	frintx	v4.2s, v0.2s            // encoding: [0x04,0x98,0x21,0x2e]
520
521         frintz v4.4h, v0.4h
522         frintz v6.8h, v8.8h
523         frintz v6.4s, v8.4s
524         frintz v6.2d, v8.2d
525         frintz v4.2s, v0.2s
526
527// CHECK: frintz  v4.4h, v0.4h            // encoding: [0x04,0x98,0xf9,0x0e]
528// CHECK: frintz  v6.8h, v8.8h            // encoding: [0x06,0x99,0xf9,0x4e]
529// CHECK:	frintz	v6.4s, v8.4s            // encoding: [0x06,0x99,0xa1,0x4e]
530// CHECK:	frintz	v6.2d, v8.2d            // encoding: [0x06,0x99,0xe1,0x4e]
531// CHECK:	frintz	v4.2s, v0.2s            // encoding: [0x04,0x98,0xa1,0x0e]
532
533         frinti v4.4h, v0.4h
534         frinti v6.8h, v8.8h
535         frinti v6.4s, v8.4s
536         frinti v6.2d, v8.2d
537         frinti v4.2s, v0.2s
538
539// CHECK: frinti  v4.4h, v0.4h            // encoding: [0x04,0x98,0xf9,0x2e]
540// CHECK: frinti  v6.8h, v8.8h            // encoding: [0x06,0x99,0xf9,0x6e]
541// CHECK:	frinti	v6.4s, v8.4s            // encoding: [0x06,0x99,0xa1,0x6e]
542// CHECK:	frinti	v6.2d, v8.2d            // encoding: [0x06,0x99,0xe1,0x6e]
543// CHECK:	frinti	v4.2s, v0.2s            // encoding: [0x04,0x98,0xa1,0x2e]
544
545//------------------------------------------------------------------------------
546// Floating-point convert to integer
547//------------------------------------------------------------------------------
548
549         fcvtns v4.4h, v0.4h
550         fcvtns v6.8h, v8.8h
551         fcvtns v6.4s, v8.4s
552         fcvtns v6.2d, v8.2d
553         fcvtns v4.2s, v0.2s
554
555// CHECK: fcvtns  v4.4h, v0.4h            // encoding: [0x04,0xa8,0x79,0x0e]
556// CHECK: fcvtns  v6.8h, v8.8h            // encoding: [0x06,0xa9,0x79,0x4e]
557// CHECK:	fcvtns	v6.4s, v8.4s            // encoding: [0x06,0xa9,0x21,0x4e]
558// CHECK:	fcvtns	v6.2d, v8.2d            // encoding: [0x06,0xa9,0x61,0x4e]
559// CHECK:	fcvtns	v4.2s, v0.2s            // encoding: [0x04,0xa8,0x21,0x0e]
560
561         fcvtnu v4.4h, v0.4h
562         fcvtnu v6.8h, v8.8h
563         fcvtnu v6.4s, v8.4s
564         fcvtnu v6.2d, v8.2d
565         fcvtnu v4.2s, v0.2s
566
567// CHECK: fcvtnu  v4.4h, v0.4h            // encoding: [0x04,0xa8,0x79,0x2e]
568// CHECK: fcvtnu  v6.8h, v8.8h            // encoding: [0x06,0xa9,0x79,0x6e]
569// CHECK:	fcvtnu	v6.4s, v8.4s            // encoding: [0x06,0xa9,0x21,0x6e]
570// CHECK:	fcvtnu	v6.2d, v8.2d            // encoding: [0x06,0xa9,0x61,0x6e]
571// CHECK:	fcvtnu	v4.2s, v0.2s            // encoding: [0x04,0xa8,0x21,0x2e]
572
573         fcvtps v4.4h, v0.4h
574         fcvtps v6.8h, v8.8h
575         fcvtps v6.4s, v8.4s
576         fcvtps v6.2d, v8.2d
577         fcvtps v4.2s, v0.2s
578
579// CHECK: fcvtps  v4.4h, v0.4h            // encoding: [0x04,0xa8,0xf9,0x0e]
580// CHECK: fcvtps  v6.8h, v8.8h            // encoding: [0x06,0xa9,0xf9,0x4e]
581// CHECK:	fcvtps	v6.4s, v8.4s            // encoding: [0x06,0xa9,0xa1,0x4e]
582// CHECK:	fcvtps	v6.2d, v8.2d            // encoding: [0x06,0xa9,0xe1,0x4e]
583// CHECK:	fcvtps	v4.2s, v0.2s            // encoding: [0x04,0xa8,0xa1,0x0e]
584
585         fcvtpu v4.4h, v0.4h
586         fcvtpu v6.8h, v8.8h
587         fcvtpu v6.4s, v8.4s
588         fcvtpu v6.2d, v8.2d
589         fcvtpu v4.2s, v0.2s
590
591// CHECK: fcvtpu  v4.4h, v0.4h            // encoding: [0x04,0xa8,0xf9,0x2e]
592// CHECK: fcvtpu  v6.8h, v8.8h            // encoding: [0x06,0xa9,0xf9,0x6e]
593// CHECK:	fcvtpu	v6.4s, v8.4s            // encoding: [0x06,0xa9,0xa1,0x6e]
594// CHECK:	fcvtpu	v6.2d, v8.2d            // encoding: [0x06,0xa9,0xe1,0x6e]
595// CHECK:	fcvtpu	v4.2s, v0.2s            // encoding: [0x04,0xa8,0xa1,0x2e]
596
597         fcvtms v4.4h, v0.4h
598         fcvtms v6.8h, v8.8h
599         fcvtms v6.4s, v8.4s
600         fcvtms v6.2d, v8.2d
601         fcvtms v4.2s, v0.2s
602
603// CHECK: fcvtms  v4.4h, v0.4h            // encoding: [0x04,0xb8,0x79,0x0e]
604// CHECK: fcvtms  v6.8h, v8.8h            // encoding: [0x06,0xb9,0x79,0x4e]
605// CHECK:	fcvtms	v6.4s, v8.4s            // encoding: [0x06,0xb9,0x21,0x4e]
606// CHECK:	fcvtms	v6.2d, v8.2d            // encoding: [0x06,0xb9,0x61,0x4e]
607// CHECK:	fcvtms	v4.2s, v0.2s            // encoding: [0x04,0xb8,0x21,0x0e]
608
609         fcvtmu v4.4h, v0.4h
610         fcvtmu v6.8h, v8.8h
611         fcvtmu v6.4s, v8.4s
612         fcvtmu v6.2d, v8.2d
613         fcvtmu v4.2s, v0.2s
614
615// CHECK: fcvtmu  v4.4h, v0.4h            // encoding: [0x04,0xb8,0x79,0x2e]
616// CHECK: fcvtmu  v6.8h, v8.8h            // encoding: [0x06,0xb9,0x79,0x6e]
617// CHECK:	fcvtmu	v6.4s, v8.4s            // encoding: [0x06,0xb9,0x21,0x6e]
618// CHECK:	fcvtmu	v6.2d, v8.2d            // encoding: [0x06,0xb9,0x61,0x6e]
619// CHECK:	fcvtmu	v4.2s, v0.2s            // encoding: [0x04,0xb8,0x21,0x2e]
620
621         fcvtzs v4.4h, v0.4h
622         fcvtzs v6.8h, v8.8h
623         fcvtzs v6.4s, v8.4s
624         fcvtzs v6.2d, v8.2d
625         fcvtzs v4.2s, v0.2s
626
627// CHECK: fcvtzs  v4.4h, v0.4h            // encoding: [0x04,0xb8,0xf9,0x0e]
628// CHECK: fcvtzs  v6.8h, v8.8h            // encoding: [0x06,0xb9,0xf9,0x4e]
629// CHECK:	fcvtzs	v6.4s, v8.4s            // encoding: [0x06,0xb9,0xa1,0x4e]
630// CHECK:	fcvtzs	v6.2d, v8.2d            // encoding: [0x06,0xb9,0xe1,0x4e]
631// CHECK:	fcvtzs	v4.2s, v0.2s            // encoding: [0x04,0xb8,0xa1,0x0e]
632
633
634         fcvtzu v4.4h, v0.4h
635         fcvtzu v6.8h, v8.8h
636         fcvtzu v6.4s, v8.4s
637         fcvtzu v6.2d, v8.2d
638         fcvtzu v4.2s, v0.2s
639
640// CHECK: fcvtzu  v4.4h, v0.4h            // encoding: [0x04,0xb8,0xf9,0x2e]
641// CHECK: fcvtzu  v6.8h, v8.8h            // encoding: [0x06,0xb9,0xf9,0x6e]
642// CHECK:	fcvtzu	v6.4s, v8.4s            // encoding: [0x06,0xb9,0xa1,0x6e]
643// CHECK:	fcvtzu	v6.2d, v8.2d            // encoding: [0x06,0xb9,0xe1,0x6e]
644// CHECK:	fcvtzu	v4.2s, v0.2s            // encoding: [0x04,0xb8,0xa1,0x2e]
645
646         fcvtas v4.4h, v0.4h
647         fcvtas v6.8h, v8.8h
648         fcvtas v6.4s, v8.4s
649         fcvtas v6.2d, v8.2d
650         fcvtas v4.2s, v0.2s
651
652// CHECK: fcvtas  v4.4h, v0.4h            // encoding: [0x04,0xc8,0x79,0x0e]
653// CHECK: fcvtas  v6.8h, v8.8h            // encoding: [0x06,0xc9,0x79,0x4e]
654// CHECK:	fcvtas	v6.4s, v8.4s            // encoding: [0x06,0xc9,0x21,0x4e]
655// CHECK:	fcvtas	v6.2d, v8.2d            // encoding: [0x06,0xc9,0x61,0x4e]
656// CHECK:	fcvtas	v4.2s, v0.2s            // encoding: [0x04,0xc8,0x21,0x0e]
657
658         fcvtau v4.4h, v0.4h
659         fcvtau v6.8h, v8.8h
660         fcvtau v6.4s, v8.4s
661         fcvtau v6.2d, v8.2d
662         fcvtau v4.2s, v0.2s
663
664// CHECK: fcvtau  v4.4h, v0.4h            // encoding: [0x04,0xc8,0x79,0x2e]
665// CHECK: fcvtau  v6.8h, v8.8h            // encoding: [0x06,0xc9,0x79,0x6e]
666// CHECK:	fcvtau	v6.4s, v8.4s            // encoding: [0x06,0xc9,0x21,0x6e]
667// CHECK:	fcvtau	v6.2d, v8.2d            // encoding: [0x06,0xc9,0x61,0x6e]
668// CHECK:	fcvtau	v4.2s, v0.2s            // encoding: [0x04,0xc8,0x21,0x2e]
669
670         urecpe v6.4s, v8.4s
671         urecpe v4.2s, v0.2s
672
673// CHECK:	urecpe	v6.4s, v8.4s            // encoding: [0x06,0xc9,0xa1,0x4e]
674// CHECK:	urecpe	v4.2s, v0.2s            // encoding: [0x04,0xc8,0xa1,0x0e]
675
676         ursqrte v6.4s, v8.4s
677         ursqrte v4.2s, v0.2s
678
679// CHECK:	ursqrte	v6.4s, v8.4s            // encoding: [0x06,0xc9,0xa1,0x6e]
680// CHECK:	ursqrte	v4.2s, v0.2s            // encoding: [0x04,0xc8,0xa1,0x2e]
681
682         scvtf v4.4h, v0.4h
683         scvtf v6.8h, v8.8h
684         scvtf v6.4s, v8.4s
685         scvtf v6.2d, v8.2d
686         scvtf v4.2s, v0.2s
687
688// CHECK: scvtf   v4.4h, v0.4h            // encoding: [0x04,0xd8,0x79,0x0e]
689// CHECK: scvtf   v6.8h, v8.8h            // encoding: [0x06,0xd9,0x79,0x4e]
690// CHECK:	scvtf	v6.4s, v8.4s            // encoding: [0x06,0xd9,0x21,0x4e]
691// CHECK:	scvtf	v6.2d, v8.2d            // encoding: [0x06,0xd9,0x61,0x4e]
692// CHECK:	scvtf	v4.2s, v0.2s            // encoding: [0x04,0xd8,0x21,0x0e]
693
694         ucvtf v4.4h, v0.4h
695         ucvtf v6.8h, v8.8h
696         ucvtf v6.4s, v8.4s
697         ucvtf v6.2d, v8.2d
698         ucvtf v4.2s, v0.2s
699
700// CHECK: ucvtf   v4.4h, v0.4h            // encoding: [0x04,0xd8,0x79,0x2e]
701// CHECK: ucvtf   v6.8h, v8.8h            // encoding: [0x06,0xd9,0x79,0x6e]
702// CHECK:	ucvtf	v6.4s, v8.4s            // encoding: [0x06,0xd9,0x21,0x6e]
703// CHECK:	ucvtf	v6.2d, v8.2d            // encoding: [0x06,0xd9,0x61,0x6e]
704// CHECK:	ucvtf	v4.2s, v0.2s            // encoding: [0x04,0xd8,0x21,0x2e]
705
706         frecpe v4.4h, v0.4h
707         frecpe v6.8h, v8.8h
708         frecpe v6.4s, v8.4s
709         frecpe v6.2d, v8.2d
710         frecpe v4.2s, v0.2s
711
712// CHECK: frecpe  v4.4h, v0.4h            // encoding: [0x04,0xd8,0xf9,0x0e]
713// CHECK: frecpe  v6.8h, v8.8h            // encoding: [0x06,0xd9,0xf9,0x4e]
714// CHECK:	frecpe	v6.4s, v8.4s            // encoding: [0x06,0xd9,0xa1,0x4e]
715// CHECK:	frecpe	v6.2d, v8.2d            // encoding: [0x06,0xd9,0xe1,0x4e]
716// CHECK:	frecpe	v4.2s, v0.2s            // encoding: [0x04,0xd8,0xa1,0x0e]
717
718         frsqrte v4.4h, v0.4h
719         frsqrte v6.8h, v8.8h
720         frsqrte v6.4s, v8.4s
721         frsqrte v6.2d, v8.2d
722         frsqrte v4.2s, v0.2s
723
724// CHECK: frsqrte v4.4h, v0.4h            // encoding: [0x04,0xd8,0xf9,0x2e]
725// CHECK: frsqrte v6.8h, v8.8h            // encoding: [0x06,0xd9,0xf9,0x6e]
726// CHECK:	frsqrte	v6.4s, v8.4s            // encoding: [0x06,0xd9,0xa1,0x6e]
727// CHECK:	frsqrte	v6.2d, v8.2d            // encoding: [0x06,0xd9,0xe1,0x6e]
728// CHECK:	frsqrte	v4.2s, v0.2s            // encoding: [0x04,0xd8,0xa1,0x2e]
729
730         fsqrt v4.4h, v0.4h
731         fsqrt v6.8h, v8.8h
732         fsqrt v6.4s, v8.4s
733         fsqrt v6.2d, v8.2d
734         fsqrt v4.2s, v0.2s
735
736// CHECK: fsqrt   v4.4h, v0.4h            // encoding: [0x04,0xf8,0xf9,0x2e]
737// CHECK: fsqrt   v6.8h, v8.8h            // encoding: [0x06,0xf9,0xf9,0x6e]
738// CHECK:	fsqrt	v6.4s, v8.4s            // encoding: [0x06,0xf9,0xa1,0x6e]
739// CHECK:	fsqrt	v6.2d, v8.2d            // encoding: [0x06,0xf9,0xe1,0x6e]
740// CHECK:	fsqrt	v4.2s, v0.2s            // encoding: [0x04,0xf8,0xa1,0x2e]
741
742
743