Merge "Add (no-op) ifuncs for SVE optimized routines."

This commit is contained in:
Elliott Hughes 2023-01-27 00:06:57 +00:00 committed by Gerrit Code Review
commit b0360a94c3
2 changed files with 14 additions and 0 deletions

View file

@ -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);
DEFINE_IFUNC_FOR(memcpy) {
if (arg->_hwcap & HWCAP_ASIMD) {
@ -110,6 +116,12 @@ DEFINE_IFUNC_FOR(strncmp) {
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);
DEFINE_IFUNC_FOR(strrchr) {
if (arg->_hwcap2 & HWCAP2_MTE) {

View file

@ -34,6 +34,7 @@ ENTRY(name); \
END(name)
FUNCTION_DELEGATE(memchr, __memchr_aarch64_mte)
FUNCTION_DELEGATE(memcmp, __memcmp_aarch64)
FUNCTION_DELEGATE(memcpy, __memcpy_aarch64)
FUNCTION_DELEGATE(memmove, __memmove_aarch64)
FUNCTION_DELEGATE(stpcpy, __stpcpy_aarch64)
@ -44,5 +45,6 @@ FUNCTION_DELEGATE(strcpy, __strcpy_aarch64)
FUNCTION_DELEGATE(strlen, __strlen_aarch64_mte)
FUNCTION_DELEGATE(strrchr, __strrchr_aarch64_mte)
FUNCTION_DELEGATE(strncmp, __strncmp_aarch64)
FUNCTION_DELEGATE(strnlen, __strnlen_aarch64)
NOTE_GNU_PROPERTY()