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 11vsll.vv v8, v4, v20, v0.t 12# CHECK-INST: vsll.vv v8, v4, v20, v0.t 13# CHECK-ENCODING: [0x57,0x04,0x4a,0x94] 14# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 15# CHECK-UNKNOWN: 57 04 4a 94 <unknown> 16 17vsll.vv v8, v4, v20 18# CHECK-INST: vsll.vv v8, v4, v20 19# CHECK-ENCODING: [0x57,0x04,0x4a,0x96] 20# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 21# CHECK-UNKNOWN: 57 04 4a 96 <unknown> 22 23vsll.vx v8, v4, a0, v0.t 24# CHECK-INST: vsll.vx v8, v4, a0, v0.t 25# CHECK-ENCODING: [0x57,0x44,0x45,0x94] 26# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 27# CHECK-UNKNOWN: 57 44 45 94 <unknown> 28 29vsll.vx v8, v4, a0 30# CHECK-INST: vsll.vx v8, v4, a0 31# CHECK-ENCODING: [0x57,0x44,0x45,0x96] 32# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 33# CHECK-UNKNOWN: 57 44 45 96 <unknown> 34 35vsll.vi v8, v4, 31, v0.t 36# CHECK-INST: vsll.vi v8, v4, 31, v0.t 37# CHECK-ENCODING: [0x57,0xb4,0x4f,0x94] 38# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 39# CHECK-UNKNOWN: 57 b4 4f 94 <unknown> 40 41vsll.vi v8, v4, 31 42# CHECK-INST: vsll.vi v8, v4, 31 43# CHECK-ENCODING: [0x57,0xb4,0x4f,0x96] 44# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 45# CHECK-UNKNOWN: 57 b4 4f 96 <unknown> 46 47vsrl.vv v8, v4, v20, v0.t 48# CHECK-INST: vsrl.vv v8, v4, v20, v0.t 49# CHECK-ENCODING: [0x57,0x04,0x4a,0xa0] 50# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 51# CHECK-UNKNOWN: 57 04 4a a0 <unknown> 52 53vsrl.vv v8, v4, v20 54# CHECK-INST: vsrl.vv v8, v4, v20 55# CHECK-ENCODING: [0x57,0x04,0x4a,0xa2] 56# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 57# CHECK-UNKNOWN: 57 04 4a a2 <unknown> 58 59vsrl.vx v8, v4, a0, v0.t 60# CHECK-INST: vsrl.vx v8, v4, a0, v0.t 61# CHECK-ENCODING: [0x57,0x44,0x45,0xa0] 62# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 63# CHECK-UNKNOWN: 57 44 45 a0 <unknown> 64 65vsrl.vx v8, v4, a0 66# CHECK-INST: vsrl.vx v8, v4, a0 67# CHECK-ENCODING: [0x57,0x44,0x45,0xa2] 68# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 69# CHECK-UNKNOWN: 57 44 45 a2 <unknown> 70 71vsrl.vi v8, v4, 31, v0.t 72# CHECK-INST: vsrl.vi v8, v4, 31, v0.t 73# CHECK-ENCODING: [0x57,0xb4,0x4f,0xa0] 74# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 75# CHECK-UNKNOWN: 57 b4 4f a0 <unknown> 76 77vsrl.vi v8, v4, 31 78# CHECK-INST: vsrl.vi v8, v4, 31 79# CHECK-ENCODING: [0x57,0xb4,0x4f,0xa2] 80# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 81# CHECK-UNKNOWN: 57 b4 4f a2 <unknown> 82 83vsra.vv v8, v4, v20, v0.t 84# CHECK-INST: vsra.vv v8, v4, v20, v0.t 85# CHECK-ENCODING: [0x57,0x04,0x4a,0xa4] 86# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 87# CHECK-UNKNOWN: 57 04 4a a4 <unknown> 88 89vsra.vv v8, v4, v20 90# CHECK-INST: vsra.vv v8, v4, v20 91# CHECK-ENCODING: [0x57,0x04,0x4a,0xa6] 92# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 93# CHECK-UNKNOWN: 57 04 4a a6 <unknown> 94 95vsra.vx v8, v4, a0, v0.t 96# CHECK-INST: vsra.vx v8, v4, a0, v0.t 97# CHECK-ENCODING: [0x57,0x44,0x45,0xa4] 98# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 99# CHECK-UNKNOWN: 57 44 45 a4 <unknown> 100 101vsra.vx v8, v4, a0 102# CHECK-INST: vsra.vx v8, v4, a0 103# CHECK-ENCODING: [0x57,0x44,0x45,0xa6] 104# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 105# CHECK-UNKNOWN: 57 44 45 a6 <unknown> 106 107vsra.vi v8, v4, 31, v0.t 108# CHECK-INST: vsra.vi v8, v4, 31, v0.t 109# CHECK-ENCODING: [0x57,0xb4,0x4f,0xa4] 110# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 111# CHECK-UNKNOWN: 57 b4 4f a4 <unknown> 112 113vsra.vi v8, v4, 31 114# CHECK-INST: vsra.vi v8, v4, 31 115# CHECK-ENCODING: [0x57,0xb4,0x4f,0xa6] 116# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 117# CHECK-UNKNOWN: 57 b4 4f a6 <unknown> 118 119vnsrl.wv v8, v4, v20, v0.t 120# CHECK-INST: vnsrl.wv v8, v4, v20, v0.t 121# CHECK-ENCODING: [0x57,0x04,0x4a,0xb0] 122# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 123# CHECK-UNKNOWN: 57 04 4a b0 <unknown> 124 125vnsrl.wv v8, v4, v20 126# CHECK-INST: vnsrl.wv v8, v4, v20 127# CHECK-ENCODING: [0x57,0x04,0x4a,0xb2] 128# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 129# CHECK-UNKNOWN: 57 04 4a b2 <unknown> 130 131vnsrl.wx v8, v4, a0, v0.t 132# CHECK-INST: vnsrl.wx v8, v4, a0, v0.t 133# CHECK-ENCODING: [0x57,0x44,0x45,0xb0] 134# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 135# CHECK-UNKNOWN: 57 44 45 b0 <unknown> 136 137vnsrl.wx v8, v4, a0 138# CHECK-INST: vnsrl.wx v8, v4, a0 139# CHECK-ENCODING: [0x57,0x44,0x45,0xb2] 140# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 141# CHECK-UNKNOWN: 57 44 45 b2 <unknown> 142 143vnsrl.wi v8, v4, 31, v0.t 144# CHECK-INST: vnsrl.wi v8, v4, 31, v0.t 145# CHECK-ENCODING: [0x57,0xb4,0x4f,0xb0] 146# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 147# CHECK-UNKNOWN: 57 b4 4f b0 <unknown> 148 149vnsrl.wi v8, v4, 31 150# CHECK-INST: vnsrl.wi v8, v4, 31 151# CHECK-ENCODING: [0x57,0xb4,0x4f,0xb2] 152# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 153# CHECK-UNKNOWN: 57 b4 4f b2 <unknown> 154 155vnsra.wv v8, v4, v20, v0.t 156# CHECK-INST: vnsra.wv v8, v4, v20, v0.t 157# CHECK-ENCODING: [0x57,0x04,0x4a,0xb4] 158# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 159# CHECK-UNKNOWN: 57 04 4a b4 <unknown> 160 161vnsra.wv v8, v4, v20 162# CHECK-INST: vnsra.wv v8, v4, v20 163# CHECK-ENCODING: [0x57,0x04,0x4a,0xb6] 164# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 165# CHECK-UNKNOWN: 57 04 4a b6 <unknown> 166 167vnsra.wx v8, v4, a0, v0.t 168# CHECK-INST: vnsra.wx v8, v4, a0, v0.t 169# CHECK-ENCODING: [0x57,0x44,0x45,0xb4] 170# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 171# CHECK-UNKNOWN: 57 44 45 b4 <unknown> 172 173vnsra.wx v8, v4, a0 174# CHECK-INST: vnsra.wx v8, v4, a0 175# CHECK-ENCODING: [0x57,0x44,0x45,0xb6] 176# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 177# CHECK-UNKNOWN: 57 44 45 b6 <unknown> 178 179vnsra.wi v8, v4, 31, v0.t 180# CHECK-INST: vnsra.wi v8, v4, 31, v0.t 181# CHECK-ENCODING: [0x57,0xb4,0x4f,0xb4] 182# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 183# CHECK-UNKNOWN: 57 b4 4f b4 <unknown> 184 185vnsra.wi v8, v4, 31 186# CHECK-INST: vnsra.wi v8, v4, 31 187# CHECK-ENCODING: [0x57,0xb4,0x4f,0xb6] 188# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 189# CHECK-UNKNOWN: 57 b4 4f b6 <unknown> 190 191vssrl.vv v8, v4, v20, v0.t 192# CHECK-INST: vssrl.vv v8, v4, v20, v0.t 193# CHECK-ENCODING: [0x57,0x04,0x4a,0xa8] 194# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 195# CHECK-UNKNOWN: 57 04 4a a8 <unknown> 196 197vssrl.vv v8, v4, v20 198# CHECK-INST: vssrl.vv v8, v4, v20 199# CHECK-ENCODING: [0x57,0x04,0x4a,0xaa] 200# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 201# CHECK-UNKNOWN: 57 04 4a aa <unknown> 202 203vssrl.vx v8, v4, a0, v0.t 204# CHECK-INST: vssrl.vx v8, v4, a0, v0.t 205# CHECK-ENCODING: [0x57,0x44,0x45,0xa8] 206# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 207# CHECK-UNKNOWN: 57 44 45 a8 <unknown> 208 209vssrl.vx v8, v4, a0 210# CHECK-INST: vssrl.vx v8, v4, a0 211# CHECK-ENCODING: [0x57,0x44,0x45,0xaa] 212# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 213# CHECK-UNKNOWN: 57 44 45 aa <unknown> 214 215vssrl.vi v8, v4, 31, v0.t 216# CHECK-INST: vssrl.vi v8, v4, 31, v0.t 217# CHECK-ENCODING: [0x57,0xb4,0x4f,0xa8] 218# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 219# CHECK-UNKNOWN: 57 b4 4f a8 <unknown> 220 221vssrl.vi v8, v4, 31 222# CHECK-INST: vssrl.vi v8, v4, 31 223# CHECK-ENCODING: [0x57,0xb4,0x4f,0xaa] 224# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 225# CHECK-UNKNOWN: 57 b4 4f aa <unknown> 226 227vssra.vv v8, v4, v20, v0.t 228# CHECK-INST: vssra.vv v8, v4, v20, v0.t 229# CHECK-ENCODING: [0x57,0x04,0x4a,0xac] 230# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 231# CHECK-UNKNOWN: 57 04 4a ac <unknown> 232 233vssra.vv v8, v4, v20 234# CHECK-INST: vssra.vv v8, v4, v20 235# CHECK-ENCODING: [0x57,0x04,0x4a,0xae] 236# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 237# CHECK-UNKNOWN: 57 04 4a ae <unknown> 238 239vssra.vx v8, v4, a0, v0.t 240# CHECK-INST: vssra.vx v8, v4, a0, v0.t 241# CHECK-ENCODING: [0x57,0x44,0x45,0xac] 242# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 243# CHECK-UNKNOWN: 57 44 45 ac <unknown> 244 245vssra.vx v8, v4, a0 246# CHECK-INST: vssra.vx v8, v4, a0 247# CHECK-ENCODING: [0x57,0x44,0x45,0xae] 248# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 249# CHECK-UNKNOWN: 57 44 45 ae <unknown> 250 251vssra.vi v8, v4, 31, v0.t 252# CHECK-INST: vssra.vi v8, v4, 31, v0.t 253# CHECK-ENCODING: [0x57,0xb4,0x4f,0xac] 254# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 255# CHECK-UNKNOWN: 57 b4 4f ac <unknown> 256 257vssra.vi v8, v4, 31 258# CHECK-INST: vssra.vi v8, v4, 31 259# CHECK-ENCODING: [0x57,0xb4,0x4f,0xae] 260# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 261# CHECK-UNKNOWN: 57 b4 4f ae <unknown> 262