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 11vsub.vv v8, v4, v20, v0.t 12# CHECK-INST: vsub.vv v8, v4, v20, v0.t 13# CHECK-ENCODING: [0x57,0x04,0x4a,0x08] 14# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 15# CHECK-UNKNOWN: 57 04 4a 08 <unknown> 16 17vsub.vv v8, v4, v20 18# CHECK-INST: vsub.vv v8, v4, v20 19# CHECK-ENCODING: [0x57,0x04,0x4a,0x0a] 20# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 21# CHECK-UNKNOWN: 57 04 4a 0a <unknown> 22 23vsub.vx v8, v4, a0, v0.t 24# CHECK-INST: vsub.vx v8, v4, a0, v0.t 25# CHECK-ENCODING: [0x57,0x44,0x45,0x08] 26# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 27# CHECK-UNKNOWN: 57 44 45 08 <unknown> 28 29vsub.vx v8, v4, a0 30# CHECK-INST: vsub.vx v8, v4, a0 31# CHECK-ENCODING: [0x57,0x44,0x45,0x0a] 32# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 33# CHECK-UNKNOWN: 57 44 45 0a <unknown> 34 35vrsub.vx v8, v4, a0, v0.t 36# CHECK-INST: vrsub.vx v8, v4, a0, v0.t 37# CHECK-ENCODING: [0x57,0x44,0x45,0x0c] 38# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 39# CHECK-UNKNOWN: 57 44 45 0c <unknown> 40 41vrsub.vx v8, v4, a0 42# CHECK-INST: vrsub.vx v8, v4, a0 43# CHECK-ENCODING: [0x57,0x44,0x45,0x0e] 44# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 45# CHECK-UNKNOWN: 57 44 45 0e <unknown> 46 47vrsub.vi v8, v4, 15, v0.t 48# CHECK-INST: vrsub.vi v8, v4, 15, v0.t 49# CHECK-ENCODING: [0x57,0xb4,0x47,0x0c] 50# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 51# CHECK-UNKNOWN: 57 b4 47 0c <unknown> 52 53vrsub.vi v8, v4, 15 54# CHECK-INST: vrsub.vi v8, v4, 15 55# CHECK-ENCODING: [0x57,0xb4,0x47,0x0e] 56# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 57# CHECK-UNKNOWN: 57 b4 47 0e <unknown> 58 59vwsubu.vv v8, v4, v20, v0.t 60# CHECK-INST: vwsubu.vv v8, v4, v20, v0.t 61# CHECK-ENCODING: [0x57,0x24,0x4a,0xc8] 62# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 63# CHECK-UNKNOWN: 57 24 4a c8 <unknown> 64 65vwsubu.vv v8, v4, v20 66# CHECK-INST: vwsubu.vv v8, v4, v20 67# CHECK-ENCODING: [0x57,0x24,0x4a,0xca] 68# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 69# CHECK-UNKNOWN: 57 24 4a ca <unknown> 70 71vwsubu.vx v8, v4, a0, v0.t 72# CHECK-INST: vwsubu.vx v8, v4, a0, v0.t 73# CHECK-ENCODING: [0x57,0x64,0x45,0xc8] 74# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 75# CHECK-UNKNOWN: 57 64 45 c8 <unknown> 76 77vwsubu.vx v8, v4, a0 78# CHECK-INST: vwsubu.vx v8, v4, a0 79# CHECK-ENCODING: [0x57,0x64,0x45,0xca] 80# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 81# CHECK-UNKNOWN: 57 64 45 ca <unknown> 82 83vwsub.vv v8, v4, v20, v0.t 84# CHECK-INST: vwsub.vv v8, v4, v20, v0.t 85# CHECK-ENCODING: [0x57,0x24,0x4a,0xcc] 86# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 87# CHECK-UNKNOWN: 57 24 4a cc <unknown> 88 89vwsub.vv v8, v4, v20 90# CHECK-INST: vwsub.vv v8, v4, v20 91# CHECK-ENCODING: [0x57,0x24,0x4a,0xce] 92# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 93# CHECK-UNKNOWN: 57 24 4a ce <unknown> 94 95vwsub.vx v8, v4, a0, v0.t 96# CHECK-INST: vwsub.vx v8, v4, a0, v0.t 97# CHECK-ENCODING: [0x57,0x64,0x45,0xcc] 98# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 99# CHECK-UNKNOWN: 57 64 45 cc <unknown> 100 101vwsub.vx v8, v4, a0 102# CHECK-INST: vwsub.vx v8, v4, a0 103# CHECK-ENCODING: [0x57,0x64,0x45,0xce] 104# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 105# CHECK-UNKNOWN: 57 64 45 ce <unknown> 106 107vwsubu.wv v8, v4, v20, v0.t 108# CHECK-INST: vwsubu.wv v8, v4, v20, v0.t 109# CHECK-ENCODING: [0x57,0x24,0x4a,0xd8] 110# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 111# CHECK-UNKNOWN: 57 24 4a d8 <unknown> 112 113vwsubu.wv v8, v4, v20 114# CHECK-INST: vwsubu.wv v8, v4, v20 115# CHECK-ENCODING: [0x57,0x24,0x4a,0xda] 116# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 117# CHECK-UNKNOWN: 57 24 4a da <unknown> 118 119vwsubu.wx v8, v4, a0, v0.t 120# CHECK-INST: vwsubu.wx v8, v4, a0, v0.t 121# CHECK-ENCODING: [0x57,0x64,0x45,0xd8] 122# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 123# CHECK-UNKNOWN: 57 64 45 d8 <unknown> 124 125vwsubu.wx v8, v4, a0 126# CHECK-INST: vwsubu.wx v8, v4, a0 127# CHECK-ENCODING: [0x57,0x64,0x45,0xda] 128# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 129# CHECK-UNKNOWN: 57 64 45 da <unknown> 130 131vwsub.wv v8, v4, v20, v0.t 132# CHECK-INST: vwsub.wv v8, v4, v20, v0.t 133# CHECK-ENCODING: [0x57,0x24,0x4a,0xdc] 134# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 135# CHECK-UNKNOWN: 57 24 4a dc <unknown> 136 137vwsub.wv v8, v4, v20 138# CHECK-INST: vwsub.wv v8, v4, v20 139# CHECK-ENCODING: [0x57,0x24,0x4a,0xde] 140# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 141# CHECK-UNKNOWN: 57 24 4a de <unknown> 142 143vwsub.wx v8, v4, a0, v0.t 144# CHECK-INST: vwsub.wx v8, v4, a0, v0.t 145# CHECK-ENCODING: [0x57,0x64,0x45,0xdc] 146# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 147# CHECK-UNKNOWN: 57 64 45 dc <unknown> 148 149vwsub.wx v8, v4, a0 150# CHECK-INST: vwsub.wx v8, v4, a0 151# CHECK-ENCODING: [0x57,0x64,0x45,0xde] 152# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 153# CHECK-UNKNOWN: 57 64 45 de <unknown> 154 155vsbc.vvm v8, v4, v20, v0 156# CHECK-INST: vsbc.vvm v8, v4, v20, v0 157# CHECK-ENCODING: [0x57,0x04,0x4a,0x48] 158# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 159# CHECK-UNKNOWN: 57 04 4a 48 <unknown> 160 161vsbc.vxm v8, v4, a0, v0 162# CHECK-INST: vsbc.vxm v8, v4, a0, v0 163# CHECK-ENCODING: [0x57,0x44,0x45,0x48] 164# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 165# CHECK-UNKNOWN: 57 44 45 48 <unknown> 166 167vmsbc.vvm v8, v4, v20, v0 168# CHECK-INST: vmsbc.vvm v8, v4, v20, v0 169# CHECK-ENCODING: [0x57,0x04,0x4a,0x4c] 170# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 171# CHECK-UNKNOWN: 57 04 4a 4c <unknown> 172 173vmsbc.vxm v8, v4, a0, v0 174# CHECK-INST: vmsbc.vxm v8, v4, a0, v0 175# CHECK-ENCODING: [0x57,0x44,0x45,0x4c] 176# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 177# CHECK-UNKNOWN: 57 44 45 4c <unknown> 178 179vmsbc.vv v8, v4, v20 180# CHECK-INST: vmsbc.vv v8, v4, v20 181# CHECK-ENCODING: [0x57,0x04,0x4a,0x4e] 182# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 183# CHECK-UNKNOWN: 57 04 4a 4e <unknown> 184 185vmsbc.vx v8, v4, a0 186# CHECK-INST: vmsbc.vx v8, v4, a0 187# CHECK-ENCODING: [0x57,0x44,0x45,0x4e] 188# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 189# CHECK-UNKNOWN: 57 44 45 4e <unknown> 190 191vssubu.vv v8, v4, v20, v0.t 192# CHECK-INST: vssubu.vv v8, v4, v20, v0.t 193# CHECK-ENCODING: [0x57,0x04,0x4a,0x88] 194# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 195# CHECK-UNKNOWN: 57 04 4a 88 <unknown> 196 197vssubu.vv v8, v4, v20 198# CHECK-INST: vssubu.vv v8, v4, v20 199# CHECK-ENCODING: [0x57,0x04,0x4a,0x8a] 200# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 201# CHECK-UNKNOWN: 57 04 4a 8a <unknown> 202 203vssubu.vx v8, v4, a0, v0.t 204# CHECK-INST: vssubu.vx v8, v4, a0, v0.t 205# CHECK-ENCODING: [0x57,0x44,0x45,0x88] 206# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 207# CHECK-UNKNOWN: 57 44 45 88 <unknown> 208 209vssubu.vx v8, v4, a0 210# CHECK-INST: vssubu.vx v8, v4, a0 211# CHECK-ENCODING: [0x57,0x44,0x45,0x8a] 212# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 213# CHECK-UNKNOWN: 57 44 45 8a <unknown> 214 215vssub.vv v8, v4, v20, v0.t 216# CHECK-INST: vssub.vv v8, v4, v20, v0.t 217# CHECK-ENCODING: [0x57,0x04,0x4a,0x8c] 218# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 219# CHECK-UNKNOWN: 57 04 4a 8c <unknown> 220 221vssub.vv v8, v4, v20 222# CHECK-INST: vssub.vv v8, v4, v20 223# CHECK-ENCODING: [0x57,0x04,0x4a,0x8e] 224# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 225# CHECK-UNKNOWN: 57 04 4a 8e <unknown> 226 227vssub.vx v8, v4, a0, v0.t 228# CHECK-INST: vssub.vx v8, v4, a0, v0.t 229# CHECK-ENCODING: [0x57,0x44,0x45,0x8c] 230# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 231# CHECK-UNKNOWN: 57 44 45 8c <unknown> 232 233vssub.vx v8, v4, a0 234# CHECK-INST: vssub.vx v8, v4, a0 235# CHECK-ENCODING: [0x57,0x44,0x45,0x8e] 236# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 237# CHECK-UNKNOWN: 57 44 45 8e <unknown> 238 239vasub.vv v8, v4, v20, v0.t 240# CHECK-INST: vasub.vv v8, v4, v20, v0.t 241# CHECK-ENCODING: [0x57,0x24,0x4a,0x2c] 242# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 243# CHECK-UNKNOWN: 57 24 4a 2c <unknown> 244 245vasub.vv v8, v4, v20 246# CHECK-INST: vasub.vv v8, v4, v20 247# CHECK-ENCODING: [0x57,0x24,0x4a,0x2e] 248# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 249# CHECK-UNKNOWN: 57 24 4a 2e <unknown> 250 251vasub.vx v8, v4, a0, v0.t 252# CHECK-INST: vasub.vx v8, v4, a0, v0.t 253# CHECK-ENCODING: [0x57,0x64,0x45,0x2c] 254# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 255# CHECK-UNKNOWN: 57 64 45 2c <unknown> 256 257vasub.vx v8, v4, a0 258# CHECK-INST: vasub.vx v8, v4, a0 259# CHECK-ENCODING: [0x57,0x64,0x45,0x2e] 260# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 261# CHECK-UNKNOWN: 57 64 45 2e <unknown> 262 263vasubu.vv v8, v4, v20, v0.t 264# CHECK-INST: vasubu.vv v8, v4, v20, v0.t 265# CHECK-ENCODING: [0x57,0x24,0x4a,0x28] 266# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 267# CHECK-UNKNOWN: 57 24 4a 28 <unknown> 268 269vasubu.vv v8, v4, v20 270# CHECK-INST: vasubu.vv v8, v4, v20 271# CHECK-ENCODING: [0x57,0x24,0x4a,0x2a] 272# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 273# CHECK-UNKNOWN: 57 24 4a 2a <unknown> 274 275vasubu.vx v8, v4, a0, v0.t 276# CHECK-INST: vasubu.vx v8, v4, a0, v0.t 277# CHECK-ENCODING: [0x57,0x64,0x45,0x28] 278# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 279# CHECK-UNKNOWN: 57 64 45 28 <unknown> 280 281vasubu.vx v8, v4, a0 282# CHECK-INST: vasubu.vx v8, v4, a0 283# CHECK-ENCODING: [0x57,0x64,0x45,0x2a] 284# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) 285# CHECK-UNKNOWN: 57 64 45 2a <unknown> 286