From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id DF1953858C2F for ; Fri, 21 Jul 2023 02:35:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DF1953858C2F Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gentoo.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gentoo.org From: "Andreas K. Huettel" To: libc-alpha@sourceware.org, Szabolcs Nagy , Joe.Ramsay@arm.com Cc: "Andreas K. Huettel" Subject: libmvec on aarch64 without hardware SVE support Date: Fri, 21 Jul 2023 04:34:52 +0200 Message-ID: <6385491.hdfAi7Kttb@pinacolada> Organization: Gentoo Linux In-Reply-To: <19372791.geO5KgaWL5@pinacolada> References: <19372791.geO5KgaWL5@pinacolada> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart4772475.8hb0ThOEGa"; micalg="pgp-sha512"; protocol="application/pgp-signature" X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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: --nextPart4772475.8hb0ThOEGa Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1"; protected-headers="v1" From: "Andreas K. Huettel" Cc: "Andreas K. Huettel" Subject: libmvec on aarch64 without hardware SVE support Date: Fri, 21 Jul 2023 04:34:52 +0200 Message-ID: <6385491.hdfAi7Kttb@pinacolada> Organization: Gentoo Linux In-Reply-To: <19372791.geO5KgaWL5@pinacolada> References: <19372791.geO5KgaWL5@pinacolada> MIME-Version: 1.0 Apparently this was caused by CFLAGS=3D"-O2 -mcpu=3Dnative -pipe" configure:321: checking for SVE support in assembler configure:331: aarch64-unknown-linux-gnu-gcc -mcpu=3Dnative -pipe -O2 -Wl,= =2DO1 -Wl,--as-needed -c -march=3Darmv8.2-a+sve conftest.s 1>&5 conftest.s: Assembler messages: conftest.s:1: Error: selected processor does not support `ptrue p0.b' Setting both CFLAGS and CXXFLAGS to "-O2 -march=3Dnative -pipe" makes configure succeed (but of course at some point generates code that does not actually run on the machine). Tests pass though [*]. Which makes me wonder... > * Added libmvec vector math library support to AArch64. It requires > GCC version >=3D 10.1.0. It can be disabled via --disable-mathvec, > however that is not a supported configuration as it changes the > ABI. > The symbol names follow the AArch64 vector ABI, they are declared > in math.h and have to be called manually at this point. What's the plan here for machines that do not support the SVE command set in hardware? Is there a fallback that preserves the ABI? What happens if code calls the vector functions on a machine that does not have the hardware support? How is an analogue case handled on x86-64? Cheers Andreas [*] UNSUPPORTED: elf/tst-env-setuid UNSUPPORTED: elf/tst-env-setuid-tunables XPASS: elf/tst-protected1a XPASS: elf/tst-protected1b UNSUPPORTED: elf/tst-valgrind-smoke UNSUPPORTED: math/test-fesetexcept-traps UNSUPPORTED: math/test-fexcept-traps UNSUPPORTED: math/test-nearbyint-except-2 UNSUPPORTED: misc/tst-adjtimex UNSUPPORTED: misc/tst-clock_adjtime UNSUPPORTED: misc/tst-ntp_adjtime UNSUPPORTED: misc/tst-pkey UNSUPPORTED: nptl/test-cond-printers UNSUPPORTED: nptl/test-condattr-printers UNSUPPORTED: nptl/test-mutex-printers UNSUPPORTED: nptl/test-mutexattr-printers UNSUPPORTED: nptl/test-rwlock-printers UNSUPPORTED: nptl/test-rwlockattr-printers UNSUPPORTED: stdlib/tst-secure-getenv XPASS: string/tst-strerror XPASS: string/tst-strsignal XPASS: support/tst-support_descriptors UNSUPPORTED: time/tst-clock_settime UNSUPPORTED: time/tst-settimeofday Summary of test results: 4717 PASS 19 UNSUPPORTED 17 XFAIL 5 XPASS Am Freitag, 21. Juli 2023, 01:39:08 CEST schrieb Andreas K. Huettel via Lib= c-alpha: > Question... I'm trying to configure master glibc on an aarch64 Neoverse-N1 > machine (gcc-12, binutils-2.39). This fails with >=20 > configure: WARNING: mathvec is enabled but assembler does not support SVE. > configure: error: use a compatible toolchain or configure with --disable-= mathvec (this results in incomplete ABI). > * ERROR: sys-libs/glibc-9999::gentoo failed (configure phase): >=20 > What's missing? > Or is --disable-mathvec needed despite the scary message? >=20 > (Asking quickly before the weekend arrives...) >=20 >=20 =2D-=20 Andreas K. H=FCttel dilfridge@gentoo.org Gentoo Linux developer (council, toolchain, base-system, perl, libreoffice) --nextPart4772475.8hb0ThOEGa Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQKTBAABCgB9FiEE/Rnm0xsZLuTcY+rT3CsWIV7VQSoFAmS57sxfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEZE MTlFNkQzMUIxOTJFRTREQzYzRUFEM0RDMkIxNjIxNUVENTQxMkEACgkQ3CsWIV7V QSogaA//YfNQwPIzos+ntSLulp1XI2VjYNjao9qi2KEPz89fj4Xt6mfZfUCtATXP sdpnkrJ4Bci/BMCygbXMFgQlFU/AUyKXcguKeV/VBPnwh92o8CTiGRkHxEnbOEpp +mnI+3HLfDdLpnMREG3EJkFIn/4hkSOtU8PLw2r0KGwUbG00Y6Y/JV40+iNEEJB1 4KkNAJLivH4RI1qwsmfXqlIJKEKXXwJr6iakzBebJcLrY09J2qiEyoUK4sekwUDw +LsW/Q1N6Nk8fpcB+NAbJFxM8ooepRhrWksrsifpwfH8K8oExhP/4dioF/tVyjRz ccmY/FEU0B6e2c9f3gD2KfQdbH/iuivdUJKxopuGxkDTkAe8oZ1HakOYh1tICD9Q M7quHT0w/a1Tsjjv9rfvSdbNOilkW/8zJjoqxvRSPi3ythu7GD5bvsbBZd4ZHCA7 L0xvVZRww1/z5jVQx9ribFYotWQAPtcPCHxKqjybVWVAUCIKR6ivaCN3Y7VikqQZ g8vhgTNpixbIqGYIK9Ien5j31Smp63bmZb1zOumntA6682bYZ8Q5j7IE7YNvBipA YEqDNFruAgUMPqlsXhAYXsT5tUivtu9zRsnW6d1qrphzSEq8zYERQLmkqBYfYyl9 Y0X4zLX96MdEJTYaTOpwdvoaXHEY/DfzCTIVFWYbZeFb/M+5Qog= =S8c1 -----END PGP SIGNATURE----- --nextPart4772475.8hb0ThOEGa--