x86, x86_64: Add __memcpy_chk assembly versions.
Implement __memcpy_chk() in assembly for x86 and x86_64 and remove the
conditionally-compiled C fallback now that all supported architectures
have an external implementation.
Bug: 389669171
Test: mma
Test: ./tests/run-on-host.sh 32 --gtest_filter='*memcpy*'
Test: ./tests/run-on-host.sh 64 --gtest_filter='*memcpy*'
Change-Id: I755fdd348f2f380e7c40bc57dc1f4d36d791b1c0
diff --git a/libc/arch-x86_64/string/sse2-memmove-slm.S b/libc/arch-x86_64/string/sse2-memmove-slm.S
index b787385..9f5fb12 100644
--- a/libc/arch-x86_64/string/sse2-memmove-slm.S
+++ b/libc/arch-x86_64/string/sse2-memmove-slm.S
@@ -99,6 +99,11 @@
#define RETURN RETURN_END;
.section .text.sse2,"ax",@progbits
+ENTRY (__memcpy_chk)
+ cmp %rcx, %rdx
+ ja __memcpy_chk_fail
+/* Fall through to memcpy/memmove. */
+END (__memcpy_chk)
ENTRY (MEMMOVE)
ENTRANCE
mov %rdi, %rax