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 A3B2E3858D33 for ; Thu, 2 Mar 2023 09:04:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A3B2E3858D33 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=1677747853; bh=2CFEkPG+Xo5hAgBVTx/qVKGA37rSFB1s4m+vrESDfvk=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=Bjlvmlq4JmgaUkaNDBMoc8re2dnTQ00WdDmQJUcHJuK4U03ermIl0iTr3WRIZ2Yi+ TAYCA2vRFBknlPXtIYbWgPjjo64qwvAZ3f0q2dH6Wk/wEsGkZJUxs8EJ5XzYkA8rEV wk7PgJPw2Vavc76HXwFL2y7XO1/5x3mw/dn0ORwQ= Received: from [IPv6:2408:8471:1003:36e3:fcc9:73a2:e263:ac75] (unknown [IPv6:2408:8471:1003:36e3:fcc9:73a2:e263:ac75]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384)) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id 9A19465BBF; Thu, 2 Mar 2023 04:04:06 -0500 (EST) Message-ID: Subject: Re: [PATCH] elfedit: add support for editing e_flags From: Xi Ruoyao To: WANG Xuerui , binutils@sourceware.org Cc: Chenghua Xu , Zhensong Liu , Qinggang Meng , WANG Xuerui Date: Thu, 02 Mar 2023 17:04:02 +0800 In-Reply-To: <660c58cc-10bf-c43b-aded-27a27300cea3@xen0n.name> References: <20230302080137.3346439-1-i.swmail@xen0n.name> <502da978c3a38a5216a0d9abbbe3ebf22f8688e5.camel@xry111.site> <660c58cc-10bf-c43b-aded-27a27300cea3@xen0n.name> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.4 MIME-Version: 1.0 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,LIKELY_SPAM_FROM,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Thu, 2023-03-02 at 16:53 +0800, WANG Xuerui wrote: > On 2023/3/2 16:20, Xi Ruoyao wrote: > > On Thu, 2023-03-02 at 16:01 +0800, WANG Xuerui wrote: > >=20 > > > I have to pick up the work because I was trying to make AMDGPU DCN wo= rk > > > on LoongArch, but that piece of code requires hard-float support whil= e > > > the LoongArch Linux kernel is compiled in the soft-float ABI, leading= to > > > link-time failures intermixing the two. > > IMO we should keep soft-float ABI while enabling the FPU (i. e. > > -mabi=3Dlp64s -mfpu=3D64).=C2=A0 But ouch, this does not work properly = with > > current GCC...=C2=A0 -mfpu=3D64 silently enables using FPR to pass arg = and > > return value, w/o even a warning.=C2=A0 Not sure about Clang. > >=20 > > I remember I've been saying "floating ABI and floating instructio= n > > set should be de-coupled" multiple times: "I" in "ABI" stands for > > "interface" anyway and all the interfaces are just designed for hiding > > implementation details.=C2=A0 But it seems nobody took it seriously. >=20 > Yeah. I remember the Toolchain Conventions has similar words so I've=20 > immediately tried `-mdouble-float` without `-mabi=3Dlp64d`, after seeing > the rejected interlinks, only to see the ABI implicitly promoted to=20 > LP64D nevertheless... If I read the doc correctly, -mdouble-float implies both -mfpu=3D64 and - mabi=3Dlpxxd, while -mfpu=3D64 alone should not affect the calling convention unless it's absolutely necessary (for e.g. -mfpu=3D32 - mabi=3Dlp64d can downgrade the ABI to lp64f). I consider "-mfpu=3D64 silently changes -mabi=3Dlp64s to -mabi=3Dlp64d" a G= CC bug (behavior difference from the toolchain convention), now making a GCC patch... --=20 Xi Ruoyao School of Aerospace Science and Technology, Xidian University