public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Xi Ruoyao <xry111@xry111.site>
To: mengqinggang <mengqinggang@loongson.cn>, gcc-patches@gcc.gnu.org
Cc: xuchenghua@loongson.cn, chenglulu@loongson.cn,
	cailulu@loongson.cn,  i.swmail@xen0n.name, maskray@google.com,
	luweining@loongson.cn,  wanglei@loongson.cn,
	hejinyang@loongson.cn
Subject: Re: [PATCH v4] LoongArch: Add support for TLS descriptors
Date: Wed, 13 Mar 2024 17:19:43 +0800	[thread overview]
Message-ID: <b8597668733fc315dfa04c92a2971216f86b19f3.camel@xry111.site> (raw)
In-Reply-To: <fb020a7bb0ae15cd8afc03a21e81a0086d86f6f4.camel@xry111.site>

On Wed, 2024-03-13 at 10:24 +0800, Xi Ruoyao wrote:
>    return TARGET_EXPLICIT_RELOCS
> -    ? "pcalau12i\t$r4,%%desc_pc_hi20(%1)\n\
> -      \taddi.d\t%2,$r0,%%desc_pc_lo12(%1)\n\
> -      \tlu32i.d\t%2,%%desc64_pc_lo20(%1)\n\
> -      \tlu52i.d\t%2,%2,%%desc64_pc_hi12(%1)\n\
> -      \tadd.d\t$r4,$r4,%2\n\
> -      \tld.d\t$r1,$r4,%%desc_ld(%1)\n\
> -      \tjirl\t$r1,$r1,%%desc_call(%1)"
> -    : "la.tls.desc\t%0,%2,%1";
> +    ? "pcalau12i\t$r4,%%desc_pc_hi20(%0)\n\t"
> +      "addi.d\t%1,$r0,%%desc_pc_lo12(%0)\n\t"
> +      "lu32i.d\t%1,%%desc64_pc_lo20(%0)\n\t"
> +      "lu52i.d\t%1,%2,%%desc64_pc_hi12(%0)\n\t"

Oops, the "%2" in the above line should be "%1".

> +      "add.d\t$r4,$r4,%1\n\t"
> +      "ld.d\t$r1,$r4,%%desc_ld(%0)\n\t"
> +      "jirl\t$r1,$r1,%%desc_call(%0)"
> +    : "la.tls.desc\t$r4,%1,%0";

-- 
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University

  reply	other threads:[~2024-03-13  9:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-12  9:20 mengqinggang
2024-03-12 22:15 ` Xi Ruoyao
2024-03-12 22:56   ` Xi Ruoyao
2024-03-13  2:24     ` Xi Ruoyao
2024-03-13  9:19       ` Xi Ruoyao [this message]
2024-03-13  3:06   ` mengqinggang
2024-03-13  9:16     ` Xi Ruoyao

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=b8597668733fc315dfa04c92a2971216f86b19f3.camel@xry111.site \
    --to=xry111@xry111.site \
    --cc=cailulu@loongson.cn \
    --cc=chenglulu@loongson.cn \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hejinyang@loongson.cn \
    --cc=i.swmail@xen0n.name \
    --cc=luweining@loongson.cn \
    --cc=maskray@google.com \
    --cc=mengqinggang@loongson.cn \
    --cc=wanglei@loongson.cn \
    --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).