summaryrefslogtreecommitdiff
path: root/sysdeps/aarch64/multiarch/memcpy.c
diff options
context:
space:
mode:
authorSteve Ellcey <sellcey@caviumnetworks.com>2018-02-22 08:38:47 -0800
committerSteve Ellcey <sellcey@caviumnetworks.com>2018-02-22 08:38:47 -0800
commite9537dddc7c7c7b60b55ed845542c8d586164488 (patch)
treeae653efab8d31c8d5056f0d29fef30c19c0fd260 /sysdeps/aarch64/multiarch/memcpy.c
parentda81ae645d8ee89052f109c814a68a9489f562e6 (diff)
downloadglibc-e9537dddc7c7c7b60b55ed845542c8d586164488.tar.gz
IFUNC for Cavium ThunderX2
* sysdeps/aarch64/multiarch/Makefile (sysdep_routines): Add memcpy_thunderx2. * sysdeps/aarch64/multiarch/ifunc-impl-list.c (MAX_IFUNC): Increment to 4. (__libc_ifunc_impl_list): Add __memcpy_thunderx2. * sysdeps/aarch64/multiarch/memcpy.c (libc_ifunc): Add IS_THUNDERX2 and IS_THUNDERX2PA checks. * sysdeps/aarch64/multiarch/memcpy_thunderx.S (USE_THUNDERX2): Use macro to set name appropriately. (memcpy): Use USE_THUNDERX2 macro to modify prefetches. * sysdeps/aarch64/multiarch/memcpy_thunderx2.S: New file. * sysdeps/unix/sysv/linux/aarch64/cpu-features.h (IS_THUNDERX2PA): New macro. (IS_THUNDERX2): New macro.
Diffstat (limited to 'sysdeps/aarch64/multiarch/memcpy.c')
-rw-r--r--sysdeps/aarch64/multiarch/memcpy.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sysdeps/aarch64/multiarch/memcpy.c b/sysdeps/aarch64/multiarch/memcpy.c
index 3efea2c644..b94c655f9d 100644
--- a/sysdeps/aarch64/multiarch/memcpy.c
+++ b/sysdeps/aarch64/multiarch/memcpy.c
@@ -30,6 +30,7 @@ extern __typeof (__redirect_memcpy) __libc_memcpy;
extern __typeof (__redirect_memcpy) __memcpy_generic attribute_hidden;
extern __typeof (__redirect_memcpy) __memcpy_thunderx attribute_hidden;
+extern __typeof (__redirect_memcpy) __memcpy_thunderx2 attribute_hidden;
extern __typeof (__redirect_memcpy) __memcpy_falkor attribute_hidden;
libc_ifunc (__libc_memcpy,
@@ -37,7 +38,9 @@ libc_ifunc (__libc_memcpy,
? __memcpy_thunderx
: (IS_FALKOR (midr)
? __memcpy_falkor
- : __memcpy_generic)));
+ : (IS_THUNDERX2 (midr) || IS_THUNDERX2PA (midr)
+ ? __memcpy_thunderx2
+ : __memcpy_generic))));
# undef memcpy
strong_alias (__libc_memcpy, memcpy);