On Tue, Jul 23, 2024 at 05:15:44PM -0700, Patrick O'Neill wrote:
> From: Gianluca Guida <gianl...@rivosinc.com>
> 
> This patch adds support for amocas.{b|h|w|d}. Support for amocas.q
> (64/128 bit cas for rv32/64) will be added in a future patch.
> 
> Extension: https://github.com/riscv/riscv-zacas
> Ratification: https://jira.riscv.org/browse/RVS-680
> 
> gcc/ChangeLog:
> 
>       * common/config/riscv/riscv-common.cc
>       (riscv_subset_list::to_string): Skip zacas when not supported by
>       the assembler.
>       * config.in: Regenerate.
>       * config/riscv/arch-canonicalize: Make zacas imply zaamo.
>       * config/riscv/riscv.opt: Add zacas.
>       * config/riscv/sync.md (zacas_atomic_cas_value<mode>): New pattern.
>       (atomic_compare_and_swap<mode>): Use new pattern for compare-and-swap 
> ops.
>       (zalrsc_atomic_cas_value_strong<mode>): Rename atomic_cas_value_strong.
>       * configure: Regenerate.
>       * configure.ac: Regenerate.
>       * doc/sourcebuild.texi: Add Zacas documentation.
> 
> gcc/testsuite/ChangeLog:
> 
>       * lib/target-supports.exp: Add zacas testsuite infra support.
>       * 
> gcc.target/riscv/amo/zalrsc-rvwmo-compare-exchange-int-acquire-release.c:
>       Remove zacas to continue to test the lr/sc pairs.
>       * gcc.target/riscv/amo/zalrsc-rvwmo-compare-exchange-int-acquire.c: 
> Ditto.
>       * gcc.target/riscv/amo/zalrsc-rvwmo-compare-exchange-int-consume.c: 
> Ditto.
>       * gcc.target/riscv/amo/zalrsc-rvwmo-compare-exchange-int-relaxed.c: 
> Ditto.
>       * gcc.target/riscv/amo/zalrsc-rvwmo-compare-exchange-int-release.c: 
> Ditto.
>       * 
> gcc.target/riscv/amo/zalrsc-rvwmo-compare-exchange-int-seq-cst-relaxed.c: 
> Ditto.
>       * gcc.target/riscv/amo/zalrsc-rvwmo-compare-exchange-int-seq-cst.c: 
> Ditto.
>       * 
> gcc.target/riscv/amo/zalrsc-ztso-compare-exchange-int-acquire-release.c: 
> Ditto.
>       * gcc.target/riscv/amo/zalrsc-ztso-compare-exchange-int-acquire.c: 
> Ditto.
>       * gcc.target/riscv/amo/zalrsc-ztso-compare-exchange-int-consume.c: 
> Ditto.
>       * gcc.target/riscv/amo/zalrsc-ztso-compare-exchange-int-relaxed.c: 
> Ditto.
>       * gcc.target/riscv/amo/zalrsc-ztso-compare-exchange-int-release.c: 
> Ditto.
>       * 
> gcc.target/riscv/amo/zalrsc-ztso-compare-exchange-int-seq-cst-relaxed.c: 
> Ditto.
>       * gcc.target/riscv/amo/zalrsc-ztso-compare-exchange-int-seq-cst.c: 
> Ditto.
>       * gcc.target/riscv/amo/zabha-zacas-preferred-over-zalrsc.c: New test.
>       * gcc.target/riscv/amo/zacas-char-requires-zabha.c: New test.
>       * gcc.target/riscv/amo/zacas-char-requires-zacas.c: New test.
>       * gcc.target/riscv/amo/zacas-preferred-over-zalrsc.c: New test.
>       * gcc.target/riscv/amo/zacas-rvwmo-compare-exchange-char-acq-rel.c: New 
> test.
>       * gcc.target/riscv/amo/zacas-rvwmo-compare-exchange-char-acquire.c: New 
> test.
>       * gcc.target/riscv/amo/zacas-rvwmo-compare-exchange-char-relaxed.c: New 
> test.
>       * gcc.target/riscv/amo/zacas-rvwmo-compare-exchange-char-release.c: New 
> test.
>       * gcc.target/riscv/amo/zacas-rvwmo-compare-exchange-char-seq-cst.c: New 
> test.
>       * 
> gcc.target/riscv/amo/zacas-rvwmo-compare-exchange-compatability-mapping-no-fence.c:
>       New test.
>       * 
> gcc.target/riscv/amo/zacas-rvwmo-compare-exchange-compatability-mapping.cc: 
> New test.
>       * gcc.target/riscv/amo/zacas-rvwmo-compare-exchange-int-acq-rel.c: New 
> test.
>       * gcc.target/riscv/amo/zacas-rvwmo-compare-exchange-int-acquire.c: New 
> test.
>       * gcc.target/riscv/amo/zacas-rvwmo-compare-exchange-int-relaxed.c: New 
> test.
>       * gcc.target/riscv/amo/zacas-rvwmo-compare-exchange-int-release.c: New 
> test.
>       * gcc.target/riscv/amo/zacas-rvwmo-compare-exchange-int-seq-cst.c: New 
> test.
>       * gcc.target/riscv/amo/zacas-rvwmo-compare-exchange-short-acq-rel.c: 
> New test.
>       * gcc.target/riscv/amo/zacas-rvwmo-compare-exchange-short-acquire.c: 
> New test.
>       * gcc.target/riscv/amo/zacas-rvwmo-compare-exchange-short-relaxed.c: 
> New test.
>       * gcc.target/riscv/amo/zacas-rvwmo-compare-exchange-short-release.c: 
> New test.
>       * gcc.target/riscv/amo/zacas-rvwmo-compare-exchange-short-seq-cst.c: 
> New test.
>       * gcc.target/riscv/amo/zacas-ztso-compare-exchange-char-seq-cst.c: New 
> test.
>       * gcc.target/riscv/amo/zacas-ztso-compare-exchange-char.c: New test.
>       * 
> gcc.target/riscv/amo/zacas-ztso-compare-exchange-compatability-mapping-no-fence.c:
>       New test.
>       * 
> gcc.target/riscv/amo/zacas-ztso-compare-exchange-compatability-mapping.cc: 
> New test.
>       * gcc.target/riscv/amo/zacas-ztso-compare-exchange-int-seq-cst.c: New 
> test.
>       * gcc.target/riscv/amo/zacas-ztso-compare-exchange-int.c: New test.
>       * gcc.target/riscv/amo/zacas-ztso-compare-exchange-short-seq-cst.c: New 
> test.
>       * gcc.target/riscv/amo/zacas-ztso-compare-exchange-short.c: New test.
> 
> Co-authored-by: Patrick O'Neill <patr...@rivosinc.com>

LGTM; feel free to add:

Tested-by: Andrea Parri <and...@rivosinc.com>

  Andrea

Reply via email to