310 lines · plain
1# RUN: llvm-mc -triple=riscv64 -show-encoding --mattr=+v %s \2# RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST3# RUN: not llvm-mc -triple=riscv64 -show-encoding %s 2>&1 \4# RUN: | FileCheck %s --check-prefix=CHECK-ERROR5# RUN: llvm-mc -triple=riscv64 -filetype=obj --mattr=+v %s \6# RUN: | llvm-objdump -d --mattr=+v --no-print-imm-hex - \7# RUN: | FileCheck %s --check-prefix=CHECK-INST8# RUN: llvm-mc -triple=riscv64 -filetype=obj --mattr=+v %s \9# RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN10 11vsub.vv v8, v4, v20, v0.t12# CHECK-INST: vsub.vv v8, v4, v20, v0.t13# CHECK-ENCODING: [0x57,0x04,0x4a,0x08]14# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}15# CHECK-UNKNOWN: 084a0457 <unknown>16 17vsub.vv v8, v4, v2018# CHECK-INST: vsub.vv v8, v4, v2019# CHECK-ENCODING: [0x57,0x04,0x4a,0x0a]20# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}21# CHECK-UNKNOWN: 0a4a0457 <unknown>22 23vsub.vx v8, v4, a0, v0.t24# CHECK-INST: vsub.vx v8, v4, a0, v0.t25# CHECK-ENCODING: [0x57,0x44,0x45,0x08]26# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}27# CHECK-UNKNOWN: 08454457 <unknown>28 29vsub.vx v8, v4, a030# CHECK-INST: vsub.vx v8, v4, a031# CHECK-ENCODING: [0x57,0x44,0x45,0x0a]32# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}33# CHECK-UNKNOWN: 0a454457 <unknown>34 35vrsub.vx v8, v4, a0, v0.t36# CHECK-INST: vrsub.vx v8, v4, a0, v0.t37# CHECK-ENCODING: [0x57,0x44,0x45,0x0c]38# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}39# CHECK-UNKNOWN: 0c454457 <unknown>40 41vrsub.vx v8, v4, a042# CHECK-INST: vrsub.vx v8, v4, a043# CHECK-ENCODING: [0x57,0x44,0x45,0x0e]44# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}45# CHECK-UNKNOWN: 0e454457 <unknown>46 47vrsub.vi v8, v4, 15, v0.t48# CHECK-INST: vrsub.vi v8, v4, 15, v0.t49# CHECK-ENCODING: [0x57,0xb4,0x47,0x0c]50# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}51# CHECK-UNKNOWN: 0c47b457 <unknown>52 53vrsub.vi v8, v4, 1554# CHECK-INST: vrsub.vi v8, v4, 1555# CHECK-ENCODING: [0x57,0xb4,0x47,0x0e]56# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}57# CHECK-UNKNOWN: 0e47b457 <unknown>58 59vwsubu.vv v8, v4, v20, v0.t60# CHECK-INST: vwsubu.vv v8, v4, v20, v0.t61# CHECK-ENCODING: [0x57,0x24,0x4a,0xc8]62# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}63# CHECK-UNKNOWN: c84a2457 <unknown>64 65vwsubu.vv v8, v4, v2066# CHECK-INST: vwsubu.vv v8, v4, v2067# CHECK-ENCODING: [0x57,0x24,0x4a,0xca]68# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}69# CHECK-UNKNOWN: ca4a2457 <unknown>70 71vwsubu.vx v8, v4, a0, v0.t72# CHECK-INST: vwsubu.vx v8, v4, a0, v0.t73# CHECK-ENCODING: [0x57,0x64,0x45,0xc8]74# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}75# CHECK-UNKNOWN: c8456457 <unknown>76 77vwsubu.vx v8, v4, a078# CHECK-INST: vwsubu.vx v8, v4, a079# CHECK-ENCODING: [0x57,0x64,0x45,0xca]80# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}81# CHECK-UNKNOWN: ca456457 <unknown>82 83vwsub.vv v8, v4, v20, v0.t84# CHECK-INST: vwsub.vv v8, v4, v20, v0.t85# CHECK-ENCODING: [0x57,0x24,0x4a,0xcc]86# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}87# CHECK-UNKNOWN: cc4a2457 <unknown>88 89vwsub.vv v8, v4, v2090# CHECK-INST: vwsub.vv v8, v4, v2091# CHECK-ENCODING: [0x57,0x24,0x4a,0xce]92# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}93# CHECK-UNKNOWN: ce4a2457 <unknown>94 95vwsub.vx v8, v4, a0, v0.t96# CHECK-INST: vwsub.vx v8, v4, a0, v0.t97# CHECK-ENCODING: [0x57,0x64,0x45,0xcc]98# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}99# CHECK-UNKNOWN: cc456457 <unknown>100 101vwsub.vx v8, v4, a0102# CHECK-INST: vwsub.vx v8, v4, a0103# CHECK-ENCODING: [0x57,0x64,0x45,0xce]104# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}105# CHECK-UNKNOWN: ce456457 <unknown>106 107vwsubu.wv v8, v4, v20, v0.t108# CHECK-INST: vwsubu.wv v8, v4, v20, v0.t109# CHECK-ENCODING: [0x57,0x24,0x4a,0xd8]110# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}111# CHECK-UNKNOWN: d84a2457 <unknown>112 113vwsubu.wv v8, v4, v20114# CHECK-INST: vwsubu.wv v8, v4, v20115# CHECK-ENCODING: [0x57,0x24,0x4a,0xda]116# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}117# CHECK-UNKNOWN: da4a2457 <unknown>118 119vwsubu.wx v8, v4, a0, v0.t120# CHECK-INST: vwsubu.wx v8, v4, a0, v0.t121# CHECK-ENCODING: [0x57,0x64,0x45,0xd8]122# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}123# CHECK-UNKNOWN: d8456457 <unknown>124 125vwsubu.wx v8, v4, a0126# CHECK-INST: vwsubu.wx v8, v4, a0127# CHECK-ENCODING: [0x57,0x64,0x45,0xda]128# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}129# CHECK-UNKNOWN: da456457 <unknown>130 131vwsub.wv v8, v4, v20, v0.t132# CHECK-INST: vwsub.wv v8, v4, v20, v0.t133# CHECK-ENCODING: [0x57,0x24,0x4a,0xdc]134# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}135# CHECK-UNKNOWN: dc4a2457 <unknown>136 137vwsub.wv v8, v4, v20138# CHECK-INST: vwsub.wv v8, v4, v20139# CHECK-ENCODING: [0x57,0x24,0x4a,0xde]140# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}141# CHECK-UNKNOWN: de4a2457 <unknown>142 143vwsub.wx v8, v4, a0, v0.t144# CHECK-INST: vwsub.wx v8, v4, a0, v0.t145# CHECK-ENCODING: [0x57,0x64,0x45,0xdc]146# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}147# CHECK-UNKNOWN: dc456457 <unknown>148 149vwsub.wx v8, v4, a0150# CHECK-INST: vwsub.wx v8, v4, a0151# CHECK-ENCODING: [0x57,0x64,0x45,0xde]152# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}153# CHECK-UNKNOWN: de456457 <unknown>154 155vsbc.vvm v8, v4, v20, v0156# CHECK-INST: vsbc.vvm v8, v4, v20, v0157# CHECK-ENCODING: [0x57,0x04,0x4a,0x48]158# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}159# CHECK-UNKNOWN: 484a0457 <unknown>160 161vsbc.vvm v4, v4, v20, v0162# CHECK-INST: vsbc.vvm v4, v4, v20, v0163# CHECK-ENCODING: [0x57,0x02,0x4a,0x48]164# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}165# CHECK-UNKNOWN: 484a0257 <unknown>166 167vsbc.vvm v8, v4, v8, v0168# CHECK-INST: vsbc.vvm v8, v4, v8, v0169# CHECK-ENCODING: [0x57,0x04,0x44,0x48]170# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}171# CHECK-UNKNOWN: 48440457 <unknown>172 173vsbc.vxm v8, v4, a0, v0174# CHECK-INST: vsbc.vxm v8, v4, a0, v0175# CHECK-ENCODING: [0x57,0x44,0x45,0x48]176# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}177# CHECK-UNKNOWN: 48454457 <unknown>178 179vmsbc.vvm v8, v4, v20, v0180# CHECK-INST: vmsbc.vvm v8, v4, v20, v0181# CHECK-ENCODING: [0x57,0x04,0x4a,0x4c]182# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}183# CHECK-UNKNOWN: 4c4a0457 <unknown>184 185vmsbc.vvm v4, v4, v20, v0186# CHECK-INST: vmsbc.vvm v4, v4, v20, v0187# CHECK-ENCODING: [0x57,0x02,0x4a,0x4c]188# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}189# CHECK-UNKNOWN: 4c4a0257 <unknown>190 191vmsbc.vvm v8, v4, v8, v0192# CHECK-INST: vmsbc.vvm v8, v4, v8, v0193# CHECK-ENCODING: [0x57,0x04,0x44,0x4c]194# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}195# CHECK-UNKNOWN: 4c440457 <unknown>196 197vmsbc.vxm v8, v4, a0, v0198# CHECK-INST: vmsbc.vxm v8, v4, a0, v0199# CHECK-ENCODING: [0x57,0x44,0x45,0x4c]200# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}201# CHECK-UNKNOWN: 4c454457 <unknown>202 203vmsbc.vv v8, v4, v20204# CHECK-INST: vmsbc.vv v8, v4, v20205# CHECK-ENCODING: [0x57,0x04,0x4a,0x4e]206# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}207# CHECK-UNKNOWN: 4e4a0457 <unknown>208 209vmsbc.vx v8, v4, a0210# CHECK-INST: vmsbc.vx v8, v4, a0211# CHECK-ENCODING: [0x57,0x44,0x45,0x4e]212# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}213# CHECK-UNKNOWN: 4e454457 <unknown>214 215vssubu.vv v8, v4, v20, v0.t216# CHECK-INST: vssubu.vv v8, v4, v20, v0.t217# CHECK-ENCODING: [0x57,0x04,0x4a,0x88]218# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}219# CHECK-UNKNOWN: 884a0457 <unknown>220 221vssubu.vv v8, v4, v20222# CHECK-INST: vssubu.vv v8, v4, v20223# CHECK-ENCODING: [0x57,0x04,0x4a,0x8a]224# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}225# CHECK-UNKNOWN: 8a4a0457 <unknown>226 227vssubu.vx v8, v4, a0, v0.t228# CHECK-INST: vssubu.vx v8, v4, a0, v0.t229# CHECK-ENCODING: [0x57,0x44,0x45,0x88]230# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}231# CHECK-UNKNOWN: 88454457 <unknown>232 233vssubu.vx v8, v4, a0234# CHECK-INST: vssubu.vx v8, v4, a0235# CHECK-ENCODING: [0x57,0x44,0x45,0x8a]236# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}237# CHECK-UNKNOWN: 8a454457 <unknown>238 239vssub.vv v8, v4, v20, v0.t240# CHECK-INST: vssub.vv v8, v4, v20, v0.t241# CHECK-ENCODING: [0x57,0x04,0x4a,0x8c]242# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}243# CHECK-UNKNOWN: 8c4a0457 <unknown>244 245vssub.vv v8, v4, v20246# CHECK-INST: vssub.vv v8, v4, v20247# CHECK-ENCODING: [0x57,0x04,0x4a,0x8e]248# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}249# CHECK-UNKNOWN: 8e4a0457 <unknown>250 251vssub.vx v8, v4, a0, v0.t252# CHECK-INST: vssub.vx v8, v4, a0, v0.t253# CHECK-ENCODING: [0x57,0x44,0x45,0x8c]254# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}255# CHECK-UNKNOWN: 8c454457 <unknown>256 257vssub.vx v8, v4, a0258# CHECK-INST: vssub.vx v8, v4, a0259# CHECK-ENCODING: [0x57,0x44,0x45,0x8e]260# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}261# CHECK-UNKNOWN: 8e454457 <unknown>262 263vasub.vv v8, v4, v20, v0.t264# CHECK-INST: vasub.vv v8, v4, v20, v0.t265# CHECK-ENCODING: [0x57,0x24,0x4a,0x2c]266# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}267# CHECK-UNKNOWN: 2c4a2457 <unknown>268 269vasub.vv v8, v4, v20270# CHECK-INST: vasub.vv v8, v4, v20271# CHECK-ENCODING: [0x57,0x24,0x4a,0x2e]272# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}273# CHECK-UNKNOWN: 2e4a2457 <unknown>274 275vasub.vx v8, v4, a0, v0.t276# CHECK-INST: vasub.vx v8, v4, a0, v0.t277# CHECK-ENCODING: [0x57,0x64,0x45,0x2c]278# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}279# CHECK-UNKNOWN: 2c456457 <unknown>280 281vasub.vx v8, v4, a0282# CHECK-INST: vasub.vx v8, v4, a0283# CHECK-ENCODING: [0x57,0x64,0x45,0x2e]284# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}285# CHECK-UNKNOWN: 2e456457 <unknown>286 287vasubu.vv v8, v4, v20, v0.t288# CHECK-INST: vasubu.vv v8, v4, v20, v0.t289# CHECK-ENCODING: [0x57,0x24,0x4a,0x28]290# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}291# CHECK-UNKNOWN: 284a2457 <unknown>292 293vasubu.vv v8, v4, v20294# CHECK-INST: vasubu.vv v8, v4, v20295# CHECK-ENCODING: [0x57,0x24,0x4a,0x2a]296# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}297# CHECK-UNKNOWN: 2a4a2457 <unknown>298 299vasubu.vx v8, v4, a0, v0.t300# CHECK-INST: vasubu.vx v8, v4, a0, v0.t301# CHECK-ENCODING: [0x57,0x64,0x45,0x28]302# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}303# CHECK-UNKNOWN: 28456457 <unknown>304 305vasubu.vx v8, v4, a0306# CHECK-INST: vasubu.vx v8, v4, a0307# CHECK-ENCODING: [0x57,0x64,0x45,0x2a]308# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}309# CHECK-UNKNOWN: 2a456457 <unknown>310