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 98F7B3858D39 for ; Thu, 18 Aug 2022 12:52:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 98F7B3858D39 Received: from localhost.localdomain (xry111.site [IPv6:2001:470:683e::1]) (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 6A9B76683B; Thu, 18 Aug 2022 08:52:45 -0400 (EDT) Message-ID: Subject: Re: [PATCH v1] LoongArch: Add support code model extreme. From: Xi Ruoyao To: Lulu Cheng , gcc-patches@gcc.gnu.org Cc: i@xen0n.name, xuchenghua@loongson.cn Date: Thu, 18 Aug 2022 20:52:43 +0800 In-Reply-To: References: <20220818100112.142343-1-chenglulu@loongson.cn> 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.0 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-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Aug 2022 12:52:49 -0000 On Thu, 2022-08-18 at 19:49 +0800, Lulu Cheng wrote: > > I think we can ignore the effect of -fplt if code model is extreme, > > instead of forcing everyone to explicitly add -fno-plt. The "large" > > code model of x86_64 also does not limit the address range and it alway= s > > avoids PLT (even if someone adds "-fplt" explicitly). > =C2=A0=C2=A0=C2=A0=C2=A0Do you mean that if cmodel=3Dextreme, > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0then add -fno-plt by default? Yes, we should use -fno-plt as the default for cmodel=3Dextreme. x86_64 silently ignores -fplt for cmodel=3Dlarge (their "large" is like our "extreme"), but perhaps it's better for us to just report an error if someone uses "-mcmodel=3Dextreme -fplt" explicitly (if possible, I'm not sure if we can determine whether -fplt is explicitly given in the backend code). --=20 Xi Ruoyao School of Aerospace Science and Technology, Xidian University