268 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 --no-print-imm-hex -d --mattr=+v - \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 11vsll.vv v8, v4, v20, v0.t12# CHECK-INST: vsll.vv v8, v4, v20, v0.t13# CHECK-ENCODING: [0x57,0x04,0x4a,0x94]14# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}15# CHECK-UNKNOWN: 944a0457 <unknown>16 17vsll.vv v8, v4, v2018# CHECK-INST: vsll.vv v8, v4, v2019# CHECK-ENCODING: [0x57,0x04,0x4a,0x96]20# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}21# CHECK-UNKNOWN: 964a0457 <unknown>22 23vsll.vx v8, v4, a0, v0.t24# CHECK-INST: vsll.vx v8, v4, a0, v0.t25# CHECK-ENCODING: [0x57,0x44,0x45,0x94]26# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}27# CHECK-UNKNOWN: 94454457 <unknown>28 29vsll.vx v8, v4, a030# CHECK-INST: vsll.vx v8, v4, a031# CHECK-ENCODING: [0x57,0x44,0x45,0x96]32# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}33# CHECK-UNKNOWN: 96454457 <unknown>34 35vsll.vi v8, v4, 31, v0.t36# CHECK-INST: vsll.vi v8, v4, 31, v0.t37# CHECK-ENCODING: [0x57,0xb4,0x4f,0x94]38# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}39# CHECK-UNKNOWN: 944fb457 <unknown>40 41vsll.vi v8, v4, 3142# CHECK-INST: vsll.vi v8, v4, 3143# CHECK-ENCODING: [0x57,0xb4,0x4f,0x96]44# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}45# CHECK-UNKNOWN: 964fb457 <unknown>46 47vsrl.vv v8, v4, v20, v0.t48# CHECK-INST: vsrl.vv v8, v4, v20, v0.t49# CHECK-ENCODING: [0x57,0x04,0x4a,0xa0]50# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}51# CHECK-UNKNOWN: a04a0457 <unknown>52 53vsrl.vv v8, v4, v2054# CHECK-INST: vsrl.vv v8, v4, v2055# CHECK-ENCODING: [0x57,0x04,0x4a,0xa2]56# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}57# CHECK-UNKNOWN: a24a0457 <unknown>58 59vsrl.vx v8, v4, a0, v0.t60# CHECK-INST: vsrl.vx v8, v4, a0, v0.t61# CHECK-ENCODING: [0x57,0x44,0x45,0xa0]62# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}63# CHECK-UNKNOWN: a0454457 <unknown>64 65vsrl.vx v8, v4, a066# CHECK-INST: vsrl.vx v8, v4, a067# CHECK-ENCODING: [0x57,0x44,0x45,0xa2]68# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}69# CHECK-UNKNOWN: a2454457 <unknown>70 71vsrl.vi v8, v4, 31, v0.t72# CHECK-INST: vsrl.vi v8, v4, 31, v0.t73# CHECK-ENCODING: [0x57,0xb4,0x4f,0xa0]74# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}75# CHECK-UNKNOWN: a04fb457 <unknown>76 77vsrl.vi v8, v4, 3178# CHECK-INST: vsrl.vi v8, v4, 3179# CHECK-ENCODING: [0x57,0xb4,0x4f,0xa2]80# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}81# CHECK-UNKNOWN: a24fb457 <unknown>82 83vsra.vv v8, v4, v20, v0.t84# CHECK-INST: vsra.vv v8, v4, v20, v0.t85# CHECK-ENCODING: [0x57,0x04,0x4a,0xa4]86# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}87# CHECK-UNKNOWN: a44a0457 <unknown>88 89vsra.vv v8, v4, v2090# CHECK-INST: vsra.vv v8, v4, v2091# CHECK-ENCODING: [0x57,0x04,0x4a,0xa6]92# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}93# CHECK-UNKNOWN: a64a0457 <unknown>94 95vsra.vx v8, v4, a0, v0.t96# CHECK-INST: vsra.vx v8, v4, a0, v0.t97# CHECK-ENCODING: [0x57,0x44,0x45,0xa4]98# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}99# CHECK-UNKNOWN: a4454457 <unknown>100 101vsra.vx v8, v4, a0102# CHECK-INST: vsra.vx v8, v4, a0103# CHECK-ENCODING: [0x57,0x44,0x45,0xa6]104# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}105# CHECK-UNKNOWN: a6454457 <unknown>106 107vsra.vi v8, v4, 31, v0.t108# CHECK-INST: vsra.vi v8, v4, 31, v0.t109# CHECK-ENCODING: [0x57,0xb4,0x4f,0xa4]110# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}111# CHECK-UNKNOWN: a44fb457 <unknown>112 113vsra.vi v8, v4, 31114# CHECK-INST: vsra.vi v8, v4, 31115# CHECK-ENCODING: [0x57,0xb4,0x4f,0xa6]116# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}117# CHECK-UNKNOWN: a64fb457 <unknown>118 119vnsrl.wv v8, v4, v20, v0.t120# CHECK-INST: vnsrl.wv v8, v4, v20, v0.t121# CHECK-ENCODING: [0x57,0x04,0x4a,0xb0]122# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}123# CHECK-UNKNOWN: b04a0457 <unknown>124 125vnsrl.wv v4, v4, v20, v0.t126# CHECK-INST: vnsrl.wv v4, v4, v20, v0.t127# CHECK-ENCODING: [0x57,0x02,0x4a,0xb0]128# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}129# CHECK-UNKNOWN: b04a0257 <unknown>130 131vnsrl.wv v8, v4, v20132# CHECK-INST: vnsrl.wv v8, v4, v20133# CHECK-ENCODING: [0x57,0x04,0x4a,0xb2]134# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}135# CHECK-UNKNOWN: b24a0457 <unknown>136 137vnsrl.wx v8, v4, a0, v0.t138# CHECK-INST: vnsrl.wx v8, v4, a0, v0.t139# CHECK-ENCODING: [0x57,0x44,0x45,0xb0]140# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}141# CHECK-UNKNOWN: b0454457 <unknown>142 143vnsrl.wx v8, v4, a0144# CHECK-INST: vnsrl.wx v8, v4, a0145# CHECK-ENCODING: [0x57,0x44,0x45,0xb2]146# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}147# CHECK-UNKNOWN: b2454457 <unknown>148 149vnsrl.wi v8, v4, 31, v0.t150# CHECK-INST: vnsrl.wi v8, v4, 31, v0.t151# CHECK-ENCODING: [0x57,0xb4,0x4f,0xb0]152# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}153# CHECK-UNKNOWN: b04fb457 <unknown>154 155vnsrl.wi v8, v4, 31156# CHECK-INST: vnsrl.wi v8, v4, 31157# CHECK-ENCODING: [0x57,0xb4,0x4f,0xb2]158# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}159# CHECK-UNKNOWN: b24fb457 <unknown>160 161vnsra.wv v8, v4, v20, v0.t162# CHECK-INST: vnsra.wv v8, v4, v20, v0.t163# CHECK-ENCODING: [0x57,0x04,0x4a,0xb4]164# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}165# CHECK-UNKNOWN: b44a0457 <unknown>166 167vnsra.wv v8, v4, v20168# CHECK-INST: vnsra.wv v8, v4, v20169# CHECK-ENCODING: [0x57,0x04,0x4a,0xb6]170# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}171# CHECK-UNKNOWN: b64a0457 <unknown>172 173vnsra.wx v8, v4, a0, v0.t174# CHECK-INST: vnsra.wx v8, v4, a0, v0.t175# CHECK-ENCODING: [0x57,0x44,0x45,0xb4]176# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}177# CHECK-UNKNOWN: b4454457 <unknown>178 179vnsra.wx v8, v4, a0180# CHECK-INST: vnsra.wx v8, v4, a0181# CHECK-ENCODING: [0x57,0x44,0x45,0xb6]182# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}183# CHECK-UNKNOWN: b6454457 <unknown>184 185vnsra.wi v8, v4, 31, v0.t186# CHECK-INST: vnsra.wi v8, v4, 31, v0.t187# CHECK-ENCODING: [0x57,0xb4,0x4f,0xb4]188# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}189# CHECK-UNKNOWN: b44fb457 <unknown>190 191vnsra.wi v8, v4, 31192# CHECK-INST: vnsra.wi v8, v4, 31193# CHECK-ENCODING: [0x57,0xb4,0x4f,0xb6]194# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}195# CHECK-UNKNOWN: b64fb457 <unknown>196 197vssrl.vv v8, v4, v20, v0.t198# CHECK-INST: vssrl.vv v8, v4, v20, v0.t199# CHECK-ENCODING: [0x57,0x04,0x4a,0xa8]200# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}201# CHECK-UNKNOWN: a84a0457 <unknown>202 203vssrl.vv v8, v4, v20204# CHECK-INST: vssrl.vv v8, v4, v20205# CHECK-ENCODING: [0x57,0x04,0x4a,0xaa]206# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}207# CHECK-UNKNOWN: aa4a0457 <unknown>208 209vssrl.vx v8, v4, a0, v0.t210# CHECK-INST: vssrl.vx v8, v4, a0, v0.t211# CHECK-ENCODING: [0x57,0x44,0x45,0xa8]212# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}213# CHECK-UNKNOWN: a8454457 <unknown>214 215vssrl.vx v8, v4, a0216# CHECK-INST: vssrl.vx v8, v4, a0217# CHECK-ENCODING: [0x57,0x44,0x45,0xaa]218# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}219# CHECK-UNKNOWN: aa454457 <unknown>220 221vssrl.vi v8, v4, 31, v0.t222# CHECK-INST: vssrl.vi v8, v4, 31, v0.t223# CHECK-ENCODING: [0x57,0xb4,0x4f,0xa8]224# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}225# CHECK-UNKNOWN: a84fb457 <unknown>226 227vssrl.vi v8, v4, 31228# CHECK-INST: vssrl.vi v8, v4, 31229# CHECK-ENCODING: [0x57,0xb4,0x4f,0xaa]230# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}231# CHECK-UNKNOWN: aa4fb457 <unknown>232 233vssra.vv v8, v4, v20, v0.t234# CHECK-INST: vssra.vv v8, v4, v20, v0.t235# CHECK-ENCODING: [0x57,0x04,0x4a,0xac]236# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}237# CHECK-UNKNOWN: ac4a0457 <unknown>238 239vssra.vv v8, v4, v20240# CHECK-INST: vssra.vv v8, v4, v20241# CHECK-ENCODING: [0x57,0x04,0x4a,0xae]242# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}243# CHECK-UNKNOWN: ae4a0457 <unknown>244 245vssra.vx v8, v4, a0, v0.t246# CHECK-INST: vssra.vx v8, v4, a0, v0.t247# CHECK-ENCODING: [0x57,0x44,0x45,0xac]248# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}249# CHECK-UNKNOWN: ac454457 <unknown>250 251vssra.vx v8, v4, a0252# CHECK-INST: vssra.vx v8, v4, a0253# CHECK-ENCODING: [0x57,0x44,0x45,0xae]254# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}255# CHECK-UNKNOWN: ae454457 <unknown>256 257vssra.vi v8, v4, 31, v0.t258# CHECK-INST: vssra.vi v8, v4, 31, v0.t259# CHECK-ENCODING: [0x57,0xb4,0x4f,0xac]260# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}261# CHECK-UNKNOWN: ac4fb457 <unknown>262 263vssra.vi v8, v4, 31264# CHECK-INST: vssra.vi v8, v4, 31265# CHECK-ENCODING: [0x57,0xb4,0x4f,0xae]266# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}267# CHECK-UNKNOWN: ae4fb457 <unknown>268