[15/20] libcpu-rt-c/x86-64: Add strcat
Commit Message
* sysdeps/x86_64/Makefile (cpu-rt-c-routines): Add strcat.
* sysdeps/x86_64/multiarch/Makefile
(libcpu-rt-c-sysdep_routines): Add strcat-sse2,
strcat-sse2-unaligned and strcat-ssse3.
* sysdeps/x86_64/strcat.S: Support libcpu-rt-c.
* sysdeps/x86_64/multiarch/strcat-sse2-unaligned.S: Likewise.
* sysdeps/x86_64/multiarch/strcat-sse2.S: Likewise.
* sysdeps/x86_64/multiarch/strcat-ssse3.S: Likewise.
* sysdeps/x86_64/multiarch/strcat.c: Likewise.
---
sysdeps/x86_64/Makefile | 2 +-
sysdeps/x86_64/multiarch/Makefile | 2 ++
sysdeps/x86_64/multiarch/strcat-sse2-unaligned.S | 2 +-
sysdeps/x86_64/multiarch/strcat-sse2.S | 2 +-
sysdeps/x86_64/multiarch/strcat-ssse3.S | 2 +-
sysdeps/x86_64/multiarch/strcat.c | 4 ++--
sysdeps/x86_64/strcat.S | 2 ++
7 files changed, 10 insertions(+), 6 deletions(-)
@@ -148,7 +148,7 @@ endif
ifeq ($(subdir),cpu-rt-c)
cpu-rt-c-routines += memchr memcmp memcpy memmove mempcpy memrchr \
- memset strchr strcmp strcpy strlen \
+ memset strcat strchr strcmp strcpy strlen \
wmemset
# For the CPU run-time tests.
@@ -81,6 +81,8 @@ libcpu-rt-c-sysdep_routines += memchr-sse2 memchr-avx2 \
memset-avx2-unaligned-erms \
memset-avx512-unaligned-erms \
memset-avx512-no-vzeroupper \
+ strcat-sse2 strcat-sse2-unaligned \
+ strcat-ssse3 \
strchr-sse2-no-bsf strchr-sse2 \
strchr-avx2 strcmp-sse2 \
strcmp-sse2-unaligned strcmp-ssse3 \
@@ -17,7 +17,7 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#if IS_IN (libc)
+#if IS_IN (libc) || IS_IN (libcpu_rt_c)
# include <sysdep.h>
@@ -16,7 +16,7 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#if IS_IN (libc)
+#if IS_IN (libc) || IS_IN (libcpu_rt_c)
# include <sysdep.h>
# define strcat __strcat_sse2
@@ -17,7 +17,7 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#if IS_IN (libc)
+#if IS_IN (libc) || IS_IN (libcpu_rt_c)
# include <sysdep.h>
@@ -18,7 +18,7 @@
<http://www.gnu.org/licenses/>. */
/* Define multiple versions only for the definition in libc. */
-#if IS_IN (libc)
+#if IS_IN (libc) || IS_IN (libcpu_rt_c)
# define strcat __redirect_strcat
# include <string.h>
# undef strcat
@@ -28,7 +28,7 @@
libc_ifunc_redirected (__redirect_strcat, strcat, IFUNC_SELECTOR ());
-# ifdef SHARED
+# if defined SHARED && !IS_IN (libcpu_rt_c)
__hidden_ver1 (strcat, __GI_strcat, __redirect_strcat)
__attribute__ ((visibility ("hidden")));
# endif
@@ -255,4 +255,6 @@ ENTRY (strcat)
movq %rdi, %rax /* Source is return value. */
retq
END (strcat)
+#if !IS_IN (libcpu_rt_c)
libc_hidden_builtin_def (strcat)
+#endif