RISC-V: Add Zbc implies Zbkc and Zvknhb implies Zvknha
Updates RISC-V assembler to reflect new ISA manual definitions for Zbc and Zvknhb.
This commit updates binutils to reflect the latest RISC-V ISA manual, where Zbkc is now defined as a subset of Zbc, and Zvknhb is a superset of Zvknha. This change ensures the assembler correctly interprets these instruction set extensions.
- proposer
Adds new implicit subset relationships for Zbc and Zvknhb based on the updated RISC-V ISA manual.
- reviewer
Asks for clarification on having multiple entries with the same string as the first field in the implicit subsets table.
“Is it correct to have multiple entries with the same string as the first field? There's {"zvknhb", "+zve32x", check_implicit_always}, a few lines down.”
- proposer
Confirms that multiple entries with the same string are intentional and necessary for defining different implicit relationships.
Technical Tradeoffs
- Ensures compliance with the latest RISC-V ISA specifications.
- Maintains correct assembler behavior for complex extension combinations.
In Details
This patch modifies bfd/elfxx-riscv.c and gas/testsuite/gas/riscv/imply.d to update the RISC-V assembler's understanding of instruction set extension implications. Specifically, it incorporates the latest definitions from the RISC-V ISA manual where Zbkc is now a subset of Zbc, and Zvknhb implies Zvknha. This ensures the assembler correctly handles implied extensions when parsing -march or similar options.
- RISC-V
- An open standard instruction set architecture (ISA) based on Reduced Instruction Set Computer principles.
- Zbc
- A RISC-V standard extension for bit manipulation instructions.
- Zbkc
- A RISC-V standard extension that is a subset of Zbc.
- Zvknhb
- A RISC-V standard extension for vector cryptography instructions.
- Zvknha
- A RISC-V standard extension for vector cryptography instructions, which Zvknhb is a superset of.
- implicit subset
- In the context of RISC-V extensions, when one extension implies another (e.g., if you enable extension A, extension B is automatically enabled because it's a subset or otherwise prerequisite).