]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
AArch64: Check for SVE in ifuncs [BZ #28744]
authorWilco Dijkstra <wdijkstr@arm.com>
Thu, 6 Jan 2022 14:36:28 +0000 (14:36 +0000)
committerFlorian Weimer <fweimer@redhat.com>
Fri, 7 Jan 2022 09:10:27 +0000 (10:10 +0100)
Add a check for SVE in the A64FX ifuncs for memcpy, memset and memmove.
This fixes BZ #28744.

(cherry picked from commit e5fa62b8db546f8792ec9e5c61e6419f4f8e3f4d)

NEWS
sysdeps/aarch64/multiarch/memcpy.c
sysdeps/aarch64/multiarch/memmove.c
sysdeps/aarch64/multiarch/memset.c

diff --git a/NEWS b/NEWS
index d9b344027b6b2af7faab006ea2993b851caf1226..2758ba644ae2fd33e42d020fa0eb1e7e44c0ab87 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -27,6 +27,7 @@ The following bugs are resolved with this release:
   [28702] RISC-V: clone does not align stack
   [28703] RISC-V: _dl_init might be called with unaligned stack
   [28704] elf/tst-cpu-features-cpuinfo fails for KVM guests on some AMD systems
+  [28744] A64FX string functions are selected without SVE HWCAP
 
 \f
 Version 2.34
index 25e0081eeb51727cfc90117117726e212728c2ff..b6703af44b3f1a3d4fc5a73b7e919352e950d6e8 100644 (file)
@@ -48,7 +48,7 @@ libc_ifunc (__libc_memcpy,
                      || IS_NEOVERSE_V1 (midr)
                      ? __memcpy_simd
 # if HAVE_AARCH64_SVE_ASM
-                    : (IS_A64FX (midr)
+                    : (IS_A64FX (midr) && sve
                        ? __memcpy_a64fx
                        : __memcpy_generic))))));
 # else
index d0adefc547f60030f0ddb5382006bc2de1ac84fa..d2339ff34ff7b3e50f284737dbd0db524ad93403 100644 (file)
@@ -48,7 +48,7 @@ libc_ifunc (__libc_memmove,
                      || IS_NEOVERSE_V1 (midr)
                      ? __memmove_simd
 # if HAVE_AARCH64_SVE_ASM
-                    : (IS_A64FX (midr)
+                    : (IS_A64FX (midr) && sve
                        ? __memmove_a64fx
                        : __memmove_generic))))));
 # else
index d7d9bbbda095e0518cd91404be460b233416ad1e..3d839bc02e96380d293a8e237e77576912835cfa 100644 (file)
@@ -44,7 +44,7 @@ libc_ifunc (__libc_memset,
              : (IS_EMAG (midr) && zva_size == 64
                ? __memset_emag
 # if HAVE_AARCH64_SVE_ASM
-               : (IS_A64FX (midr)
+               : (IS_A64FX (midr) && sve
                  ? __memset_a64fx
                  : __memset_generic))));
 # else