aboutsummaryrefslogtreecommitdiff
path: root/libgcc
diff options
context:
space:
mode:
authorYang Yujie <yangyujie@loongson.cn>2024-04-08 16:45:13 +0800
committerLulu Cheng <chenglulu@loongson.cn>2024-04-09 17:03:15 +0800
commit8657d76d583f0f87000e9003ba75922f2bbe4455 (patch)
tree241cba80e6cd82311c079a8b2fe49fb514181a34 /libgcc
parent73fb0a6153f4781587c925c56683b61632e63dee (diff)
downloadgcc-8657d76d583f0f87000e9003ba75922f2bbe4455.zip
gcc-8657d76d583f0f87000e9003ba75922f2bbe4455.tar.gz
gcc-8657d76d583f0f87000e9003ba75922f2bbe4455.tar.bz2
LoongArch: Enable switchable target
This patch fixes the back-end context switching in cases where functions should be built with their own target contexts instead of the global one, such as LTO linking and functions with target attributes (TBD). PR target/113233 gcc/ChangeLog: * config/loongarch/loongarch.cc (loongarch_reg_init): Reinitialize the loongarch_regno_mode_ok cache. (loongarch_option_override): Same. (loongarch_save_restore_target_globals): Restore target globals. (loongarch_set_current_function): Restore the target contexts for functions. (TARGET_SET_CURRENT_FUNCTION): Define. * config/loongarch/loongarch.h (SWITCHABLE_TARGET): Enable switchable target context. * config/loongarch/loongarch-builtins.cc (loongarch_init_builtins): Initialize all builtin functions at startup. (loongarch_expand_builtin): Turn assertion of builtin availability into a test. gcc/testsuite/ChangeLog: * lib/target-supports.exp: Define condition loongarch_sx_as. * gcc.dg/lto/pr113233_0.c: New test.
Diffstat (limited to 'libgcc')
0 files changed, 0 insertions, 0 deletions