Track upstream arm-optimized-routines changes.
The MTE-compatible routines are now faster than the incompatible ones, so they merged them upstream. I've left the ifunc boilerplate on the assumption that I'll be back later to enable the new SVE variants. Test: treehugger Change-Id: Ic894bfb350b9aa70e307bca1c4978624b3e5f4fd
This commit is contained in:
parent
98c641b096
commit
5ec0bfae50
2 changed files with 12 additions and 24 deletions
|
@ -61,11 +61,8 @@ DEFINE_IFUNC_FOR(memmove) {
|
|||
|
||||
typedef int stpcpy_func(char*, const char*);
|
||||
DEFINE_IFUNC_FOR(stpcpy) {
|
||||
if (arg->_hwcap2 & HWCAP2_MTE) {
|
||||
RETURN_FUNC(stpcpy_func, __stpcpy_aarch64_mte);
|
||||
} else {
|
||||
RETURN_FUNC(stpcpy_func, __stpcpy_aarch64);
|
||||
}
|
||||
// TODO: enable the SVE version.
|
||||
RETURN_FUNC(stpcpy_func, __stpcpy_aarch64);
|
||||
}
|
||||
|
||||
typedef char* strchr_func(const char*, int);
|
||||
|
@ -88,20 +85,14 @@ DEFINE_IFUNC_FOR(strchrnul) {
|
|||
|
||||
typedef int strcmp_func(const char*, const char*);
|
||||
DEFINE_IFUNC_FOR(strcmp) {
|
||||
if (arg->_hwcap2 & HWCAP2_MTE) {
|
||||
RETURN_FUNC(strcmp_func, __strcmp_aarch64_mte);
|
||||
} else {
|
||||
RETURN_FUNC(strcmp_func, __strcmp_aarch64);
|
||||
}
|
||||
// TODO: enable the SVE version.
|
||||
RETURN_FUNC(strcmp_func, __strcmp_aarch64);
|
||||
}
|
||||
|
||||
typedef int strcpy_func(char*, const char*);
|
||||
DEFINE_IFUNC_FOR(strcpy) {
|
||||
if (arg->_hwcap2 & HWCAP2_MTE) {
|
||||
RETURN_FUNC(strcpy_func, __strcpy_aarch64_mte);
|
||||
} else {
|
||||
RETURN_FUNC(strcpy_func, __strcpy_aarch64);
|
||||
}
|
||||
// TODO: enable the SVE version.
|
||||
RETURN_FUNC(strcpy_func, __strcpy_aarch64);
|
||||
}
|
||||
|
||||
typedef size_t strlen_func(const char*);
|
||||
|
@ -115,11 +106,8 @@ DEFINE_IFUNC_FOR(strlen) {
|
|||
|
||||
typedef int strncmp_func(const char*, const char*, int);
|
||||
DEFINE_IFUNC_FOR(strncmp) {
|
||||
if (arg->_hwcap2 & HWCAP2_MTE) {
|
||||
RETURN_FUNC(strncmp_func, __strncmp_aarch64_mte);
|
||||
} else {
|
||||
RETURN_FUNC(strncmp_func, __strncmp_aarch64);
|
||||
}
|
||||
// TODO: enable the SVE version.
|
||||
RETURN_FUNC(strncmp_func, __strncmp_aarch64);
|
||||
}
|
||||
|
||||
typedef char* strrchr_func(const char*, int);
|
||||
|
|
|
@ -36,13 +36,13 @@ END(name)
|
|||
FUNCTION_DELEGATE(memchr, __memchr_aarch64_mte)
|
||||
FUNCTION_DELEGATE(memcpy, __memcpy_aarch64)
|
||||
FUNCTION_DELEGATE(memmove, __memmove_aarch64)
|
||||
FUNCTION_DELEGATE(stpcpy, __stpcpy_aarch64_mte)
|
||||
FUNCTION_DELEGATE(stpcpy, __stpcpy_aarch64)
|
||||
FUNCTION_DELEGATE(strchr, __strchr_aarch64_mte)
|
||||
FUNCTION_DELEGATE(strchrnul, __strchrnul_aarch64_mte)
|
||||
FUNCTION_DELEGATE(strcmp, __strcmp_aarch64_mte)
|
||||
FUNCTION_DELEGATE(strcpy, __strcpy_aarch64_mte)
|
||||
FUNCTION_DELEGATE(strcmp, __strcmp_aarch64)
|
||||
FUNCTION_DELEGATE(strcpy, __strcpy_aarch64)
|
||||
FUNCTION_DELEGATE(strlen, __strlen_aarch64_mte)
|
||||
FUNCTION_DELEGATE(strrchr, __strrchr_aarch64_mte)
|
||||
FUNCTION_DELEGATE(strncmp, __strncmp_aarch64_mte)
|
||||
FUNCTION_DELEGATE(strncmp, __strncmp_aarch64)
|
||||
|
||||
NOTE_GNU_PROPERTY()
|
||||
|
|
Loading…
Reference in a new issue