Merge "Nullability check for utmp module"
diff --git a/libc/arch-arm64/dynamic_function_dispatch.cpp b/libc/arch-arm64/dynamic_function_dispatch.cpp
index bbd4218..0edc7f7 100644
--- a/libc/arch-arm64/dynamic_function_dispatch.cpp
+++ b/libc/arch-arm64/dynamic_function_dispatch.cpp
@@ -61,11 +61,8 @@
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 @@
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 @@
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);
diff --git a/libc/arch-arm64/static_function_dispatch.S b/libc/arch-arm64/static_function_dispatch.S
index d00f071..5c36de6 100644
--- a/libc/arch-arm64/static_function_dispatch.S
+++ b/libc/arch-arm64/static_function_dispatch.S
@@ -36,13 +36,13 @@
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()