179894
commit e5fa62b8db546f8792ec9e5c61e6419f4f8e3f4d
179894
Author: Wilco Dijkstra <wdijkstr@arm.com>
179894
Date:   Thu Jan 6 14:36:28 2022 +0000
179894
179894
    AArch64: Check for SVE in ifuncs [BZ #28744]
179894
    
179894
    Add a check for SVE in the A64FX ifuncs for memcpy, memset and memmove.
179894
    This fixes BZ #28744.
179894
179894
Conflicts:
179894
	sysdeps/aarch64/multiarch/memcpy.c
179894
	sysdeps/aarch64/multiarch/memmove.c
179894
	sysdeps/aarch64/multiarch/memset.c
179894
	  (IFUNC resolver differences in the backport.)
179894
179894
diff --git a/sysdeps/aarch64/multiarch/memcpy.c b/sysdeps/aarch64/multiarch/memcpy.c
179894
index e0313c42e82a7b86..a6ebeb06d3bda00f 100644
179894
--- a/sysdeps/aarch64/multiarch/memcpy.c
179894
+++ b/sysdeps/aarch64/multiarch/memcpy.c
179894
@@ -44,7 +44,7 @@ libc_ifunc (__libc_memcpy,
179894
 		: (IS_THUNDERX2 (midr) || IS_THUNDERX2PA (midr)
179894
 		  ? __memcpy_thunderx2
179894
 # if HAVE_AARCH64_SVE_ASM
179894
-		  : (IS_A64FX (midr)
179894
+		  : (IS_A64FX (midr) && sve
179894
 		     ? __memcpy_a64fx
179894
 		     : __memcpy_generic)))));
179894
 # else
179894
diff --git a/sysdeps/aarch64/multiarch/memmove.c b/sysdeps/aarch64/multiarch/memmove.c
179894
index d96612b9cf7c3a4e..bea72b3eddde54c0 100644
179894
--- a/sysdeps/aarch64/multiarch/memmove.c
179894
+++ b/sysdeps/aarch64/multiarch/memmove.c
179894
@@ -41,7 +41,7 @@ libc_ifunc (__libc_memmove,
179894
 	     : (IS_FALKOR (midr) || IS_PHECDA (midr)
179894
 		? __memmove_falkor
179894
 # if HAVE_AARCH64_SVE_ASM
179894
-		: (IS_A64FX (midr)
179894
+		: (IS_A64FX (midr) && sve
179894
 		   ? __memmove_a64fx
179894
 		   : __memmove_generic))));
179894
 # else
179894
diff --git a/sysdeps/aarch64/multiarch/memset.c b/sysdeps/aarch64/multiarch/memset.c
179894
index 2c8cc72bb0b18474..e7bd412377533f18 100644
179894
--- a/sysdeps/aarch64/multiarch/memset.c
179894
+++ b/sysdeps/aarch64/multiarch/memset.c
179894
@@ -38,7 +38,7 @@ libc_ifunc (__libc_memset,
179894
 	    ((IS_FALKOR (midr) || IS_PHECDA (midr)) && zva_size == 64
179894
 	     ? __memset_falkor
179894
 # if HAVE_AARCH64_SVE_ASM
179894
-	     : (IS_A64FX (midr)
179894
+	     : (IS_A64FX (midr) && sve
179894
 		? __memset_a64fx
179894
 		: __memset_generic)));
179894
 # else