1# RUN: llvm-mc -triple=riscv64 -show-encoding --mattr=+experimental-v %s \ 2# RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST 3# RUN: not llvm-mc -triple=riscv64 -show-encoding %s 2>&1 \ 4# RUN: | FileCheck %s --check-prefix=CHECK-ERROR 5# RUN: llvm-mc -triple=riscv64 -filetype=obj --mattr=+experimental-v %s \ 6# RUN: | llvm-objdump -d --mattr=+experimental-v - \ 7# RUN: | FileCheck %s --check-prefix=CHECK-INST 8# RUN: llvm-mc -triple=riscv64 -filetype=obj --mattr=+experimental-v %s \ 9# RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN 10 11vadd.vv v8, v4, v20, v0.t 12# CHECK-INST: vadd.vv v8, v4, v20, v0.t 13# CHECK-ENCODING: [0x57,0x04,0x4a,0x00] 14# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 15# CHECK-UNKNOWN: 57 04 4a 00 <unknown> 16 17vadd.vv v8, v4, v20 18# CHECK-INST: vadd.vv v8, v4, v20 19# CHECK-ENCODING: [0x57,0x04,0x4a,0x02] 20# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 21# CHECK-UNKNOWN: 57 04 4a 02 <unknown> 22 23vadd.vx v8, v4, a0, v0.t 24# CHECK-INST: vadd.vx v8, v4, a0, v0.t 25# CHECK-ENCODING: [0x57,0x44,0x45,0x00] 26# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 27# CHECK-UNKNOWN: 57 44 45 00 <unknown> 28 29vadd.vx v8, v4, a0 30# CHECK-INST: vadd.vx v8, v4, a0 31# CHECK-ENCODING: [0x57,0x44,0x45,0x02] 32# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 33# CHECK-UNKNOWN: 57 44 45 02 <unknown> 34 35vadd.vi v8, v4, 15, v0.t 36# CHECK-INST: vadd.vi v8, v4, 15, v0.t 37# CHECK-ENCODING: [0x57,0xb4,0x47,0x00] 38# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 39# CHECK-UNKNOWN: 57 b4 47 00 <unknown> 40 41vadd.vi v8, v4, 15 42# CHECK-INST: vadd.vi v8, v4, 15 43# CHECK-ENCODING: [0x57,0xb4,0x47,0x02] 44# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 45# CHECK-UNKNOWN: 57 b4 47 02 <unknown> 46 47vwaddu.vv v8, v4, v20, v0.t 48# CHECK-INST: vwaddu.vv v8, v4, v20, v0.t 49# CHECK-ENCODING: [0x57,0x24,0x4a,0xc0] 50# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 51# CHECK-UNKNOWN: 57 24 4a c0 <unknown> 52 53vwaddu.vv v8, v4, v20 54# CHECK-INST: vwaddu.vv v8, v4, v20 55# CHECK-ENCODING: [0x57,0x24,0x4a,0xc2] 56# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 57# CHECK-UNKNOWN: 57 24 4a c2 <unknown> 58 59vwaddu.vx v8, v4, a0, v0.t 60# CHECK-INST: vwaddu.vx v8, v4, a0, v0.t 61# CHECK-ENCODING: [0x57,0x64,0x45,0xc0] 62# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 63# CHECK-UNKNOWN: 57 64 45 c0 <unknown> 64 65vwaddu.vx v8, v4, a0 66# CHECK-INST: vwaddu.vx v8, v4, a0 67# CHECK-ENCODING: [0x57,0x64,0x45,0xc2] 68# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 69# CHECK-UNKNOWN: 57 64 45 c2 <unknown> 70 71vwadd.vv v8, v4, v20, v0.t 72# CHECK-INST: vwadd.vv v8, v4, v20, v0.t 73# CHECK-ENCODING: [0x57,0x24,0x4a,0xc4] 74# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 75# CHECK-UNKNOWN: 57 24 4a c4 <unknown> 76 77vwadd.vv v8, v4, v20 78# CHECK-INST: vwadd.vv v8, v4, v20 79# CHECK-ENCODING: [0x57,0x24,0x4a,0xc6] 80# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 81# CHECK-UNKNOWN: 57 24 4a c6 <unknown> 82 83vwadd.vx v8, v4, a0, v0.t 84# CHECK-INST: vwadd.vx v8, v4, a0, v0.t 85# CHECK-ENCODING: [0x57,0x64,0x45,0xc4] 86# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 87# CHECK-UNKNOWN: 57 64 45 c4 <unknown> 88 89vwadd.vx v8, v4, a0 90# CHECK-INST: vwadd.vx v8, v4, a0 91# CHECK-ENCODING: [0x57,0x64,0x45,0xc6] 92# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 93# CHECK-UNKNOWN: 57 64 45 c6 <unknown> 94 95vwaddu.wv v8, v4, v20, v0.t 96# CHECK-INST: vwaddu.wv v8, v4, v20, v0.t 97# CHECK-ENCODING: [0x57,0x24,0x4a,0xd0] 98# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 99# CHECK-UNKNOWN: 57 24 4a d0 <unknown> 100 101vwaddu.wv v8, v4, v20 102# CHECK-INST: vwaddu.wv v8, v4, v20 103# CHECK-ENCODING: [0x57,0x24,0x4a,0xd2] 104# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 105# CHECK-UNKNOWN: 57 24 4a d2 <unknown> 106 107vwaddu.wx v8, v4, a0, v0.t 108# CHECK-INST: vwaddu.wx v8, v4, a0, v0.t 109# CHECK-ENCODING: [0x57,0x64,0x45,0xd0] 110# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 111# CHECK-UNKNOWN: 57 64 45 d0 <unknown> 112 113vwaddu.wx v8, v4, a0 114# CHECK-INST: vwaddu.wx v8, v4, a0 115# CHECK-ENCODING: [0x57,0x64,0x45,0xd2] 116# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 117# CHECK-UNKNOWN: 57 64 45 d2 <unknown> 118 119vwadd.wv v8, v4, v20, v0.t 120# CHECK-INST: vwadd.wv v8, v4, v20, v0.t 121# CHECK-ENCODING: [0x57,0x24,0x4a,0xd4] 122# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 123# CHECK-UNKNOWN: 57 24 4a d4 <unknown> 124 125vwadd.wv v8, v4, v20 126# CHECK-INST: vwadd.wv v8, v4, v20 127# CHECK-ENCODING: [0x57,0x24,0x4a,0xd6] 128# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 129# CHECK-UNKNOWN: 57 24 4a d6 <unknown> 130 131vwadd.wx v8, v4, a0, v0.t 132# CHECK-INST: vwadd.wx v8, v4, a0, v0.t 133# CHECK-ENCODING: [0x57,0x64,0x45,0xd4] 134# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 135# CHECK-UNKNOWN: 57 64 45 d4 <unknown> 136 137vwadd.wx v8, v4, a0 138# CHECK-INST: vwadd.wx v8, v4, a0 139# CHECK-ENCODING: [0x57,0x64,0x45,0xd6] 140# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 141# CHECK-UNKNOWN: 57 64 45 d6 <unknown> 142 143vadc.vvm v8, v4, v20, v0 144# CHECK-INST: vadc.vvm v8, v4, v20, v0 145# CHECK-ENCODING: [0x57,0x04,0x4a,0x40] 146# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 147# CHECK-UNKNOWN: 57 04 4a 40 <unknown> 148 149vadc.vxm v8, v4, a0, v0 150# CHECK-INST: vadc.vxm v8, v4, a0, v0 151# CHECK-ENCODING: [0x57,0x44,0x45,0x40] 152# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 153# CHECK-UNKNOWN: 57 44 45 40 <unknown> 154 155vadc.vim v8, v4, 15, v0 156# CHECK-INST: vadc.vim v8, v4, 15, v0 157# CHECK-ENCODING: [0x57,0xb4,0x47,0x40] 158# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 159# CHECK-UNKNOWN: 57 b4 47 40 <unknown> 160 161vmadc.vvm v8, v4, v20, v0 162# CHECK-INST: vmadc.vvm v8, v4, v20, v0 163# CHECK-ENCODING: [0x57,0x04,0x4a,0x44] 164# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 165# CHECK-UNKNOWN: 57 04 4a 44 <unknown> 166 167vmadc.vxm v8, v4, a0, v0 168# CHECK-INST: vmadc.vxm v8, v4, a0, v0 169# CHECK-ENCODING: [0x57,0x44,0x45,0x44] 170# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 171# CHECK-UNKNOWN: 57 44 45 44 <unknown> 172 173vmadc.vim v8, v4, 15, v0 174# CHECK-INST: vmadc.vim v8, v4, 15, v0 175# CHECK-ENCODING: [0x57,0xb4,0x47,0x44] 176# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 177# CHECK-UNKNOWN: 57 b4 47 44 <unknown> 178 179vmadc.vv v8, v4, v20 180# CHECK-INST: vmadc.vv v8, v4, v20 181# CHECK-ENCODING: [0x57,0x04,0x4a,0x46] 182# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 183# CHECK-UNKNOWN: 57 04 4a 46 <unknown> 184 185vmadc.vx v8, v4, a0 186# CHECK-INST: vmadc.vx v8, v4, a0 187# CHECK-ENCODING: [0x57,0x44,0x45,0x46] 188# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 189# CHECK-UNKNOWN: 57 44 45 46 <unknown> 190 191vmadc.vi v8, v4, 15 192# CHECK-INST: vmadc.vi v8, v4, 15 193# CHECK-ENCODING: [0x57,0xb4,0x47,0x46] 194# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 195# CHECK-UNKNOWN: 57 b4 47 46 <unknown> 196 197vsaddu.vv v8, v4, v20, v0.t 198# CHECK-INST: vsaddu.vv v8, v4, v20, v0.t 199# CHECK-ENCODING: [0x57,0x04,0x4a,0x80] 200# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 201# CHECK-UNKNOWN: 57 04 4a 80 <unknown> 202 203vsaddu.vv v8, v4, v20 204# CHECK-INST: vsaddu.vv v8, v4, v20 205# CHECK-ENCODING: [0x57,0x04,0x4a,0x82] 206# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 207# CHECK-UNKNOWN: 57 04 4a 82 <unknown> 208 209vsaddu.vx v8, v4, a0, v0.t 210# CHECK-INST: vsaddu.vx v8, v4, a0, v0.t 211# CHECK-ENCODING: [0x57,0x44,0x45,0x80] 212# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 213# CHECK-UNKNOWN: 57 44 45 80 <unknown> 214 215vsaddu.vx v8, v4, a0 216# CHECK-INST: vsaddu.vx v8, v4, a0 217# CHECK-ENCODING: [0x57,0x44,0x45,0x82] 218# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 219# CHECK-UNKNOWN: 57 44 45 82 <unknown> 220 221vsaddu.vi v8, v4, 15, v0.t 222# CHECK-INST: vsaddu.vi v8, v4, 15, v0.t 223# CHECK-ENCODING: [0x57,0xb4,0x47,0x80] 224# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 225# CHECK-UNKNOWN: 57 b4 47 80 <unknown> 226 227vsaddu.vi v8, v4, 15 228# CHECK-INST: vsaddu.vi v8, v4, 15 229# CHECK-ENCODING: [0x57,0xb4,0x47,0x82] 230# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 231# CHECK-UNKNOWN: 57 b4 47 82 <unknown> 232 233vsadd.vv v8, v4, v20, v0.t 234# CHECK-INST: vsadd.vv v8, v4, v20, v0.t 235# CHECK-ENCODING: [0x57,0x04,0x4a,0x84] 236# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 237# CHECK-UNKNOWN: 57 04 4a 84 <unknown> 238 239vsadd.vv v8, v4, v20 240# CHECK-INST: vsadd.vv v8, v4, v20 241# CHECK-ENCODING: [0x57,0x04,0x4a,0x86] 242# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 243# CHECK-UNKNOWN: 57 04 4a 86 <unknown> 244 245vsadd.vx v8, v4, a0, v0.t 246# CHECK-INST: vsadd.vx v8, v4, a0, v0.t 247# CHECK-ENCODING: [0x57,0x44,0x45,0x84] 248# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 249# CHECK-UNKNOWN: 57 44 45 84 <unknown> 250 251vsadd.vx v8, v4, a0 252# CHECK-INST: vsadd.vx v8, v4, a0 253# CHECK-ENCODING: [0x57,0x44,0x45,0x86] 254# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 255# CHECK-UNKNOWN: 57 44 45 86 <unknown> 256 257vsadd.vi v8, v4, 15, v0.t 258# CHECK-INST: vsadd.vi v8, v4, 15, v0.t 259# CHECK-ENCODING: [0x57,0xb4,0x47,0x84] 260# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 261# CHECK-UNKNOWN: 57 b4 47 84 <unknown> 262 263vsadd.vi v8, v4, 15 264# CHECK-INST: vsadd.vi v8, v4, 15 265# CHECK-ENCODING: [0x57,0xb4,0x47,0x86] 266# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 267# CHECK-UNKNOWN: 57 b4 47 86 <unknown> 268 269vaadd.vv v8, v4, v20, v0.t 270# CHECK-INST: vaadd.vv v8, v4, v20, v0.t 271# CHECK-ENCODING: [0x57,0x24,0x4a,0x24] 272# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 273# CHECK-UNKNOWN: 57 24 4a 24 <unknown> 274 275vaadd.vv v8, v4, v20 276# CHECK-INST: vaadd.vv v8, v4, v20 277# CHECK-ENCODING: [0x57,0x24,0x4a,0x26] 278# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 279# CHECK-UNKNOWN: 57 24 4a 26 <unknown> 280 281vaadd.vx v8, v4, a0, v0.t 282# CHECK-INST: vaadd.vx v8, v4, a0, v0.t 283# CHECK-ENCODING: [0x57,0x64,0x45,0x24] 284# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 285# CHECK-UNKNOWN: 57 64 45 24 <unknown> 286 287vaadd.vx v8, v4, a0 288# CHECK-INST: vaadd.vx v8, v4, a0 289# CHECK-ENCODING: [0x57,0x64,0x45,0x26] 290# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 291# CHECK-UNKNOWN: 57 64 45 26 <unknown> 292 293vaaddu.vv v8, v4, v20, v0.t 294# CHECK-INST: vaaddu.vv v8, v4, v20, v0.t 295# CHECK-ENCODING: [0x57,0x24,0x4a,0x20] 296# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 297# CHECK-UNKNOWN: 57 24 4a 20 <unknown> 298 299vaaddu.vv v8, v4, v20 300# CHECK-INST: vaaddu.vv v8, v4, v20 301# CHECK-ENCODING: [0x57,0x24,0x4a,0x22] 302# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 303# CHECK-UNKNOWN: 57 24 4a 22 <unknown> 304 305vaaddu.vx v8, v4, a0, v0.t 306# CHECK-INST: vaaddu.vx v8, v4, a0, v0.t 307# CHECK-ENCODING: [0x57,0x64,0x45,0x20] 308# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 309# CHECK-UNKNOWN: 57 64 45 20 <unknown> 310 311vaaddu.vx v8, v4, a0 312# CHECK-INST: vaaddu.vx v8, v4, a0 313# CHECK-ENCODING: [0x57,0x64,0x45,0x22] 314# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 315# CHECK-UNKNOWN: 57 64 45 22 <unknown> 316 317vwcvt.x.x.v v8, v4, v0.t 318# CHECK-INST: vwcvt.x.x.v v8, v4, v0.t 319# CHECK-ENCODING: [0x57,0x64,0x40,0xc4] 320# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 321# CHECK-UNKNOWN: 57 64 40 c4 <unknown> 322 323vwcvt.x.x.v v8, v4 324# CHECK-INST: vwadd.vx v8, v4, zero 325# CHECK-ENCODING: [0x57,0x64,0x40,0xc6] 326# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 327# CHECK-UNKNOWN: 57 64 40 c6 <unknown> 328 329vwcvtu.x.x.v v8, v4, v0.t 330# CHECK-INST: vwcvtu.x.x.v v8, v4, v0.t 331# CHECK-ENCODING: [0x57,0x64,0x40,0xc0] 332# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 333# CHECK-UNKNOWN: 57 64 40 c0 <unknown> 334 335vwcvtu.x.x.v v8, v4 336# CHECK-INST: vwaddu.vx v8, v4, zero 337# CHECK-ENCODING: [0x57,0x64,0x40,0xc2] 338# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 339# CHECK-UNKNOWN: 57 64 40 c2 <unknown> 340