aboutsummaryrefslogtreecommitdiff
path: root/libgcc
diff options
context:
space:
mode:
authorYangyu Chen <cyy@cyyself.name>2024-11-05 11:23:07 +0800
committerKito Cheng <kito.cheng@sifive.com>2024-11-13 17:01:42 +0800
commit917d03e4f366f7738684bed2eae02482b535b7fc (patch)
tree37a62817c89b2a623d2364808a885d74313b8825 /libgcc
parent0c77c4b082bf110fd2fc9c800268ac58fa579d06 (diff)
downloadgcc-917d03e4f366f7738684bed2eae02482b535b7fc.zip
gcc-917d03e4f366f7738684bed2eae02482b535b7fc.tar.gz
gcc-917d03e4f366f7738684bed2eae02482b535b7fc.tar.bz2
RISC-V: Implement TARGET_GENERATE_VERSION_DISPATCHER_BODY and TARGET_GET_FUNCTION_VERSIONS_DISPATCHER
This patch implements the TARGET_GENERATE_VERSION_DISPATCHER_BODY and TARGET_GET_FUNCTION_VERSIONS_DISPATCHER for RISC-V. This is used to generate the dispatcher function and get the dispatcher function for function multiversioning. This patch copies many codes from commit 0cfde688e213 ("[aarch64] Add function multiversioning support") and modifies them to fit the RISC-V port. A key difference is the data structure of feature bits in RISC-V C-API is a array of unsigned long long, while in AArch64 is not a array. So we need to generate the array reference for each feature bits element in the dispatcher function. Signed-off-by: Yangyu Chen <cyy@cyyself.name> gcc/ChangeLog: * config/riscv/riscv.cc (add_condition_to_bb): New function. (dispatch_function_versions): New function. (get_suffixed_assembler_name): New function. (make_resolver_func): New function. (riscv_generate_version_dispatcher_body): New function. (riscv_get_function_versions_dispatcher): New function. (TARGET_GENERATE_VERSION_DISPATCHER_BODY): Implement it. (TARGET_GET_FUNCTION_VERSIONS_DISPATCHER): Implement it.
Diffstat (limited to 'libgcc')
0 files changed, 0 insertions, 0 deletions