RISC-V: Merge the two zvknhb implicit entries
Clean up RISC-V Zvknhb implicit subset definitions by merging duplicate entries.
This committed patch cleans up the RISC-V implicit subset definitions by merging two identical entries for ‘zvknhb’. While both entries were functional, one was redundant and less clear. This change simplifies the internal representation without altering functionality.
- proposer
Submits a patch to merge duplicate 'zvknhb' implicit subset entries in binutils' RISC-V configuration, improving clarity without functional change.
“Commit 60667464054 added a second zvknhb entry to riscv_implicit_subsets. Both were applied, since the table is scanned once and every matching entry is used, but one entry is clearer. No functional change.”
- reviewer
Acknowledges the commit and the reasoning for merging the duplicate entries.
Technical Tradeoffs
- Improves code clarity and maintainability by removing redundancy.
- No functional impact, as the behavior remains the same.
In Details
The patch modifies bfd/elfxx-riscv.c by removing a redundant entry for the zvknhb implicit subset from the riscv_implicit_subsets array. This array maps ISA extension names to their dependencies. Previously, two identical entries existed for zvknhb, both pointing to +zvknha and +zve32x. The commit consolidates these into a single, clearer entry, addressing an inefficiency in the configuration.
- RISC-V
- An open-standard instruction set architecture based on RISC principles.
- implicit subset
- A predefined set of ISA extensions that are automatically enabled when a larger extension is selected.
- zvknhb
- A specific RISC-V ISA extension, likely related to vector or cryptographic operations.
- BFD
- Binutils Format Description, a library used by binutils to support various object file formats.