public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Lulu Cheng <chenglulu@loongson.cn>
To: Xi Ruoyao <xry111@xry111.site>,
	gcc-patches@gcc.gnu.org, liuzhensong <liuzhensong@loongson.cn>
Cc: Wang Xuerui <i@xen0n.name>, Chenghua Xu <xuchenghua@loongson.cn>,
	Huacai Chen <chenhuacai@kernel.org>
Subject: Re: [PATCH] LoongArch: add -mdirect-extern-access option
Date: Sun, 4 Sep 2022 15:00:00 +0800	[thread overview]
Message-ID: <496bac6b-95b0-00ec-a212-0142104950c4@loongson.cn> (raw)
In-Reply-To: <11ab925378eb7f4ee3a0e8a6a81be45c64aebe00.camel@xry111.site>

[-- Attachment #1: Type: text/plain, Size: 1356 bytes --]


在 2022/9/4 下午2:35, Xi Ruoyao 写道:
> On Sun, 2022-09-04 at 11:22 +0800, Lulu Cheng wrote:
>> 在 2022/9/4 上午10:51, Xi Ruoyao 写道:
>>   
>>> On Sun, 2022-09-04 at 10:26 +0800, Lulu Cheng wrote:
>>>   
>>>> If the above modifications are not added, the function call is:
>>>>
>>>>   bl %plt(test1)
>>>>
>>>> now is :
>>>>
>>>>   bl test1
>>> Regarding "%plt(...)", in the binutils code:
>>>
>>>     /* For compatible old asm code.  */
>>>     if (0 == strcmp (op_c_str, "plt"))
>>>       btype = BFD_RELOC_LARCH_B26;
>>>
>>> Link:
>>> https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=gas/config/loongarch-parse.y;h=8704687706df50aa15aff05f97e4560d7ec6fa23;hb=refs/heads/master#l131
>>>
>>> Zhensong: does "old asm code" here mean we should remove %plt from
>>> "new"
>>> assembly code, i. e. stop to print %plt(...) in GCC completely?
>>>
>>   
>> I think '%plt' also needs to be removed from the readability of the
>> assembly code.:-\
> I understand, but maybe we should remove %plt unconditionally, with or
> without -mdirect-extern-access.  Note that for -mcmodel=medium we don't
> say something like "%pc_hi20(%plt(x))" either.


I have thought about this problem. For example, there is no '%plt' in 
aarch64, but I think it can be added and easily distinguished at the 
assembly code level,

so this is not removed.

  reply	other threads:[~2022-09-04  7:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-01 10:54 Xi Ruoyao
2022-09-02  3:12 ` Huacai Chen
2022-09-02  3:31   ` Xi Ruoyao
2022-09-02 11:30 ` Xi Ruoyao
2022-09-04  0:52   ` Fangrui Song
2022-09-04  2:26   ` Lulu Cheng
2022-09-04  2:51     ` Xi Ruoyao
2022-09-04  3:22       ` Lulu Cheng
2022-09-04  6:35         ` Xi Ruoyao
2022-09-04  7:00           ` Lulu Cheng [this message]
2022-09-04  7:38             ` Fangrui Song
2022-09-04 13:29               ` 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=496bac6b-95b0-00ec-a212-0142104950c4@loongson.cn \
    --to=chenglulu@loongson.cn \
    --cc=chenhuacai@kernel.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=i@xen0n.name \
    --cc=liuzhensong@loongson.cn \
    --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).