public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Xi Ruoyao <xry111@xry111.site>
To: caiyinyu <caiyinyu@loongson.cn>,
	adhemerval.zanella@linaro.org,  libc-alpha@sourceware.org,
	i.swmail@xen0n.name
Cc: xuchenghua@loongson.cn, joseph_myers@mentor.com
Subject: Re: [PATCH 1/1] LoongArch: Add pointer mangling support.
Date: Tue, 16 Aug 2022 09:28:57 +0800	[thread overview]
Message-ID: <d7f277c477d3b18b56f872b9ed5acc9089e16130.camel@xry111.site> (raw)
In-Reply-To: <20220811040056.3164122-1-caiyinyu@loongson.cn>

On Thu, 2022-08-11 at 12:00 +0800, caiyinyu wrote:
> +/* Load or store to/from a got-relative EXPR into/from G, using T.
> +   Note G and T are register names.  */
> +#define LDST_GLOBAL(OP, G, T,  EXPR) \
> +  pcalau12i T, %got_pc_hi20(EXPR); \
> +  OP       T, T, %got_pc_lo12(EXPR); \

Should this be "ld.d T, T, %got_pc_lo12(EXPR)"?  Or if OP is a store
we'll store into GOT and break it.

Or if we don't need to support store just rename it to "LD_GLOBAL".

> +  OP       G, T, 0;
> +
> +/* Load or store to/from a pc-relative EXPR into/from G, using T.
> +   Note G and T are register names.  */
> +#define LDST_PCREL(OP, G, T,  EXPR) \
> +  pcalau12i T, %pc_hi20(EXPR); \
> +  OP       G, T, %pc_lo12(EXPR);

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

  parent reply	other threads:[~2022-08-16  1:29 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-11  4:00 caiyinyu
2022-08-15 20:52 ` Joseph Myers
2022-08-16  1:30   ` Xi Ruoyao
2022-08-16  1:59     ` Xi Ruoyao
2022-08-16 15:23       ` Joseph Myers
2022-08-17  7:43         ` Xi Ruoyao
2022-08-17 16:46           ` Joseph Myers
2022-08-19 13:46             ` Xi Ruoyao
2022-08-21  7:25               ` caiyinyu
2022-08-18  2:25           ` caiyinyu
2022-08-16  1:28 ` Xi Ruoyao [this message]
2022-08-16  6:34   ` caiyinyu

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=d7f277c477d3b18b56f872b9ed5acc9089e16130.camel@xry111.site \
    --to=xry111@xry111.site \
    --cc=adhemerval.zanella@linaro.org \
    --cc=caiyinyu@loongson.cn \
    --cc=i.swmail@xen0n.name \
    --cc=joseph_myers@mentor.com \
    --cc=libc-alpha@sourceware.org \
    --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).