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 14vfsub.vv v8, v4, v20, v0.t 15# CHECK-INST: vfsub.vv v8, v4, v20, v0.t 16# CHECK-ENCODING: [0x57,0x14,0x4a,0x08] 17# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}} 18# CHECK-UNKNOWN: 084a1457 <unknown> 19 20vfsub.vv v8, v4, v20 21# CHECK-INST: vfsub.vv v8, v4, v20 22# CHECK-ENCODING: [0x57,0x14,0x4a,0x0a] 23# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}} 24# CHECK-UNKNOWN: 0a4a1457 <unknown> 25 26vfsub.vf v8, v4, fa0, v0.t 27# CHECK-INST: vfsub.vf v8, v4, fa0, v0.t 28# CHECK-ENCODING: [0x57,0x54,0x45,0x08] 29# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}} 30# CHECK-UNKNOWN: 08455457 <unknown> 31 32vfsub.vf v8, v4, fa0 33# CHECK-INST: vfsub.vf v8, v4, fa0 34# CHECK-ENCODING: [0x57,0x54,0x45,0x0a] 35# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}} 36# CHECK-UNKNOWN: 0a455457 <unknown> 37 38vfrsub.vf v8, v4, fa0, v0.t 39# CHECK-INST: vfrsub.vf v8, v4, fa0, v0.t 40# CHECK-ENCODING: [0x57,0x54,0x45,0x9c] 41# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}} 42# CHECK-UNKNOWN: 9c455457 <unknown> 43 44vfrsub.vf v8, v4, fa0 45# CHECK-INST: vfrsub.vf v8, v4, fa0 46# CHECK-ENCODING: [0x57,0x54,0x45,0x9e] 47# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}} 48# CHECK-UNKNOWN: 9e455457 <unknown> 49 50vfwsub.vv v8, v4, v20, v0.t 51# CHECK-INST: vfwsub.vv v8, v4, v20, v0.t 52# CHECK-ENCODING: [0x57,0x14,0x4a,0xc8] 53# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}} 54# CHECK-UNKNOWN: c84a1457 <unknown> 55 56vfwsub.vv v8, v4, v20 57# CHECK-INST: vfwsub.vv v8, v4, v20 58# CHECK-ENCODING: [0x57,0x14,0x4a,0xca] 59# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}} 60# CHECK-UNKNOWN: ca4a1457 <unknown> 61 62vfwsub.vf v8, v4, fa0, v0.t 63# CHECK-INST: vfwsub.vf v8, v4, fa0, v0.t 64# CHECK-ENCODING: [0x57,0x54,0x45,0xc8] 65# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}} 66# CHECK-UNKNOWN: c8455457 <unknown> 67 68vfwsub.vf v8, v4, fa0 69# CHECK-INST: vfwsub.vf v8, v4, fa0 70# CHECK-ENCODING: [0x57,0x54,0x45,0xca] 71# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}} 72# CHECK-UNKNOWN: ca455457 <unknown> 73 74vfwsub.wv v8, v4, v20, v0.t 75# CHECK-INST: vfwsub.wv v8, v4, v20, v0.t 76# CHECK-ENCODING: [0x57,0x14,0x4a,0xd8] 77# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}} 78# CHECK-UNKNOWN: d84a1457 <unknown> 79 80vfwsub.wv v8, v4, v20 81# CHECK-INST: vfwsub.wv v8, v4, v20 82# CHECK-ENCODING: [0x57,0x14,0x4a,0xda] 83# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}} 84# CHECK-UNKNOWN: da4a1457 <unknown> 85 86vfwsub.wf v8, v4, fa0, v0.t 87# CHECK-INST: vfwsub.wf v8, v4, fa0, v0.t 88# CHECK-ENCODING: [0x57,0x54,0x45,0xd8] 89# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}} 90# CHECK-UNKNOWN: d8455457 <unknown> 91 92vfwsub.wf v8, v4, fa0 93# CHECK-INST: vfwsub.wf v8, v4, fa0 94# CHECK-ENCODING: [0x57,0x54,0x45,0xda] 95# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}} 96# CHECK-UNKNOWN: da455457 <unknown> 97