]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
[AArch64] Add ifunc support for Ares
authorWilco Dijkstra <Wilco.Dijkstra@arm.com>
Wed, 19 Dec 2018 18:28:24 +0000 (18:28 +0000)
committerWilco Dijkstra <wdijkstr@arm.com>
Fri, 6 Sep 2019 17:58:34 +0000 (18:58 +0100)
Add Ares to the midr_el0 list and support ifunc dispatch.  Since Ares
supports 2 128-bit loads/stores, use Neon registers for memcpy by
selecting __memcpy_falkor by default (we should rename this to
__memcpy_simd or similar).

* manual/tunables.texi (glibc.cpu.name): Add ares tunable.
* sysdeps/aarch64/multiarch/memcpy.c (__libc_memcpy): Use
__memcpy_falkor for ares.
* sysdeps/unix/sysv/linux/aarch64/cpu-features.h (IS_ARES):
Add new define.
* sysdeps/unix/sysv/linux/aarch64/cpu-features.c (cpu_list):
Add ares cpu.

(cherry picked from commit 02f440c1ef5d5d79552a524065aa3e2fabe469b9)

ChangeLog
manual/tunables.texi
sysdeps/aarch64/multiarch/memcpy.c
sysdeps/unix/sysv/linux/aarch64/cpu-features.c
sysdeps/unix/sysv/linux/aarch64/cpu-features.h

index 0482b0c4355d37b0329b891a1d7fb2a017979e83..2a9b6ed7ef5ad8d3fcd866df45ce4ab9c7506e9a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2019-01-09  Wilco Dijkstra  <wdijkstr@arm.com>
+
+       * manual/tunables.texi (glibc.cpu.name): Add ares tunable.
+       * sysdeps/aarch64/multiarch/memcpy.c (__libc_memcpy): Use
+       __memcpy_falkor for ares.
+       * sysdeps/unix/sysv/linux/aarch64/cpu-features.h (IS_ARES):
+       Add new define.
+       * sysdeps/unix/sysv/linux/aarch64/cpu-features.c (cpu_list):
+       Add ares cpu.
+
 2019-09-06  Siddhesh Poyarekar  <siddhesh@sourceware.org>
 
        * sysdeps/aarch64/multiarch/memcpy_falkor.S (__memcpy_falkor):
index a23c8d076af454fa6d108d1ea48073895f99b117..b230cde556c2c02e9e54a170640458edb38e9f96 100644 (file)
@@ -253,7 +253,7 @@ This tunable is specific to i386 and x86-64.
 @deftp Tunable glibc.tune.cpu
 The @code{glibc.tune.cpu=xxx} tunable allows the user to tell @theglibc{} to
 assume that the CPU is @code{xxx} where xxx may have one of these values:
-@code{generic}, @code{falkor}, @code{thunderxt88}.
+@code{generic}, @code{falkor}, @code{thunderxt88}, @code{ares}.
 
 This tunable is specific to aarch64.
 @end deftp
index b395df1c635f7dcd107f8cb288f0f021d754ed02..ee4d78ea1d948158bbc5c705f33f9eaf8ff4b85d 100644 (file)
@@ -35,7 +35,7 @@ extern __typeof (__redirect_memcpy) __memcpy_falkor attribute_hidden;
 libc_ifunc (__libc_memcpy,
             (IS_THUNDERX (midr)
             ? __memcpy_thunderx
-            : (IS_FALKOR (midr)
+            : (IS_FALKOR (midr) || IS_ARES (midr)
                ? __memcpy_falkor
                : __memcpy_generic)));
 
index 0c7e13f4fa3da813f17201520b39b6140f931032..50297bc409cfd6e8c3fcb77c3507732720dc8299 100644 (file)
@@ -30,6 +30,7 @@ struct cpu_list
 static struct cpu_list cpu_list[] = {
       {"falkor",       0x510FC000},
       {"thunderxt88",  0x430F0A10},
+      {"ares",         0x411FD0C0},
       {"generic",      0x0}
 };
 
index 73cb53da9a13049b6829e577559ba43678544d3f..d2ad5c63b9c77cc3729a818637579d2e282a2ffb 100644 (file)
@@ -44,6 +44,9 @@
 #define IS_FALKOR(midr) (MIDR_IMPLEMENTOR(midr) == 'Q'                       \
                         && MIDR_PARTNUM(midr) == 0xc00)
 
+#define IS_ARES(midr) (MIDR_IMPLEMENTOR(midr) == 'A'                         \
+                       && MIDR_PARTNUM(midr) == 0xd0c)
+
 struct cpu_features
 {
   uint64_t midr_el1;