RISC-V: Add support for XCVmac extension in CV32E40P
authorMary Bennett <mary.bennett@embecosm.com>
Mon, 2 Oct 2023 02:02:05 +0000 (03:02 +0100)
committerNelson Chu <nelson@rivosinc.com>
Tue, 7 Nov 2023 04:06:27 +0000 (12:06 +0800)
commitccb388ca39f49b611acadce03916837c9c1c1ed1
treec55e0441952e6b2c821000718ded7b3b3501cf60
parentcf0d07fd07117934750e4bb94cfc0349e251afae
RISC-V: Add support for XCVmac 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 `xcvmac`
          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 XCVmac as an additional ISA extension
          for CORE-V.
* testsuite/gas/riscv/cv-mac-fail-march.d: New test.
* testsuite/gas/riscv/cv-mac-fail-march.l: New test.
* testsuite/gas/riscv/cv-mac-fail-march.s: New test.
* testsuite/gas/riscv/cv-mac-fail-operand.d: New test.
* testsuite/gas/riscv/cv-mac-fail-operand.l: New test.
* testsuite/gas/riscv/cv-mac-fail-operand.s: New test.
* testsuite/gas/riscv/cv-mac-insns.d: New test.
* testsuite/gas/riscv/cv-mac-insns.s: New test.

opcodes/ChangeLog:

* riscv-dis.c (print_insn_args): Disassemble information with
          the EXTRACT macro implemented.
* riscv-opc.c: Defined the MASK and added
          XCVmac instructions.

include/ChangeLog:

* opcode/riscv-opc.h: Added corresponding MATCH and MASK macros
          for XCVmac.
* opcode/riscv.h: Added corresponding EXTRACT and ENCODE macros
          for uimm.
(enum riscv_insn_class): Added the XCVmac instruction class.
15 files changed:
bfd/elfxx-riscv.c
gas/config/tc-riscv.c
gas/doc/c-riscv.texi
gas/testsuite/gas/riscv/cv-mac-fail-march.d [new file with mode: 0644]
gas/testsuite/gas/riscv/cv-mac-fail-march.l [new file with mode: 0644]
gas/testsuite/gas/riscv/cv-mac-fail-march.s [new file with mode: 0644]
gas/testsuite/gas/riscv/cv-mac-fail-operand.d [new file with mode: 0644]
gas/testsuite/gas/riscv/cv-mac-fail-operand.l [new file with mode: 0644]
gas/testsuite/gas/riscv/cv-mac-fail-operand.s [new file with mode: 0644]
gas/testsuite/gas/riscv/cv-mac-insns.d [new file with mode: 0644]
gas/testsuite/gas/riscv/cv-mac-insns.s [new file with mode: 0644]
include/opcode/riscv-opc.h
include/opcode/riscv.h
opcodes/riscv-dis.c
opcodes/riscv-opc.c