From: chenglulu <chenglulu@loongson.cn>
To: gcc-patches@gcc.gnu.org
Cc: xry111@xry111.site, i@xen0n.name, xuchenghua@loongson.cn
Subject: Re: [pushed][PATCH v5 0/5] When cmodel=extreme, add macro implementation and fix problems with explicit relos implementation.
Date: Fri, 2 Feb 2024 09:17:54 +0800 [thread overview]
Message-ID: <ade35b84-3d53-12a9-5b51-b8e9acd70762@loongson.cn> (raw)
In-Reply-To: <20240129082201.26087-1-chenglulu@loongson.cn>
Pushed to r14-8717...r14-8721.
在 2024/1/29 下午4:21, 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
>
prev parent reply other threads:[~2024-02-02 1:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-29 8:21 [PATCH " 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 ` chenglulu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ade35b84-3d53-12a9-5b51-b8e9acd70762@loongson.cn \
--to=chenglulu@loongson.cn \
--cc=gcc-patches@gcc.gnu.org \
--cc=i@xen0n.name \
--cc=xry111@xry111.site \
--cc=xuchenghua@loongson.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).