Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/common/lib/libc/string Disable the larger/faster code path. ...



details:   https://anonhg.NetBSD.org/src/rev/e1d6af8af56e
branches:  trunk
changeset: 982557:e1d6af8af56e
user:      simonb <simonb%NetBSD.org@localhost>
date:      Sat Apr 17 05:57:11 2021 +0000

description:
Disable the larger/faster code path.  While the optimised code path was
indeed quicker, it nonetheless failed to actually fill all the requested
memory with the specified value much of the time if a non-aligned start
address was used.

diffstat:

 common/lib/libc/string/memset2.c |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diffs (21 lines):

diff -r 7654a4ac9174 -r e1d6af8af56e common/lib/libc/string/memset2.c
--- a/common/lib/libc/string/memset2.c  Sat Apr 17 04:11:52 2021 +0000
+++ b/common/lib/libc/string/memset2.c  Sat Apr 17 05:57:11 2021 +0000
@@ -29,7 +29,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: memset2.c,v 1.5 2012/03/02 16:22:27 apb Exp $");
+__RCSID("$NetBSD: memset2.c,v 1.6 2021/04/17 05:57:11 simonb Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include <sys/types.h>
@@ -47,6 +47,8 @@
 #include <sys/endian.h>
 #include <machine/types.h>
 
+#define __OPTIMIZE_SIZE__      /* other code path is very broken */
+
 #ifdef TEST
 #include <assert.h>
 #define _DIAGASSERT(a)         assert(a)



Home | Main Index | Thread Index | Old Index