RISC-V: Add C API feature bits for multiple extensions.
Adds RISC-V C API feature bit metadata for multiple extensions, enabling detection of these extensions.
This commit adds RISC-V C API feature bit metadata for several extensions including supm, zicntr, zihpm, zfbfmin, zvfbfmin, zvfbfwma, zicbom, zaamo, zalrsc, zabha, zalasr, zicbop, and zicfilp. This metadata enables the compiler to detect the presence of these extensions. The patch incorporates information from riscv-c-api-doc PR #185 but does not add ISA extension support or new runtime probing capabilities directly.
In Details
The RISC-V C API uses feature bits for extension detection, and this patch adds metadata for several new extensions. The riscv-ext-bitmask.def and riscv-ext.def files are updated to include these extensions, and corresponding definitions are added to feature_bits.c in libgcc. These changes enable the compiler to identify the presence of these extensions during compilation, which is crucial for code generation and optimization with these extensions.
For Context
Modern CPUs often have optional extensions to the core instruction set. Compilers need to know what extensions are present in order to use them. This commit adds metadata to GCC to indicate the presence of several RISC-V extensions according to the RISC-V C API specification. This allows the compiler to detect and utilize these extensions when generating code, potentially improving performance.