]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
RISC-V: Add implication from the XTheadZvamo extension
authorTsukasa OI <research_trasio@irq.a4lg.com>
Sun, 18 May 2025 04:35:16 +0000 (04:35 +0000)
committerTsukasa OI <research_trasio@irq.a4lg.com>
Mon, 19 May 2025 10:55:31 +0000 (10:55 +0000)
commitbe28a26aebc6537e6ce3544aeba6ec70828cf126
tree4a11e7d8e1dc0502539e8c91af510d38721b4793
parented57ac46e53a71c463c0f7510d4e3bb5aac675ab
RISC-V: Add implication from the XTheadZvamo extension

T-Head/XuanTie's vector extension documentation states that their vector
extensions are based on the standard vector extension draft,
version 0.7.1.

In that draft, it is rare to see dependencies between extensions as
in the ratified version ... except: "Zvamo" -> "Zaamo".

cf. <https://github.com/riscvarchive/riscv-v-spec/releases/tag/0.7.1>

> If vector AMO instructions are supported, then the scalar Zaamo
> instructions (atomic operations from the standard A extension)
> must be present.

Note that using the words like "imply" or "depend" for extensions
weren't a common practice to represent dependencies between extensions
at the time the documentation was created.

The "Zaamo" was not ratified as an extension at the time but this is a
subset of the "A" extension and defines scalar AMO operations (while
"Zvamo" -- NOT in the ratified specification -- defines vector AMO ops).

The important part is that the T-Head/XuanTie's documentation just
states that the "Zvamo" (draft) extension is renamed to "XTheadZvamo".
It means, this implication should have been preserved in some way.

> The extension Zvamo is renamed to XTheadZvamo.

cf. <https://github.com/XUANTIE-RV/thead-extension-spec/blob/2.3.0/xtheadvector.adoc>

bfd/ChangeLog:

* elfxx-riscv.c (riscv_implicit_subsets): Add implication
"XTheadZvamo" -> "Zaamo".

gas/ChangeLog:

* testsuite/gas/riscv/imply.s: Add "XTheadZvamo" implication.
* testsuite/gas/riscv/imply.d: Ditto.
bfd/elfxx-riscv.c
gas/testsuite/gas/riscv/imply.d
gas/testsuite/gas/riscv/imply.s