v3 -> v4: 1. Add macro support for TLS symbols 2. Added support for loading __get_tls_addr symbol address using call36. 3. Merge template got_load_tls_{ld/gd/le/ie}. 4. Enable explicit reloc for extreme TLS GD/LD with -mexplicit-relocs=auto.
v2 -> v3: 1. Modify the detection rules of a test case. v1 -> v2: 1. Use the temporarily allocated registers as intermediate registers to implement the extreme macro. 2. Fixed bugs in v1 test cases. Lulu Cheng (4): LoongArch: Merge template got_load_tls_{ld/gd/le/ie}. LoongArch: Add the macro implementation of mcmodel=extreme. LoongArch: Enable explicit reloc for extreme TLS GD/LD with -mexplicit-relocs=auto. LoongArch: Added support for loading __get_tls_addr symbol address using call36. gcc/config/loongarch/loongarch-protos.h | 1 + gcc/config/loongarch/loongarch.cc | 182 +++++++++--------- gcc/config/loongarch/loongarch.md | 101 ++++++---- gcc/config/loongarch/predicates.md | 12 ++ .../gcc.target/loongarch/attr-model-5.c | 8 + .../explicit-relocs-extreme-auto-tls-ld-gd.c | 5 + .../explicit-relocs-medium-auto-tls-ld-gd.c | 5 + ...icit-relocs-medium-call36-auto-tls-ld-gd.c | 5 + .../loongarch/func-call-extreme-5.c | 7 + .../loongarch/func-call-extreme-6.c | 7 + .../gcc.target/loongarch/tls-extreme-macro.c | 35 ++++ 11 files changed, 239 insertions(+), 129 deletions(-) create mode 100644 gcc/testsuite/gcc.target/loongarch/attr-model-5.c create mode 100644 gcc/testsuite/gcc.target/loongarch/explicit-relocs-extreme-auto-tls-ld-gd.c create mode 100644 gcc/testsuite/gcc.target/loongarch/explicit-relocs-medium-auto-tls-ld-gd.c create mode 100644 gcc/testsuite/gcc.target/loongarch/explicit-relocs-medium-call36-auto-tls-ld-gd.c create mode 100644 gcc/testsuite/gcc.target/loongarch/func-call-extreme-5.c create mode 100644 gcc/testsuite/gcc.target/loongarch/func-call-extreme-6.c create mode 100644 gcc/testsuite/gcc.target/loongarch/tls-extreme-macro.c -- 2.39.3