diff --git a/llvm/docs/RISCVUsage.rst b/llvm/docs/RISCVUsage.rst --- a/llvm/docs/RISCVUsage.rst +++ b/llvm/docs/RISCVUsage.rst @@ -279,3 +279,6 @@ ``XSfvcp`` LLVM implements `version 1.0.0 of the SiFive Vector Coprocessor Interface (VCIX) Software Specification `_ by SiFive. All instructions are prefixed with `sf.vc.` as described in the specification, and the riscv-toolchain-convention document linked above. + +``XCVbitmanip`` + LLVM implements `version 1.3.1 of the Core-V bit manipulation custom instructions specification `_ by Core-V. All instructions are prefixed with `cv.` as described in the specification. diff --git a/llvm/lib/Target/RISCV/RISCVInstrInfoXCVbitmanip.td b/llvm/lib/Target/RISCV/RISCVInstrInfoXCVbitmanip.td --- a/llvm/lib/Target/RISCV/RISCVInstrInfoXCVbitmanip.td +++ b/llvm/lib/Target/RISCV/RISCVInstrInfoXCVbitmanip.td @@ -1,4 +1,4 @@ -//===-- RISCVInstrInfoXCVbitmanip.td - CORE-V instructions ------*- tablegen -*-===// +//===-- RISCVInstrInfoXCVbitmanip.td - CORE-V instructions -*- tablegen -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -63,18 +63,20 @@ } class CVBitManipRII funct2, bits<3> funct3, string opcodestr> - : RVInstBitManipRII; + : RVInstBitManipRII; class CVBitManipRR funct7, string opcodestr> : RVInstBitManipRR; + opcodestr, "$rd, $rs1, $rs2", []>; class CVBitManipR funct7, string opcodestr> : RVInstBitManipR; + opcodestr, "$rd, $rs1", []>; -let Predicates = [HasVendorXCVbitmanip, IsRV32], hasSideEffects = 0, mayLoad = 0, mayStore = 0 in { +let Predicates = [HasVendorXCVbitmanip, IsRV32], + hasSideEffects = 0, mayLoad = 0, mayStore = 0 in { def CV_EXTRACT : CVBitManipRII<0b00, 0b000, "cv.extract">; def CV_EXTRACTU : CVBitManipRII<0b01, 0b000, "cv.extractu">; @@ -89,11 +91,11 @@ let Constraints = "$rd = $rd_wb" in { def CV_INSERT : RVInstBitManipRII<0b10, 0b000, (outs GPR:$rd_wb), - (ins GPR:$rs1, uimm5:$is3, uimm5:$is2, GPR:$rd), - "cv.insert", "$rd, $rs1, $is3, $is2", []>; + (ins GPR:$rs1, uimm5:$is3, uimm5:$is2, GPR:$rd), + "cv.insert", "$rd, $rs1, $is3, $is2", []>; def CV_INSERTR : RVInstBitManipRR<0b0011010, 0b011, (outs GPR:$rd_wb), - (ins GPR:$rs1, GPR:$rs2, GPR:$rd), - "cv.insertr", "$rd, $rs1, $rs2", []>; + (ins GPR:$rs1, GPR:$rs2, GPR:$rd), + "cv.insertr", "$rd, $rs1, $rs2", []>; } def CV_BCLRR : CVBitManipRR<0b0011100, "cv.bclrr">; diff --git a/llvm/test/MC/RISCV/corev/XCVbitmanip-invalid.s b/llvm/test/MC/RISCV/corev/XCVbitmanip-invalid.s new file mode 100644 --- /dev/null +++ b/llvm/test/MC/RISCV/corev/XCVbitmanip-invalid.s @@ -0,0 +1,267 @@ +# RUN: not llvm-mc -triple=riscv32 --mattr=+xcvbitmanip %s 2>&1 \ +# RUN: | FileCheck %s --check-prefixes=CHECK-ERROR + +cv.extract t0, t1 +# CHECK-ERROR: too few operands for instruction + +cv.extract t0, t1, 0 +# CHECK-ERROR: too few operands for instruction + +cv.extract t0, t1, t2 +# CHECK-ERROR: immediate must be an integer in the range [0, 31] + +cv.extract t0, t1, t2, t3 +# CHECK-ERROR: immediate must be an integer in the range [0, 31] + +cv.extract t0, t1, 0, 32 +# CHECK-ERROR: immediate must be an integer in the range [0, 31] + +cv.extract t0, t1, 0, -1 +# CHECK-ERROR: immediate must be an integer in the range [0, 31] + +cv.extract t0, t1, 32, 0 +# CHECK-ERROR: immediate must be an integer in the range [0, 31] + +cv.extract t0, t1, -1, 0 +# CHECK-ERROR: immediate must be an integer in the range [0, 31] + +cv.extractu t0, t1 +# CHECK-ERROR: too few operands for instruction + +cv.extractu t0, t1, 0 +# CHECK-ERROR: too few operands for instruction + +cv.extractu t0, t1, t2 +# CHECK-ERROR: immediate must be an integer in the range [0, 31] + +cv.extractu t0, t1, t2, t3 +# CHECK-ERROR: immediate must be an integer in the range [0, 31] + +cv.extractu t0, t1, 0, 32 +# CHECK-ERROR: immediate must be an integer in the range [0, 31] + +cv.extractu t0, t1, 0, -1 +# CHECK-ERROR: immediate must be an integer in the range [0, 31] + +cv.extractu t0, t1, 32, 0 +# CHECK-ERROR: immediate must be an integer in the range [0, 31] + +cv.extractu t0, t1, -1, 0 +# CHECK-ERROR: immediate must be an integer in the range [0, 31] + +cv.insert t0, t1 +# CHECK-ERROR: too few operands for instruction + +cv.insert t0, t1, 0 +# CHECK-ERROR: too few operands for instruction + +cv.insert t0, t1, t2 +# CHECK-ERROR: immediate must be an integer in the range [0, 31] + +cv.insert t0, t1, t2, t3 +# CHECK-ERROR: immediate must be an integer in the range [0, 31] + +cv.insert t0, t1, 0, 32 +# CHECK-ERROR: immediate must be an integer in the range [0, 31] + +cv.insert t0, t1, 0, -1 +# CHECK-ERROR: immediate must be an integer in the range [0, 31] + +cv.insert t0, t1, 32, 0 +# CHECK-ERROR: immediate must be an integer in the range [0, 31] + +cv.insert t0, t1, -1, 0 +# CHECK-ERROR: immediate must be an integer in the range [0, 31] + +cv.bclr t0, t1 +# CHECK-ERROR: too few operands for instruction + +cv.bclr t0, t1, 0 +# CHECK-ERROR: too few operands for instruction + +cv.bclr t0, t1, t2 +# CHECK-ERROR: immediate must be an integer in the range [0, 31] + +cv.bclr t0, t1, t2, t3 +# CHECK-ERROR: immediate must be an integer in the range [0, 31] + +cv.bclr t0, t1, 0, 32 +# CHECK-ERROR: immediate must be an integer in the range [0, 31] + +cv.bclr t0, t1, 0, -1 +# CHECK-ERROR: immediate must be an integer in the range [0, 31] + +cv.bclr t0, t1, 32, 0 +# CHECK-ERROR: immediate must be an integer in the range [0, 31] + +cv.bclr t0, t1, -1, 0 +# CHECK-ERROR: immediate must be an integer in the range [0, 31] + +cv.bset t0, t1 +# CHECK-ERROR: too few operands for instruction + +cv.bset t0, t1, 0 +# CHECK-ERROR: too few operands for instruction + +cv.bset t0, t1, t2 +# CHECK-ERROR: immediate must be an integer in the range [0, 31] + +cv.bset t0, t1, t2, t3 +# CHECK-ERROR: immediate must be an integer in the range [0, 31] + +cv.bset t0, t1, 0, 32 +# CHECK-ERROR: immediate must be an integer in the range [0, 31] + +cv.bset t0, t1, 0, -1 +# CHECK-ERROR: immediate must be an integer in the range [0, 31] + +cv.bset t0, t1, 32, 0 +# CHECK-ERROR: immediate must be an integer in the range [0, 31] + +cv.bset t0, t1, -1, 0 +# CHECK-ERROR: immediate must be an integer in the range [0, 31] + +cv.bitrev t0, t1 +# CHECK-ERROR: too few operands for instruction + +cv.bitrev t0, t1, 0 +# CHECK-ERROR: too few operands for instruction + +cv.bitrev t0, t1, t2 +# CHECK-ERROR: immediate must be an integer in the range [0, 3] + +cv.bitrev t0, t1, t2, t3 +# CHECK-ERROR: immediate must be an integer in the range [0, 3] + +cv.bitrev t0, t1, 0, 32 +# CHECK-ERROR: immediate must be an integer in the range [0, 31] + +cv.bitrev t0, t1, 0, -1 +# CHECK-ERROR: immediate must be an integer in the range [0, 31] + +cv.bitrev t0, t1, 32, 0 +# CHECK-ERROR: immediate must be an integer in the range [0, 3] + +cv.bitrev t0, t1, -1, 0 +# CHECK-ERROR: immediate must be an integer in the range [0, 3] + +cv.extractr t0 +# CHECK-ERROR: too few operands for instruction + +cv.extractr t0, 0 +# CHECK-ERROR: invalid operand for instruction + +cv.extractr t0, t1, 0 +# CHECK-ERROR: invalid operand for instruction + +cv.extractr t0, t1 +# CHECK-ERROR: too few operands for instruction + +cv.extractur t0 +# CHECK-ERROR: too few operands for instruction + +cv.extractur t0, 0 +# CHECK-ERROR: invalid operand for instruction + +cv.extractur t0, t1, 0 +# CHECK-ERROR: invalid operand for instruction + +cv.extractur t0, t1 +# CHECK-ERROR: too few operands for instruction + +cv.insertr t0 +# CHECK-ERROR: too few operands for instruction + +cv.insertr t0, 0 +# CHECK-ERROR: invalid operand for instruction + +cv.insertr t0, t1, 0 +# CHECK-ERROR: invalid operand for instruction + +cv.insertr t0, t1 +# CHECK-ERROR: too few operands for instruction + +cv.bclrr t0 +# CHECK-ERROR: too few operands for instruction + +cv.bclrr t0, 0 +# CHECK-ERROR: invalid operand for instruction + +cv.bclrr t0, t1, 0 +# CHECK-ERROR: invalid operand for instruction + +cv.bclrr t0, t1 +# CHECK-ERROR: too few operands for instruction + +cv.bsetr t0 +# CHECK-ERROR: too few operands for instruction + +cv.bsetr t0, 0 +# CHECK-ERROR: invalid operand for instruction + +cv.bsetr t0, t1, 0 +# CHECK-ERROR: invalid operand for instruction + +cv.bsetr t0, t1 +# CHECK-ERROR: too few operands for instruction + +cv.ror t0 +# CHECK-ERROR: too few operands for instruction + +cv.ror t0, 0 +# CHECK-ERROR: invalid operand for instruction + +cv.ror t0, t1, 0 +# CHECK-ERROR: invalid operand for instruction + +cv.ror t0, t1 +# CHECK-ERROR: too few operands for instruction + +cv.ff1 t0 +# CHECK-ERROR: too few operands for instruction + +cv.ff1 t0, 0 +# CHECK-ERROR: invalid operand for instruction + +cv.ff1 t0, t1, 0 +# CHECK-ERROR: invalid operand for instruction + +cv.ff1 t0, t1, t2 +# CHECK-ERROR: invalid operand for instruction + +cv.fl1 t0 +# CHECK-ERROR: too few operands for instruction + +cv.fl1 t0, 0 +# CHECK-ERROR: invalid operand for instruction + +cv.fl1 t0, t1, 0 +# CHECK-ERROR: invalid operand for instruction + +cv.fl1 t0, t1, t2 +# CHECK-ERROR: invalid operand for instruction + +cv.clb t0 +# CHECK-ERROR: too few operands for instruction + +cv.clb t0, 0 +# CHECK-ERROR: invalid operand for instruction + +cv.clb t0, t1, 0 +# CHECK-ERROR: invalid operand for instruction + +cv.clb t0, t1, t2 +# CHECK-ERROR: invalid operand for instruction + +cv.cnt t0 +# CHECK-ERROR: too few operands for instruction + +cv.cnt t0, 0 +# CHECK-ERROR: invalid operand for instruction + +cv.cnt t0, t1, 0 +# CHECK-ERROR: invalid operand for instruction + +cv.cnt t0, t1, t2 +# CHECK-ERROR: invalid operand for instruction + diff --git a/llvm/test/MC/RISCV/corev/XCVbitmanip.s b/llvm/test/MC/RISCV/corev/XCVbitmanip.s new file mode 100644 --- /dev/null +++ b/llvm/test/MC/RISCV/corev/XCVbitmanip.s @@ -0,0 +1,246 @@ +# RUN: llvm-mc -triple=riscv32 --mattr=+xcvbitmanip -show-encoding %s \ +# RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INSTR +# +# RUN: not llvm-mc -triple riscv32 %s 2>&1 \ +# RUN: | FileCheck -check-prefix=CHECK-NO-EXT %s + +cv.extract t0, t1, 0, 1 +# CHECK-INSTR: cv.extract t0, t1, 0, 1 +# CHECK-ENCODING: [0xdb,0x02,0x13,0x00] +# CHECK-NO-EXT: instruction requires the following: 'XCVbitmanip' (Bit Manipulation){{$}} + +cv.extract a0, a1, 17, 18 +# CHECK-INSTR: cv.extract a0, a1, 17, 18 +# CHECK-ENCODING: [0x5b,0x85,0x25,0x23] +# CHECK-NO-EXT: instruction requires the following: 'XCVbitmanip' (Bit Manipulation){{$}} + +cv.extract s0, s1, 30, 31 +# CHECK-INSTR: cv.extract s0, s1, 30, 31 +# CHECK-ENCODING: [0x5b,0x84,0xf4,0x3d] +# CHECK-NO-EXT: instruction requires the following: 'XCVbitmanip' (Bit Manipulation){{$}} + +cv.extractu t0, t1, 0, 1 +# CHECK-INSTR: cv.extractu t0, t1, 0, 1 +# CHECK-ENCODING: [0xdb,0x02,0x13,0x40] +# CHECK-NO-EXT: instruction requires the following: 'XCVbitmanip' (Bit Manipulation){{$}} + +cv.extractu a0, a1, 17, 18 +# CHECK-INSTR: cv.extractu a0, a1, 17, 18 +# CHECK-ENCODING: [0x5b,0x85,0x25,0x63] +# CHECK-NO-EXT: instruction requires the following: 'XCVbitmanip' (Bit Manipulation){{$}} + +cv.extractu s0, s1, 30, 31 +# CHECK-INSTR: cv.extractu s0, s1, 30, 31 +# CHECK-ENCODING: [0x5b,0x84,0xf4,0x7d] +# CHECK-NO-EXT: instruction requires the following: 'XCVbitmanip' (Bit Manipulation){{$}} + +cv.insert t0, t1, 0, 1 +# CHECK-INSTR: cv.insert t0, t1, 0, 1 +# CHECK-ENCODING: [0xdb,0x02,0x13,0x80] +# CHECK-NO-EXT: instruction requires the following: 'XCVbitmanip' (Bit Manipulation){{$}} + +cv.insert a0, a1, 17, 18 +# CHECK-INSTR: cv.insert a0, a1, 17, 18 +# CHECK-ENCODING: [0x5b,0x85,0x25,0xa3] +# CHECK-NO-EXT: instruction requires the following: 'XCVbitmanip' (Bit Manipulation){{$}} + +cv.insert s0, s1, 30, 31 +# CHECK-INSTR: cv.insert s0, s1, 30, 31 +# CHECK-ENCODING: [0x5b,0x84,0xf4,0xbd] +# CHECK-NO-EXT: instruction requires the following: 'XCVbitmanip' (Bit Manipulation){{$}} + +cv.bclr t0, t1, 0, 1 +# CHECK-INSTR: cv.bclr t0, t1, 0, 1 +# CHECK-ENCODING: [0xdb,0x12,0x13,0x00] +# CHECK-NO-EXT: instruction requires the following: 'XCVbitmanip' (Bit Manipulation){{$}} + +cv.bclr a0, a1, 17, 18 +# CHECK-INSTR: cv.bclr a0, a1, 17, 18 +# CHECK-ENCODING: [0x5b,0x95,0x25,0x23] +# CHECK-NO-EXT: instruction requires the following: 'XCVbitmanip' (Bit Manipulation){{$}} + +cv.bclr s0, s1, 30, 31 +# CHECK-INSTR: cv.bclr s0, s1, 30, 31 +# CHECK-ENCODING: [0x5b,0x94,0xf4,0x3d] +# CHECK-NO-EXT: instruction requires the following: 'XCVbitmanip' (Bit Manipulation){{$}} + +cv.bset t0, t1, 0, 1 +# CHECK-INSTR: cv.bset t0, t1, 0, 1 +# CHECK-ENCODING: [0xdb,0x12,0x13,0x40] +# CHECK-NO-EXT: instruction requires the following: 'XCVbitmanip' (Bit Manipulation){{$}} + +cv.bset a0, a1, 17, 18 +# CHECK-INSTR: cv.bset a0, a1, 17, 18 +# CHECK-ENCODING: [0x5b,0x95,0x25,0x63] +# CHECK-NO-EXT: instruction requires the following: 'XCVbitmanip' (Bit Manipulation){{$}} + +cv.bset s0, s1, 30, 31 +# CHECK-INSTR: cv.bset s0, s1, 30, 31 +# CHECK-ENCODING: [0x5b,0x94,0xf4,0x7d] +# CHECK-NO-EXT: instruction requires the following: 'XCVbitmanip' (Bit Manipulation){{$}} + +cv.bitrev t0, t1, 0, 1 +# CHECK-INSTR: cv.bitrev t0, t1, 0, 1 +# CHECK-ENCODING: [0xdb,0x12,0x13,0xc0] +# CHECK-NO-EXT: instruction requires the following: 'XCVbitmanip' (Bit Manipulation){{$}} + +cv.bitrev a0, a1, 1, 18 +# CHECK-INSTR: cv.bitrev a0, a1, 1, 18 +# CHECK-ENCODING: [0x5b,0x95,0x25,0xc3] +# CHECK-NO-EXT: instruction requires the following: 'XCVbitmanip' (Bit Manipulation){{$}} + +cv.bitrev s0, s1, 2, 31 +# CHECK-INSTR: cv.bitrev s0, s1, 2, 31 +# CHECK-ENCODING: [0x5b,0x94,0xf4,0xc5] +# CHECK-NO-EXT: instruction requires the following: 'XCVbitmanip' (Bit Manipulation){{$}} + +cv.extractr t0, t1, t2 +# CHECK-INSTR: cv.extractr t0, t1, t2 +# CHECK-ENCODING: [0xab,0x32,0x73,0x30] +# CHECK-NO-EXT: instruction requires the following: 'XCVbitmanip' (Bit Manipulation){{$}} + +cv.extractr a0, a1, a2 +# CHECK-INSTR: cv.extractr a0, a1, a2 +# CHECK-ENCODING: [0x2b,0xb5,0xc5,0x30] +# CHECK-NO-EXT: instruction requires the following: 'XCVbitmanip' (Bit Manipulation){{$}} + +cv.extractr s0, s1, s2 +# CHECK-INSTR: cv.extractr s0, s1, s2 +# CHECK-ENCODING: [0x2b,0xb4,0x24,0x31] +# CHECK-NO-EXT: instruction requires the following: 'XCVbitmanip' (Bit Manipulation){{$}} + +cv.extractur t0, t1, t2 +# CHECK-INSTR: cv.extractur t0, t1, t2 +# CHECK-ENCODING: [0xab,0x32,0x73,0x32] +# CHECK-NO-EXT: instruction requires the following: 'XCVbitmanip' (Bit Manipulation){{$}} + +cv.extractur a0, a1, a2 +# CHECK-INSTR: cv.extractur a0, a1, a2 +# CHECK-ENCODING: [0x2b,0xb5,0xc5,0x32] +# CHECK-NO-EXT: instruction requires the following: 'XCVbitmanip' (Bit Manipulation){{$}} + +cv.extractur s0, s1, s2 +# CHECK-INSTR: cv.extractur s0, s1, s2 +# CHECK-ENCODING: [0x2b,0xb4,0x24,0x33] +# CHECK-NO-EXT: instruction requires the following: 'XCVbitmanip' (Bit Manipulation){{$}} + +cv.insertr t0, t1, t2 +# CHECK-INSTR: cv.insertr t0, t1, t2 +# CHECK-ENCODING: [0xab,0x32,0x73,0x34] +# CHECK-NO-EXT: instruction requires the following: 'XCVbitmanip' (Bit Manipulation){{$}} + +cv.insertr a0, a1, a2 +# CHECK-INSTR: cv.insertr a0, a1, a2 +# CHECK-ENCODING: [0x2b,0xb5,0xc5,0x34] +# CHECK-NO-EXT: instruction requires the following: 'XCVbitmanip' (Bit Manipulation){{$}} + +cv.insertr s0, s1, s2 +# CHECK-INSTR: cv.insertr s0, s1, s2 +# CHECK-ENCODING: [0x2b,0xb4,0x24,0x35] +# CHECK-NO-EXT: instruction requires the following: 'XCVbitmanip' (Bit Manipulation){{$}} + +cv.bclrr t0, t1, t2 +# CHECK-INSTR: cv.bclrr t0, t1, t2 +# CHECK-ENCODING: [0xab,0x32,0x73,0x38] +# CHECK-NO-EXT: instruction requires the following: 'XCVbitmanip' (Bit Manipulation){{$}} + +cv.bclrr a0, a1, a2 +# CHECK-INSTR: cv.bclrr a0, a1, a2 +# CHECK-ENCODING: [0x2b,0xb5,0xc5,0x38] +# CHECK-NO-EXT: instruction requires the following: 'XCVbitmanip' (Bit Manipulation){{$}} + +cv.bclrr s0, s1, s2 +# CHECK-INSTR: cv.bclrr s0, s1, s2 +# CHECK-ENCODING: [0x2b,0xb4,0x24,0x39] +# CHECK-NO-EXT: instruction requires the following: 'XCVbitmanip' (Bit Manipulation){{$}} + +cv.bsetr t0, t1, t2 +# CHECK-INSTR: cv.bsetr t0, t1, t2 +# CHECK-ENCODING: [0xab,0x32,0x73,0x3a] +# CHECK-NO-EXT: instruction requires the following: 'XCVbitmanip' (Bit Manipulation){{$}} + +cv.bsetr a0, a1, a2 +# CHECK-INSTR: cv.bsetr a0, a1, a2 +# CHECK-ENCODING: [0x2b,0xb5,0xc5,0x3a] +# CHECK-NO-EXT: instruction requires the following: 'XCVbitmanip' (Bit Manipulation){{$}} + +cv.bsetr s0, s1, s2 +# CHECK-INSTR: cv.bsetr s0, s1, s2 +# CHECK-ENCODING: [0x2b,0xb4,0x24,0x3b] +# CHECK-NO-EXT: instruction requires the following: 'XCVbitmanip' (Bit Manipulation){{$}} + +cv.ror t0, t1, t2 +# CHECK-INSTR: cv.ror t0, t1, t2 +# CHECK-ENCODING: [0xab,0x32,0x73,0x40] +# CHECK-NO-EXT: instruction requires the following: 'XCVbitmanip' (Bit Manipulation){{$}} + +cv.ror a0, a1, a2 +# CHECK-INSTR: cv.ror a0, a1, a2 +# CHECK-ENCODING: [0x2b,0xb5,0xc5,0x40] +# CHECK-NO-EXT: instruction requires the following: 'XCVbitmanip' (Bit Manipulation){{$}} + +cv.ror s0, s1, s2 +# CHECK-INSTR: cv.ror s0, s1, s2 +# CHECK-ENCODING: [0x2b,0xb4,0x24,0x41] +# CHECK-NO-EXT: instruction requires the following: 'XCVbitmanip' (Bit Manipulation){{$}} + +cv.ff1 t0, t1 +# CHECK-INSTR: cv.ff1 t0, t1 +# CHECK-ENCODING: [0xab,0x32,0x03,0x42] +# CHECK-NO-EXT: instruction requires the following: 'XCVbitmanip' (Bit Manipulation){{$}} + +cv.ff1 a0, a1 +# CHECK-INSTR: cv.ff1 a0, a1 +# CHECK-ENCODING: [0x2b,0xb5,0x05,0x42] +# CHECK-NO-EXT: instruction requires the following: 'XCVbitmanip' (Bit Manipulation){{$}} + +cv.ff1 s0, s1 +# CHECK-INSTR: cv.ff1 s0, s1 +# CHECK-ENCODING: [0x2b,0xb4,0x04,0x42] +# CHECK-NO-EXT: instruction requires the following: 'XCVbitmanip' (Bit Manipulation){{$}} + +cv.fl1 t0, t1 +# CHECK-INSTR: cv.fl1 t0, t1 +# CHECK-ENCODING: [0xab,0x32,0x03,0x44] +# CHECK-NO-EXT: instruction requires the following: 'XCVbitmanip' (Bit Manipulation){{$}} + +cv.fl1 a0, a1 +# CHECK-INSTR: cv.fl1 a0, a1 +# CHECK-ENCODING: [0x2b,0xb5,0x05,0x44] +# CHECK-NO-EXT: instruction requires the following: 'XCVbitmanip' (Bit Manipulation){{$}} + +cv.fl1 s0, s1 +# CHECK-INSTR: cv.fl1 s0, s1 +# CHECK-ENCODING: [0x2b,0xb4,0x04,0x44] +# CHECK-NO-EXT: instruction requires the following: 'XCVbitmanip' (Bit Manipulation){{$}} + +cv.clb t0, t1 +# CHECK-INSTR: cv.clb t0, t1 +# CHECK-ENCODING: [0xab,0x32,0x03,0x46] +# CHECK-NO-EXT: instruction requires the following: 'XCVbitmanip' (Bit Manipulation){{$}} + +cv.clb a0, a1 +# CHECK-INSTR: cv.clb a0, a1 +# CHECK-ENCODING: [0x2b,0xb5,0x05,0x46] +# CHECK-NO-EXT: instruction requires the following: 'XCVbitmanip' (Bit Manipulation){{$}} + +cv.clb s0, s1 +# CHECK-INSTR: cv.clb s0, s1 +# CHECK-ENCODING: [0x2b,0xb4,0x04,0x46] +# CHECK-NO-EXT: instruction requires the following: 'XCVbitmanip' (Bit Manipulation){{$}} + +cv.cnt t0, t1 +# CHECK-INSTR: cv.cnt t0, t1 +# CHECK-ENCODING: [0xab,0x32,0x03,0x48] +# CHECK-NO-EXT: instruction requires the following: 'XCVbitmanip' (Bit Manipulation){{$}} + +cv.cnt a0, a1 +# CHECK-INSTR: cv.cnt a0, a1 +# CHECK-ENCODING: [0x2b,0xb5,0x05,0x48] +# CHECK-NO-EXT: instruction requires the following: 'XCVbitmanip' (Bit Manipulation){{$}} + +cv.cnt s0, s1 +# CHECK-INSTR: cv.cnt s0, s1 +# CHECK-ENCODING: [0x2b,0xb4,0x04,0x48] +# CHECK-NO-EXT: instruction requires the following: 'XCVbitmanip' (Bit Manipulation){{$}} + diff --git a/llvm/test/MC/RISCV/corev/bitmanip/bclr-invalid.s b/llvm/test/MC/RISCV/corev/bitmanip/bclr-invalid.s deleted file mode 100644 --- a/llvm/test/MC/RISCV/corev/bitmanip/bclr-invalid.s +++ /dev/null @@ -1,27 +0,0 @@ -# RUN: not llvm-mc -triple=riscv32 --mattr=+xcvbitmanip %s 2>&1 \ -# RUN: | FileCheck %s --check-prefixes=CHECK-ERROR - -cv.bclr t0, t1 -# CHECK-ERROR: too few operands for instruction - -cv.bclr t0, t1, 0 -# CHECK-ERROR: too few operands for instruction - -cv.bclr t0, t1, t2 -# CHECK-ERROR: immediate must be an integer in the range [0, 31] - -cv.bclr t0, t1, t2, t3 -# CHECK-ERROR: immediate must be an integer in the range [0, 31] - -cv.bclr t0, t1, 0, 32 -# CHECK-ERROR: immediate must be an integer in the range [0, 31] - -cv.bclr t0, t1, 0, -1 -# CHECK-ERROR: immediate must be an integer in the range [0, 31] - -cv.bclr t0, t1, 32, 0 -# CHECK-ERROR: immediate must be an integer in the range [0, 31] - -cv.bclr t0, t1, -1, 0 -# CHECK-ERROR: immediate must be an integer in the range [0, 31] - diff --git a/llvm/test/MC/RISCV/corev/bitmanip/bclr.s b/llvm/test/MC/RISCV/corev/bitmanip/bclr.s deleted file mode 100644 --- a/llvm/test/MC/RISCV/corev/bitmanip/bclr.s +++ /dev/null @@ -1,15 +0,0 @@ -# RUN: llvm-mc -triple=riscv32 --mattr=+xcvbitmanip -show-encoding %s \ -# RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INSTR - -cv.bclr t0, t1, 0, 1 -# CHECK-INSTR: cv.bclr t0, t1, 0, 1 -# CHECK-ENCODING: [0xdb,0x12,0x13,0x00] - -cv.bclr a0, a1, 17, 18 -# CHECK-INSTR: cv.bclr a0, a1, 17, 18 -# CHECK-ENCODING: [0x5b,0x95,0x25,0x23] - -cv.bclr s0, s1, 30, 31 -# CHECK-INSTR: cv.bclr s0, s1, 30, 31 -# CHECK-ENCODING: [0x5b,0x94,0xf4,0x3d] - diff --git a/llvm/test/MC/RISCV/corev/bitmanip/bclrr-invalid.s b/llvm/test/MC/RISCV/corev/bitmanip/bclrr-invalid.s deleted file mode 100644 --- a/llvm/test/MC/RISCV/corev/bitmanip/bclrr-invalid.s +++ /dev/null @@ -1,15 +0,0 @@ -# RUN: not llvm-mc -triple=riscv32 --mattr=+xcvbitmanip %s 2>&1 \ -# RUN: | FileCheck %s --check-prefixes=CHECK-ERROR - -cv.bclrr t0 -# CHECK-ERROR: too few operands for instruction - -cv.bclrr t0, 0 -# CHECK-ERROR: invalid operand for instruction - -cv.bclrr t0, t1, 0 -# CHECK-ERROR: invalid operand for instruction - -cv.bclrr t0, t1 -# CHECK-ERROR: too few operands for instruction - diff --git a/llvm/test/MC/RISCV/corev/bitmanip/bclrr.s b/llvm/test/MC/RISCV/corev/bitmanip/bclrr.s deleted file mode 100644 --- a/llvm/test/MC/RISCV/corev/bitmanip/bclrr.s +++ /dev/null @@ -1,15 +0,0 @@ -# RUN: llvm-mc -triple=riscv32 --mattr=+xcvbitmanip -show-encoding %s \ -# RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INSTR - -cv.bclrr t0, t1, t2 -# CHECK-INSTR: cv.bclrr t0, t1, t2 -# CHECK-ENCODING: [0xab,0x32,0x73,0x38] - -cv.bclrr a0, a1, a2 -# CHECK-INSTR: cv.bclrr a0, a1, a2 -# CHECK-ENCODING: [0x2b,0xb5,0xc5,0x38] - -cv.bclrr s0, s1, s2 -# CHECK-INSTR: cv.bclrr s0, s1, s2 -# CHECK-ENCODING: [0x2b,0xb4,0x24,0x39] - diff --git a/llvm/test/MC/RISCV/corev/bitmanip/bitrev-invalid.s b/llvm/test/MC/RISCV/corev/bitmanip/bitrev-invalid.s deleted file mode 100644 --- a/llvm/test/MC/RISCV/corev/bitmanip/bitrev-invalid.s +++ /dev/null @@ -1,27 +0,0 @@ -# RUN: not llvm-mc -triple=riscv32 --mattr=+xcvbitmanip %s 2>&1 \ -# RUN: | FileCheck %s --check-prefixes=CHECK-ERROR - -cv.bitrev t0, t1 -# CHECK-ERROR: too few operands for instruction - -cv.bitrev t0, t1, 0 -# CHECK-ERROR: too few operands for instruction - -cv.bitrev t0, t1, t2 -# CHECK-ERROR: immediate must be an integer in the range [0, 3] - -cv.bitrev t0, t1, t2, t3 -# CHECK-ERROR: immediate must be an integer in the range [0, 3] - -cv.bitrev t0, t1, 0, 32 -# CHECK-ERROR: immediate must be an integer in the range [0, 31] - -cv.bitrev t0, t1, 0, -1 -# CHECK-ERROR: immediate must be an integer in the range [0, 31] - -cv.bitrev t0, t1, 32, 0 -# CHECK-ERROR: immediate must be an integer in the range [0, 3] - -cv.bitrev t0, t1, -1, 0 -# CHECK-ERROR: immediate must be an integer in the range [0, 3] - diff --git a/llvm/test/MC/RISCV/corev/bitmanip/bitrev.s b/llvm/test/MC/RISCV/corev/bitmanip/bitrev.s deleted file mode 100644 --- a/llvm/test/MC/RISCV/corev/bitmanip/bitrev.s +++ /dev/null @@ -1,15 +0,0 @@ -# RUN: llvm-mc -triple=riscv32 --mattr=+xcvbitmanip -show-encoding %s \ -# RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INSTR - -cv.bitrev t0, t1, 0, 1 -# CHECK-INSTR: cv.bitrev t0, t1, 0, 1 -# CHECK-ENCODING: [0xdb,0x12,0x13,0xc0] - -cv.bitrev a0, a1, 1, 18 -# CHECK-INSTR: cv.bitrev a0, a1, 1, 18 -# CHECK-ENCODING: [0x5b,0x95,0x25,0xc3] - -cv.bitrev s0, s1, 2, 31 -# CHECK-INSTR: cv.bitrev s0, s1, 2, 31 -# CHECK-ENCODING: [0x5b,0x94,0xf4,0xc5] - diff --git a/llvm/test/MC/RISCV/corev/bitmanip/bset-invalid.s b/llvm/test/MC/RISCV/corev/bitmanip/bset-invalid.s deleted file mode 100644 --- a/llvm/test/MC/RISCV/corev/bitmanip/bset-invalid.s +++ /dev/null @@ -1,27 +0,0 @@ -# RUN: not llvm-mc -triple=riscv32 --mattr=+xcvbitmanip %s 2>&1 \ -# RUN: | FileCheck %s --check-prefixes=CHECK-ERROR - -cv.bset t0, t1 -# CHECK-ERROR: too few operands for instruction - -cv.bset t0, t1, 0 -# CHECK-ERROR: too few operands for instruction - -cv.bset t0, t1, t2 -# CHECK-ERROR: immediate must be an integer in the range [0, 31] - -cv.bset t0, t1, t2, t3 -# CHECK-ERROR: immediate must be an integer in the range [0, 31] - -cv.bset t0, t1, 0, 32 -# CHECK-ERROR: immediate must be an integer in the range [0, 31] - -cv.bset t0, t1, 0, -1 -# CHECK-ERROR: immediate must be an integer in the range [0, 31] - -cv.bset t0, t1, 32, 0 -# CHECK-ERROR: immediate must be an integer in the range [0, 31] - -cv.bset t0, t1, -1, 0 -# CHECK-ERROR: immediate must be an integer in the range [0, 31] - diff --git a/llvm/test/MC/RISCV/corev/bitmanip/bset.s b/llvm/test/MC/RISCV/corev/bitmanip/bset.s deleted file mode 100644 --- a/llvm/test/MC/RISCV/corev/bitmanip/bset.s +++ /dev/null @@ -1,15 +0,0 @@ -# RUN: llvm-mc -triple=riscv32 --mattr=+xcvbitmanip -show-encoding %s \ -# RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INSTR - -cv.bset t0, t1, 0, 1 -# CHECK-INSTR: cv.bset t0, t1, 0, 1 -# CHECK-ENCODING: [0xdb,0x12,0x13,0x40] - -cv.bset a0, a1, 17, 18 -# CHECK-INSTR: cv.bset a0, a1, 17, 18 -# CHECK-ENCODING: [0x5b,0x95,0x25,0x63] - -cv.bset s0, s1, 30, 31 -# CHECK-INSTR: cv.bset s0, s1, 30, 31 -# CHECK-ENCODING: [0x5b,0x94,0xf4,0x7d] - diff --git a/llvm/test/MC/RISCV/corev/bitmanip/bsetr-invalid.s b/llvm/test/MC/RISCV/corev/bitmanip/bsetr-invalid.s deleted file mode 100644 --- a/llvm/test/MC/RISCV/corev/bitmanip/bsetr-invalid.s +++ /dev/null @@ -1,15 +0,0 @@ -# RUN: not llvm-mc -triple=riscv32 --mattr=+xcvbitmanip %s 2>&1 \ -# RUN: | FileCheck %s --check-prefixes=CHECK-ERROR - -cv.bsetr t0 -# CHECK-ERROR: too few operands for instruction - -cv.bsetr t0, 0 -# CHECK-ERROR: invalid operand for instruction - -cv.bsetr t0, t1, 0 -# CHECK-ERROR: invalid operand for instruction - -cv.bsetr t0, t1 -# CHECK-ERROR: too few operands for instruction - diff --git a/llvm/test/MC/RISCV/corev/bitmanip/bsetr.s b/llvm/test/MC/RISCV/corev/bitmanip/bsetr.s deleted file mode 100644 --- a/llvm/test/MC/RISCV/corev/bitmanip/bsetr.s +++ /dev/null @@ -1,15 +0,0 @@ -# RUN: llvm-mc -triple=riscv32 --mattr=+xcvbitmanip -show-encoding %s \ -# RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INSTR - -cv.bsetr t0, t1, t2 -# CHECK-INSTR: cv.bsetr t0, t1, t2 -# CHECK-ENCODING: [0xab,0x32,0x73,0x3a] - -cv.bsetr a0, a1, a2 -# CHECK-INSTR: cv.bsetr a0, a1, a2 -# CHECK-ENCODING: [0x2b,0xb5,0xc5,0x3a] - -cv.bsetr s0, s1, s2 -# CHECK-INSTR: cv.bsetr s0, s1, s2 -# CHECK-ENCODING: [0x2b,0xb4,0x24,0x3b] - diff --git a/llvm/test/MC/RISCV/corev/bitmanip/clb-invalid.s b/llvm/test/MC/RISCV/corev/bitmanip/clb-invalid.s deleted file mode 100644 --- a/llvm/test/MC/RISCV/corev/bitmanip/clb-invalid.s +++ /dev/null @@ -1,15 +0,0 @@ -# RUN: not llvm-mc -triple=riscv32 --mattr=+xcvbitmanip %s 2>&1 \ -# RUN: | FileCheck %s --check-prefixes=CHECK-ERROR - -cv.clb t0 -# CHECK-ERROR: too few operands for instruction - -cv.clb t0, 0 -# CHECK-ERROR: invalid operand for instruction - -cv.clb t0, t1, 0 -# CHECK-ERROR: invalid operand for instruction - -cv.clb t0, t1, t2 -# CHECK-ERROR: invalid operand for instruction - diff --git a/llvm/test/MC/RISCV/corev/bitmanip/clb.s b/llvm/test/MC/RISCV/corev/bitmanip/clb.s deleted file mode 100644 --- a/llvm/test/MC/RISCV/corev/bitmanip/clb.s +++ /dev/null @@ -1,15 +0,0 @@ -# RUN: llvm-mc -triple=riscv32 --mattr=+xcvbitmanip -show-encoding %s \ -# RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INSTR - -cv.clb t0, t1 -# CHECK-INSTR: cv.clb t0, t1 -# CHECK-ENCODING: [0xab,0x32,0x03,0x46] - -cv.clb a0, a1 -# CHECK-INSTR: cv.clb a0, a1 -# CHECK-ENCODING: [0x2b,0xb5,0x05,0x46] - -cv.clb s0, s1 -# CHECK-INSTR: cv.clb s0, s1 -# CHECK-ENCODING: [0x2b,0xb4,0x04,0x46] - diff --git a/llvm/test/MC/RISCV/corev/bitmanip/cnt-invalid.s b/llvm/test/MC/RISCV/corev/bitmanip/cnt-invalid.s deleted file mode 100644 --- a/llvm/test/MC/RISCV/corev/bitmanip/cnt-invalid.s +++ /dev/null @@ -1,15 +0,0 @@ -# RUN: not llvm-mc -triple=riscv32 --mattr=+xcvbitmanip %s 2>&1 \ -# RUN: | FileCheck %s --check-prefixes=CHECK-ERROR - -cv.cnt t0 -# CHECK-ERROR: too few operands for instruction - -cv.cnt t0, 0 -# CHECK-ERROR: invalid operand for instruction - -cv.cnt t0, t1, 0 -# CHECK-ERROR: invalid operand for instruction - -cv.cnt t0, t1, t2 -# CHECK-ERROR: invalid operand for instruction - diff --git a/llvm/test/MC/RISCV/corev/bitmanip/cnt.s b/llvm/test/MC/RISCV/corev/bitmanip/cnt.s deleted file mode 100644 --- a/llvm/test/MC/RISCV/corev/bitmanip/cnt.s +++ /dev/null @@ -1,15 +0,0 @@ -# RUN: llvm-mc -triple=riscv32 --mattr=+xcvbitmanip -show-encoding %s \ -# RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INSTR - -cv.cnt t0, t1 -# CHECK-INSTR: cv.cnt t0, t1 -# CHECK-ENCODING: [0xab,0x32,0x03,0x48] - -cv.cnt a0, a1 -# CHECK-INSTR: cv.cnt a0, a1 -# CHECK-ENCODING: [0x2b,0xb5,0x05,0x48] - -cv.cnt s0, s1 -# CHECK-INSTR: cv.cnt s0, s1 -# CHECK-ENCODING: [0x2b,0xb4,0x04,0x48] - diff --git a/llvm/test/MC/RISCV/corev/bitmanip/extract-invalid.s b/llvm/test/MC/RISCV/corev/bitmanip/extract-invalid.s deleted file mode 100644 --- a/llvm/test/MC/RISCV/corev/bitmanip/extract-invalid.s +++ /dev/null @@ -1,27 +0,0 @@ -# RUN: not llvm-mc -triple=riscv32 --mattr=+xcvbitmanip %s 2>&1 \ -# RUN: | FileCheck %s --check-prefixes=CHECK-ERROR - -cv.extract t0, t1 -# CHECK-ERROR: too few operands for instruction - -cv.extract t0, t1, 0 -# CHECK-ERROR: too few operands for instruction - -cv.extract t0, t1, t2 -# CHECK-ERROR: immediate must be an integer in the range [0, 31] - -cv.extract t0, t1, t2, t3 -# CHECK-ERROR: immediate must be an integer in the range [0, 31] - -cv.extract t0, t1, 0, 32 -# CHECK-ERROR: immediate must be an integer in the range [0, 31] - -cv.extract t0, t1, 0, -1 -# CHECK-ERROR: immediate must be an integer in the range [0, 31] - -cv.extract t0, t1, 32, 0 -# CHECK-ERROR: immediate must be an integer in the range [0, 31] - -cv.extract t0, t1, -1, 0 -# CHECK-ERROR: immediate must be an integer in the range [0, 31] - diff --git a/llvm/test/MC/RISCV/corev/bitmanip/extract.s b/llvm/test/MC/RISCV/corev/bitmanip/extract.s deleted file mode 100644 --- a/llvm/test/MC/RISCV/corev/bitmanip/extract.s +++ /dev/null @@ -1,15 +0,0 @@ -# RUN: llvm-mc -triple=riscv32 --mattr=+xcvbitmanip -show-encoding %s \ -# RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INSTR - -cv.extract t0, t1, 0, 1 -# CHECK-INSTR: cv.extract t0, t1, 0, 1 -# CHECK-ENCODING: [0xdb,0x02,0x13,0x00] - -cv.extract a0, a1, 17, 18 -# CHECK-INSTR: cv.extract a0, a1, 17, 18 -# CHECK-ENCODING: [0x5b,0x85,0x25,0x23] - -cv.extract s0, s1, 30, 31 -# CHECK-INSTR: cv.extract s0, s1, 30, 31 -# CHECK-ENCODING: [0x5b,0x84,0xf4,0x3d] - diff --git a/llvm/test/MC/RISCV/corev/bitmanip/extractr-invalid.s b/llvm/test/MC/RISCV/corev/bitmanip/extractr-invalid.s deleted file mode 100644 --- a/llvm/test/MC/RISCV/corev/bitmanip/extractr-invalid.s +++ /dev/null @@ -1,15 +0,0 @@ -# RUN: not llvm-mc -triple=riscv32 --mattr=+xcvbitmanip %s 2>&1 \ -# RUN: | FileCheck %s --check-prefixes=CHECK-ERROR - -cv.extractr t0 -# CHECK-ERROR: too few operands for instruction - -cv.extractr t0, 0 -# CHECK-ERROR: invalid operand for instruction - -cv.extractr t0, t1, 0 -# CHECK-ERROR: invalid operand for instruction - -cv.extractr t0, t1 -# CHECK-ERROR: too few operands for instruction - diff --git a/llvm/test/MC/RISCV/corev/bitmanip/extractr.s b/llvm/test/MC/RISCV/corev/bitmanip/extractr.s deleted file mode 100644 --- a/llvm/test/MC/RISCV/corev/bitmanip/extractr.s +++ /dev/null @@ -1,15 +0,0 @@ -# RUN: llvm-mc -triple=riscv32 --mattr=+xcvbitmanip -show-encoding %s \ -# RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INSTR - -cv.extractr t0, t1, t2 -# CHECK-INSTR: cv.extractr t0, t1, t2 -# CHECK-ENCODING: [0xab,0x32,0x73,0x30] - -cv.extractr a0, a1, a2 -# CHECK-INSTR: cv.extractr a0, a1, a2 -# CHECK-ENCODING: [0x2b,0xb5,0xc5,0x30] - -cv.extractr s0, s1, s2 -# CHECK-INSTR: cv.extractr s0, s1, s2 -# CHECK-ENCODING: [0x2b,0xb4,0x24,0x31] - diff --git a/llvm/test/MC/RISCV/corev/bitmanip/extractu-invalid.s b/llvm/test/MC/RISCV/corev/bitmanip/extractu-invalid.s deleted file mode 100644 --- a/llvm/test/MC/RISCV/corev/bitmanip/extractu-invalid.s +++ /dev/null @@ -1,27 +0,0 @@ -# RUN: not llvm-mc -triple=riscv32 --mattr=+xcvbitmanip %s 2>&1 \ -# RUN: | FileCheck %s --check-prefixes=CHECK-ERROR - -cv.extractu t0, t1 -# CHECK-ERROR: too few operands for instruction - -cv.extractu t0, t1, 0 -# CHECK-ERROR: too few operands for instruction - -cv.extractu t0, t1, t2 -# CHECK-ERROR: immediate must be an integer in the range [0, 31] - -cv.extractu t0, t1, t2, t3 -# CHECK-ERROR: immediate must be an integer in the range [0, 31] - -cv.extractu t0, t1, 0, 32 -# CHECK-ERROR: immediate must be an integer in the range [0, 31] - -cv.extractu t0, t1, 0, -1 -# CHECK-ERROR: immediate must be an integer in the range [0, 31] - -cv.extractu t0, t1, 32, 0 -# CHECK-ERROR: immediate must be an integer in the range [0, 31] - -cv.extractu t0, t1, -1, 0 -# CHECK-ERROR: immediate must be an integer in the range [0, 31] - diff --git a/llvm/test/MC/RISCV/corev/bitmanip/extractu.s b/llvm/test/MC/RISCV/corev/bitmanip/extractu.s deleted file mode 100644 --- a/llvm/test/MC/RISCV/corev/bitmanip/extractu.s +++ /dev/null @@ -1,15 +0,0 @@ -# RUN: llvm-mc -triple=riscv32 --mattr=+xcvbitmanip -show-encoding %s \ -# RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INSTR - -cv.extractu t0, t1, 0, 1 -# CHECK-INSTR: cv.extractu t0, t1, 0, 1 -# CHECK-ENCODING: [0xdb,0x02,0x13,0x40] - -cv.extractu a0, a1, 17, 18 -# CHECK-INSTR: cv.extractu a0, a1, 17, 18 -# CHECK-ENCODING: [0x5b,0x85,0x25,0x63] - -cv.extractu s0, s1, 30, 31 -# CHECK-INSTR: cv.extractu s0, s1, 30, 31 -# CHECK-ENCODING: [0x5b,0x84,0xf4,0x7d] - diff --git a/llvm/test/MC/RISCV/corev/bitmanip/extractur-invalid.s b/llvm/test/MC/RISCV/corev/bitmanip/extractur-invalid.s deleted file mode 100644 --- a/llvm/test/MC/RISCV/corev/bitmanip/extractur-invalid.s +++ /dev/null @@ -1,15 +0,0 @@ -# RUN: not llvm-mc -triple=riscv32 --mattr=+xcvbitmanip %s 2>&1 \ -# RUN: | FileCheck %s --check-prefixes=CHECK-ERROR - -cv.extractur t0 -# CHECK-ERROR: too few operands for instruction - -cv.extractur t0, 0 -# CHECK-ERROR: invalid operand for instruction - -cv.extractur t0, t1, 0 -# CHECK-ERROR: invalid operand for instruction - -cv.extractur t0, t1 -# CHECK-ERROR: too few operands for instruction - diff --git a/llvm/test/MC/RISCV/corev/bitmanip/extractur.s b/llvm/test/MC/RISCV/corev/bitmanip/extractur.s deleted file mode 100644 --- a/llvm/test/MC/RISCV/corev/bitmanip/extractur.s +++ /dev/null @@ -1,15 +0,0 @@ -# RUN: llvm-mc -triple=riscv32 --mattr=+xcvbitmanip -show-encoding %s \ -# RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INSTR - -cv.extractur t0, t1, t2 -# CHECK-INSTR: cv.extractur t0, t1, t2 -# CHECK-ENCODING: [0xab,0x32,0x73,0x32] - -cv.extractur a0, a1, a2 -# CHECK-INSTR: cv.extractur a0, a1, a2 -# CHECK-ENCODING: [0x2b,0xb5,0xc5,0x32] - -cv.extractur s0, s1, s2 -# CHECK-INSTR: cv.extractur s0, s1, s2 -# CHECK-ENCODING: [0x2b,0xb4,0x24,0x33] - diff --git a/llvm/test/MC/RISCV/corev/bitmanip/ff1-invalid.s b/llvm/test/MC/RISCV/corev/bitmanip/ff1-invalid.s deleted file mode 100644 --- a/llvm/test/MC/RISCV/corev/bitmanip/ff1-invalid.s +++ /dev/null @@ -1,15 +0,0 @@ -# RUN: not llvm-mc -triple=riscv32 --mattr=+xcvbitmanip %s 2>&1 \ -# RUN: | FileCheck %s --check-prefixes=CHECK-ERROR - -cv.ff1 t0 -# CHECK-ERROR: too few operands for instruction - -cv.ff1 t0, 0 -# CHECK-ERROR: invalid operand for instruction - -cv.ff1 t0, t1, 0 -# CHECK-ERROR: invalid operand for instruction - -cv.ff1 t0, t1, t2 -# CHECK-ERROR: invalid operand for instruction - diff --git a/llvm/test/MC/RISCV/corev/bitmanip/ff1.s b/llvm/test/MC/RISCV/corev/bitmanip/ff1.s deleted file mode 100644 --- a/llvm/test/MC/RISCV/corev/bitmanip/ff1.s +++ /dev/null @@ -1,15 +0,0 @@ -# RUN: llvm-mc -triple=riscv32 --mattr=+xcvbitmanip -show-encoding %s \ -# RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INSTR - -cv.ff1 t0, t1 -# CHECK-INSTR: cv.ff1 t0, t1 -# CHECK-ENCODING: [0xab,0x32,0x03,0x42] - -cv.ff1 a0, a1 -# CHECK-INSTR: cv.ff1 a0, a1 -# CHECK-ENCODING: [0x2b,0xb5,0x05,0x42] - -cv.ff1 s0, s1 -# CHECK-INSTR: cv.ff1 s0, s1 -# CHECK-ENCODING: [0x2b,0xb4,0x04,0x42] - diff --git a/llvm/test/MC/RISCV/corev/bitmanip/fl1-invalid.s b/llvm/test/MC/RISCV/corev/bitmanip/fl1-invalid.s deleted file mode 100644 --- a/llvm/test/MC/RISCV/corev/bitmanip/fl1-invalid.s +++ /dev/null @@ -1,15 +0,0 @@ -# RUN: not llvm-mc -triple=riscv32 --mattr=+xcvbitmanip %s 2>&1 \ -# RUN: | FileCheck %s --check-prefixes=CHECK-ERROR - -cv.fl1 t0 -# CHECK-ERROR: too few operands for instruction - -cv.fl1 t0, 0 -# CHECK-ERROR: invalid operand for instruction - -cv.fl1 t0, t1, 0 -# CHECK-ERROR: invalid operand for instruction - -cv.fl1 t0, t1, t2 -# CHECK-ERROR: invalid operand for instruction - diff --git a/llvm/test/MC/RISCV/corev/bitmanip/fl1.s b/llvm/test/MC/RISCV/corev/bitmanip/fl1.s deleted file mode 100644 --- a/llvm/test/MC/RISCV/corev/bitmanip/fl1.s +++ /dev/null @@ -1,15 +0,0 @@ -# RUN: llvm-mc -triple=riscv32 --mattr=+xcvbitmanip -show-encoding %s \ -# RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INSTR - -cv.fl1 t0, t1 -# CHECK-INSTR: cv.fl1 t0, t1 -# CHECK-ENCODING: [0xab,0x32,0x03,0x44] - -cv.fl1 a0, a1 -# CHECK-INSTR: cv.fl1 a0, a1 -# CHECK-ENCODING: [0x2b,0xb5,0x05,0x44] - -cv.fl1 s0, s1 -# CHECK-INSTR: cv.fl1 s0, s1 -# CHECK-ENCODING: [0x2b,0xb4,0x04,0x44] - diff --git a/llvm/test/MC/RISCV/corev/bitmanip/insert-invalid.s b/llvm/test/MC/RISCV/corev/bitmanip/insert-invalid.s deleted file mode 100644 --- a/llvm/test/MC/RISCV/corev/bitmanip/insert-invalid.s +++ /dev/null @@ -1,27 +0,0 @@ -# RUN: not llvm-mc -triple=riscv32 --mattr=+xcvbitmanip %s 2>&1 \ -# RUN: | FileCheck %s --check-prefixes=CHECK-ERROR - -cv.insert t0, t1 -# CHECK-ERROR: too few operands for instruction - -cv.insert t0, t1, 0 -# CHECK-ERROR: too few operands for instruction - -cv.insert t0, t1, t2 -# CHECK-ERROR: immediate must be an integer in the range [0, 31] - -cv.insert t0, t1, t2, t3 -# CHECK-ERROR: immediate must be an integer in the range [0, 31] - -cv.insert t0, t1, 0, 32 -# CHECK-ERROR: immediate must be an integer in the range [0, 31] - -cv.insert t0, t1, 0, -1 -# CHECK-ERROR: immediate must be an integer in the range [0, 31] - -cv.insert t0, t1, 32, 0 -# CHECK-ERROR: immediate must be an integer in the range [0, 31] - -cv.insert t0, t1, -1, 0 -# CHECK-ERROR: immediate must be an integer in the range [0, 31] - diff --git a/llvm/test/MC/RISCV/corev/bitmanip/insert.s b/llvm/test/MC/RISCV/corev/bitmanip/insert.s deleted file mode 100644 --- a/llvm/test/MC/RISCV/corev/bitmanip/insert.s +++ /dev/null @@ -1,15 +0,0 @@ -# RUN: llvm-mc -triple=riscv32 --mattr=+xcvbitmanip -show-encoding %s \ -# RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INSTR - -cv.insert t0, t1, 0, 1 -# CHECK-INSTR: cv.insert t0, t1, 0, 1 -# CHECK-ENCODING: [0xdb,0x02,0x13,0x80] - -cv.insert a0, a1, 17, 18 -# CHECK-INSTR: cv.insert a0, a1, 17, 18 -# CHECK-ENCODING: [0x5b,0x85,0x25,0xa3] - -cv.insert s0, s1, 30, 31 -# CHECK-INSTR: cv.insert s0, s1, 30, 31 -# CHECK-ENCODING: [0x5b,0x84,0xf4,0xbd] - diff --git a/llvm/test/MC/RISCV/corev/bitmanip/insertr-invalid.s b/llvm/test/MC/RISCV/corev/bitmanip/insertr-invalid.s deleted file mode 100644 --- a/llvm/test/MC/RISCV/corev/bitmanip/insertr-invalid.s +++ /dev/null @@ -1,15 +0,0 @@ -# RUN: not llvm-mc -triple=riscv32 --mattr=+xcvbitmanip %s 2>&1 \ -# RUN: | FileCheck %s --check-prefixes=CHECK-ERROR - -cv.insertr t0 -# CHECK-ERROR: too few operands for instruction - -cv.insertr t0, 0 -# CHECK-ERROR: invalid operand for instruction - -cv.insertr t0, t1, 0 -# CHECK-ERROR: invalid operand for instruction - -cv.insertr t0, t1 -# CHECK-ERROR: too few operands for instruction - diff --git a/llvm/test/MC/RISCV/corev/bitmanip/insertr.s b/llvm/test/MC/RISCV/corev/bitmanip/insertr.s deleted file mode 100644 --- a/llvm/test/MC/RISCV/corev/bitmanip/insertr.s +++ /dev/null @@ -1,15 +0,0 @@ -# RUN: llvm-mc -triple=riscv32 --mattr=+xcvbitmanip -show-encoding %s \ -# RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INSTR - -cv.insertr t0, t1, t2 -# CHECK-INSTR: cv.insertr t0, t1, t2 -# CHECK-ENCODING: [0xab,0x32,0x73,0x34] - -cv.insertr a0, a1, a2 -# CHECK-INSTR: cv.insertr a0, a1, a2 -# CHECK-ENCODING: [0x2b,0xb5,0xc5,0x34] - -cv.insertr s0, s1, s2 -# CHECK-INSTR: cv.insertr s0, s1, s2 -# CHECK-ENCODING: [0x2b,0xb4,0x24,0x35] - diff --git a/llvm/test/MC/RISCV/corev/bitmanip/ror-invalid.s b/llvm/test/MC/RISCV/corev/bitmanip/ror-invalid.s deleted file mode 100644 --- a/llvm/test/MC/RISCV/corev/bitmanip/ror-invalid.s +++ /dev/null @@ -1,15 +0,0 @@ -# RUN: not llvm-mc -triple=riscv32 --mattr=+xcvbitmanip %s 2>&1 \ -# RUN: | FileCheck %s --check-prefixes=CHECK-ERROR - -cv.ror t0 -# CHECK-ERROR: too few operands for instruction - -cv.ror t0, 0 -# CHECK-ERROR: invalid operand for instruction - -cv.ror t0, t1, 0 -# CHECK-ERROR: invalid operand for instruction - -cv.ror t0, t1 -# CHECK-ERROR: too few operands for instruction - diff --git a/llvm/test/MC/RISCV/corev/bitmanip/ror.s b/llvm/test/MC/RISCV/corev/bitmanip/ror.s deleted file mode 100644 --- a/llvm/test/MC/RISCV/corev/bitmanip/ror.s +++ /dev/null @@ -1,15 +0,0 @@ -# RUN: llvm-mc -triple=riscv32 --mattr=+xcvbitmanip -show-encoding %s \ -# RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INSTR - -cv.ror t0, t1, t2 -# CHECK-INSTR: cv.ror t0, t1, t2 -# CHECK-ENCODING: [0xab,0x32,0x73,0x40] - -cv.ror a0, a1, a2 -# CHECK-INSTR: cv.ror a0, a1, a2 -# CHECK-ENCODING: [0x2b,0xb5,0xc5,0x40] - -cv.ror s0, s1, s2 -# CHECK-INSTR: cv.ror s0, s1, s2 -# CHECK-ENCODING: [0x2b,0xb4,0x24,0x41] -