aboutsummaryrefslogtreecommitdiff
path: root/libgomp/target.c
diff options
context:
space:
mode:
authorXi Ruoyao <xry111@xry111.site>2023-12-01 10:09:33 +0800
committerLulu Cheng <chenglulu@loongson.cn>2023-12-08 15:38:37 +0800
commit2b2a0599e221786c2f019f1e8c02c80d23c71430 (patch)
treefd3f447443867f8b7ca572a7dd5aefde18ee967a /libgomp/target.c
parent39a1ab9c33b6067b1cc843408886e7ba709fbb62 (diff)
downloadgcc-2b2a0599e221786c2f019f1e8c02c80d23c71430.zip
gcc-2b2a0599e221786c2f019f1e8c02c80d23c71430.tar.gz
gcc-2b2a0599e221786c2f019f1e8c02c80d23c71430.tar.bz2
LoongArch: Switch loongarch-def from C to C++ to make it possible.
We'll use HOST_WIDE_INT in LoongArch static properties in following patches. To keep the same readability as C99 designated initializers, create a std::array like data structure with position setter function, and add field setter functions for structs used in loongarch-def.cc. Remove unneeded guards #if !defined(IN_LIBGCC2) && !defined(IN_TARGET_LIBS) && !defined(IN_RTS) in loongarch-def.h and loongarch-opts.h. gcc/ChangeLog: * config/loongarch/loongarch-def.h: Remove extern "C". (loongarch_isa_base_strings): Declare as loongarch_def_array instead of plain array. (loongarch_isa_ext_strings): Likewise. (loongarch_abi_base_strings): Likewise. (loongarch_abi_ext_strings): Likewise. (loongarch_cmodel_strings): Likewise. (loongarch_cpu_strings): Likewise. (loongarch_cpu_default_isa): Likewise. (loongarch_cpu_issue_rate): Likewise. (loongarch_cpu_multipass_dfa_lookahead): Likewise. (loongarch_cpu_cache): Likewise. (loongarch_cpu_align): Likewise. (loongarch_cpu_rtx_cost_data): Likewise. (loongarch_isa): Add a constructor and field setter functions. * config/loongarch/loongarch-opts.h (loongarch-defs.h): Do not include for target libraries. * config/loongarch/loongarch-opts.cc: Comment code that doesn't run and causes compilation errors. * config/loongarch/loongarch-tune.h (LOONGARCH_TUNE_H): Likewise. (struct loongarch_rtx_cost_data): Likewise. (struct loongarch_cache): Likewise. (struct loongarch_align): Likewise. * config/loongarch/t-loongarch: Compile loongarch-def.cc with the C++ compiler. * config/loongarch/loongarch-def-array.h: New file for a std:array like data structure with position setter function. * config/loongarch/loongarch-def.c: Rename to ... * config/loongarch/loongarch-def.cc: ... here. (loongarch_cpu_strings): Define as loongarch_def_array instead of plain array. (loongarch_cpu_default_isa): Likewise. (loongarch_cpu_cache): Likewise. (loongarch_cpu_align): Likewise. (loongarch_cpu_rtx_cost_data): Likewise. (loongarch_cpu_issue_rate): Likewise. (loongarch_cpu_multipass_dfa_lookahead): Likewise. (loongarch_isa_base_strings): Likewise. (loongarch_isa_ext_strings): Likewise. (loongarch_abi_base_strings): Likewise. (loongarch_abi_ext_strings): Likewise. (loongarch_cmodel_strings): Likewise. (abi_minimal_isa): Likewise. (loongarch_rtx_cost_optimize_size): Use field setter functions instead of designated initializers. (loongarch_rtx_cost_data): Implement default constructor.
Diffstat (limited to 'libgomp/target.c')
0 files changed, 0 insertions, 0 deletions