public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH v5 0/5] When cmodel=extreme, add macro implementation and fix problems with explicit relos implementation.
@ 2024-01-29  8:21 Lulu Cheng
  2024-01-29  8:21 ` [PATCH v5 1/5] LoongArch: Merge template got_load_tls_{ld/gd/le/ie} Lulu Cheng
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Lulu Cheng @ 2024-01-29  8:21 UTC (permalink / raw)
  To: gcc-patches; +Cc: xry111, i, xuchenghua, Lulu Cheng

When cmodel=extreme, since the symbol address is obtained through four instructions,
errors may occur in some cases during linking. Xi Ruoyao fixes this problem.

https://github.com/loongson/la-abi-specs/blob/release/laelf.adoc#extreme-code-model


v4 -> v5:
  1. Modify code format.
  2. Add the implementation patch submitted by Xi Ruoyao about '-mcmodel=extreme -mexplicit-relocs=always'.

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.

Xi Ruoyao (1):
  LoongArch: Don't split the instructions containing relocs for extreme
    code model.

 gcc/config/loongarch/loongarch-protos.h       |   1 +
 gcc/config/loongarch/loongarch.cc             | 265 ++++++++++--------
 gcc/config/loongarch/loongarch.md             | 125 ++++++---
 gcc/config/loongarch/predicates.md            |  12 +
 .../loongarch/cmodel-extreme-mi-thunk-1.C     |  11 +
 .../loongarch/cmodel-extreme-mi-thunk-2.C     |   6 +
 .../loongarch/cmodel-extreme-mi-thunk-3.C     |   6 +
 .../gcc.target/loongarch/attr-model-5.c       |   8 +
 .../gcc.target/loongarch/cmodel-extreme-1.c   |  18 ++
 .../gcc.target/loongarch/cmodel-extreme-2.c   |   7 +
 .../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-1.c           |  14 +-
 .../loongarch/func-call-extreme-2.c           |  29 +-
 .../loongarch/func-call-extreme-3.c           |   2 +-
 .../loongarch/func-call-extreme-4.c           |   2 +-
 .../loongarch/func-call-extreme-5.c           |   7 +
 .../loongarch/func-call-extreme-6.c           |   7 +
 .../gcc.target/loongarch/tls-extreme-macro.c  |  35 +++
 20 files changed, 375 insertions(+), 195 deletions(-)
 create mode 100644 gcc/testsuite/g++.target/loongarch/cmodel-extreme-mi-thunk-1.C
 create mode 100644 gcc/testsuite/g++.target/loongarch/cmodel-extreme-mi-thunk-2.C
 create mode 100644 gcc/testsuite/g++.target/loongarch/cmodel-extreme-mi-thunk-3.C
 create mode 100644 gcc/testsuite/gcc.target/loongarch/attr-model-5.c
 create mode 100644 gcc/testsuite/gcc.target/loongarch/cmodel-extreme-1.c
 create mode 100644 gcc/testsuite/gcc.target/loongarch/cmodel-extreme-2.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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-02-02  1:18 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-29  8:21 [PATCH v5 0/5] When cmodel=extreme, add macro implementation and fix problems with explicit relos implementation Lulu Cheng
2024-01-29  8:21 ` [PATCH v5 1/5] LoongArch: Merge template got_load_tls_{ld/gd/le/ie} Lulu Cheng
2024-01-29  8:21 ` [PATCH v5 2/5] LoongArch: Add the macro implementation of mcmodel=extreme Lulu Cheng
2024-01-29  8:21 ` [PATCH v5 3/5] LoongArch: Enable explicit reloc for extreme TLS GD/LD with -mexplicit-relocs=auto Lulu Cheng
2024-01-29  8:22 ` [PATCH v5 4/5] LoongArch: Added support for loading __get_tls_addr symbol address using call36 Lulu Cheng
2024-01-29  8:22 ` [PATCH v5 5/5] LoongArch: Don't split the instructions containing relocs for extreme code model Lulu Cheng
2024-02-02  1:17 ` [pushed][PATCH v5 0/5] When cmodel=extreme, add macro implementation and fix problems with explicit relos implementation chenglulu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).