Module Name:    src
Committed By:   jakllsch
Date:           Sat Mar 22 19:16:34 UTC 2014

Modified Files:
        src/common/lib/libc/arch/x86_64/string: bcmp.S bcopy.S ffs.S memchr.S
            memcmp.S strcat.S strchr.S strcmp.S strcpy.S strlen.S strrchr.S

Log Message:
For all x86_64 string assembly functions that don't overlap (i.e. every
one except memset and bzero) use END() so that symbol size information
is available.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/common/lib/libc/arch/x86_64/string/bcmp.S \
    src/common/lib/libc/arch/x86_64/string/memcmp.S \
    src/common/lib/libc/arch/x86_64/string/strrchr.S
cvs rdiff -u -r1.4 -r1.5 src/common/lib/libc/arch/x86_64/string/bcopy.S \
    src/common/lib/libc/arch/x86_64/string/ffs.S
cvs rdiff -u -r1.5 -r1.6 src/common/lib/libc/arch/x86_64/string/memchr.S \
    src/common/lib/libc/arch/x86_64/string/strlen.S
cvs rdiff -u -r1.1 -r1.2 src/common/lib/libc/arch/x86_64/string/strcat.S \
    src/common/lib/libc/arch/x86_64/string/strcmp.S \
    src/common/lib/libc/arch/x86_64/string/strcpy.S
cvs rdiff -u -r1.6 -r1.7 src/common/lib/libc/arch/x86_64/string/strchr.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/common/lib/libc/arch/x86_64/string/bcmp.S
diff -u src/common/lib/libc/arch/x86_64/string/bcmp.S:1.2 src/common/lib/libc/arch/x86_64/string/bcmp.S:1.3
--- src/common/lib/libc/arch/x86_64/string/bcmp.S:1.2	Mon Nov 12 18:41:59 2007
+++ src/common/lib/libc/arch/x86_64/string/bcmp.S	Sat Mar 22 19:16:34 2014
@@ -1,7 +1,7 @@
 #include <machine/asm.h>
 
 #if defined(LIBC_SCCS)
-	RCSID("$NetBSD: bcmp.S,v 1.2 2007/11/12 18:41:59 ad Exp $")
+	RCSID("$NetBSD: bcmp.S,v 1.3 2014/03/22 19:16:34 jakllsch Exp $")
 #endif
 
 ENTRY(bcmp)
@@ -21,3 +21,4 @@ ENTRY(bcmp)
 
 L1:	incl	%eax
 L2:	ret
+END(bcmp)
Index: src/common/lib/libc/arch/x86_64/string/memcmp.S
diff -u src/common/lib/libc/arch/x86_64/string/memcmp.S:1.2 src/common/lib/libc/arch/x86_64/string/memcmp.S:1.3
--- src/common/lib/libc/arch/x86_64/string/memcmp.S:1.2	Mon Nov 12 18:41:59 2007
+++ src/common/lib/libc/arch/x86_64/string/memcmp.S	Sat Mar 22 19:16:34 2014
@@ -7,7 +7,7 @@
 #include <machine/asm.h>
 
 #if defined(LIBC_SCCS)
-	RCSID("$NetBSD: memcmp.S,v 1.2 2007/11/12 18:41:59 ad Exp $")
+	RCSID("$NetBSD: memcmp.S,v 1.3 2014/03/22 19:16:34 jakllsch Exp $")
 #endif
 
 ENTRY(memcmp)
@@ -37,3 +37,4 @@ L6:	xorl	%eax,%eax		/* Perform unsigned 
 	movb	-1(%rsi),%dl
 	subl    %edx,%eax
 	ret
+END(memcmp)
Index: src/common/lib/libc/arch/x86_64/string/strrchr.S
diff -u src/common/lib/libc/arch/x86_64/string/strrchr.S:1.2 src/common/lib/libc/arch/x86_64/string/strrchr.S:1.3
--- src/common/lib/libc/arch/x86_64/string/strrchr.S:1.2	Fri Jul 17 19:37:57 2009
+++ src/common/lib/libc/arch/x86_64/string/strrchr.S	Sat Mar 22 19:16:34 2014
@@ -6,7 +6,7 @@
 #include <machine/asm.h>
 
 #if defined(LIBC_SCCS)
-	RCSID("$NetBSD: strrchr.S,v 1.2 2009/07/17 19:37:57 dsl Exp $")
+	RCSID("$NetBSD: strrchr.S,v 1.3 2014/03/22 19:16:34 jakllsch Exp $")
 #endif
 
 ENTRY(strrchr)
@@ -120,5 +120,6 @@ ENTRY(strrchr)
 
 .Ldone:
 	ret
+END(strrchr)
 
 STRONG_ALIAS(rindex,strrchr)

Index: src/common/lib/libc/arch/x86_64/string/bcopy.S
diff -u src/common/lib/libc/arch/x86_64/string/bcopy.S:1.4 src/common/lib/libc/arch/x86_64/string/bcopy.S:1.5
--- src/common/lib/libc/arch/x86_64/string/bcopy.S:1.4	Sun Nov 22 17:25:47 2009
+++ src/common/lib/libc/arch/x86_64/string/bcopy.S	Sat Mar 22 19:16:34 2014
@@ -32,7 +32,7 @@
 #include <machine/asm.h>
 
 #if defined(LIBC_SCCS)
-	RCSID("$NetBSD: bcopy.S,v 1.4 2009/11/22 17:25:47 dsl Exp $")
+	RCSID("$NetBSD: bcopy.S,v 1.5 2014/03/22 19:16:34 jakllsch Exp $")
 #endif
 
 	/*
@@ -158,3 +158,13 @@ ENTRY(bcopy)
 	cld
 	ret
 #endif
+
+#ifdef MEMCOPY
+END(memcpy)
+#else
+#ifdef MEMMOVE
+END(memmove)
+#else
+END(bcopy)
+#endif
+#endif
Index: src/common/lib/libc/arch/x86_64/string/ffs.S
diff -u src/common/lib/libc/arch/x86_64/string/ffs.S:1.4 src/common/lib/libc/arch/x86_64/string/ffs.S:1.5
--- src/common/lib/libc/arch/x86_64/string/ffs.S:1.4	Mon Jul 20 15:21:00 2009
+++ src/common/lib/libc/arch/x86_64/string/ffs.S	Sat Mar 22 19:16:34 2014
@@ -7,7 +7,7 @@
 #include <machine/asm.h>
 
 #if defined(LIBC_SCCS)
-	RCSID("$NetBSD: ffs.S,v 1.4 2009/07/20 15:21:00 christos Exp $")
+	RCSID("$NetBSD: ffs.S,v 1.5 2014/03/22 19:16:34 jakllsch Exp $")
 #endif
 
 ENTRY(ffs)
@@ -18,3 +18,4 @@ ENTRY(ffs)
 
 1:	xorl	%eax,%eax		/* clear result */
 	ret
+END(ffs)

Index: src/common/lib/libc/arch/x86_64/string/memchr.S
diff -u src/common/lib/libc/arch/x86_64/string/memchr.S:1.5 src/common/lib/libc/arch/x86_64/string/memchr.S:1.6
--- src/common/lib/libc/arch/x86_64/string/memchr.S:1.5	Sat Aug  1 20:47:02 2009
+++ src/common/lib/libc/arch/x86_64/string/memchr.S	Sat Mar 22 19:16:34 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: memchr.S,v 1.5 2009/08/01 20:47:02 dsl Exp $	*/
+/*	$NetBSD: memchr.S,v 1.6 2014/03/22 19:16:34 jakllsch Exp $	*/
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
 #include <machine/asm.h>
 
 #if defined(LIBC_SCCS)
-	RCSID("$NetBSD: memchr.S,v 1.5 2009/08/01 20:47:02 dsl Exp $")
+	RCSID("$NetBSD: memchr.S,v 1.6 2014/03/22 19:16:34 jakllsch Exp $")
 #endif
 
 /*
@@ -106,3 +106,4 @@ ENTRY(memchr)
 /* Not found */
 30:	xorq	%rax,%rax
 	ret
+END(memchr)
Index: src/common/lib/libc/arch/x86_64/string/strlen.S
diff -u src/common/lib/libc/arch/x86_64/string/strlen.S:1.5 src/common/lib/libc/arch/x86_64/string/strlen.S:1.6
--- src/common/lib/libc/arch/x86_64/string/strlen.S:1.5	Sun Jul 12 21:24:21 2009
+++ src/common/lib/libc/arch/x86_64/string/strlen.S	Sat Mar 22 19:16:34 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: strlen.S,v 1.5 2009/07/12 21:24:21 dsl Exp $	*/
+/*	$NetBSD: strlen.S,v 1.6 2014/03/22 19:16:34 jakllsch Exp $	*/
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
 #include <machine/asm.h>
 
 #if defined(LIBC_SCCS)
-	RCSID("$NetBSD: strlen.S,v 1.5 2009/07/12 21:24:21 dsl Exp $")
+	RCSID("$NetBSD: strlen.S,v 1.6 2014/03/22 19:16:34 jakllsch Exp $")
 #endif
 
 /*
@@ -161,6 +161,11 @@ ENTRY(strlen)
 	dec	%rsi
 	or	%rsi,%rdx		/* low bytes now non-zero */
 	jmp	2b
+#ifdef TEST_STRLEN
+END(test_strlen)
+#else
+END(strlen)
+#endif
 
 #ifdef TEST_STRLEN
 /* trivial implementation when testing above! */
@@ -173,4 +178,5 @@ ENTRY(strlen)
 	jmp	1b
 2:	sub	%rdi,%rax
 	ret
+END(strlen)
 #endif

Index: src/common/lib/libc/arch/x86_64/string/strcat.S
diff -u src/common/lib/libc/arch/x86_64/string/strcat.S:1.1 src/common/lib/libc/arch/x86_64/string/strcat.S:1.2
--- src/common/lib/libc/arch/x86_64/string/strcat.S:1.1	Tue Dec 20 19:28:51 2005
+++ src/common/lib/libc/arch/x86_64/string/strcat.S	Sat Mar 22 19:16:34 2014
@@ -6,7 +6,7 @@
 #include <machine/asm.h>
 
 #if defined(LIBC_SCCS)
-	RCSID("$NetBSD: strcat.S,v 1.1 2005/12/20 19:28:51 christos Exp $")
+	RCSID("$NetBSD: strcat.S,v 1.2 2014/03/22 19:16:34 jakllsch Exp $")
 #endif
 
 ENTRY(strcat)
@@ -162,3 +162,4 @@ ENTRY(strcat)
 
 .Ldone:
 	ret
+END(strcat)
Index: src/common/lib/libc/arch/x86_64/string/strcmp.S
diff -u src/common/lib/libc/arch/x86_64/string/strcmp.S:1.1 src/common/lib/libc/arch/x86_64/string/strcmp.S:1.2
--- src/common/lib/libc/arch/x86_64/string/strcmp.S:1.1	Tue Dec 20 19:28:51 2005
+++ src/common/lib/libc/arch/x86_64/string/strcmp.S	Sat Mar 22 19:16:34 2014
@@ -6,7 +6,7 @@
 #include <machine/asm.h>
 
 #if defined(LIBC_SCCS)
-	RCSID("$NetBSD: strcmp.S,v 1.1 2005/12/20 19:28:51 christos Exp $")
+	RCSID("$NetBSD: strcmp.S,v 1.2 2014/03/22 19:16:34 jakllsch Exp $")
 #endif
 
 ENTRY(strcmp)
@@ -70,3 +70,4 @@ ENTRY(strcmp)
 	movzbq	%dl,%rdx
 	subq	%rdx,%rax
 	ret
+END(strcmp)
Index: src/common/lib/libc/arch/x86_64/string/strcpy.S
diff -u src/common/lib/libc/arch/x86_64/string/strcpy.S:1.1 src/common/lib/libc/arch/x86_64/string/strcpy.S:1.2
--- src/common/lib/libc/arch/x86_64/string/strcpy.S:1.1	Tue Dec 20 19:28:51 2005
+++ src/common/lib/libc/arch/x86_64/string/strcpy.S	Sat Mar 22 19:16:34 2014
@@ -6,7 +6,7 @@
 #include <machine/asm.h>
 
 #if defined(LIBC_SCCS)
-	RCSID("$NetBSD: strcpy.S,v 1.1 2005/12/20 19:28:51 christos Exp $")
+	RCSID("$NetBSD: strcpy.S,v 1.2 2014/03/22 19:16:34 jakllsch Exp $")
 #endif
 
 /*
@@ -109,3 +109,4 @@ ENTRY(strcpy)
 
 .Ldone:
 	ret
+END(strcpy)

Index: src/common/lib/libc/arch/x86_64/string/strchr.S
diff -u src/common/lib/libc/arch/x86_64/string/strchr.S:1.6 src/common/lib/libc/arch/x86_64/string/strchr.S:1.7
--- src/common/lib/libc/arch/x86_64/string/strchr.S:1.6	Mon Jul 20 15:21:00 2009
+++ src/common/lib/libc/arch/x86_64/string/strchr.S	Sat Mar 22 19:16:34 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: strchr.S,v 1.6 2009/07/20 15:21:00 christos Exp $	*/
+/*	$NetBSD: strchr.S,v 1.7 2014/03/22 19:16:34 jakllsch Exp $	*/
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
 #include <machine/asm.h>
 
 #if defined(LIBC_SCCS)
-	RCSID("$NetBSD: strchr.S,v 1.6 2009/07/20 15:21:00 christos Exp $")
+	RCSID("$NetBSD: strchr.S,v 1.7 2014/03/22 19:16:34 jakllsch Exp $")
 #endif
 
 /*
@@ -132,6 +132,11 @@ ENTRY(strchr)
 	sar	%cl,%r10	/* top bytes 0xff */
 	and	%r10,%rax	/* clear lsb from unwanted low bytes */
 	jmp	21b
+#ifdef TEST_STRCHR
+END(test_strchr)
+#else
+END(strchr)
+#endif
 
 #ifdef TEST_STRCHR
 /* Trivial version for bug-fixing above */
@@ -148,6 +153,7 @@ ENTRY(strchr)
 	ret
 2:	lea	-1(%rsi),%rax
 	ret
+END(strchr)
 #endif
 
 STRONG_ALIAS(index,strchr)

Reply via email to