From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 86667158020 for ; Tue, 18 Oct 2022 09:57:01 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3370EE0946; Tue, 18 Oct 2022 09:56:57 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id F14F3E08F2 for ; Tue, 18 Oct 2022 09:56:55 +0000 (UTC) Message-ID: <0f7b6a9e1cab0f9f388bf56b76535bbabb110978.camel@gentoo.org> Subject: Re: [gentoo-dev] [PATCH] profiles/arch/amd64: add "-mfpmath=sse" to CFLAGS_x86 From: David Seifert To: gentoo-dev@lists.gentoo.org, Mike Gilbert Date: Tue, 18 Oct 2022 11:56:51 +0200 In-Reply-To: References: <20221018015755.332526-1-floppym@gentoo.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 X-Archives-Salt: e8b62437-9d16-483d-870e-9c45b75812d2 X-Archives-Hash: 873def50a22aab941ec2a2967f0beca3 On Tue, 2022-10-18 at 10:14 +0200, Ulrich Mueller wrote: > > > > > > On Tue, 18 Oct 2022, Mike Gilbert wrote: >=20 > > Reference: https://gcc.gnu.org/wiki/x87note >=20 > Which says: >=20 > > ... the amount of worst-case error that could possibly happen using > > the x87 (with any amount of intermediate rounding) is at worst the > > same as true 64 or 32 bit arithmetic, and in practice is almost > > always > > better. >=20 > and: >=20 > > Note, however, that this greater repeatability comes at the cost of > > lost precision (i.e. SSE always gets the same precision because it > > always takes the equivalent of the x87's worst case: a forced round > > down at each step). >=20 > So, it comes with a price, and I wonder if we shouldn't leave that > choice to the user, and go with the upstream GCC default? >=20 > > -CFLAGS_x86=3D"-m32" > > +CFLAGS_x86=3D"-m32 -mfpmath=3Dsse" -mfpmath=3Dsse is already the default on amd64. > Also, why add the flag only to CFLAGS_x86 but not to CFLAGS_amd64? > They should have the same single and double precision arithmetic? >=20 > Ulrich