[v4,0/1] RISC-V: Support CORE-V XCVBITMAIP extension

Message ID 20240125140957.1513119-1-mary.bennett@embecosm.com
Headers
Series RISC-V: Support CORE-V XCVBITMAIP extension |

Message

Mary Bennett Jan. 25, 2024, 2:09 p.m. UTC
  This patch series presents the comprehensive implementation of the BITMANIP
extension for CORE-V.

Tested with riscv-gnu-toolchain on binutils, ld, gas and gcc testsuites to
ensure its correctness and compatibility with the existing codebase.
However, your input, reviews, and suggestions are invaluable in making this
extension even more robust.

The CORE-V builtins are described in the specification [1] and work can be
found in the OpenHW group's Github repository [2].

[1] github.com/openhwgroup/core-v-sw/blob/master/specifications/corev-builtin-spec.md

[2] github.com/openhwgroup/corev-gcc

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>

RISC-V: Add support for XCVbitmanip extension in CV32E40P

 gcc/common/config/riscv/riscv-common.cc       |   2 +
 gcc/config/riscv/constraints.md               |  16 ++
 gcc/config/riscv/corev.def                    |  13 ++
 gcc/config/riscv/corev.md                     | 182 ++++++++++++++++++
 gcc/config/riscv/predicates.md                |  16 ++
 gcc/config/riscv/riscv-builtins.cc            |   1 +
 gcc/config/riscv/riscv-ftypes.def             |   5 +
 gcc/config/riscv/riscv.cc                     |  13 ++
 gcc/config/riscv/riscv.opt                    |   2 +
 gcc/doc/extend.texi                           |  53 +++++
 gcc/doc/sourcebuild.texi                      |   3 +
 .../riscv/cv-bitmanip-compile-bclr.c          |  27 +++
 .../riscv/cv-bitmanip-compile-bclrr.c         |  18 ++
 .../riscv/cv-bitmanip-compile-bitrev.c        |  30 +++
 .../riscv/cv-bitmanip-compile-bset.c          |  27 +++
 .../riscv/cv-bitmanip-compile-bsetr.c         |  18 ++
 .../riscv/cv-bitmanip-compile-clb.c           |  18 ++
 .../riscv/cv-bitmanip-compile-cnt.c           |  18 ++
 .../riscv/cv-bitmanip-compile-extract.c       |  27 +++
 .../riscv/cv-bitmanip-compile-extractr.c      |  18 ++
 .../riscv/cv-bitmanip-compile-extractu.c      |  27 +++
 .../riscv/cv-bitmanip-compile-extractur.c     |  18 ++
 .../riscv/cv-bitmanip-compile-ff1.c           |  18 ++
 .../riscv/cv-bitmanip-compile-fl1.c           |  18 ++
 .../riscv/cv-bitmanip-compile-insert.c        |  24 +++
 .../riscv/cv-bitmanip-compile-insertr.c       |  18 ++
 .../riscv/cv-bitmanip-compile-ror.c           |  18 ++
 .../riscv/cv-bitmanip-fail-compile-bclr.c     |  25 +++
 .../riscv/cv-bitmanip-fail-compile-bitrev.c   |  23 +++
 .../riscv/cv-bitmanip-fail-compile-bset.c     |  25 +++
 .../riscv/cv-bitmanip-fail-compile-extract.c  |  25 +++
 .../riscv/cv-bitmanip-fail-compile-extractu.c |  25 +++
 .../riscv/cv-bitmanip-fail-compile-insert.c   |  25 +++
 gcc/testsuite/lib/target-supports.exp         |  13 ++
 34 files changed, 809 insertions(+)
 create mode 100644 gcc/testsuite/gcc.target/riscv/cv-bitmanip-compile-bclr.c
 create mode 100644 gcc/testsuite/gcc.target/riscv/cv-bitmanip-compile-bclrr.c
 create mode 100644 gcc/testsuite/gcc.target/riscv/cv-bitmanip-compile-bitrev.c
 create mode 100644 gcc/testsuite/gcc.target/riscv/cv-bitmanip-compile-bset.c
 create mode 100644 gcc/testsuite/gcc.target/riscv/cv-bitmanip-compile-bsetr.c
 create mode 100644 gcc/testsuite/gcc.target/riscv/cv-bitmanip-compile-clb.c
 create mode 100644 gcc/testsuite/gcc.target/riscv/cv-bitmanip-compile-cnt.c
 create mode 100644 gcc/testsuite/gcc.target/riscv/cv-bitmanip-compile-extract.c
 create mode 100644 gcc/testsuite/gcc.target/riscv/cv-bitmanip-compile-extractr.c
 create mode 100644 gcc/testsuite/gcc.target/riscv/cv-bitmanip-compile-extractu.c
 create mode 100644 gcc/testsuite/gcc.target/riscv/cv-bitmanip-compile-extractur.c
 create mode 100644 gcc/testsuite/gcc.target/riscv/cv-bitmanip-compile-ff1.c
 create mode 100644 gcc/testsuite/gcc.target/riscv/cv-bitmanip-compile-fl1.c
 create mode 100644 gcc/testsuite/gcc.target/riscv/cv-bitmanip-compile-insert.c
 create mode 100644 gcc/testsuite/gcc.target/riscv/cv-bitmanip-compile-insertr.c
 create mode 100644 gcc/testsuite/gcc.target/riscv/cv-bitmanip-compile-ror.c
 create mode 100644 gcc/testsuite/gcc.target/riscv/cv-bitmanip-fail-compile-bclr.c
 create mode 100644 gcc/testsuite/gcc.target/riscv/cv-bitmanip-fail-compile-bitrev.c
 create mode 100644 gcc/testsuite/gcc.target/riscv/cv-bitmanip-fail-compile-bset.c
 create mode 100644 gcc/testsuite/gcc.target/riscv/cv-bitmanip-fail-compile-extract.c
 create mode 100644 gcc/testsuite/gcc.target/riscv/cv-bitmanip-fail-compile-extractu.c
 create mode 100644 gcc/testsuite/gcc.target/riscv/cv-bitmanip-fail-compile-insert.c