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 4 5# CHECK: vmov.i32 q0, #0x1bff @ encoding: [0x81,0xef,0x5b,0x0c] 6vmov.i32 q0, #0x1bff 7 8# CHECK: vmov.i16 q0, #0x5c @ encoding: [0x85,0xef,0x5c,0x08] 9vmov.i16 q0, #0x5c 10 11# CHECK: vmov.i8 q0, #0x4c @ encoding: [0x84,0xef,0x5c,0x0e] 12vmov.i8 q0, #0x4c 13 14# CHECK: vmov.f32 q0, #-3.625000e+00 @ encoding: [0x80,0xff,0x5d,0x0f] 15vmov.f32 q0, #-3.625000e+00 16 17# CHECK: vmov.f32 q0, #1.250000e-01 @ encoding: [0x84,0xef,0x50,0x0f] 18vmov.f32 q0, #0.125 19 20# CHECK: vmov.f32 q0, #1.328125e-01 @ encoding: [0x84,0xef,0x51,0x0f] 21vmov.f32 q0, #0.1328125 22 23# CHECK: vmov.f32 q0, #3.100000e+01 @ encoding: [0x83,0xef,0x5f,0x0f] 24vmov.f32 q0, #31.0 25 26# CHECK: vmov.f32 s16, s1 @ encoding: [0xb0,0xee,0x60,0x8a] 27vmov.f32 s16, s1 28 29# CHECK: vmov.f64 d0, d1 @ encoding: [0xb0,0xee,0x41,0x0b] 30vmov.f64 d0, d1 31 32# CHECK: vmov.i64 q0, #0xff0000ffffffffff @ encoding: [0x81,0xff,0x7f,0x0e] 33vmov.i64 q0, #0xff0000ffffffffff 34 35# ERROR: [[@LINE+1]]:14: error: invalid operand for instruction 36vmov.i32 q0, #0xabcd 37 38# ERROR: [[@LINE+1]]:14: error: invalid operand for instruction 39vmov.i16 q0, #0xabcd 40 41# ERROR: [[@LINE+1]]:14: error: invalid operand for instruction 42vmov.i32 q0, #0xabffffff 43 44# ERROR: [[@LINE+1]]:14: error: invalid operand for instruction 45vmov.i32 q0, #0xabffffff 46 47# ERROR: [[@LINE+1]]:14: error: invalid operand for instruction 48vmov.f32 q0, #0.0625 49 50# ERROR: [[@LINE+1]]:14: error: invalid operand for instruction 51vmov.f32 q0, #33.0 52 53# CHECK: vmul.i8 q0, q0, q3 @ encoding: [0x00,0xef,0x56,0x09] 54vmul.i8 q0, q0, q3 55 56# CHECK: vmul.i16 q6, q0, q3 @ encoding: [0x10,0xef,0x56,0xc9] 57vmul.i16 q6, q0, q3 58 59# CHECK: vmul.i32 q7, q3, q6 @ encoding: [0x26,0xef,0x5c,0xe9] 60vmul.i32 q7, q3, q6 61 62# CHECK: vqrdmulh.s8 q0, q5, q5 @ encoding: [0x0a,0xff,0x4a,0x0b] 63vqrdmulh.s8 q0, q5, q5 64 65# CHECK: vqrdmulh.s16 q1, q4, q2 @ encoding: [0x18,0xff,0x44,0x2b] 66vqrdmulh.s16 q1, q4, q2 67 68# CHECK: vqrdmulh.s32 q0, q5, q0 @ encoding: [0x2a,0xff,0x40,0x0b] 69vqrdmulh.s32 q0, q5, q0 70 71# CHECK: vqdmulh.s8 q0, q4, q5 @ encoding: [0x08,0xef,0x4a,0x0b] 72vqdmulh.s8 q0, q4, q5 73 74# CHECK: vqdmulh.s16 q6, q4, q0 @ encoding: [0x18,0xef,0x40,0xcb] 75vqdmulh.s16 q6, q4, q0 76 77# CHECK: vqdmulh.s32 q5, q0, q6 @ encoding: [0x20,0xef,0x4c,0xab] 78vqdmulh.s32 q5, q0, q6 79 80# CHECK: vsub.i8 q3, q2, q5 @ encoding: [0x04,0xff,0x4a,0x68] 81vsub.i8 q3, q2, q5 82 83# CHECK: vsub.i16 q0, q3, q6 @ encoding: [0x16,0xff,0x4c,0x08] 84vsub.i16 q0, q3, q6 85 86# CHECK: vsub.i32 q0, q0, q6 @ encoding: [0x20,0xff,0x4c,0x08] 87vsub.i32 q0, q0, q6 88 89# CHECK: vadd.i8 q0, q2, q2 @ encoding: [0x04,0xef,0x44,0x08] 90vadd.i8 q0, q2, q2 91 92# CHECK: vadd.i16 q2, q2, q1 @ encoding: [0x14,0xef,0x42,0x48] 93vadd.i16 q2, q2, q1 94 95# CHECK: vadd.i32 q0, q0, q6 @ encoding: [0x20,0xef,0x4c,0x08] 96vadd.i32 q0, q0, q6 97 98# CHECK: vqsub.s8 q1, q6, q0 @ encoding: [0x0c,0xef,0x50,0x22] 99vqsub.s8 q1, q6, q0 100 101# CHECK: vqsub.s16 q0, q6, q1 @ encoding: [0x1c,0xef,0x52,0x02] 102vqsub.s16 q0, q6, q1 103 104# CHECK: vqsub.s32 q0, q0, q5 @ encoding: [0x20,0xef,0x5a,0x02] 105vqsub.s32 q0, q0, q5 106 107# CHECK: vqsub.u8 q0, q2, q6 @ encoding: [0x04,0xff,0x5c,0x02] 108vqsub.u8 q0, q2, q6 109 110# CHECK: vqsub.u16 q0, q7, q1 @ encoding: [0x1e,0xff,0x52,0x02] 111vqsub.u16 q0, q7, q1 112 113# CHECK: vqsub.u32 q1, q4, q7 @ encoding: [0x28,0xff,0x5e,0x22] 114vqsub.u32 q1, q4, q7 115 116# CHECK: vqadd.s8 q0, q1, q2 @ encoding: [0x02,0xef,0x54,0x00] 117vqadd.s8 q0, q1, q2 118 119# CHECK: vqadd.s8 q0, q4, q6 @ encoding: [0x08,0xef,0x5c,0x00] 120vqadd.s8 q0, q4, q6 121 122# CHECK: vqadd.s16 q0, q5, q5 @ encoding: [0x1a,0xef,0x5a,0x00] 123vqadd.s16 q0, q5, q5 124 125# CHECK: vqadd.s32 q0, q0, q4 @ encoding: [0x20,0xef,0x58,0x00] 126vqadd.s32 q0, q0, q4 127 128# CHECK: vqadd.u8 q0, q4, q2 @ encoding: [0x08,0xff,0x54,0x00] 129vqadd.u8 q0, q4, q2 130 131# CHECK: vqadd.u16 q4, q6, q6 @ encoding: [0x1c,0xff,0x5c,0x80] 132vqadd.u16 q4, q6, q6 133 134# CHECK: vqadd.u32 q0, q1, q2 @ encoding: [0x22,0xff,0x54,0x00] 135vqadd.u32 q0, q1, q2 136 137# CHECK: vabd.s8 q0, q0, q2 @ encoding: [0x00,0xef,0x44,0x07] 138vabd.s8 q0, q0, q2 139 140# CHECK: vabd.s16 q1, q5, q4 @ encoding: [0x1a,0xef,0x48,0x27] 141vabd.s16 q1, q5, q4 142 143# CHECK: vabd.s32 q2, q3, q2 @ encoding: [0x26,0xef,0x44,0x47] 144vabd.s32 q2, q3, q2 145 146# CHECK: vabd.u8 q1, q6, q4 @ encoding: [0x0c,0xff,0x48,0x27] 147vabd.u8 q1, q6, q4 148 149# CHECK: vabd.u16 q0, q6, q2 @ encoding: [0x1c,0xff,0x44,0x07] 150vabd.u16 q0, q6, q2 151 152# CHECK: vabd.u32 q0, q7, q4 @ encoding: [0x2e,0xff,0x48,0x07] 153vabd.u32 q0, q7, q4 154 155# CHECK: vrhadd.s8 q0, q1, q1 @ encoding: [0x02,0xef,0x42,0x01] 156vrhadd.s8 q0, q1, q1 157 158# CHECK: vrhadd.s16 q0, q1, q0 @ encoding: [0x12,0xef,0x40,0x01] 159vrhadd.s16 q0, q1, q0 160 161# CHECK: vrhadd.s32 q0, q4, q1 @ encoding: [0x28,0xef,0x42,0x01] 162vrhadd.s32 q0, q4, q1 163 164# CHECK: vrhadd.u8 q1, q0, q6 @ encoding: [0x00,0xff,0x4c,0x21] 165vrhadd.u8 q1, q0, q6 166 167# CHECK: vrhadd.u16 q2, q2, q5 @ encoding: [0x14,0xff,0x4a,0x41] 168vrhadd.u16 q2, q2, q5 169 170# CHECK: vrhadd.u32 q2, q3, q0 @ encoding: [0x26,0xff,0x40,0x41] 171vrhadd.u32 q2, q3, q0 172 173# CHECK: vhsub.s8 q0, q0, q2 @ encoding: [0x00,0xef,0x44,0x02] 174vhsub.s8 q0, q0, q2 175 176# CHECK: vhsub.s16 q1, q3, q1 @ encoding: [0x16,0xef,0x42,0x22] 177vhsub.s16 q1, q3, q1 178 179# CHECK: vhsub.s32 q0, q2, q5 @ encoding: [0x24,0xef,0x4a,0x02] 180vhsub.s32 q0, q2, q5 181 182# CHECK: vhsub.u8 q0, q4, q2 @ encoding: [0x08,0xff,0x44,0x02] 183vhsub.u8 q0, q4, q2 184 185# CHECK: vhsub.u16 q0, q7, q5 @ encoding: [0x1e,0xff,0x4a,0x02] 186vhsub.u16 q0, q7, q5 187 188# CHECK: vhsub.u32 q2, q6, q4 @ encoding: [0x2c,0xff,0x48,0x42] 189vhsub.u32 q2, q6, q4 190 191# CHECK: vhadd.s8 q0, q7, q0 @ encoding: [0x0e,0xef,0x40,0x00] 192vhadd.s8 q0, q7, q0 193 194# CHECK: vhadd.s16 q4, q0, q2 @ encoding: [0x10,0xef,0x44,0x80] 195vhadd.s16 q4, q0, q2 196 197# CHECK: vhadd.s32 q0, q3, q1 @ encoding: [0x26,0xef,0x42,0x00] 198vhadd.s32 q0, q3, q1 199 200# CHECK: vhadd.u8 q3, q0, q3 @ encoding: [0x00,0xff,0x46,0x60] 201vhadd.u8 q3, q0, q3 202 203# CHECK: vhadd.u16 q0, q1, q3 @ encoding: [0x12,0xff,0x46,0x00] 204vhadd.u16 q0, q1, q3 205 206# CHECK: vhadd.u32 q0, q1, q3 @ encoding: [0x22,0xff,0x46,0x00] 207vhadd.u32 q0, q1, q3 208 209# CHECK: vdup.8 q6, r8 @ encoding: [0xec,0xee,0x10,0x8b] 210vdup.8 q6, r8 211 212# CHECK: vdup.16 q7, lr @ encoding: [0xae,0xee,0x30,0xeb] 213vdup.16 q7, lr 214 215# CHECK: vdup.32 q1, r9 @ encoding: [0xa2,0xee,0x10,0x9b] 216vdup.32 q1, r9 217 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] 221vpte.i8 eq, q0, q0 222vdupt.16 q0, r1 223vdupe.16 q0, r1 224 225# CHECK: vcls.s8 q2, q1 @ encoding: [0xb0,0xff,0x42,0x44] 226vcls.s8 q2, q1 227 228# CHECK: vcls.s16 q0, q4 @ encoding: [0xb4,0xff,0x48,0x04] 229vcls.s16 q0, q4 230 231# CHECK: vcls.s32 q0, q0 @ encoding: [0xb8,0xff,0x40,0x04] 232vcls.s32 q0, q0 233 234# CHECK: vclz.i8 q0, q7 @ encoding: [0xb0,0xff,0xce,0x04] 235vclz.i8 q0, q7 236 237# CHECK: vclz.i16 q4, q7 @ encoding: [0xb4,0xff,0xce,0x84] 238vclz.i16 q4, q7 239 240# CHECK: vclz.i32 q7, q5 @ encoding: [0xb8,0xff,0xca,0xe4] 241vclz.i32 q7, q5 242 243# CHECK: vneg.s8 q1, q0 @ encoding: [0xb1,0xff,0xc0,0x23] 244vneg.s8 q1, q0 245 246# CHECK: vneg.s16 q0, q1 @ encoding: [0xb5,0xff,0xc2,0x03] 247vneg.s16 q0, q1 248 249# CHECK: vneg.s32 q7, q2 @ encoding: [0xb9,0xff,0xc4,0xe3] 250vneg.s32 q7, q2 251 252# CHECK: vabs.s8 q1, q1 @ encoding: [0xb1,0xff,0x42,0x23] 253vabs.s8 q1, q1 254 255# CHECK: vabs.s16 q0, q2 @ encoding: [0xb5,0xff,0x44,0x03] 256vabs.s16 q0, q2 257 258# CHECK: vabs.s32 q0, q7 @ encoding: [0xb9,0xff,0x4e,0x03] 259vabs.s32 q0, q7 260 261# CHECK: vqneg.s8 q0, q0 @ encoding: [0xb0,0xff,0xc0,0x07] 262vqneg.s8 q0, q0 263 264# CHECK: vqneg.s16 q6, q2 @ encoding: [0xb4,0xff,0xc4,0xc7] 265vqneg.s16 q6, q2 266 267# CHECK: vqneg.s32 q7, q2 @ encoding: [0xb8,0xff,0xc4,0xe7] 268vqneg.s32 q7, q2 269 270# CHECK: vqabs.s8 q2, q4 @ encoding: [0xb0,0xff,0x48,0x47] 271vqabs.s8 q2, q4 272 273# CHECK: vqabs.s16 q0, q2 @ encoding: [0xb4,0xff,0x44,0x07] 274vqabs.s16 q0, q2 275 276# CHECK: vqabs.s32 q0, q5 @ encoding: [0xb8,0xff,0x4a,0x07] 277vqabs.s32 q0, q5 278 279vpste 280vnegt.s8 q0, q1 281vnege.s8 q0, q1 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] 285 286vpst 287vqaddt.s16 q0, q1, q2 288# CHECK: vpst @ encoding: [0x71,0xfe,0x4d,0x0f] 289# CHECK: vqaddt.s16 q0, q1, q2 @ encoding: [0x12,0xef,0x54,0x00] 290 291vpste 292vqnegt.s8 q0, q1 293vqnege.s16 q0, q1 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] 297 298# CHECK: vmina.s8 q1, q7 @ encoding: [0x33,0xee,0x8f,0x3e] 299# CHECK-NOFP: vmina.s8 q1, q7 @ encoding: [0x33,0xee,0x8f,0x3e] 300vmina.s8 q1, q7 301 302# CHECK: vmina.s16 q1, q4 @ encoding: [0x37,0xee,0x89,0x3e] 303# CHECK-NOFP: vmina.s16 q1, q4 @ encoding: [0x37,0xee,0x89,0x3e] 304vmina.s16 q1, q4 305 306# CHECK: vmina.s32 q0, q7 @ encoding: [0x3b,0xee,0x8f,0x1e] 307# CHECK-NOFP: vmina.s32 q0, q7 @ encoding: [0x3b,0xee,0x8f,0x1e] 308vmina.s32 q0, q7 309 310# CHECK: vmaxa.s8 q0, q7 @ encoding: [0x33,0xee,0x8f,0x0e] 311# CHECK-NOFP: vmaxa.s8 q0, q7 @ encoding: [0x33,0xee,0x8f,0x0e] 312vmaxa.s8 q0, q7 313 314# CHECK: vmaxa.s16 q1, q0 @ encoding: [0x37,0xee,0x81,0x2e] 315# CHECK-NOFP: vmaxa.s16 q1, q0 @ encoding: [0x37,0xee,0x81,0x2e] 316vmaxa.s16 q1, q0 317 318# CHECK: vmaxa.s32 q1, q0 @ encoding: [0x3b,0xee,0x81,0x2e] 319# CHECK-NOFP: vmaxa.s32 q1, q0 @ encoding: [0x3b,0xee,0x81,0x2e] 320vmaxa.s32 q1, q0 321