RISC-V: Add support for XCValu extension in CV32E40P
authorMary Bennett <mary.bennett@embecosm.com>
Mon, 2 Oct 2023 02:02:06 +0000 (03:02 +0100)
committerNelson Chu <nelson@rivosinc.com>
Tue, 7 Nov 2023 04:06:32 +0000 (12:06 +0800)
commitd1bd9787f9ad8c49fb463d8d53411aeb5f9c179b
tree2cb9c05606e9c273a1a7f99ef40cc24e112e16d0
parentccb388ca39f49b611acadce03916837c9c1c1ed1
RISC-V: Add support for XCValu extension in CV32E40P

Spec: https://docs.openhwgroup.org/projects/cv32e40p-user-manual/en/latest/instruction_set_extensions.html

Contributors:
  Mary Bennett <mary.bennett@embecosm.com>
  Nandni Jamnadas <nandni.jamnadas@embecosm.com>
  Pietra Ferreira <pietra.ferreira@embecosm.com>
  Charlie Keaney
  Jessica Mills
  Craig Blackmore <craig.blackmore@embecosm.com>
  Simon Cook <simon.cook@embecosm.com>
  Jeremy Bennett <jeremy.bennett@embecosm.com>
  Helene Chelin <helene.chelin@embecosm.com>

bfd/ChangeLog:

* elfxx-riscv.c (riscv_multi_subset_supports): Added `xcvalu`
          instruction class.
(riscv_multi_subset_supports_ext): Likewise.

gas/ChangeLog:

* config/tc-riscv.c (validate_riscv_insn): Added the necessary
          operands for the extension.
(riscv_ip): Likewise.
* doc/c-riscv.texi: Noted XCValu as an additional ISA extension
          for CORE-V.
* testsuite/gas/riscv/cv-alu-boundaries.d: New test.
* testsuite/gas/riscv/cv-alu-boundaries.l: New test.
* testsuite/gas/riscv/cv-alu-boundaries.s: New test.
* testsuite/gas/riscv/cv-alu-fail-march.d: New test.
* testsuite/gas/riscv/cv-alu-fail-march.l: New test.
* testsuite/gas/riscv/cv-alu-fail-march.s: New test.
* testsuite/gas/riscv/cv-alu-fail-operand-01.d: New test.
* testsuite/gas/riscv/cv-alu-fail-operand-01.l: New test.
* testsuite/gas/riscv/cv-alu-fail-operand-01.s: New test.
* testsuite/gas/riscv/cv-alu-fail-operand-02.d: New test.
* testsuite/gas/riscv/cv-alu-fail-operand-02.l: New test.
* testsuite/gas/riscv/cv-alu-fail-operand-02.s: New test.
* testsuite/gas/riscv/cv-alu-fail-operand-03.d: New test.
* testsuite/gas/riscv/cv-alu-fail-operand-03.l: New test.
* testsuite/gas/riscv/cv-alu-fail-operand-03.s: New test.
* testsuite/gas/riscv/cv-alu-fail-operand-04.d: New test.
* testsuite/gas/riscv/cv-alu-fail-operand-04.l: New test.
* testsuite/gas/riscv/cv-alu-fail-operand-04.s: New test.
* testsuite/gas/riscv/cv-alu-fail-operand-05.d: New test.
* testsuite/gas/riscv/cv-alu-fail-operand-05.l: New test.
* testsuite/gas/riscv/cv-alu-fail-operand-05.s: New test.
* testsuite/gas/riscv/cv-alu-fail-operand-06.d: New test.
* testsuite/gas/riscv/cv-alu-fail-operand-06.l: New test.
* testsuite/gas/riscv/cv-alu-fail-operand-06.s: New test.
* testsuite/gas/riscv/cv-alu-fail-operand-07.d: New test.
* testsuite/gas/riscv/cv-alu-fail-operand-07.l: New test.
* testsuite/gas/riscv/cv-alu-fail-operand-07.s: New test.
* testsuite/gas/riscv/cv-alu-insns.d: New test.
* testsuite/gas/riscv/cv-alu-insns.s: New test.

opcodes/ChangeLog:

* riscv-dis.c (print_insn_args): Disassemble xcb operand.
* riscv-opc.c: Defined the MASK and added XCValu instructions.

include/ChangeLog:

* opcode/riscv-opc.h: Added corresponding MATCH and MASK macros
          for XCValu.
* opcode/riscv.h: Added corresponding EXTRACT and ENCODE macros
          for XCValu.
(enum riscv_insn_class): Added the XCValu instruction class.
36 files changed:
bfd/elfxx-riscv.c
gas/config/tc-riscv.c
gas/doc/c-riscv.texi
gas/testsuite/gas/riscv/cv-alu-boundaries.d [new file with mode: 0644]
gas/testsuite/gas/riscv/cv-alu-boundaries.l [new file with mode: 0644]
gas/testsuite/gas/riscv/cv-alu-boundaries.s [new file with mode: 0644]
gas/testsuite/gas/riscv/cv-alu-fail-march.d [new file with mode: 0644]
gas/testsuite/gas/riscv/cv-alu-fail-march.l [new file with mode: 0644]
gas/testsuite/gas/riscv/cv-alu-fail-march.s [new file with mode: 0644]
gas/testsuite/gas/riscv/cv-alu-fail-operand-01.d [new file with mode: 0644]
gas/testsuite/gas/riscv/cv-alu-fail-operand-01.l [new file with mode: 0644]
gas/testsuite/gas/riscv/cv-alu-fail-operand-01.s [new file with mode: 0644]
gas/testsuite/gas/riscv/cv-alu-fail-operand-02.d [new file with mode: 0644]
gas/testsuite/gas/riscv/cv-alu-fail-operand-02.l [new file with mode: 0644]
gas/testsuite/gas/riscv/cv-alu-fail-operand-02.s [new file with mode: 0644]
gas/testsuite/gas/riscv/cv-alu-fail-operand-03.d [new file with mode: 0644]
gas/testsuite/gas/riscv/cv-alu-fail-operand-03.l [new file with mode: 0644]
gas/testsuite/gas/riscv/cv-alu-fail-operand-03.s [new file with mode: 0644]
gas/testsuite/gas/riscv/cv-alu-fail-operand-04.d [new file with mode: 0644]
gas/testsuite/gas/riscv/cv-alu-fail-operand-04.l [new file with mode: 0644]
gas/testsuite/gas/riscv/cv-alu-fail-operand-04.s [new file with mode: 0644]
gas/testsuite/gas/riscv/cv-alu-fail-operand-05.d [new file with mode: 0644]
gas/testsuite/gas/riscv/cv-alu-fail-operand-05.l [new file with mode: 0644]
gas/testsuite/gas/riscv/cv-alu-fail-operand-05.s [new file with mode: 0644]
gas/testsuite/gas/riscv/cv-alu-fail-operand-06.d [new file with mode: 0644]
gas/testsuite/gas/riscv/cv-alu-fail-operand-06.l [new file with mode: 0644]
gas/testsuite/gas/riscv/cv-alu-fail-operand-06.s [new file with mode: 0644]
gas/testsuite/gas/riscv/cv-alu-fail-operand-07.d [new file with mode: 0644]
gas/testsuite/gas/riscv/cv-alu-fail-operand-07.l [new file with mode: 0644]
gas/testsuite/gas/riscv/cv-alu-fail-operand-07.s [new file with mode: 0644]
gas/testsuite/gas/riscv/cv-alu-insns.d [new file with mode: 0644]
gas/testsuite/gas/riscv/cv-alu-insns.s [new file with mode: 0644]
include/opcode/riscv-opc.h
include/opcode/riscv.h
opcodes/riscv-dis.c
opcodes/riscv-opc.c