svn commit: r339348 - head/lib/libc/amd64/string
Mateusz Guzik
mjg at FreeBSD.org
Sat Oct 13 21:17:29 UTC 2018
Author: mjg
Date: Sat Oct 13 21:17:28 2018
New Revision: 339348
URL: https://svnweb.freebsd.org/changeset/base/339348
Log:
amd64: convert libc bcopy to a C func to avoid future bloat
The function is of limited use and is an almost a direct clone of
memmove/memcpy (with arguments swapped). Introduction of ERMS variants
of string routines would mean avoidable growth of libc.
bcopy will get redefined to a __builtin_memmove later on with this
symbol only left for compatibility.
Reviewed by: kib
Approved by: re (gjb)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D17539
Added:
head/lib/libc/amd64/string/bcopy.c (contents, props changed)
Deleted:
head/lib/libc/amd64/string/bcopy.S
Modified:
head/lib/libc/amd64/string/Makefile.inc
Modified: head/lib/libc/amd64/string/Makefile.inc
==============================================================================
--- head/lib/libc/amd64/string/Makefile.inc Sat Oct 13 21:15:47 2018 (r339347)
+++ head/lib/libc/amd64/string/Makefile.inc Sat Oct 13 21:17:28 2018 (r339348)
@@ -2,7 +2,6 @@
MDSRCS+= \
bcmp.S \
- bcopy.S \
bzero.S \
memcmp.S \
memcpy.S \
Added: head/lib/libc/amd64/string/bcopy.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/lib/libc/amd64/string/bcopy.c Sat Oct 13 21:17:28 2018 (r339348)
@@ -0,0 +1,15 @@
+/*-
+ * Public domain.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <string.h>
+
+void
+bcopy(const void *src, void *dst, size_t len)
+{
+
+ memmove(dst, src, len);
+}
More information about the svn-src-all
mailing list