Simplify RISC-V Builtin Definitions
This commit simplifies the definition of RISC-V built-in functions within GCC.
This commit simplifies the way RISC-V built-in functions are defined in GCC, removing redundant information and improving code organization. The change involves refactoring the riscv_builtin_description struct and related macros, leading to more concise and maintainable code. This internal refactoring reduces complexity and the potential for errors when adding or modifying RISC-V built-ins.
In Details
This commit refactors config/riscv/riscv-builtins.cc to simplify the definition of RISC-V builtins. It deletes enum riscv_builtin_type, replaces it with a bool in struct riscv_builtin_description, and reorders fields for better packing. It also modifies related macros like RISCV_BUILTIN and removes DIRECT_NO_TARGET_BUILTIN. This touches the architecture-specific implementation of GCC's builtin function handling.
For Context
Built-in functions are special functions provided by the compiler that offer direct access to low-level hardware features or optimized implementations of common tasks. This commit simplifies how these functions are defined for the RISC-V architecture within GCC. By streamlining the definition process, the code becomes easier to understand and maintain, reducing the likelihood of errors and making it simpler to add new built-in functions in the future.