1# RUN: llvm-mc -triple=riscv64 -show-encoding --mattr=+v %s \ 2# RUN: --mattr=+f \ 3# RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST 4# RUN: not llvm-mc -triple=riscv64 -show-encoding %s 2>&1 \ 5# RUN: | FileCheck %s --check-prefix=CHECK-ERROR 6# 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-INST 10# RUN: llvm-mc -triple=riscv64 -filetype=obj --mattr=+v %s \ 11# RUN: --mattr=+f \ 12# RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN 13 14vfadd.vv v8, v4, v20, v0.t 15# CHECK-INST: vfadd.vv v8, v4, v20, v0.t 16# CHECK-ENCODING: [0x57,0x14,0x4a,0x00] 17# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}} 18# CHECK-UNKNOWN: 004a1457 <unknown> 19 20vfadd.vv v8, v4, v20 21# CHECK-INST: vfadd.vv v8, v4, v20 22# CHECK-ENCODING: [0x57,0x14,0x4a,0x02] 23# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}} 24# CHECK-UNKNOWN: 024a1457 <unknown> 25 26vfadd.vf v8, v4, fa0, v0.t 27# CHECK-INST: vfadd.vf v8, v4, fa0, v0.t 28# CHECK-ENCODING: [0x57,0x54,0x45,0x00] 29# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}} 30# CHECK-UNKNOWN: 00455457 <unknown> 31 32vfadd.vf v8, v4, fa0 33# CHECK-INST: vfadd.vf v8, v4, fa0 34# CHECK-ENCODING: [0x57,0x54,0x45,0x02] 35# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}} 36# CHECK-UNKNOWN: 02455457 <unknown> 37 38vfwadd.vv v8, v4, v20, v0.t 39# CHECK-INST: vfwadd.vv v8, v4, v20, v0.t 40# CHECK-ENCODING: [0x57,0x14,0x4a,0xc0] 41# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}} 42# CHECK-UNKNOWN: c04a1457 <unknown> 43 44vfwadd.vv v8, v4, v20 45# CHECK-INST: vfwadd.vv v8, v4, v20 46# CHECK-ENCODING: [0x57,0x14,0x4a,0xc2] 47# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}} 48# CHECK-UNKNOWN: c24a1457 <unknown> 49 50vfwadd.vf v8, v4, fa0, v0.t 51# CHECK-INST: vfwadd.vf v8, v4, fa0, v0.t 52# CHECK-ENCODING: [0x57,0x54,0x45,0xc0] 53# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}} 54# CHECK-UNKNOWN: c0455457 <unknown> 55 56vfwadd.vf v8, v4, fa0 57# CHECK-INST: vfwadd.vf v8, v4, fa0 58# CHECK-ENCODING: [0x57,0x54,0x45,0xc2] 59# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}} 60# CHECK-UNKNOWN: c2455457 <unknown> 61 62vfwadd.wv v8, v4, v20, v0.t 63# CHECK-INST: vfwadd.wv v8, v4, v20, v0.t 64# CHECK-ENCODING: [0x57,0x14,0x4a,0xd0] 65# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}} 66# CHECK-UNKNOWN: d04a1457 <unknown> 67 68vfwadd.wv v8, v4, v20 69# CHECK-INST: vfwadd.wv v8, v4, v20 70# CHECK-ENCODING: [0x57,0x14,0x4a,0xd2] 71# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}} 72# CHECK-UNKNOWN: d24a1457 <unknown> 73 74vfwadd.wf v8, v4, fa0, v0.t 75# CHECK-INST: vfwadd.wf v8, v4, fa0, v0.t 76# CHECK-ENCODING: [0x57,0x54,0x45,0xd0] 77# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}} 78# CHECK-UNKNOWN: d0455457 <unknown> 79 80vfwadd.wf v8, v4, fa0 81# CHECK-INST: vfwadd.wf v8, v4, fa0 82# CHECK-ENCODING: [0x57,0x54,0x45,0xd2] 83# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}} 84# CHECK-UNKNOWN: d2455457 <unknown> 85