From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from xry111.site (xry111.site [89.208.246.23]) by sourceware.org (Postfix) with ESMTPS id 2928D3858D37 for ; Sun, 4 Sep 2022 06:35:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2928D3858D37 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=xry111.site Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=xry111.site DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xry111.site; s=default; t=1662273333; bh=hBUBzPf9Vm0Xz4X5k57skF7MmWoyd32QWa9IMUjaqGU=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=GCnkS/zSMShk/fjC7+VI1oBsYr/Z8VPBvhRaDGUszipZu+Wjlco1gxoMgfrpnuhfy vp17nnZgFRCreWov1pDAf1Z4Aw4QFn5s/h0lmmkkJHAUldyln+4HjlhokDz2agzEMP 1pJ5eUyOB3savLv2AQOqK6fECZjZJrjeu0eU8Cu0= Received: from [IPv6:240e:358:11b4:5800:dc73:854d:832e:4] (unknown [IPv6:240e:358:11b4:5800:dc73:854d:832e:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id 2C15F66956; Sun, 4 Sep 2022 02:35:28 -0400 (EDT) Message-ID: <11ab925378eb7f4ee3a0e8a6a81be45c64aebe00.camel@xry111.site> Subject: Re: [PATCH] LoongArch: add -mdirect-extern-access option From: Xi Ruoyao To: Lulu Cheng , gcc-patches@gcc.gnu.org, liuzhensong Cc: Wang Xuerui , Chenghua Xu , Huacai Chen Date: Sun, 04 Sep 2022 14:35:22 +0800 In-Reply-To: References: <20220901105412.42242-1-xry111@xry111.site> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.45.2 MIME-Version: 1.0 X-Spam-Status: No, score=1.5 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FROM_SUSPICIOUS_NTLD,LIKELY_SPAM_FROM,PDS_OTHER_BAD_TLD,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Sun, 2022-09-04 at 11:22 +0800, Lulu Cheng wrote: >=20 > =E5=9C=A8 2022/9/4 =E4=B8=8A=E5=8D=8810:51, Xi Ruoyao =E5=86=99=E9=81=93: > =C2=A0 > > On Sun, 2022-09-04 at 10:26 +0800, Lulu Cheng wrote: > > =C2=A0 > > > If the above modifications are not added, the function call is: > > >=20 > > > =C2=A0bl %plt(test1) > > >=20 > > > now is : > > >=20 > > > =C2=A0bl test1 > > Regarding "%plt(...)", in the binutils code: > >=20 > > =C2=A0=C2=A0=C2=A0/* For compatible old asm code. */ > > =C2=A0=C2=A0=C2=A0if (0 =3D=3D strcmp (op_c_str, "plt")) > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0btype =3D BFD_RELOC_LARCH_B26; > >=20 > > Link: > > https://sourceware.org/git/?p=3Dbinutils-gdb.git;a=3Dblob;f=3Dgas/confi= g/loongarch-parse.y;h=3D8704687706df50aa15aff05f97e4560d7ec6fa23;hb=3Drefs/= heads/master#l131 > >=20 > > Zhensong: does "old asm code" here mean we should remove %plt from > > "new" > > assembly code, i. e. stop to print %plt(...) in GCC completely? > >=20 > =C2=A0 > 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=3Dmedium we don't say something like "%pc_hi20(%plt(x))" either. --=20 Xi Ruoyao School of Aerospace Science and Technology, Xidian University