libc: simplify ssse3 detection
Since ssse3 is required as part of Android's ABI, even for 32-bit x86
(https://developer.android.com/ndk/guides/abis#sa), we can simplify
these ifuncs away.
Bug: 358360849
Test: mma
Change-Id: Ife68c7f492cc1b179aa332c12ab35b2ad6b9795a
diff --git a/libc/Android.bp b/libc/Android.bp
index 30e201a..8ff5fff 100644
--- a/libc/Android.bp
+++ b/libc/Android.bp
@@ -1181,16 +1181,6 @@
"arch-x86/bionic/__x86.get_pc_thunk.S",
"arch-x86/generic/string/memcmp.S",
- "arch-x86/generic/string/strcmp.S",
- "arch-x86/generic/string/strncmp.S",
- "arch-x86/generic/string/strcat.S",
-
- "arch-x86/generic/string/strlcat.c",
- "arch-x86/generic/string/strlcpy.c",
- "arch-x86/generic/string/strncat.c",
- "arch-x86/generic/string/wcscat.c",
- "arch-x86/generic/string/wcscpy.c",
- "arch-x86/generic/string/wmemcmp.c",
"arch-x86/string/sse2-memchr-atom.S",
"arch-x86/string/sse2-memmove-slm.S",
diff --git a/libc/arch-x86/dynamic_function_dispatch.cpp b/libc/arch-x86/dynamic_function_dispatch.cpp
index 9d7a4c9..e6cc5fb 100644
--- a/libc/arch-x86/dynamic_function_dispatch.cpp
+++ b/libc/arch-x86/dynamic_function_dispatch.cpp
@@ -84,89 +84,11 @@
}
STRLEN_SHIM()
-DEFINE_IFUNC_FOR(strcmp) {
- __builtin_cpu_init();
- // TODO: ssse3 is required by our x86 abi!
- if (__builtin_cpu_supports("ssse3")) RETURN_FUNC(strcmp_func_t, strcmp_ssse3);
- RETURN_FUNC(strcmp_func_t, strcmp_generic);
-}
-STRCMP_SHIM()
-
-DEFINE_IFUNC_FOR(strncmp) {
- __builtin_cpu_init();
- // TODO: ssse3 is required by our x86 abi!
- if (__builtin_cpu_supports("ssse3"))
- RETURN_FUNC(strncmp_func_t, strncmp_ssse3);
- RETURN_FUNC(strncmp_func_t, strncmp_generic);
-}
-STRNCMP_SHIM()
-
-DEFINE_IFUNC_FOR(strcat) {
- __builtin_cpu_init();
- // TODO: ssse3 is required by our x86 abi!
- if (__builtin_cpu_supports("ssse3")) RETURN_FUNC(strcat_func_t, strcat_ssse3);
- RETURN_FUNC(strcat_func_t, strcat_generic);
-}
-STRCAT_SHIM()
-
-DEFINE_IFUNC_FOR(strncat) {
- __builtin_cpu_init();
- // TODO: ssse3 is required by our x86 abi!
- if (__builtin_cpu_supports("ssse3")) RETURN_FUNC(strncat_func_t, strncat_ssse3);
- RETURN_FUNC(strncat_func_t, strncat_openbsd);
-}
-STRNCAT_SHIM()
-
-typedef size_t strlcat_func_t(char*, const char*, size_t);
-DEFINE_IFUNC_FOR(strlcat) {
- __builtin_cpu_init();
- // TODO: ssse3 is required by our x86 abi!
- if (__builtin_cpu_supports("ssse3")) RETURN_FUNC(strlcat_func_t, strlcat_ssse3);
- RETURN_FUNC(strlcat_func_t, strlcat_openbsd);
-}
-DEFINE_STATIC_SHIM(size_t strlcat(char* dst, const char* src, size_t n) {
- FORWARD(strlcat)(dst, src, n);
-})
-
-typedef size_t strlcpy_func_t(char*, const char*, size_t);
-DEFINE_IFUNC_FOR(strlcpy) {
- __builtin_cpu_init();
- // TODO: ssse3 is required by our x86 abi!
- if (__builtin_cpu_supports("ssse3")) RETURN_FUNC(strlcpy_func_t, strlcpy_ssse3);
- RETURN_FUNC(strlcpy_func_t, strlcpy_openbsd);
-}
-DEFINE_STATIC_SHIM(size_t strlcpy(char* dst, const char* src, size_t n) {
- FORWARD(strlcpy)(dst, src, n);
-})
-
-typedef wchar_t* wcscat_func_t(wchar_t*, const wchar_t*);
-DEFINE_IFUNC_FOR(wcscat) {
- __builtin_cpu_init();
- // TODO: ssse3 is required by our x86 abi!
- if (__builtin_cpu_supports("ssse3")) RETURN_FUNC(wcscat_func_t, wcscat_ssse3);
- RETURN_FUNC(wcscat_func_t, wcscat_freebsd);
-}
-DEFINE_STATIC_SHIM(wchar_t* wcscat(wchar_t* dst, const wchar_t* src) {
- FORWARD(wcscat)(dst, src);
-})
-
-typedef wchar_t* wcscpy_func_t(wchar_t*, const wchar_t*);
-DEFINE_IFUNC_FOR(wcscpy) {
- __builtin_cpu_init();
- // TODO: ssse3 is required by our x86 abi!
- if (__builtin_cpu_supports("ssse3")) RETURN_FUNC(wcscpy_func_t, wcscpy_ssse3);
- RETURN_FUNC(wcscpy_func_t, wcscpy_freebsd);
-}
-DEFINE_STATIC_SHIM(wchar_t* wcscpy(wchar_t* dst, const wchar_t* src) {
- FORWARD(wcscpy)(dst, src);
-})
-
typedef int wmemcmp_func_t(const wchar_t*, const wchar_t*, size_t);
DEFINE_IFUNC_FOR(wmemcmp) {
__builtin_cpu_init();
if (__builtin_cpu_supports("sse4.1")) RETURN_FUNC(wmemcmp_func_t, wmemcmp_sse4);
- if (__builtin_cpu_is("atom")) RETURN_FUNC(wmemcmp_func_t, wmemcmp_atom);
- RETURN_FUNC(wmemcmp_func_t, wmemcmp_freebsd);
+ RETURN_FUNC(wmemcmp_func_t, wmemcmp_atom);
}
DEFINE_STATIC_SHIM(int wmemcmp(const wchar_t* lhs, const wchar_t* rhs, size_t n) {
FORWARD(wmemcmp)(lhs, rhs, n);
diff --git a/libc/arch-x86/generic/string/strcat.S b/libc/arch-x86/generic/string/strcat.S
deleted file mode 100644
index e2e9623..0000000
--- a/libc/arch-x86/generic/string/strcat.S
+++ /dev/null
@@ -1,74 +0,0 @@
-/* $OpenBSD: strcat.S,v 1.8 2005/08/07 11:30:38 espie Exp $ */
-/*
- * Written by J.T. Conklin <jtc@netbsd.org>.
- * Public domain.
- */
-
-#include <private/bionic_asm.h>
-
-#if defined(APIWARN)
-#APP
- .section .gnu.warning.strcat
- .ascii "warning: strcat() is almost always misused, please use strlcat()"
-#NO_APP
-#endif
-
-/*
- * NOTE: I've unrolled the loop eight times: large enough to make a
- * significant difference, and small enough not to totally trash the
- * cache.
- */
-
-ENTRY(strcat_generic)
- pushl %edi /* save edi */
- movl 8(%esp),%edi /* dst address */
- movl 12(%esp),%edx /* src address */
- pushl %edi /* push destination address */
-
- cld /* set search forward */
- xorl %eax,%eax /* set search for null terminator */
- movl $-1,%ecx /* set search for lots of characters */
- repne /* search! */
- scasb
-
- leal -1(%edi),%ecx /* correct dst address */
-
- .align 2,0x90
-L1: movb (%edx),%al /* unroll loop, but not too much */
- movb %al,(%ecx)
- testb %al,%al
- jz L2
- movb 1(%edx),%al
- movb %al,1(%ecx)
- testb %al,%al
- jz L2
- movb 2(%edx),%al
- movb %al,2(%ecx)
- testb %al,%al
- jz L2
- movb 3(%edx),%al
- movb %al,3(%ecx)
- testb %al,%al
- jz L2
- movb 4(%edx),%al
- movb %al,4(%ecx)
- testb %al,%al
- jz L2
- movb 5(%edx),%al
- movb %al,5(%ecx)
- testb %al,%al
- jz L2
- movb 6(%edx),%al
- movb %al,6(%ecx)
- testb %al,%al
- jz L2
- movb 7(%edx),%al
- movb %al,7(%ecx)
- addl $8,%edx
- addl $8,%ecx
- testb %al,%al
- jnz L1
-L2: popl %eax /* pop destination address */
- popl %edi /* restore edi */
- ret
-END(strcat_generic)
diff --git a/libc/arch-x86/generic/string/strcmp.S b/libc/arch-x86/generic/string/strcmp.S
deleted file mode 100644
index 7b003e8..0000000
--- a/libc/arch-x86/generic/string/strcmp.S
+++ /dev/null
@@ -1,82 +0,0 @@
-/* $OpenBSD: strcmp.S,v 1.3 2005/08/07 11:30:38 espie Exp $ */
-/*
- * Written by J.T. Conklin <jtc@netbsd.org>.
- * Public domain.
- */
-
-#include <private/bionic_asm.h>
-
-/*
- * NOTE: I've unrolled the loop eight times: large enough to make a
- * significant difference, and small enough not to totally trash the
- * cache.
- */
-
-ENTRY(strcmp_generic)
- movl 0x04(%esp),%eax
- movl 0x08(%esp),%edx
- jmp L2 /* Jump into the loop! */
-
- .align 2,0x90
-L1: incl %eax
- incl %edx
-L2: movb (%eax),%cl
- testb %cl,%cl /* null terminator??? */
- jz L3
- cmpb %cl,(%edx) /* chars match??? */
- jne L3
- incl %eax
- incl %edx
- movb (%eax),%cl
- testb %cl,%cl
- jz L3
- cmpb %cl,(%edx)
- jne L3
- incl %eax
- incl %edx
- movb (%eax),%cl
- testb %cl,%cl
- jz L3
- cmpb %cl,(%edx)
- jne L3
- incl %eax
- incl %edx
- movb (%eax),%cl
- testb %cl,%cl
- jz L3
- cmpb %cl,(%edx)
- jne L3
- incl %eax
- incl %edx
- movb (%eax),%cl
- testb %cl,%cl
- jz L3
- cmpb %cl,(%edx)
- jne L3
- incl %eax
- incl %edx
- movb (%eax),%cl
- testb %cl,%cl
- jz L3
- cmpb %cl,(%edx)
- jne L3
- incl %eax
- incl %edx
- movb (%eax),%cl
- testb %cl,%cl
- jz L3
- cmpb %cl,(%edx)
- jne L3
- incl %eax
- incl %edx
- movb (%eax),%cl
- testb %cl,%cl
- jz L3
- cmpb %cl,(%edx)
- je L1
- .align 2, 0x90
-L3: movzbl (%eax),%eax /* unsigned comparison */
- movzbl (%edx),%edx
- subl %edx,%eax
- ret
-END(strcmp_generic)
diff --git a/libc/arch-x86/generic/string/strlcat.c b/libc/arch-x86/generic/string/strlcat.c
deleted file mode 100644
index 95c34a3..0000000
--- a/libc/arch-x86/generic/string/strlcat.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <upstream-openbsd/android/include/openbsd-compat.h>
-
-#define strlcat strlcat_openbsd
-#include <upstream-openbsd/lib/libc/string/strlcat.c>
diff --git a/libc/arch-x86/generic/string/strlcpy.c b/libc/arch-x86/generic/string/strlcpy.c
deleted file mode 100644
index 8d4047c..0000000
--- a/libc/arch-x86/generic/string/strlcpy.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <upstream-openbsd/android/include/openbsd-compat.h>
-
-#define strlcpy strlcpy_openbsd
-#include <upstream-openbsd/lib/libc/string/strlcpy.c>
diff --git a/libc/arch-x86/generic/string/strncat.c b/libc/arch-x86/generic/string/strncat.c
deleted file mode 100644
index 687e560..0000000
--- a/libc/arch-x86/generic/string/strncat.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <upstream-openbsd/android/include/openbsd-compat.h>
-
-#define strncat strncat_openbsd
-#include <upstream-openbsd/lib/libc/string/strncat.c>
diff --git a/libc/arch-x86/generic/string/strncmp.S b/libc/arch-x86/generic/string/strncmp.S
deleted file mode 100644
index 6d9f23c..0000000
--- a/libc/arch-x86/generic/string/strncmp.S
+++ /dev/null
@@ -1,114 +0,0 @@
-/* $OpenBSD: strncmp.S,v 1.3 2005/08/07 11:30:38 espie Exp $ */
-/*
- * Written by J.T. Conklin <jtc@netbsd.org>.
- * Public domain.
- */
-
-#include <private/bionic_asm.h>
-
-/*
- * NOTE: I've unrolled the loop eight times: large enough to make a
- * significant difference, and small enough not to totally trash the
- * cache.
- */
-
-ENTRY(strncmp_generic)
- pushl %ebx
- movl 8(%esp),%eax
- movl 12(%esp),%ecx
- movl 16(%esp),%edx
- testl %edx,%edx
- jmp L2 /* Jump into the loop! */
-
- .align 2,0x90
-L1: incl %eax
- incl %ecx
- decl %edx
-L2: jz L4 /* strings are equal */
- movb (%eax),%bl
- testb %bl,%bl
- jz L3
- cmpb %bl,(%ecx)
- jne L3
-
- incl %eax
- incl %ecx
- decl %edx
- jz L4
- movb (%eax),%bl
- testb %bl,%bl
- jz L3
- cmpb %bl,(%ecx)
- jne L3
-
- incl %eax
- incl %ecx
- decl %edx
- jz L4
- movb (%eax),%bl
- testb %bl,%bl
- jz L3
- cmpb %bl,(%ecx)
- jne L3
-
- incl %eax
- incl %ecx
- decl %edx
- jz L4
- movb (%eax),%bl
- testb %bl,%bl
- jz L3
- cmpb %bl,(%ecx)
- jne L3
-
- incl %eax
- incl %ecx
- decl %edx
- jz L4
- movb (%eax),%bl
- testb %bl,%bl
- jz L3
- cmpb %bl,(%ecx)
- jne L3
-
- incl %eax
- incl %ecx
- decl %edx
- jz L4
- movb (%eax),%bl
- testb %bl,%bl
- jz L3
- cmpb %bl,(%ecx)
- jne L3
-
- incl %eax
- incl %ecx
- decl %edx
- jz L4
- movb (%eax),%bl
- testb %bl,%bl
- jz L3
- cmpb %bl,(%ecx)
- jne L3
-
- incl %eax
- incl %ecx
- decl %edx
- jz L4
- movb (%eax),%bl
- testb %bl,%bl
- jz L3
- cmpb %bl,(%ecx)
- je L1
-
- .align 2,0x90
-L3: movzbl (%eax),%eax /* unsigned comparision */
- movzbl (%ecx),%ecx
- subl %ecx,%eax
- popl %ebx
- ret
- .align 2,0x90
-L4: xorl %eax,%eax
- popl %ebx
- ret
-END(strncmp_generic)
diff --git a/libc/arch-x86/generic/string/wcscat.c b/libc/arch-x86/generic/string/wcscat.c
deleted file mode 100644
index a102551..0000000
--- a/libc/arch-x86/generic/string/wcscat.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#define wcscat wcscat_freebsd
-#include <upstream-freebsd/lib/libc/string/wcscat.c>
diff --git a/libc/arch-x86/generic/string/wcscpy.c b/libc/arch-x86/generic/string/wcscpy.c
deleted file mode 100644
index 10fb66d..0000000
--- a/libc/arch-x86/generic/string/wcscpy.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#define wcscpy wcscpy_freebsd
-#include <upstream-freebsd/lib/libc/string/wcscpy.c>
diff --git a/libc/arch-x86/generic/string/wmemcmp.c b/libc/arch-x86/generic/string/wmemcmp.c
deleted file mode 100644
index 9d5e929..0000000
--- a/libc/arch-x86/generic/string/wmemcmp.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#define wmemcmp wmemcmp_freebsd
-#include <upstream-freebsd/lib/libc/string/wmemcmp.c>
diff --git a/libc/arch-x86/string/ssse3-strcat-atom.S b/libc/arch-x86/string/ssse3-strcat-atom.S
index 8d8e89d..b851d9e 100644
--- a/libc/arch-x86/string/ssse3-strcat-atom.S
+++ b/libc/arch-x86/string/ssse3-strcat-atom.S
@@ -87,7 +87,7 @@
#define POP(REG) popl REG; CFI_POP (REG)
#ifndef STRCAT
-# define STRCAT strcat_ssse3
+# define STRCAT strcat
#endif
#define PARMS 4
diff --git a/libc/arch-x86/string/ssse3-strcmp-atom.S b/libc/arch-x86/string/ssse3-strcmp-atom.S
index 08f6d4a..ee253b9 100644
--- a/libc/arch-x86/string/ssse3-strcmp-atom.S
+++ b/libc/arch-x86/string/ssse3-strcmp-atom.S
@@ -108,7 +108,7 @@
#endif
#ifndef STRCMP
-# define STRCMP strcmp_ssse3
+# define STRCMP strcmp
#endif
.section .text.ssse3,"ax",@progbits
diff --git a/libc/arch-x86/string/ssse3-strlcat-atom.S b/libc/arch-x86/string/ssse3-strlcat-atom.S
index 055b489..daaf254 100644
--- a/libc/arch-x86/string/ssse3-strlcat-atom.S
+++ b/libc/arch-x86/string/ssse3-strlcat-atom.S
@@ -82,7 +82,7 @@
#define LEN SRC+4
.text
-ENTRY (strlcat_ssse3)
+ENTRY (strlcat)
mov DST(%esp), %edx
PUSH (%ebx)
mov LEN(%esp), %ebx
diff --git a/libc/arch-x86/string/ssse3-strlcpy-atom.S b/libc/arch-x86/string/ssse3-strlcpy-atom.S
index 1671da6..cdb17cc 100644
--- a/libc/arch-x86/string/ssse3-strlcpy-atom.S
+++ b/libc/arch-x86/string/ssse3-strlcpy-atom.S
@@ -29,8 +29,8 @@
*/
#define USE_AS_STRNCPY
-#define STRCPY strlcpy_ssse3
-#define STRLEN strlcpy_ssse3
+#define STRCPY strlcpy
+#define STRLEN strlcpy
#define USE_AS_STRLCPY
#include "ssse3-strcpy-atom.S"
diff --git a/libc/arch-x86/string/ssse3-strncat-atom.S b/libc/arch-x86/string/ssse3-strncat-atom.S
index ccb08a7..5618771 100644
--- a/libc/arch-x86/string/ssse3-strncat-atom.S
+++ b/libc/arch-x86/string/ssse3-strncat-atom.S
@@ -28,7 +28,7 @@
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#define STRCAT strncat_ssse3
+#define STRCAT strncat
#define USE_AS_STRNCAT
#include "ssse3-strcat-atom.S"
diff --git a/libc/arch-x86/string/ssse3-strncmp-atom.S b/libc/arch-x86/string/ssse3-strncmp-atom.S
index 2bf5002..234f728 100644
--- a/libc/arch-x86/string/ssse3-strncmp-atom.S
+++ b/libc/arch-x86/string/ssse3-strncmp-atom.S
@@ -30,6 +30,5 @@
#define USE_AS_STRNCMP
-#define STRCMP strncmp_ssse3
+#define STRCMP strncmp
#include "ssse3-strcmp-atom.S"
-
diff --git a/libc/arch-x86/string/ssse3-wcscat-atom.S b/libc/arch-x86/string/ssse3-wcscat-atom.S
index a307983..8a389a3 100644
--- a/libc/arch-x86/string/ssse3-wcscat-atom.S
+++ b/libc/arch-x86/string/ssse3-wcscat-atom.S
@@ -85,7 +85,7 @@
#define USE_AS_WCSCAT
.text
-ENTRY (wcscat_ssse3)
+ENTRY (wcscat)
PUSH (%edi)
mov STR1(%esp), %edi
mov %edi, %edx
@@ -111,4 +111,4 @@
#define RETURN POP(%edi); ret; CFI_PUSH(%edi)
#include "ssse3-wcscpy-atom.S"
-END (wcscat_ssse3)
+END (wcscat)
diff --git a/libc/arch-x86/string/ssse3-wcscpy-atom.S b/libc/arch-x86/string/ssse3-wcscpy-atom.S
index 80aa15f..27cb61e 100644
--- a/libc/arch-x86/string/ssse3-wcscpy-atom.S
+++ b/libc/arch-x86/string/ssse3-wcscpy-atom.S
@@ -88,7 +88,7 @@
# define LEN STR2+4
.text
-ENTRY (wcscpy_ssse3)
+ENTRY (wcscpy)
mov STR1(%esp), %edx
mov STR2(%esp), %ecx
@@ -648,5 +648,5 @@
ret
#ifndef USE_AS_WCSCAT
-END (wcscpy_ssse3)
+END (wcscpy)
#endif