diff options
author | Lulu Cheng <chenglulu@loongson.cn> | 2025-01-07 11:42:25 +0800 |
---|---|---|
committer | Lulu Cheng <chenglulu@loongson.cn> | 2025-01-21 17:36:28 +0800 |
commit | c01ad91886527f685e67037ab4d36a6b0cd07c08 (patch) | |
tree | f260b8683a789850ef9dc0ac0e16bbd776db14b8 /gcc/cfgloopmanip.cc | |
parent | f3d884da1280e211f48be0619e5d2f1ee7eeee87 (diff) | |
download | gcc-c01ad91886527f685e67037ab4d36a6b0cd07c08.zip gcc-c01ad91886527f685e67037ab4d36a6b0cd07c08.tar.gz gcc-c01ad91886527f685e67037ab4d36a6b0cd07c08.tar.bz2 |
LoongArch: Implement target attribute.
Add function attributes support for LoongArch.
Currently, the following items are supported:
__attribute__ ((target ("{no-}strict-align")))
__attribute__ ((target ("cmodel=")))
__attribute__ ((target ("arch=")))
__attribute__ ((target ("tune=")))
__attribute__ ((target ("{no-}lsx")))
__attribute__ ((target ("{no-}lasx")))
This implementation is derived from AArch64.
gcc/ChangeLog:
* attr-urls.def: Regenerate.
* config.gcc: Add loongarch-target-attr.o to extra_objs.
* config/loongarch/loongarch-protos.h
(loongarch_option_valid_attribute_p): Function declaration.
(loongarch_option_override_internal): Likewise.
* config/loongarch/loongarch.cc
(loongarch_option_override_internal): Delete the modifications
to target_option_default_node and target_option_current_node.
(loongarch_set_current_function): Add annotation information.
(loongarch_option_override): add assignment operations to
target_option_default_node and target_option_current_node.
(TARGET_OPTION_VALID_ATTRIBUTE_P): Define.
* config/loongarch/t-loongarch: Add compilation of target file
loongarch-target-attr.o.
* doc/extend.texi: Add description information of LoongArch
Function Attributes.
* config/loongarch/loongarch-target-attr.cc: New file.
gcc/testsuite/ChangeLog:
* gcc.target/loongarch/arch-func-attr-1.c: New test.
* gcc.target/loongarch/cmodel-func-attr-1.c: New test.
* gcc.target/loongarch/lasx-func-attr-1.c: New test.
* gcc.target/loongarch/lasx-func-attr-2.c: New test.
* gcc.target/loongarch/lsx-func-attr-1.c: New test.
* gcc.target/loongarch/lsx-func-attr-2.c: New test.
* gcc.target/loongarch/strict_align-func-attr-1.c: New test.
* gcc.target/loongarch/strict_align-func-attr-2.c: New test.
* gcc.target/loongarch/vector-func-attr-1.c: New test.
* gcc.target/loongarch/attr-check-error-message.c: New test.
Diffstat (limited to 'gcc/cfgloopmanip.cc')
0 files changed, 0 insertions, 0 deletions