Add (no-op) ifuncs for SVE optimized routines.
This patch doesn't *enable* the SVE optimized routines, but it does let us see if switching them to ifuncs will cause any app compat issues, so that we can more easily use the optimized routines in future. Test: treehugger Change-Id: Ic5fe570bd21687da397b48127bf688f7ec68dd0c
This commit is contained in:
parent
b1f9b1b224
commit
3d8e98f8bd
|
@ -41,6 +41,12 @@ DEFINE_IFUNC_FOR(memchr) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
typedef void* memcmp_func(void*, const void*, size_t);
|
||||||
|
DEFINE_IFUNC_FOR(memcmp) {
|
||||||
|
// TODO: enable the SVE version.
|
||||||
|
RETURN_FUNC(memcmp_func, __memcmp_aarch64);
|
||||||
|
}
|
||||||
|
|
||||||
typedef void* memcpy_func(void*, const void*, size_t);
|
typedef void* memcpy_func(void*, const void*, size_t);
|
||||||
DEFINE_IFUNC_FOR(memcpy) {
|
DEFINE_IFUNC_FOR(memcpy) {
|
||||||
if (arg->_hwcap & HWCAP_ASIMD) {
|
if (arg->_hwcap & HWCAP_ASIMD) {
|
||||||
|
@ -110,6 +116,12 @@ DEFINE_IFUNC_FOR(strncmp) {
|
||||||
RETURN_FUNC(strncmp_func, __strncmp_aarch64);
|
RETURN_FUNC(strncmp_func, __strncmp_aarch64);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
typedef size_t strnlen_func(const char*);
|
||||||
|
DEFINE_IFUNC_FOR(strnlen) {
|
||||||
|
// TODO: enable the SVE version.
|
||||||
|
RETURN_FUNC(strnlen_func, __strnlen_aarch64);
|
||||||
|
}
|
||||||
|
|
||||||
typedef char* strrchr_func(const char*, int);
|
typedef char* strrchr_func(const char*, int);
|
||||||
DEFINE_IFUNC_FOR(strrchr) {
|
DEFINE_IFUNC_FOR(strrchr) {
|
||||||
if (arg->_hwcap2 & HWCAP2_MTE) {
|
if (arg->_hwcap2 & HWCAP2_MTE) {
|
||||||
|
|
|
@ -34,6 +34,7 @@ ENTRY(name); \
|
||||||
END(name)
|
END(name)
|
||||||
|
|
||||||
FUNCTION_DELEGATE(memchr, __memchr_aarch64_mte)
|
FUNCTION_DELEGATE(memchr, __memchr_aarch64_mte)
|
||||||
|
FUNCTION_DELEGATE(memcmp, __memcmp_aarch64)
|
||||||
FUNCTION_DELEGATE(memcpy, __memcpy_aarch64)
|
FUNCTION_DELEGATE(memcpy, __memcpy_aarch64)
|
||||||
FUNCTION_DELEGATE(memmove, __memmove_aarch64)
|
FUNCTION_DELEGATE(memmove, __memmove_aarch64)
|
||||||
FUNCTION_DELEGATE(stpcpy, __stpcpy_aarch64)
|
FUNCTION_DELEGATE(stpcpy, __stpcpy_aarch64)
|
||||||
|
@ -44,5 +45,6 @@ FUNCTION_DELEGATE(strcpy, __strcpy_aarch64)
|
||||||
FUNCTION_DELEGATE(strlen, __strlen_aarch64_mte)
|
FUNCTION_DELEGATE(strlen, __strlen_aarch64_mte)
|
||||||
FUNCTION_DELEGATE(strrchr, __strrchr_aarch64_mte)
|
FUNCTION_DELEGATE(strrchr, __strrchr_aarch64_mte)
|
||||||
FUNCTION_DELEGATE(strncmp, __strncmp_aarch64)
|
FUNCTION_DELEGATE(strncmp, __strncmp_aarch64)
|
||||||
|
FUNCTION_DELEGATE(strnlen, __strnlen_aarch64)
|
||||||
|
|
||||||
NOTE_GNU_PROPERTY()
|
NOTE_GNU_PROPERTY()
|
||||||
|
|
Loading…
Reference in New Issue