Merge "Track upstream arm-optimized-routines changes."

This commit is contained in:
Elliott Hughes 2023-01-25 20:21:25 +00:00 committed by Gerrit Code Review
commit 8b47a35072
2 changed files with 12 additions and 24 deletions

View file

@ -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);

View file

@ -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()