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)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 8F09615808B for ; Tue, 13 Feb 2024 19:30:25 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A2966E2A09; Tue, 13 Feb 2024 19:30:20 +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 96968E29FF; Tue, 13 Feb 2024 19:30:19 +0000 (UTC) Message-ID: Subject: [gentoo-dev] x86 arch testing: please use -mfpmath=sse From: =?UTF-8?Q?Micha=C5=82_G=C3=B3rny?= To: gentoo-dev-announce@lists.gentoo.org Cc: gentoo-dev@lists.gentoo.org Date: Tue, 13 Feb 2024 20:30:14 +0100 Organization: Gentoo Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-ssoxKM4B02+By5QeibfL" User-Agent: Evolution 3.50.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: 1ed3a009-db3f-4807-a50b-7562f0f4d978 X-Archives-Hash: 0391e433cb026179f06adc8e385466de --=-ssoxKM4B02+By5QeibfL Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello, TL;DR: when arch testing for x86, please use `-mfpmath=3Dsse` (this may require raising `-march=3D` to `pentium4` or newer, or adding `-msse2`. The x86 architecture historically supports two floating-precision arithmetic modes: using the 387 coprocessor, and using the SSE instruction set. The compilers default to using the former when compiling for 32-bit x86, and the latter for amd64. The problem with 387 arithmetic is that it uses nonstandard 80-bit registers (vs 64-bit doubles). While technically this means that it achieves better precision, it often means that the same computations yield different rounding results. As a result, test built against amd64 fail with 387-based arithmetic. While technically these tests are broken in the first place for doing exact matching on floating-point arithmetic results, getting everything fixed is a major issue. These problems are quite unlikely to affect real use cases. On top of that, many upstreams don't care about 32-bit systems much, and bothering them with avoidable test failures reduces our chances of having real problems solved. Therefore, I would like to ask arch testers not to test with 387 floating-point arithmetic anymore. We have already switched amd64 multilib to use `-mfpmath=3Dsse` for 32-bit multilib, and we are planning to provide x86 profiles with SSE2 baseline as well. Note that in order for `-mfpmath=3Dsse` to be fully effectively, the code must be compiled with SSE2 support. This could be achieved by using `- march=3Dpentium4` or higher, or adding `-msse2`. TIA. --=20 Best regards, Micha=C5=82 G=C3=B3rny --=-ssoxKM4B02+By5QeibfL Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- iQFGBAABCgAwFiEEx2qEUJQJjSjMiybFY5ra4jKeJA4FAmXLw0YSHG1nb3JueUBn ZW50b28ub3JnAAoJEGOa2uIyniQOkYEH/RtmQtIVDFIztYCEmRcMRoZLBAwfdcYY YoKIabLA6F3dqwwr247efQK4x19zeS4ynFgid6wQApeu4x6m05ByP7beyrJRh1Ra ln1JBMZiZCkHZVwTwOQJfOhLVmuVR0oXj09tSALrZQ62hV3UxbOXYYPPaqEpgXwD Z9To0Aq2xZV2kQ8cW+cgdXsQtW8duVasT56FWfpmkNlBWGk8zbldiJn2sNcy1h0g Cj89gfdnqR9u04EDnarExWBSUEn/tYZ4EMAEkW9rvcrw38U7Jkv0pTL9ChJvdfmh 3OBvAyS+UiC5s5YTzFK+7ujfDzlnXxOQfSdtfS51twCj7SclnsmHYAk= =EE0P -----END PGP SIGNATURE----- --=-ssoxKM4B02+By5QeibfL--