riscv: thead: Add support for the XTheadBs ISA extension
authorChristoph Müllner <christoph.muellner@vrull.eu>
Mon, 5 Dec 2022 12:02:24 +0000 (13:02 +0100)
committerPhilipp Tomsich <philipp.tomsich@vrull.eu>
Wed, 15 Mar 2023 08:56:45 +0000 (09:56 +0100)
commitd328d3a6f8756ed61b3cdf3675b24051f7d3b2ef
treed5eb64d284dd836617d70165d2d5420006123b8d
parentb77c32273b432db3f04175b95143b3ed5214f6f3
riscv: thead: Add support for the XTheadBs ISA extension

This patch adds support for the XTheadBs ISA extension.
The new INSN pattern is defined in a new file to separate
this vendor extension from the standard extensions.
The cost model adjustment reuses the xbs:bext cost.

gcc/ChangeLog:

* config/riscv/riscv.cc (riscv_rtx_costs): Add xthead:tst cost.
* config/riscv/thead.md (*th_tst<mode>3): New INSN.

gcc/testsuite/ChangeLog:

* gcc.target/riscv/xtheadbs-tst.c: New test.

Signed-off-by: Christoph Müllner <christoph.muellner@vrull.eu>
gcc/config/riscv/riscv.cc
gcc/config/riscv/thead.md
gcc/testsuite/gcc.target/riscv/xtheadbs-tst.c [new file with mode: 0644]