262 lines · plain
1# RUN: llvm-mc -triple=riscv64 -show-encoding --mattr=+v %s \2# RUN: --M no-aliases | 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 -M no-aliases - \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 11vsm.v v24, (a0)12# CHECK-INST: vsm.v v24, (a0)13# CHECK-ENCODING: [0x27,0x0c,0xb5,0x02]14# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}15# CHECK-UNKNOWN: 02b50c27 <unknown>16 17vse8.v v24, (a0), v0.t18# CHECK-INST: vse8.v v24, (a0), v0.t19# CHECK-ENCODING: [0x27,0x0c,0x05,0x00]20# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}21# CHECK-UNKNOWN: 00050c27 <unknown>22 23vse8.v v24, (a0)24# CHECK-INST: vse8.v v24, (a0)25# CHECK-ENCODING: [0x27,0x0c,0x05,0x02]26# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}27# CHECK-UNKNOWN: 02050c27 <unknown>28 29vse16.v v24, (a0), v0.t30# CHECK-INST: vse16.v v24, (a0), v0.t31# CHECK-ENCODING: [0x27,0x5c,0x05,0x00]32# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}33# CHECK-UNKNOWN: 00055c27 <unknown>34 35vse16.v v24, (a0)36# CHECK-INST: vse16.v v24, (a0)37# CHECK-ENCODING: [0x27,0x5c,0x05,0x02]38# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}39# CHECK-UNKNOWN: 02055c27 <unknown>40 41vse32.v v24, (a0), v0.t42# CHECK-INST: vse32.v v24, (a0), v0.t43# CHECK-ENCODING: [0x27,0x6c,0x05,0x00]44# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}45# CHECK-UNKNOWN: 00056c27 <unknown>46 47vse32.v v24, (a0)48# CHECK-INST: vse32.v v24, (a0)49# CHECK-ENCODING: [0x27,0x6c,0x05,0x02]50# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}51# CHECK-UNKNOWN: 02056c27 <unknown>52 53vse64.v v24, (a0), v0.t54# CHECK-INST: vse64.v v24, (a0), v0.t55# CHECK-ENCODING: [0x27,0x7c,0x05,0x00]56# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors) or 'Zve64x' (Vector Extensions for Embedded Processors){{$}}57# CHECK-UNKNOWN: 00057c27 <unknown>58 59vse64.v v24, (a0)60# CHECK-INST: vse64.v v24, (a0)61# CHECK-ENCODING: [0x27,0x7c,0x05,0x02]62# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors) or 'Zve64x' (Vector Extensions for Embedded Processors){{$}}63# CHECK-UNKNOWN: 02057c27 <unknown>64 65vsse8.v v24, (a0), a1, v0.t66# CHECK-INST: vsse8.v v24, (a0), a1, v0.t67# CHECK-ENCODING: [0x27,0x0c,0xb5,0x08]68# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}69# CHECK-UNKNOWN: 08b50c27 <unknown>70 71vsse8.v v24, (a0), a172# CHECK-INST: vsse8.v v24, (a0), a173# CHECK-ENCODING: [0x27,0x0c,0xb5,0x0a]74# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}75# CHECK-UNKNOWN: 0ab50c27 <unknown>76 77vsse16.v v24, (a0), a1, v0.t78# CHECK-INST: vsse16.v v24, (a0), a1, v0.t79# CHECK-ENCODING: [0x27,0x5c,0xb5,0x08]80# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}81# CHECK-UNKNOWN: 08b55c27 <unknown>82 83vsse16.v v24, (a0), a184# CHECK-INST: vsse16.v v24, (a0), a185# CHECK-ENCODING: [0x27,0x5c,0xb5,0x0a]86# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}87# CHECK-UNKNOWN: 0ab55c27 <unknown>88 89vsse32.v v24, (a0), a1, v0.t90# CHECK-INST: vsse32.v v24, (a0), a1, v0.t91# CHECK-ENCODING: [0x27,0x6c,0xb5,0x08]92# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}93# CHECK-UNKNOWN: 08b56c27 <unknown>94 95vsse32.v v24, (a0), a196# CHECK-INST: vsse32.v v24, (a0), a197# CHECK-ENCODING: [0x27,0x6c,0xb5,0x0a]98# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}99# CHECK-UNKNOWN: 0ab56c27 <unknown>100 101vsse64.v v24, (a0), a1, v0.t102# CHECK-INST: vsse64.v v24, (a0), a1, v0.t103# CHECK-ENCODING: [0x27,0x7c,0xb5,0x08]104# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors) or 'Zve64x' (Vector Extensions for Embedded Processors){{$}}105# CHECK-UNKNOWN: 08b57c27 <unknown>106 107vsse64.v v24, (a0), a1108# CHECK-INST: vsse64.v v24, (a0), a1109# CHECK-ENCODING: [0x27,0x7c,0xb5,0x0a]110# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors) or 'Zve64x' (Vector Extensions for Embedded Processors){{$}}111# CHECK-UNKNOWN: 0ab57c27 <unknown>112 113vsuxei8.v v24, (a0), v4, v0.t114# CHECK-INST: vsuxei8.v v24, (a0), v4, v0.t115# CHECK-ENCODING: [0x27,0x0c,0x45,0x04]116# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}117# CHECK-UNKNOWN: 04450c27 <unknown>118 119vsuxei8.v v24, (a0), v4120# CHECK-INST: vsuxei8.v v24, (a0), v4121# CHECK-ENCODING: [0x27,0x0c,0x45,0x06]122# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}123# CHECK-UNKNOWN: 06450c27 <unknown>124 125vsuxei16.v v24, (a0), v4, v0.t126# CHECK-INST: vsuxei16.v v24, (a0), v4, v0.t127# CHECK-ENCODING: [0x27,0x5c,0x45,0x04]128# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}129# CHECK-UNKNOWN: 04455c27 <unknown>130 131vsuxei16.v v24, (a0), v4132# CHECK-INST: vsuxei16.v v24, (a0), v4133# CHECK-ENCODING: [0x27,0x5c,0x45,0x06]134# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}135# CHECK-UNKNOWN: 06455c27 <unknown>136 137vsuxei32.v v24, (a0), v4, v0.t138# CHECK-INST: vsuxei32.v v24, (a0), v4, v0.t139# CHECK-ENCODING: [0x27,0x6c,0x45,0x04]140# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}141# CHECK-UNKNOWN: 04456c27 <unknown>142 143vsuxei32.v v24, (a0), v4144# CHECK-INST: vsuxei32.v v24, (a0), v4145# CHECK-ENCODING: [0x27,0x6c,0x45,0x06]146# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}147# CHECK-UNKNOWN: 06456c27 <unknown>148 149vsuxei64.v v24, (a0), v4, v0.t150# CHECK-INST: vsuxei64.v v24, (a0), v4, v0.t151# CHECK-ENCODING: [0x27,0x7c,0x45,0x04]152# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors) or 'Zve64x' (Vector Extensions for Embedded Processors){{$}}153# CHECK-UNKNOWN: 04457c27 <unknown>154 155vsuxei64.v v24, (a0), v4156# CHECK-INST: vsuxei64.v v24, (a0), v4157# CHECK-ENCODING: [0x27,0x7c,0x45,0x06]158# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors) or 'Zve64x' (Vector Extensions for Embedded Processors){{$}}159# CHECK-UNKNOWN: 06457c27 <unknown>160 161vsoxei8.v v24, (a0), v4, v0.t162# CHECK-INST: vsoxei8.v v24, (a0), v4, v0.t163# CHECK-ENCODING: [0x27,0x0c,0x45,0x0c]164# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}165# CHECK-UNKNOWN: 0c450c27 <unknown>166 167vsoxei8.v v24, (a0), v4168# CHECK-INST: vsoxei8.v v24, (a0), v4169# CHECK-ENCODING: [0x27,0x0c,0x45,0x0e]170# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}171# CHECK-UNKNOWN: 0e450c27 <unknown>172 173vsoxei16.v v24, (a0), v4, v0.t174# CHECK-INST: vsoxei16.v v24, (a0), v4, v0.t175# CHECK-ENCODING: [0x27,0x5c,0x45,0x0c]176# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}177# CHECK-UNKNOWN: 0c455c27 <unknown>178 179vsoxei16.v v24, (a0), v4180# CHECK-INST: vsoxei16.v v24, (a0), v4181# CHECK-ENCODING: [0x27,0x5c,0x45,0x0e]182# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}183# CHECK-UNKNOWN: 0e455c27 <unknown>184 185vsoxei32.v v24, (a0), v4, v0.t186# CHECK-INST: vsoxei32.v v24, (a0), v4, v0.t187# CHECK-ENCODING: [0x27,0x6c,0x45,0x0c]188# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}189# CHECK-UNKNOWN: 0c456c27 <unknown>190 191vsoxei32.v v24, (a0), v4192# CHECK-INST: vsoxei32.v v24, (a0), v4193# CHECK-ENCODING: [0x27,0x6c,0x45,0x0e]194# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}195# CHECK-UNKNOWN: 0e456c27 <unknown>196 197vsoxei64.v v24, (a0), v4, v0.t198# CHECK-INST: vsoxei64.v v24, (a0), v4, v0.t199# CHECK-ENCODING: [0x27,0x7c,0x45,0x0c]200# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors) or 'Zve64x' (Vector Extensions for Embedded Processors){{$}}201# CHECK-UNKNOWN: 0c457c27 <unknown>202 203vsoxei64.v v24, (a0), v4204# CHECK-INST: vsoxei64.v v24, (a0), v4205# CHECK-ENCODING: [0x27,0x7c,0x45,0x0e]206# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors) or 'Zve64x' (Vector Extensions for Embedded Processors){{$}}207# CHECK-UNKNOWN: 0e457c27 <unknown>208 209vs1r.v v24, (a0)210# CHECK-INST: vs1r.v v24, (a0)211# CHECK-ENCODING: [0x27,0x0c,0x85,0x02]212# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}213# CHECK-UNKNOWN: 02850c27 <unknown>214 215vs2r.v v24, (a0)216# CHECK-INST: vs2r.v v24, (a0)217# CHECK-ENCODING: [0x27,0x0c,0x85,0x22]218# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}219# CHECK-UNKNOWN: 22850c27 <unknown>220 221vs4r.v v24, (a0)222# CHECK-INST: vs4r.v v24, (a0)223# CHECK-ENCODING: [0x27,0x0c,0x85,0x62]224# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}225# CHECK-UNKNOWN: 62850c27 <unknown>226 227vs8r.v v24, (a0)228# CHECK-INST: vs8r.v v24, (a0)229# CHECK-ENCODING: [0x27,0x0c,0x85,0xe2]230# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}231# CHECK-UNKNOWN: e2850c27 <unknown>232 233vsm.v v24, 0(a0)234# CHECK-INST: vsm.v v24, (a0)235# CHECK-ENCODING: [0x27,0x0c,0xb5,0x02]236# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}237# CHECK-UNKNOWN: 02b50c27 <unknown>238 239vse8.v v24, 0(a0), v0.t240# CHECK-INST: vse8.v v24, (a0), v0.t241# CHECK-ENCODING: [0x27,0x0c,0x05,0x00]242# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}243# CHECK-UNKNOWN: 00050c27 <unknown>244 245vsse16.v v24, 0(a0), a1, v0.t246# CHECK-INST: vsse16.v v24, (a0), a1, v0.t247# CHECK-ENCODING: [0x27,0x5c,0xb5,0x08]248# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}249# CHECK-UNKNOWN: 08b55c27 <unknown>250 251vsuxei8.v v24, 0(a0), v4, v0.t252# CHECK-INST: vsuxei8.v v24, (a0), v4, v0.t253# CHECK-ENCODING: [0x27,0x0c,0x45,0x04]254# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}255# CHECK-UNKNOWN: 04450c27 <unknown>256 257vsoxei32.v v24, 0(a0), v4, v0.t258# CHECK-INST: vsoxei32.v v24, (a0), v4, v0.t259# CHECK-ENCODING: [0x27,0x6c,0x45,0x0c]260# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}261# CHECK-UNKNOWN: 0c456c27 <unknown>262