diff options
author | Christoph Müllner <christoph.muellner@vrull.eu> | 2022-06-28 17:44:37 +0200 |
---|---|---|
committer | Philipp Tomsich <philipp.tomsich@vrull.eu> | 2022-09-22 18:06:09 +0200 |
commit | 73442230966a22b3238b2074691a71d7b4ed914a (patch) | |
tree | 973dd8274f6432ff4977d7e9174d4dd0b6467db4 /gas | |
parent | 8254c3d2c94ae5458095ea6c25446ba89134b9da (diff) | |
download | gdb-73442230966a22b3238b2074691a71d7b4ed914a.zip gdb-73442230966a22b3238b2074691a71d7b4ed914a.tar.gz gdb-73442230966a22b3238b2074691a71d7b4ed914a.tar.bz2 |
RISC-V: Add T-Head CondMov vendor extension
T-Head has a range of vendor-specific instructions.
Therefore it makes sense to group them into smaller chunks
in form of vendor extensions.
This patch adds the XTheadCondMov extension, a collection of
T-Head-specific conditional move instructions.
The 'th' prefix and the "XTheadCondMov" extension are documented
in a PR for the RISC-V toolchain conventions ([1]).
[1] https://github.com/riscv-non-isa/riscv-toolchain-conventions/pull/19
Co-developed-by: Lifang Xia <lifang_xia@linux.alibaba.com>
Signed-off-by: Christoph Müllner <christoph.muellner@vrull.eu>
Diffstat (limited to 'gas')
-rw-r--r-- | gas/doc/c-riscv.texi | 5 | ||||
-rw-r--r-- | gas/testsuite/gas/riscv/x-thead-condmov.d | 11 | ||||
-rw-r--r-- | gas/testsuite/gas/riscv/x-thead-condmov.s | 3 |
3 files changed, 19 insertions, 0 deletions
diff --git a/gas/doc/c-riscv.texi b/gas/doc/c-riscv.texi index 570a4f4..b1462ce 100644 --- a/gas/doc/c-riscv.texi +++ b/gas/doc/c-riscv.texi @@ -724,6 +724,11 @@ The XTheadCmo extension provides instructions for cache management. It is documented in @url{https://github.com/T-head-Semi/thead-extension-spec/releases/download/2.0.0/xthead-2022-09-05-2.0.0.pdf}. +@item XTheadCondMov +The XTheadCondMov extension provides instructions for conditional moves. + +It is documented in @url{https://github.com/T-head-Semi/thead-extension-spec/releases/download/2.0.0/xthead-2022-09-05-2.0.0.pdf}. + @item XTheadSync The XTheadSync extension provides instructions for multi-processor synchronization. diff --git a/gas/testsuite/gas/riscv/x-thead-condmov.d b/gas/testsuite/gas/riscv/x-thead-condmov.d new file mode 100644 index 0000000..5972d09 --- /dev/null +++ b/gas/testsuite/gas/riscv/x-thead-condmov.d @@ -0,0 +1,11 @@ +#as: -march=rv64i_xtheadcondmov +#source: x-thead-condmov.s +#objdump: -dr + +.*:[ ]+file format .* + +Disassembly of section .text: + +0+000 <target>: +[ ]+[0-9a-f]+:[ ]+40c5950b[ ]+th.mveqz[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+42c5950b[ ]+th.mvnez[ ]+a0,a1,a2 diff --git a/gas/testsuite/gas/riscv/x-thead-condmov.s b/gas/testsuite/gas/riscv/x-thead-condmov.s new file mode 100644 index 0000000..f71191d --- /dev/null +++ b/gas/testsuite/gas/riscv/x-thead-condmov.s @@ -0,0 +1,3 @@ +target: + th.mveqz a0, a1, a2 + th.mvnez a0, a1, a2 |