1 # RUN: not llvm-mc -triple=thumbv8.1m.main-none-eabi -mattr=+mve -show-encoding %s 2>%t \
2 # RUN: | FileCheck --check-prefix=CHECK %s
3 # RUN: FileCheck --check-prefix=ERROR %s < %t
5 # CHECK: vmov.i32 q0, #0x1bff @ encoding: [0x81,0xef,0x5b,0x0c]
8 # CHECK: vmov.i16 q0, #0x5c @ encoding: [0x85,0xef,0x5c,0x08]
11 # CHECK: vmov.i8 q0, #0x4c @ encoding: [0x84,0xef,0x5c,0x0e]
14 # CHECK: vmov.f32 q0, #-3.625000e+00 @ encoding: [0x80,0xff,0x5d,0x0f]
15 vmov.f32 q0
, #-3.625000e+00
17 # CHECK: vmov.f32 q0, #1.250000e-01 @ encoding: [0x84,0xef,0x50,0x0f]
20 # CHECK: vmov.f32 q0, #1.328125e-01 @ encoding: [0x84,0xef,0x51,0x0f]
21 vmov.f32 q0
, #0.1328125
23 # CHECK: vmov.f32 q0, #3.100000e+01 @ encoding: [0x83,0xef,0x5f,0x0f]
26 # CHECK: vmov.f32 s16, s1 @ encoding: [0xb0,0xee,0x60,0x8a]
29 # CHECK: vmov.f64 d0, d1 @ encoding: [0xb0,0xee,0x41,0x0b]
32 # CHECK: vmov.i64 q0, #0xff0000ffffffffff @ encoding: [0x81,0xff,0x7f,0x0e]
33 vmov.i64 q0
, #0xff0000ffffffffff
35 # ERROR: [[@LINE+1]]:14: error: invalid operand for instruction
38 # ERROR: [[@LINE+1]]:14: error: invalid operand for instruction
41 # ERROR: [[@LINE+1]]:14: error: invalid operand for instruction
42 vmov.i32 q0
, #0xabffffff
44 # ERROR: [[@LINE+1]]:14: error: invalid operand for instruction
45 vmov.i32 q0
, #0xabffffff
47 # ERROR: [[@LINE+1]]:14: error: invalid operand for instruction
50 # ERROR: [[@LINE+1]]:14: error: invalid operand for instruction
53 # CHECK: vmul.i8 q0, q0, q3 @ encoding: [0x00,0xef,0x56,0x09]
56 # CHECK: vmul.i16 q6, q0, q3 @ encoding: [0x10,0xef,0x56,0xc9]
59 # CHECK: vmul.i32 q7, q3, q6 @ encoding: [0x26,0xef,0x5c,0xe9]
62 # CHECK: vqrdmulh.s8 q0, q5, q5 @ encoding: [0x0a,0xff,0x4a,0x0b]
63 vqrdmulh.s8 q0
, q5
, q5
65 # CHECK: vqrdmulh.s16 q1, q4, q2 @ encoding: [0x18,0xff,0x44,0x2b]
66 vqrdmulh.s16 q1
, q4
, q2
68 # CHECK: vqrdmulh.s32 q0, q5, q0 @ encoding: [0x2a,0xff,0x40,0x0b]
69 vqrdmulh.s32 q0
, q5
, q0
71 # CHECK: vqdmulh.s8 q0, q4, q5 @ encoding: [0x08,0xef,0x4a,0x0b]
74 # CHECK: vqdmulh.s16 q6, q4, q0 @ encoding: [0x18,0xef,0x40,0xcb]
75 vqdmulh.s16 q6
, q4
, q0
77 # CHECK: vqdmulh.s32 q5, q0, q6 @ encoding: [0x20,0xef,0x4c,0xab]
78 vqdmulh.s32 q5
, q0
, q6
80 # CHECK: vsub.i8 q3, q2, q5 @ encoding: [0x04,0xff,0x4a,0x68]
83 # CHECK: vsub.i16 q0, q3, q6 @ encoding: [0x16,0xff,0x4c,0x08]
86 # CHECK: vsub.i32 q0, q0, q6 @ encoding: [0x20,0xff,0x4c,0x08]
89 # CHECK: vadd.i8 q0, q2, q2 @ encoding: [0x04,0xef,0x44,0x08]
92 # CHECK: vadd.i16 q2, q2, q1 @ encoding: [0x14,0xef,0x42,0x48]
95 # CHECK: vadd.i32 q0, q0, q6 @ encoding: [0x20,0xef,0x4c,0x08]
98 # CHECK: vqsub.s8 q1, q6, q0 @ encoding: [0x0c,0xef,0x50,0x22]
101 # CHECK: vqsub.s16 q0, q6, q1 @ encoding: [0x1c,0xef,0x52,0x02]
104 # CHECK: vqsub.s32 q0, q0, q5 @ encoding: [0x20,0xef,0x5a,0x02]
107 # CHECK: vqsub.u8 q0, q2, q6 @ encoding: [0x04,0xff,0x5c,0x02]
110 # CHECK: vqsub.u16 q0, q7, q1 @ encoding: [0x1e,0xff,0x52,0x02]
113 # CHECK: vqsub.u32 q1, q4, q7 @ encoding: [0x28,0xff,0x5e,0x22]
116 # CHECK: vqadd.s8 q0, q1, q2 @ encoding: [0x02,0xef,0x54,0x00]
119 # CHECK: vqadd.s8 q0, q4, q6 @ encoding: [0x08,0xef,0x5c,0x00]
122 # CHECK: vqadd.s16 q0, q5, q5 @ encoding: [0x1a,0xef,0x5a,0x00]
125 # CHECK: vqadd.s32 q0, q0, q4 @ encoding: [0x20,0xef,0x58,0x00]
128 # CHECK: vqadd.u8 q0, q4, q2 @ encoding: [0x08,0xff,0x54,0x00]
131 # CHECK: vqadd.u16 q4, q6, q6 @ encoding: [0x1c,0xff,0x5c,0x80]
134 # CHECK: vqadd.u32 q0, q1, q2 @ encoding: [0x22,0xff,0x54,0x00]
137 # CHECK: vabd.s8 q0, q0, q2 @ encoding: [0x00,0xef,0x44,0x07]
140 # CHECK: vabd.s16 q1, q5, q4 @ encoding: [0x1a,0xef,0x48,0x27]
143 # CHECK: vabd.s32 q2, q3, q2 @ encoding: [0x26,0xef,0x44,0x47]
146 # CHECK: vabd.u8 q1, q6, q4 @ encoding: [0x0c,0xff,0x48,0x27]
149 # CHECK: vabd.u16 q0, q6, q2 @ encoding: [0x1c,0xff,0x44,0x07]
152 # CHECK: vabd.u32 q0, q7, q4 @ encoding: [0x2e,0xff,0x48,0x07]
155 # CHECK: vrhadd.s8 q0, q1, q1 @ encoding: [0x02,0xef,0x42,0x01]
158 # CHECK: vrhadd.s16 q0, q1, q0 @ encoding: [0x12,0xef,0x40,0x01]
159 vrhadd.s16 q0
, q1
, q0
161 # CHECK: vrhadd.s32 q0, q4, q1 @ encoding: [0x28,0xef,0x42,0x01]
162 vrhadd.s32 q0
, q4
, q1
164 # CHECK: vrhadd.u8 q1, q0, q6 @ encoding: [0x00,0xff,0x4c,0x21]
167 # CHECK: vrhadd.u16 q2, q2, q5 @ encoding: [0x14,0xff,0x4a,0x41]
168 vrhadd.u16 q2
, q2
, q5
170 # CHECK: vrhadd.u32 q2, q3, q0 @ encoding: [0x26,0xff,0x40,0x41]
171 vrhadd.u32 q2
, q3
, q0
173 # CHECK: vhsub.s8 q0, q0, q2 @ encoding: [0x00,0xef,0x44,0x02]
176 # CHECK: vhsub.s16 q1, q3, q1 @ encoding: [0x16,0xef,0x42,0x22]
179 # CHECK: vhsub.s32 q0, q2, q5 @ encoding: [0x24,0xef,0x4a,0x02]
182 # CHECK: vhsub.u8 q0, q4, q2 @ encoding: [0x08,0xff,0x44,0x02]
185 # CHECK: vhsub.u16 q0, q7, q5 @ encoding: [0x1e,0xff,0x4a,0x02]
188 # CHECK: vhsub.u32 q2, q6, q4 @ encoding: [0x2c,0xff,0x48,0x42]
191 # CHECK: vhadd.s8 q0, q7, q0 @ encoding: [0x0e,0xef,0x40,0x00]
194 # CHECK: vhadd.s16 q4, q0, q2 @ encoding: [0x10,0xef,0x44,0x80]
197 # CHECK: vhadd.s32 q0, q3, q1 @ encoding: [0x26,0xef,0x42,0x00]
200 # CHECK: vhadd.u8 q3, q0, q3 @ encoding: [0x00,0xff,0x46,0x60]
203 # CHECK: vhadd.u16 q0, q1, q3 @ encoding: [0x12,0xff,0x46,0x00]
206 # CHECK: vhadd.u32 q0, q1, q3 @ encoding: [0x22,0xff,0x46,0x00]
209 # CHECK: vdup.8 q6, r8 @ encoding: [0xec,0xee,0x10,0x8b]
212 # CHECK: vdup.16 q7, lr @ encoding: [0xae,0xee,0x30,0xeb]
215 # CHECK: vdup.32 q1, r9 @ encoding: [0xa2,0xee,0x10,0x9b]
218 # CHECK: vpte.i8 eq, q0, q0
219 # CHECK: vdupt.16 q0, r1 @ encoding: [0xa0,0xee,0x30,0x1b]
220 # CHECK: vdupe.16 q0, r1 @ encoding: [0xa0,0xee,0x30,0x1b]
225 # CHECK: vcls.s8 q2, q1 @ encoding: [0xb0,0xff,0x42,0x44]
228 # CHECK: vcls.s16 q0, q4 @ encoding: [0xb4,0xff,0x48,0x04]
231 # CHECK: vcls.s32 q0, q0 @ encoding: [0xb8,0xff,0x40,0x04]
234 # CHECK: vclz.i8 q0, q7 @ encoding: [0xb0,0xff,0xce,0x04]
237 # CHECK: vclz.i16 q4, q7 @ encoding: [0xb4,0xff,0xce,0x84]
240 # CHECK: vclz.i32 q7, q5 @ encoding: [0xb8,0xff,0xca,0xe4]
243 # CHECK: vneg.s8 q1, q0 @ encoding: [0xb1,0xff,0xc0,0x23]
246 # CHECK: vneg.s16 q0, q1 @ encoding: [0xb5,0xff,0xc2,0x03]
249 # CHECK: vneg.s32 q7, q2 @ encoding: [0xb9,0xff,0xc4,0xe3]
252 # CHECK: vabs.s8 q1, q1 @ encoding: [0xb1,0xff,0x42,0x23]
255 # CHECK: vabs.s16 q0, q2 @ encoding: [0xb5,0xff,0x44,0x03]
258 # CHECK: vabs.s32 q0, q7 @ encoding: [0xb9,0xff,0x4e,0x03]
261 # CHECK: vqneg.s8 q0, q0 @ encoding: [0xb0,0xff,0xc0,0x07]
264 # CHECK: vqneg.s16 q6, q2 @ encoding: [0xb4,0xff,0xc4,0xc7]
267 # CHECK: vqneg.s32 q7, q2 @ encoding: [0xb8,0xff,0xc4,0xe7]
270 # CHECK: vqabs.s8 q2, q4 @ encoding: [0xb0,0xff,0x48,0x47]
273 # CHECK: vqabs.s16 q0, q2 @ encoding: [0xb4,0xff,0x44,0x07]
276 # CHECK: vqabs.s32 q0, q5 @ encoding: [0xb8,0xff,0x4a,0x07]
282 # CHECK: vpste @ encoding: [0x71,0xfe,0x4d,0x8f]
283 # CHECK: vnegt.s8 q0, q1 @ encoding: [0xb1,0xff,0xc2,0x03]
284 # CHECK: vnege.s8 q0, q1 @ encoding: [0xb1,0xff,0xc2,0x03]
287 vqaddt.s16 q0
, q1
, q2
288 # CHECK: vpst @ encoding: [0x71,0xfe,0x4d,0x0f]
289 # CHECK: vqaddt.s16 q0, q1, q2 @ encoding: [0x12,0xef,0x54,0x00]
294 # CHECK: vpste @ encoding: [0x71,0xfe,0x4d,0x8f]
295 # CHECK: vqnegt.s8 q0, q1 @ encoding: [0xb0,0xff,0xc2,0x07]
296 # CHECK: vqnege.s16 q0, q1 @ encoding: [0xb4,0xff,0xc2,0x07]
298 # CHECK: vmina.s8 q1, q7 @ encoding: [0x33,0xee,0x8f,0x3e]
299 # CHECK-NOFP: vmina.s8 q1, q7 @ encoding: [0x33,0xee,0x8f,0x3e]
302 # CHECK: vmina.s16 q1, q4 @ encoding: [0x37,0xee,0x89,0x3e]
303 # CHECK-NOFP: vmina.s16 q1, q4 @ encoding: [0x37,0xee,0x89,0x3e]
306 # CHECK: vmina.s32 q0, q7 @ encoding: [0x3b,0xee,0x8f,0x1e]
307 # CHECK-NOFP: vmina.s32 q0, q7 @ encoding: [0x3b,0xee,0x8f,0x1e]
310 # CHECK: vmaxa.s8 q0, q7 @ encoding: [0x33,0xee,0x8f,0x0e]
311 # CHECK-NOFP: vmaxa.s8 q0, q7 @ encoding: [0x33,0xee,0x8f,0x0e]
314 # CHECK: vmaxa.s16 q1, q0 @ encoding: [0x37,0xee,0x81,0x2e]
315 # CHECK-NOFP: vmaxa.s16 q1, q0 @ encoding: [0x37,0xee,0x81,0x2e]
318 # CHECK: vmaxa.s32 q1, q0 @ encoding: [0x3b,0xee,0x81,0x2e]
319 # CHECK-NOFP: vmaxa.s32 q1, q0 @ encoding: [0x3b,0xee,0x81,0x2e]