diff options
author | Xi Ruoyao <xry111@xry111.site> | 2023-10-02 13:00:18 +0800 |
---|---|---|
committer | Xi Ruoyao <xry111@xry111.site> | 2023-10-23 15:30:19 +0800 |
commit | 95db62f4ad4cfce30b7683a7e3e9f06330e84878 (patch) | |
tree | 15b3f29ba6a12269d00c9214d43600862ef56486 /gcc/tree-vect-loop-manip.cc | |
parent | 8811630df88bccfab232f8ab7da4bb43b70fa9de (diff) | |
download | gcc-95db62f4ad4cfce30b7683a7e3e9f06330e84878.zip gcc-95db62f4ad4cfce30b7683a7e3e9f06330e84878.tar.gz gcc-95db62f4ad4cfce30b7683a7e3e9f06330e84878.tar.bz2 |
LoongArch: Use explicit relocs for TLS access with -mexplicit-relocs=auto
The linker does not know how to relax TLS access for LoongArch, so let's
emit machine instructions with explicit relocs for TLS.
gcc/ChangeLog:
* config/loongarch/loongarch.cc (loongarch_explicit_relocs_p):
Return true for TLS symbol types if -mexplicit-relocs=auto.
(loongarch_call_tls_get_addr): Replace TARGET_EXPLICIT_RELOCS
with la_opt_explicit_relocs != EXPLICIT_RELOCS_NONE.
(loongarch_legitimize_tls_address): Likewise.
* config/loongarch/loongarch.md (@tls_low<mode>): Remove
TARGET_EXPLICIT_RELOCS from insn condition.
gcc/testsuite/ChangeLog:
* gcc.target/loongarch/explicit-relocs-auto-tls-ld-gd.c: New
test.
* gcc.target/loongarch/explicit-relocs-auto-tls-le-ie.c: New
test.
Diffstat (limited to 'gcc/tree-vect-loop-manip.cc')
0 files changed, 0 insertions, 0 deletions