The A extension has been split into two parts: Zaamo and Zalrsc.
This patch adds basic support by making the A extension imply Zaamo and
Zalrsc.

Zaamo/Zalrsc spec: https://github.com/riscv/riscv-zaamo-zalrsc/tags
Ratification: https://jira.riscv.org/browse/RVS-1995

v2:
Rebased and updated some testcases that rely on the ISA string.

Patrick O'Neill (3):
  RISC-V: Add basic Zaamo and Zalrsc support
  RISC-V: Add Zalrsc and Zaamo testsuite support
  RISC-V: Add Zalrsc amo-op patterns

 gcc/common/config/riscv/riscv-common.cc       |  11 +-
 gcc/config/riscv/arch-canonicalize            |   1 +
 gcc/config/riscv/riscv.opt                    |   6 +-
 gcc/config/riscv/sync.md                      | 152 +++++++++++++++---
 .../riscv/amo-table-a-6-amo-add-1.c           |   2 +-
 .../riscv/amo-table-a-6-amo-add-2.c           |   2 +-
 .../riscv/amo-table-a-6-amo-add-3.c           |   2 +-
 .../riscv/amo-table-a-6-amo-add-4.c           |   2 +-
 .../riscv/amo-table-a-6-amo-add-5.c           |   2 +-
 .../riscv/amo-table-a-6-compare-exchange-1.c  |   2 +-
 .../riscv/amo-table-a-6-compare-exchange-2.c  |   2 +-
 .../riscv/amo-table-a-6-compare-exchange-3.c  |   2 +-
 .../riscv/amo-table-a-6-compare-exchange-4.c  |   2 +-
 .../riscv/amo-table-a-6-compare-exchange-5.c  |   2 +-
 .../riscv/amo-table-a-6-compare-exchange-6.c  |   2 +-
 .../riscv/amo-table-a-6-compare-exchange-7.c  |   2 +-
 .../riscv/amo-table-a-6-subword-amo-add-1.c   |   2 +-
 .../riscv/amo-table-a-6-subword-amo-add-2.c   |   2 +-
 .../riscv/amo-table-a-6-subword-amo-add-3.c   |   2 +-
 .../riscv/amo-table-a-6-subword-amo-add-4.c   |   2 +-
 .../riscv/amo-table-a-6-subword-amo-add-5.c   |   2 +-
 .../riscv/amo-table-ztso-amo-add-1.c          |   1 +
 .../riscv/amo-table-ztso-amo-add-2.c          |   1 +
 .../riscv/amo-table-ztso-amo-add-3.c          |   1 +
 .../riscv/amo-table-ztso-amo-add-4.c          |   1 +
 .../riscv/amo-table-ztso-amo-add-5.c          |   1 +
 .../riscv/amo-table-ztso-compare-exchange-1.c |   1 +
 .../riscv/amo-table-ztso-compare-exchange-2.c |   1 +
 .../riscv/amo-table-ztso-compare-exchange-3.c |   1 +
 .../riscv/amo-table-ztso-compare-exchange-4.c |   1 +
 .../riscv/amo-table-ztso-compare-exchange-5.c |   1 +
 .../riscv/amo-table-ztso-compare-exchange-6.c |   1 +
 .../riscv/amo-table-ztso-compare-exchange-7.c |   1 +
 .../riscv/amo-table-ztso-subword-amo-add-1.c  |   1 +
 .../riscv/amo-table-ztso-subword-amo-add-2.c  |   1 +
 .../riscv/amo-table-ztso-subword-amo-add-3.c  |   1 +
 .../riscv/amo-table-ztso-subword-amo-add-4.c  |   1 +
 .../riscv/amo-table-ztso-subword-amo-add-5.c  |   1 +
 .../riscv/amo-zaamo-preferred-over-zalrsc.c   |  17 ++
 .../gcc.target/riscv/amo-zalrsc-amo-add-1.c   |  19 +++
 .../gcc.target/riscv/amo-zalrsc-amo-add-2.c   |  19 +++
 .../gcc.target/riscv/amo-zalrsc-amo-add-3.c   |  19 +++
 .../gcc.target/riscv/amo-zalrsc-amo-add-4.c   |  19 +++
 .../gcc.target/riscv/amo-zalrsc-amo-add-5.c   |  19 +++
 gcc/testsuite/gcc.target/riscv/attribute-15.c |   2 +-
 gcc/testsuite/gcc.target/riscv/attribute-16.c |   2 +-
 gcc/testsuite/gcc.target/riscv/attribute-17.c |   2 +-
 gcc/testsuite/gcc.target/riscv/attribute-18.c |   2 +-
 gcc/testsuite/gcc.target/riscv/pr110696.c     |   2 +-
 .../gcc.target/riscv/rvv/base/pr114352-1.c    |   4 +-
 .../gcc.target/riscv/rvv/base/pr114352-3.c    |   8 +-
 gcc/testsuite/lib/target-supports.exp         | 134 ++++++++++-----
 52 files changed, 395 insertions(+), 94 deletions(-)
 create mode 100644 
gcc/testsuite/gcc.target/riscv/amo-zaamo-preferred-over-zalrsc.c
 create mode 100644 gcc/testsuite/gcc.target/riscv/amo-zalrsc-amo-add-1.c
 create mode 100644 gcc/testsuite/gcc.target/riscv/amo-zalrsc-amo-add-2.c
 create mode 100644 gcc/testsuite/gcc.target/riscv/amo-zalrsc-amo-add-3.c
 create mode 100644 gcc/testsuite/gcc.target/riscv/amo-zalrsc-amo-add-4.c
 create mode 100644 gcc/testsuite/gcc.target/riscv/amo-zalrsc-amo-add-5.c

--
2.34.1

Reply via email to