271 lines · plain
1# RUN: llvm-mc -triple=riscv64 -show-encoding --mattr=+v %s \2# RUN: --mattr=+f \3# RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST4# RUN: not llvm-mc -triple=riscv64 -show-encoding %s 2>&1 \5# RUN: | FileCheck %s --check-prefix=CHECK-ERROR6# RUN: llvm-mc -triple=riscv64 -filetype=obj --mattr=+v %s \7# RUN: --mattr=+f \8# RUN: | llvm-objdump -d --mattr=+v --mattr=+f - \9# RUN: | FileCheck %s --check-prefix=CHECK-INST10# RUN: llvm-mc -triple=riscv64 -filetype=obj --mattr=+v %s \11# RUN: --mattr=+f \12# RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN13 14vfcvt.xu.f.v v8, v4, v0.t15# CHECK-INST: vfcvt.xu.f.v v8, v4, v0.t16# CHECK-ENCODING: [0x57,0x14,0x40,0x48]17# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}18# CHECK-UNKNOWN: 48401457 <unknown>19 20vfcvt.xu.f.v v8, v421# CHECK-INST: vfcvt.xu.f.v v8, v422# CHECK-ENCODING: [0x57,0x14,0x40,0x4a]23# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}24# CHECK-UNKNOWN: 4a401457 <unknown>25 26vfcvt.x.f.v v8, v4, v0.t27# CHECK-INST: vfcvt.x.f.v v8, v4, v0.t28# CHECK-ENCODING: [0x57,0x94,0x40,0x48]29# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}30# CHECK-UNKNOWN: 48409457 <unknown>31 32vfcvt.x.f.v v8, v433# CHECK-INST: vfcvt.x.f.v v8, v434# CHECK-ENCODING: [0x57,0x94,0x40,0x4a]35# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}36# CHECK-UNKNOWN: 4a409457 <unknown>37 38vfcvt.f.xu.v v8, v4, v0.t39# CHECK-INST: vfcvt.f.xu.v v8, v4, v0.t40# CHECK-ENCODING: [0x57,0x14,0x41,0x48]41# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}42# CHECK-UNKNOWN: 48411457 <unknown>43 44vfcvt.f.xu.v v8, v445# CHECK-INST: vfcvt.f.xu.v v8, v446# CHECK-ENCODING: [0x57,0x14,0x41,0x4a]47# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}48# CHECK-UNKNOWN: 4a411457 <unknown>49 50vfcvt.f.x.v v8, v4, v0.t51# CHECK-INST: vfcvt.f.x.v v8, v4, v0.t52# CHECK-ENCODING: [0x57,0x94,0x41,0x48]53# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}54# CHECK-UNKNOWN: 48419457 <unknown>55 56vfcvt.f.x.v v8, v457# CHECK-INST: vfcvt.f.x.v v8, v458# CHECK-ENCODING: [0x57,0x94,0x41,0x4a]59# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}60# CHECK-UNKNOWN: 4a419457 <unknown>61 62vfcvt.rtz.xu.f.v v8, v4, v0.t63# CHECK-INST: vfcvt.rtz.xu.f.v v8, v4, v0.t64# CHECK-ENCODING: [0x57,0x14,0x43,0x48]65# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}66# CHECK-UNKNOWN: 48431457 <unknown>67 68vfcvt.rtz.xu.f.v v8, v469# CHECK-INST: vfcvt.rtz.xu.f.v v8, v470# CHECK-ENCODING: [0x57,0x14,0x43,0x4a]71# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}72# CHECK-UNKNOWN: 4a431457 <unknown>73 74vfcvt.rtz.x.f.v v8, v4, v0.t75# CHECK-INST: vfcvt.rtz.x.f.v v8, v4, v0.t76# CHECK-ENCODING: [0x57,0x94,0x43,0x48]77# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}78# CHECK-UNKNOWN: 48439457 <unknown>79 80vfcvt.rtz.x.f.v v8, v481# CHECK-INST: vfcvt.rtz.x.f.v v8, v482# CHECK-ENCODING: [0x57,0x94,0x43,0x4a]83# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}84# CHECK-UNKNOWN: 4a439457 <unknown>85 86vfwcvt.xu.f.v v8, v4, v0.t87# CHECK-INST: vfwcvt.xu.f.v v8, v4, v0.t88# CHECK-ENCODING: [0x57,0x14,0x44,0x48]89# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}90# CHECK-UNKNOWN: 48441457 <unknown>91 92vfwcvt.xu.f.v v8, v493# CHECK-INST: vfwcvt.xu.f.v v8, v494# CHECK-ENCODING: [0x57,0x14,0x44,0x4a]95# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}96# CHECK-UNKNOWN: 4a441457 <unknown>97 98vfwcvt.x.f.v v8, v4, v0.t99# CHECK-INST: vfwcvt.x.f.v v8, v4, v0.t100# CHECK-ENCODING: [0x57,0x94,0x44,0x48]101# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}102# CHECK-UNKNOWN: 48449457 <unknown>103 104vfwcvt.x.f.v v8, v4105# CHECK-INST: vfwcvt.x.f.v v8, v4106# CHECK-ENCODING: [0x57,0x94,0x44,0x4a]107# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}108# CHECK-UNKNOWN: 4a449457 <unknown>109 110vfwcvt.f.xu.v v8, v4, v0.t111# CHECK-INST: vfwcvt.f.xu.v v8, v4, v0.t112# CHECK-ENCODING: [0x57,0x14,0x45,0x48]113# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}114# CHECK-UNKNOWN: 48451457 <unknown>115 116vfwcvt.f.xu.v v8, v4117# CHECK-INST: vfwcvt.f.xu.v v8, v4118# CHECK-ENCODING: [0x57,0x14,0x45,0x4a]119# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}120# CHECK-UNKNOWN: 4a451457 <unknown>121 122vfwcvt.f.x.v v8, v4, v0.t123# CHECK-INST: vfwcvt.f.x.v v8, v4, v0.t124# CHECK-ENCODING: [0x57,0x94,0x45,0x48]125# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}126# CHECK-UNKNOWN: 48459457 <unknown>127 128vfwcvt.f.x.v v8, v4129# CHECK-INST: vfwcvt.f.x.v v8, v4130# CHECK-ENCODING: [0x57,0x94,0x45,0x4a]131# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}132# CHECK-UNKNOWN: 4a459457 <unknown>133 134vfwcvt.f.f.v v8, v4, v0.t135# CHECK-INST: vfwcvt.f.f.v v8, v4, v0.t136# CHECK-ENCODING: [0x57,0x14,0x46,0x48]137# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}138# CHECK-UNKNOWN: 48461457 <unknown>139 140vfwcvt.f.f.v v8, v4141# CHECK-INST: vfwcvt.f.f.v v8, v4142# CHECK-ENCODING: [0x57,0x14,0x46,0x4a]143# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}144# CHECK-UNKNOWN: 4a461457 <unknown>145 146vfwcvt.rtz.xu.f.v v8, v4, v0.t147# CHECK-INST: vfwcvt.rtz.xu.f.v v8, v4, v0.t148# CHECK-ENCODING: [0x57,0x14,0x47,0x48]149# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}150# CHECK-UNKNOWN: 48471457 <unknown>151 152vfwcvt.rtz.xu.f.v v8, v4153# CHECK-INST: vfwcvt.rtz.xu.f.v v8, v4154# CHECK-ENCODING: [0x57,0x14,0x47,0x4a]155# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}156# CHECK-UNKNOWN: 4a471457 <unknown>157 158vfwcvt.rtz.x.f.v v8, v4, v0.t159# CHECK-INST: vfwcvt.rtz.x.f.v v8, v4, v0.t160# CHECK-ENCODING: [0x57,0x94,0x47,0x48]161# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}162# CHECK-UNKNOWN: 48479457 <unknown>163 164vfwcvt.rtz.x.f.v v8, v4165# CHECK-INST: vfwcvt.rtz.x.f.v v8, v4166# CHECK-ENCODING: [0x57,0x94,0x47,0x4a]167# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}168# CHECK-UNKNOWN: 4a479457 <unknown>169 170vfncvt.xu.f.w v8, v4, v0.t171# CHECK-INST: vfncvt.xu.f.w v8, v4, v0.t172# CHECK-ENCODING: [0x57,0x14,0x48,0x48]173# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}174# CHECK-UNKNOWN: 48481457 <unknown>175 176vfncvt.xu.f.w v4, v4, v0.t177# CHECK-INST: vfncvt.xu.f.w v4, v4, v0.t178# CHECK-ENCODING: [0x57,0x12,0x48,0x48]179# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}180# CHECK-UNKNOWN: 48481257 <unknown>181 182vfncvt.xu.f.w v8, v4183# CHECK-INST: vfncvt.xu.f.w v8, v4184# CHECK-ENCODING: [0x57,0x14,0x48,0x4a]185# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}186# CHECK-UNKNOWN: 4a481457 <unknown>187 188vfncvt.x.f.w v8, v4, v0.t189# CHECK-INST: vfncvt.x.f.w v8, v4, v0.t190# CHECK-ENCODING: [0x57,0x94,0x48,0x48]191# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}192# CHECK-UNKNOWN: 48489457 <unknown>193 194vfncvt.x.f.w v8, v4195# CHECK-INST: vfncvt.x.f.w v8, v4196# CHECK-ENCODING: [0x57,0x94,0x48,0x4a]197# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}198# CHECK-UNKNOWN: 4a489457 <unknown>199 200vfncvt.f.xu.w v8, v4, v0.t201# CHECK-INST: vfncvt.f.xu.w v8, v4, v0.t202# CHECK-ENCODING: [0x57,0x14,0x49,0x48]203# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}204# CHECK-UNKNOWN: 48491457 <unknown>205 206vfncvt.f.xu.w v8, v4207# CHECK-INST: vfncvt.f.xu.w v8, v4208# CHECK-ENCODING: [0x57,0x14,0x49,0x4a]209# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}210# CHECK-UNKNOWN: 4a491457 <unknown>211 212vfncvt.f.x.w v8, v4, v0.t213# CHECK-INST: vfncvt.f.x.w v8, v4, v0.t214# CHECK-ENCODING: [0x57,0x94,0x49,0x48]215# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}216# CHECK-UNKNOWN: 48499457 <unknown>217 218vfncvt.f.x.w v8, v4219# CHECK-INST: vfncvt.f.x.w v8, v4220# CHECK-ENCODING: [0x57,0x94,0x49,0x4a]221# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}222# CHECK-UNKNOWN: 4a499457 <unknown>223 224vfncvt.f.f.w v8, v4, v0.t225# CHECK-INST: vfncvt.f.f.w v8, v4, v0.t226# CHECK-ENCODING: [0x57,0x14,0x4a,0x48]227# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}228# CHECK-UNKNOWN: 484a1457 <unknown>229 230vfncvt.f.f.w v8, v4231# CHECK-INST: vfncvt.f.f.w v8, v4232# CHECK-ENCODING: [0x57,0x14,0x4a,0x4a]233# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}234# CHECK-UNKNOWN: 4a4a1457 <unknown>235 236vfncvt.rod.f.f.w v8, v4, v0.t237# CHECK-INST: vfncvt.rod.f.f.w v8, v4, v0.t238# CHECK-ENCODING: [0x57,0x94,0x4a,0x48]239# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}240# CHECK-UNKNOWN: 484a9457 <unknown>241 242vfncvt.rod.f.f.w v8, v4243# CHECK-INST: vfncvt.rod.f.f.w v8, v4244# CHECK-ENCODING: [0x57,0x94,0x4a,0x4a]245# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}246# CHECK-UNKNOWN: 4a4a9457 <unknown>247 248vfncvt.rtz.xu.f.w v8, v4, v0.t249# CHECK-INST: vfncvt.rtz.xu.f.w v8, v4, v0.t250# CHECK-ENCODING: [0x57,0x14,0x4b,0x48]251# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}252# CHECK-UNKNOWN: 484b1457 <unknown>253 254vfncvt.rtz.xu.f.w v8, v4255# CHECK-INST: vfncvt.rtz.xu.f.w v8, v4256# CHECK-ENCODING: [0x57,0x14,0x4b,0x4a]257# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}258# CHECK-UNKNOWN: 4a4b1457 <unknown>259 260vfncvt.rtz.x.f.w v8, v4, v0.t261# CHECK-INST: vfncvt.rtz.x.f.w v8, v4, v0.t262# CHECK-ENCODING: [0x57,0x94,0x4b,0x48]263# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}264# CHECK-UNKNOWN: 484b9457 <unknown>265 266vfncvt.rtz.x.f.w v8, v4267# CHECK-INST: vfncvt.rtz.x.f.w v8, v4268# CHECK-ENCODING: [0x57,0x94,0x4b,0x4a]269# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}270# CHECK-UNKNOWN: 4a4b9457 <unknown>271