diff options
author | Yangyu Chen <cyy@cyyself.name> | 2024-11-05 11:22:29 +0800 |
---|---|---|
committer | Kito Cheng <kito.cheng@sifive.com> | 2024-11-13 17:01:42 +0800 |
commit | bd975bd1ce5fdbe99901df9145ba40d7145fd066 (patch) | |
tree | cf771967e6dd6338431d74e9513edc63735671b6 /libgcc | |
parent | 1f99a39da290291121d08701b218f23781adddd8 (diff) | |
download | gcc-bd975bd1ce5fdbe99901df9145ba40d7145fd066.zip gcc-bd975bd1ce5fdbe99901df9145ba40d7145fd066.tar.gz gcc-bd975bd1ce5fdbe99901df9145ba40d7145fd066.tar.bz2 |
RISC-V: Implement TARGET_OPTION_VALID_VERSION_ATTRIBUTE_P
This patch implements the TARGET_OPTION_VALID_VERSION_ATTRIBUTE_P for
RISC-V. This hook is used to process attribute
((target_version ("..."))).
As it is the first patch which introduces the target_version attribute,
we also set TARGET_HAS_FMV_TARGET_ATTRIBUTE to 0 to use "target_version"
for function versioning.
Co-Developed-by: Hank Chang <hank.chang@sifive.com>
Signed-off-by: Yangyu Chen <cyy@cyyself.name>
gcc/ChangeLog:
* config/riscv/riscv-protos.h
(riscv_process_target_attr): Remove as it is not used.
(riscv_option_valid_version_attribute_p): Declare.
(riscv_process_target_version_attr): Declare.
* config/riscv/riscv-target-attr.cc
(riscv_target_attrs): Renamed from riscv_attributes.
(riscv_target_version_attrs): New attributes for target_version.
(riscv_process_one_target_attr): New arguments to select attrs.
(riscv_process_target_attr): Likewise.
(riscv_option_valid_attribute_p): Likewise.
(riscv_process_target_version_attr): New function.
(riscv_option_valid_version_attribute_p): New function.
* config/riscv/riscv.cc
(TARGET_OPTION_VALID_VERSION_ATTRIBUTE_P): Implement it.
* config/riscv/riscv.h (TARGET_HAS_FMV_TARGET_ATTRIBUTE): Define
it to 0 to use "target_version" for function versioning.
Diffstat (limited to 'libgcc')
0 files changed, 0 insertions, 0 deletions