From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from xry111.site (xry111.site [IPv6:2001:470:683e::1]) by sourceware.org (Postfix) with ESMTPS id 98A6C3858D33 for ; Thu, 9 Mar 2023 15:18:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 98A6C3858D33 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=1678375109; bh=4G9gaFzcbg1icynibqZx1UrtSVvCiy4FsYUdViXum4o=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=Aljsb4TvKS03ELiWntr7LjnaMTGPfccAzFN0GZsJHFKSbpILZs3OCKOclurRlcq01 /POixnlTceqmtO1mEejSel1QmLw7H3EjEaQl5zLi2SvbDqwyAd7uVpK/qPfD1sE8Ln YCq/Ebin78JPzn6SH/Dj7cHVlh5ulypc5O6ya9vg= 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 B39C666338; Thu, 9 Mar 2023 10:18:27 -0500 (EST) Message-ID: <0c9b0538369a8632834a7bb9b3e9855c61fbe281.camel@xry111.site> Subject: Re: [PATCH] Remap __GLIBC_FLT_EVAL_METHOD to 0 if __FLT_EVAL_METHOD__ is -1 From: Xi Ruoyao To: Kito Cheng Cc: Palmer Dabbelt , libc-alpha@sourceware.org, joseph@codesourcery.com, jeffreyalaw@gmail.com, Darius Rad , christoph.muellner@vrull.eu, DJ Delorie , Andrew Waterman , Wilco Dijkstra Date: Thu, 09 Mar 2023 23:18:25 +0800 In-Reply-To: References: <20230217022646.99959-1-kito.cheng@sifive.com> 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=-1.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_NUMSUBJECT,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-09 at 22:59 +0800, Kito Cheng wrote: > Hi Ruoyao: >=20 > GCC isn't set that to -1, but clang/LLVM did, see > https://github.com/llvm/llvm-project/issues/60781=C2=A0and > https://reviews.llvm.org/D121122 Hmm, it turns -ffast-math into "-fslow-math" :(. > Seems like LLVM folks are consider to rever that, but even clang/LLVM > revert that, >=20 > the issue still there: should we treat indeterminable precision as > evaluating value as long double? >=20 > It's almost no benefit for those targets who have 128 bit long double > type. I agree that if __FLT_EVAL_METHOD__ is not 0, 1, or 2, and the target does not have native support for some "special" floating point types, we *should* make float_t float and double_t double. But doing so may blow up rolling-release distros: if a library uses float_t and double_t in the API and the distro maintainers rebuilt the library with a new Glibc, but (s)he has not rebuilt an application using the library yet, the application will just crash or produce "strange" results. Maybe we'll need to issue an alert about this to the distro maintainers. --=20 Xi Ruoyao School of Aerospace Science and Technology, Xidian University