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 Some boot blocks too big now, only co...
details: https://anonhg.NetBSD.org/src/rev/49dce89bae5d
branches: trunk
changeset: 1006850:49dce89bae5d
user: ad <ad%NetBSD.org@localhost>
date: Wed Jan 29 09:18:26 2020 +0000
description:
Some boot blocks too big now, only compare in big chunks if !_STANDALONE.
diffstat:
common/lib/libc/string/bcmp.c | 12 +++++++++---
common/lib/libc/string/memcmp.c | 12 +++++++++---
2 files changed, 18 insertions(+), 6 deletions(-)
diffs (82 lines):
diff -r ca5d116bc3c2 -r 49dce89bae5d common/lib/libc/string/bcmp.c
--- a/common/lib/libc/string/bcmp.c Wed Jan 29 08:43:30 2020 +0000
+++ b/common/lib/libc/string/bcmp.c Wed Jan 29 09:18:26 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bcmp.c,v 1.9 2020/01/27 22:22:03 ad Exp $ */
+/* $NetBSD: bcmp.c,v 1.10 2020/01/29 09:18:26 ad Exp $ */
/*-
* Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -63,7 +63,7 @@
#if 0
static char sccsid[] = "@(#)bcmp.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: bcmp.c,v 1.9 2020/01/27 22:22:03 ad Exp $");
+__RCSID("$NetBSD: bcmp.c,v 1.10 2020/01/29 09:18:26 ad Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -86,8 +86,10 @@
int
bcmp(const void *s1, const void *s2, size_t n)
{
+ const unsigned char *c1, *c2;
+
+#ifndef _STANDALONE
const uintptr_t *b1, *b2;
- const unsigned char *c1, *c2;
b1 = s1;
b2 = s2;
@@ -105,6 +107,10 @@
c1 = (const unsigned char *)b1;
c2 = (const unsigned char *)b2;
+#else
+ c1 = (const unsigned char *)s1;
+ c2 = (const unsigned char *)s2;
+#endif
if (n != 0) {
do {
diff -r ca5d116bc3c2 -r 49dce89bae5d common/lib/libc/string/memcmp.c
--- a/common/lib/libc/string/memcmp.c Wed Jan 29 08:43:30 2020 +0000
+++ b/common/lib/libc/string/memcmp.c Wed Jan 29 09:18:26 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: memcmp.c,v 1.7 2020/01/27 22:22:03 ad Exp $ */
+/* $NetBSD: memcmp.c,v 1.8 2020/01/29 09:18:26 ad Exp $ */
/*-
* Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@
#if 0
static char sccsid[] = "@(#)memcmp.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: memcmp.c,v 1.7 2020/01/27 22:22:03 ad Exp $");
+__RCSID("$NetBSD: memcmp.c,v 1.8 2020/01/29 09:18:26 ad Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -86,8 +86,10 @@
int
memcmp(const void *s1, const void *s2, size_t n)
{
+ const unsigned char *c1, *c2;
+
+#ifndef _STANDALONE
const uintptr_t *b1, *b2;
- const unsigned char *c1, *c2;
b1 = s1;
b2 = s2;
@@ -107,6 +109,10 @@
c1 = (const unsigned char *)b1;
c2 = (const unsigned char *)b2;
+#else
+ c1 = (const unsigned char *)s1;
+ c2 = (const unsigned char *)s2;
+#endif
if (n != 0) {
do {
Home |
Main Index |
Thread Index |
Old Index