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 DD5E13858D26 for ; Thu, 23 May 2024 03:20:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DD5E13858D26 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=xry111.site Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=xry111.site ARC-Filter: OpenARC Filter v1.0.0 sourceware.org DD5E13858D26 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=89.208.246.23 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716434444; cv=none; b=cy7LXXtppre2AojW67UA6KrrKutrdhXZ/XV8fk1xq6800mPYTDqjHWD44FzWCg8weXNMqDLVXLtbxtNMKSHFeCXWEoI7oFqp9wvYxHs+uKNdiYipJrN+2UthxgVzQWzYDoz+D4RLQJgXA2ehWAP81/PQTZbV9YpRBLtf6i0IZ+k= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716434444; c=relaxed/simple; bh=y5nL0llGnKB4X4cR3LVJNrhC6PzgTfLge5eqb7MouWM=; h=DKIM-Signature:Message-ID:Subject:From:To:Date:MIME-Version; b=PorEsfuM3n7W0EGWDCs3qlwBfVSOje0tfXhcM/N0H82aOfNszGN6Vm9MfSwY4v/N5GsLmD2rBBOekANVxeXBV03LIdkEORPKBAJ/MM5tzxJTRNWqQHthlUlL7FulIeWN1okLmBKPdDXYpihrMy87Wv/yz5GalWtXftAwhl4lo+o= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xry111.site; s=default; t=1716434441; bh=y5nL0llGnKB4X4cR3LVJNrhC6PzgTfLge5eqb7MouWM=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=G791Q2lyPJfoZN5L8sLUZLRcurMkaav7vVCci6MiRLORNrGTaftrA+Tzl/W6l4/ae k6JkskSu6YkEtmNccw2ivLBZdr05yc3jStTny0rjgdw6ROnsVZoaI6u/UZQN4lonkp GnajriZJd3PTAkkcoDM8Tk3+QG5c7FeiKM/ClP3A= Received: from [192.168.124.11] (unknown [113.140.11.123]) (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 E74FA66EED; Wed, 22 May 2024 23:20:39 -0400 (EDT) Message-ID: <918bd706514526e31ce887e0487f2fbb0dfba687.camel@xry111.site> Subject: Ping: [PATCH] LoongArch: Use "$fcsr0" instead of "$r0" in _FPU_{GET,SET}CW From: Xi Ruoyao To: libc-alpha@sourceware.org Cc: caiyinyu@loongson.cn, Adhemerval Zanella , WANG Xuerui , luweining@loongson.cn Date: Thu, 23 May 2024 11:20:36 +0800 In-Reply-To: <20240429073111.14572-2-xry111@xry111.site> References: <20240429073111.14572-2-xry111@xry111.site> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.52.1 MIME-Version: 1.0 X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,LIKELY_SPAM_FROM,RCVD_IN_BARRACUDACENTRAL,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Ping. On Mon, 2024-04-29 at 15:31 +0800, Xi Ruoyao wrote: > Clang inline-asm parser does not allow using "$r0" in > movfcsr2gr/movgr2fcsr, so everything using _FPU_{GET,SET}CW is now > failing to build with Clang on LoongArch.=C2=A0 As we now requires Binuti= ls > > =3D 2.41 which supports using "$fcsr0" here, use it instead of "$r0" to > fix the issue. >=20 > Link: https://github.com/loongson-community/discussions/issues/53#issueco= mment-2081507390 > Link: https://sourceware.org/git/?p=3Dbinutils-gdb.git;a=3Dcommit;h=3D414= 2b2368353 > Signed-off-by: Xi Ruoyao > --- >=20 > People in the Cc list will receive this twice because I've mistyped the > address of libc-alpha first time.=C2=A0 Sorry.=C2=A0 Stupid I :(. >=20 > =C2=A0sysdeps/loongarch/fpu_control.h | 4 ++-- > =C2=A01 file changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/sysdeps/loongarch/fpu_control.h b/sysdeps/loongarch/fpu_cont= rol.h > index 54add4e01c..3cdf2417d9 100644 > --- a/sysdeps/loongarch/fpu_control.h > +++ b/sysdeps/loongarch/fpu_control.h > @@ -91,8 +91,8 @@ typedef unsigned int fpu_control_t __attribute__ ((__mo= de__ (__SI__))); > =C2=A0/* Macros for accessing the hardware control word.=C2=A0 */ > =C2=A0extern fpu_control_t __loongarch_fpu_getcw (void) __THROW; > =C2=A0extern void __loongarch_fpu_setcw (fpu_control_t) __THROW; > -#define _FPU_GETCW(cw) __asm__ volatile ("movfcsr2gr %0,$r0" : "=3Dr"(cw= )) > -#define _FPU_SETCW(cw) __asm__ volatile ("movgr2fcsr $r0,%0" : : "r"(cw)= ) > +#define _FPU_GETCW(cw) __asm__ volatile ("movfcsr2gr %0,$fcsr0" : "=3Dr"= (cw)) > +#define _FPU_SETCW(cw) __asm__ volatile ("movgr2fcsr $fcsr0,%0" : : "r"(= cw)) > =C2=A0 > =C2=A0/* Default control word set at startup.=C2=A0 */ > =C2=A0extern fpu_control_t __fpu_control; --=20 Xi Ruoyao School of Aerospace Science and Technology, Xidian University