Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Oct 2018 21:17:28 +0000 (UTC)
From:      Mateusz Guzik <mjg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r339348 - head/lib/libc/amd64/string
Message-ID:  <201810132117.w9DLHSg7017299@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
+}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201810132117.w9DLHSg7017299>