Module Name: src
Committed By: jakllsch
Date: Sat Mar 22 19:38:46 UTC 2014
Modified Files:
src/common/lib/libc/arch/i386/string: ffs.S memchr.S memcmp.S memcpy.S
strcat.S strchr.S strcmp.S strcpy.S strlen.S strrchr.S
src/common/lib/libc/arch/i386/string/small: memcmp.S memset.S strchr.S
strcmp.S strcpy.S strlen.S
Log Message:
For all i386 string assembly functions that don't overlap use END() so
that symbol size information is available.
To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/common/lib/libc/arch/i386/string/ffs.S \
src/common/lib/libc/arch/i386/string/memchr.S \
src/common/lib/libc/arch/i386/string/strcat.S \
src/common/lib/libc/arch/i386/string/strcmp.S \
src/common/lib/libc/arch/i386/string/strcpy.S \
src/common/lib/libc/arch/i386/string/strlen.S
cvs rdiff -u -r1.2 -r1.3 src/common/lib/libc/arch/i386/string/memcmp.S \
src/common/lib/libc/arch/i386/string/strchr.S \
src/common/lib/libc/arch/i386/string/strrchr.S
cvs rdiff -u -r1.3 -r1.4 src/common/lib/libc/arch/i386/string/memcpy.S
cvs rdiff -u -r1.1 -r1.2 src/common/lib/libc/arch/i386/string/small/memcmp.S \
src/common/lib/libc/arch/i386/string/small/memset.S \
src/common/lib/libc/arch/i386/string/small/strchr.S \
src/common/lib/libc/arch/i386/string/small/strcmp.S \
src/common/lib/libc/arch/i386/string/small/strcpy.S \
src/common/lib/libc/arch/i386/string/small/strlen.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/i386/string/ffs.S
diff -u src/common/lib/libc/arch/i386/string/ffs.S:1.1 src/common/lib/libc/arch/i386/string/ffs.S:1.2
--- src/common/lib/libc/arch/i386/string/ffs.S:1.1 Tue Dec 20 19:28:49 2005
+++ src/common/lib/libc/arch/i386/string/ffs.S Sat Mar 22 19:38:46 2014
@@ -6,7 +6,7 @@
#include <machine/asm.h>
#if defined(LIBC_SCCS)
- RCSID("$NetBSD: ffs.S,v 1.1 2005/12/20 19:28:49 christos Exp $")
+ RCSID("$NetBSD: ffs.S,v 1.2 2014/03/22 19:38:46 jakllsch Exp $")
#endif
ENTRY(ffs)
@@ -18,3 +18,4 @@ ENTRY(ffs)
_ALIGN_TEXT
L1: xorl %eax,%eax /* clear result */
ret
+END(ffs)
Index: src/common/lib/libc/arch/i386/string/memchr.S
diff -u src/common/lib/libc/arch/i386/string/memchr.S:1.1 src/common/lib/libc/arch/i386/string/memchr.S:1.2
--- src/common/lib/libc/arch/i386/string/memchr.S:1.1 Tue Dec 20 19:28:49 2005
+++ src/common/lib/libc/arch/i386/string/memchr.S Sat Mar 22 19:38:46 2014
@@ -6,7 +6,7 @@
#include <machine/asm.h>
#if defined(LIBC_SCCS)
- RCSID("$NetBSD: memchr.S,v 1.1 2005/12/20 19:28:49 christos Exp $")
+ RCSID("$NetBSD: memchr.S,v 1.2 2014/03/22 19:38:46 jakllsch Exp $")
#endif
ENTRY(memchr)
@@ -16,7 +16,7 @@ ENTRY(memchr)
movl 16(%esp),%esi
/*
- * Align to word boundary.
+ * Align to word boundary.
* Consider unrolling loop?
*/
testl %esi,%esi /* nbytes == 0? */
@@ -107,3 +107,4 @@ ENTRY(memchr)
.Ldone:
popl %esi
ret
+END(memchr)
Index: src/common/lib/libc/arch/i386/string/strcat.S
diff -u src/common/lib/libc/arch/i386/string/strcat.S:1.1 src/common/lib/libc/arch/i386/string/strcat.S:1.2
--- src/common/lib/libc/arch/i386/string/strcat.S:1.1 Tue Dec 20 19:28:49 2005
+++ src/common/lib/libc/arch/i386/string/strcat.S Sat Mar 22 19:38:46 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:49 christos Exp $")
+ RCSID("$NetBSD: strcat.S,v 1.2 2014/03/22 19:38:46 jakllsch Exp $")
#endif
ENTRY(strcat)
@@ -125,3 +125,4 @@ ENTRY(strcat)
movl 8(%esp),%eax
popl %ebx
ret
+END(strcat)
Index: src/common/lib/libc/arch/i386/string/strcmp.S
diff -u src/common/lib/libc/arch/i386/string/strcmp.S:1.1 src/common/lib/libc/arch/i386/string/strcmp.S:1.2
--- src/common/lib/libc/arch/i386/string/strcmp.S:1.1 Tue Dec 20 19:28:49 2005
+++ src/common/lib/libc/arch/i386/string/strcmp.S Sat Mar 22 19:38:46 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:49 christos Exp $")
+ RCSID("$NetBSD: strcmp.S,v 1.2 2014/03/22 19:38:46 jakllsch Exp $")
#endif
ENTRY(strcmp)
@@ -75,3 +75,4 @@ ENTRY(strcmp)
popl %ebx
popl %esi
ret
+END(strcmp)
Index: src/common/lib/libc/arch/i386/string/strcpy.S
diff -u src/common/lib/libc/arch/i386/string/strcpy.S:1.1 src/common/lib/libc/arch/i386/string/strcpy.S:1.2
--- src/common/lib/libc/arch/i386/string/strcpy.S:1.1 Tue Dec 20 19:28:49 2005
+++ src/common/lib/libc/arch/i386/string/strcpy.S Sat Mar 22 19:38:46 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:49 christos Exp $")
+ RCSID("$NetBSD: strcpy.S,v 1.2 2014/03/22 19:38:46 jakllsch Exp $")
#endif
/*
@@ -14,7 +14,7 @@
* source pointer is aligned to a word boundary, it then copies by
* words until it finds a word containing a zero byte, and finally
* copies by bytes until the end of the string is reached.
- *
+ *
* While this may result in unaligned stores if the source and
* destination pointers are unaligned with respect to each other,
* it is still faster than either byte copies or the overhead of
@@ -53,7 +53,7 @@ ENTRY(strcpy)
leal -0x01010101(%ebx),%edx
testl $0x80808080,%edx
je .Lloop
-
+
/*
* In rare cases, the above loop may exit prematurely. We must
* return to the loop if none of the bytes in the word equal 0.
@@ -84,3 +84,4 @@ ENTRY(strcpy)
movl 8(%esp),%eax
popl %ebx
ret
+END(strcpy)
Index: src/common/lib/libc/arch/i386/string/strlen.S
diff -u src/common/lib/libc/arch/i386/string/strlen.S:1.1 src/common/lib/libc/arch/i386/string/strlen.S:1.2
--- src/common/lib/libc/arch/i386/string/strlen.S:1.1 Tue Dec 20 19:28:49 2005
+++ src/common/lib/libc/arch/i386/string/strlen.S Sat Mar 22 19:38:46 2014
@@ -6,7 +6,7 @@
#include <machine/asm.h>
#if defined(LIBC_SCCS)
- RCSID("$NetBSD: strlen.S,v 1.1 2005/12/20 19:28:49 christos Exp $")
+ RCSID("$NetBSD: strlen.S,v 1.2 2014/03/22 19:38:46 jakllsch Exp $")
#endif
ENTRY(strlen)
@@ -139,3 +139,4 @@ ENTRY(strlen)
.Ldone:
subl 4(%esp),%eax
ret
+END(strlen)
Index: src/common/lib/libc/arch/i386/string/memcmp.S
diff -u src/common/lib/libc/arch/i386/string/memcmp.S:1.2 src/common/lib/libc/arch/i386/string/memcmp.S:1.3
--- src/common/lib/libc/arch/i386/string/memcmp.S:1.2 Mon Nov 12 18:41:59 2007
+++ src/common/lib/libc/arch/i386/string/memcmp.S Sat Mar 22 19:38:46 2014
@@ -6,7 +6,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:38:46 jakllsch Exp $")
#endif
ENTRY(memcmp)
@@ -45,3 +45,4 @@ L6: xorl %eax,%eax /* Perform unsigned
popl %esi
popl %edi
ret
+END(memcmp)
Index: src/common/lib/libc/arch/i386/string/strchr.S
diff -u src/common/lib/libc/arch/i386/string/strchr.S:1.2 src/common/lib/libc/arch/i386/string/strchr.S:1.3
--- src/common/lib/libc/arch/i386/string/strchr.S:1.2 Fri Jul 17 19:37:57 2009
+++ src/common/lib/libc/arch/i386/string/strchr.S Sat Mar 22 19:38:46 2014
@@ -6,7 +6,7 @@
#include <machine/asm.h>
#if defined(LIBC_SCCS)
- RCSID("$NetBSD: strchr.S,v 1.2 2009/07/17 19:37:57 dsl Exp $")
+ RCSID("$NetBSD: strchr.S,v 1.3 2014/03/22 19:38:46 jakllsch Exp $")
#endif
ENTRY(strchr)
@@ -99,5 +99,6 @@ ENTRY(strchr)
popl %ebx
popl %esi
ret
+END(strchr)
STRONG_ALIAS(index,strchr)
Index: src/common/lib/libc/arch/i386/string/strrchr.S
diff -u src/common/lib/libc/arch/i386/string/strrchr.S:1.2 src/common/lib/libc/arch/i386/string/strrchr.S:1.3
--- src/common/lib/libc/arch/i386/string/strrchr.S:1.2 Fri Jul 17 19:37:57 2009
+++ src/common/lib/libc/arch/i386/string/strrchr.S Sat Mar 22 19:38:46 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:38:46 jakllsch Exp $")
#endif
ENTRY(strrchr)
@@ -92,5 +92,6 @@ ENTRY(strrchr)
popl %edi
popl %esi
ret
+END(strrchr)
STRONG_ALIAS(rindex,strrchr)
Index: src/common/lib/libc/arch/i386/string/memcpy.S
diff -u src/common/lib/libc/arch/i386/string/memcpy.S:1.3 src/common/lib/libc/arch/i386/string/memcpy.S:1.4
--- src/common/lib/libc/arch/i386/string/memcpy.S:1.3 Mon Nov 12 18:41:59 2007
+++ src/common/lib/libc/arch/i386/string/memcpy.S Sat Mar 22 19:38:46 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: memcpy.S,v 1.3 2007/11/12 18:41:59 ad Exp $ */
+/* $NetBSD: memcpy.S,v 1.4 2014/03/22 19:38:46 jakllsch Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -35,7 +35,7 @@
#include <machine/asm.h>
#if defined(LIBC_SCCS)
- RCSID("$NetBSD: memcpy.S,v 1.3 2007/11/12 18:41:59 ad Exp $")
+ RCSID("$NetBSD: memcpy.S,v 1.4 2014/03/22 19:38:46 jakllsch Exp $")
#endif
/*
@@ -131,3 +131,13 @@ ENTRY(memcpy)
movb %al,(%edi)
jmp .Lback_aligned
#endif
+
+#ifdef BCOPY
+END(bcopy)
+#else
+#ifdef MEMMOVE
+END(memmove)
+#else
+END(memcpy)
+#endif
+#endif
Index: src/common/lib/libc/arch/i386/string/small/memcmp.S
diff -u src/common/lib/libc/arch/i386/string/small/memcmp.S:1.1 src/common/lib/libc/arch/i386/string/small/memcmp.S:1.2
--- src/common/lib/libc/arch/i386/string/small/memcmp.S:1.1 Thu Jun 16 16:39:14 2011
+++ src/common/lib/libc/arch/i386/string/small/memcmp.S Sat Mar 22 19:38:46 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: memcmp.S,v 1.1 2011/06/16 16:39:14 joerg Exp $ */
+/* $NetBSD: memcmp.S,v 1.2 2014/03/22 19:38:46 jakllsch Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -29,7 +29,7 @@
*/
#include <machine/asm.h>
- RCSID("$NetBSD: memcmp.S,v 1.1 2011/06/16 16:39:14 joerg Exp $")
+ RCSID("$NetBSD: memcmp.S,v 1.2 2014/03/22 19:38:46 jakllsch Exp $")
ENTRY(memcmp)
pushl %esi
@@ -48,3 +48,4 @@ ENTRY(memcmp)
1:
decl %eax
ret
+END(memcmp)
Index: src/common/lib/libc/arch/i386/string/small/memset.S
diff -u src/common/lib/libc/arch/i386/string/small/memset.S:1.1 src/common/lib/libc/arch/i386/string/small/memset.S:1.2
--- src/common/lib/libc/arch/i386/string/small/memset.S:1.1 Thu Jun 16 16:39:14 2011
+++ src/common/lib/libc/arch/i386/string/small/memset.S Sat Mar 22 19:38:46 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: memset.S,v 1.1 2011/06/16 16:39:14 joerg Exp $ */
+/* $NetBSD: memset.S,v 1.2 2014/03/22 19:38:46 jakllsch Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <machine/asm.h>
- RCSID("$NetBSD: memset.S,v 1.1 2011/06/16 16:39:14 joerg Exp $")
+ RCSID("$NetBSD: memset.S,v 1.2 2014/03/22 19:38:46 jakllsch Exp $")
ENTRY(memset)
pushl %edi
@@ -43,3 +43,4 @@ ENTRY(memset)
popl %eax
popl %edi
ret
+END(memset)
Index: src/common/lib/libc/arch/i386/string/small/strchr.S
diff -u src/common/lib/libc/arch/i386/string/small/strchr.S:1.1 src/common/lib/libc/arch/i386/string/small/strchr.S:1.2
--- src/common/lib/libc/arch/i386/string/small/strchr.S:1.1 Thu Jun 16 16:39:14 2011
+++ src/common/lib/libc/arch/i386/string/small/strchr.S Sat Mar 22 19:38:46 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: strchr.S,v 1.1 2011/06/16 16:39:14 joerg Exp $ */
+/* $NetBSD: strchr.S,v 1.2 2014/03/22 19:38:46 jakllsch Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -29,7 +29,7 @@
*/
#include <machine/asm.h>
- RCSID("$NetBSD: strchr.S,v 1.1 2011/06/16 16:39:14 joerg Exp $")
+ RCSID("$NetBSD: strchr.S,v 1.2 2014/03/22 19:38:46 jakllsch Exp $")
ENTRY(strchr)
popl %edx /* Return address */
@@ -49,3 +49,4 @@ ENTRY(strchr)
xorl %eax, %eax
3:
ret
+END(strchr)
Index: src/common/lib/libc/arch/i386/string/small/strcmp.S
diff -u src/common/lib/libc/arch/i386/string/small/strcmp.S:1.1 src/common/lib/libc/arch/i386/string/small/strcmp.S:1.2
--- src/common/lib/libc/arch/i386/string/small/strcmp.S:1.1 Thu Jun 16 16:39:14 2011
+++ src/common/lib/libc/arch/i386/string/small/strcmp.S Sat Mar 22 19:38:46 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: strcmp.S,v 1.1 2011/06/16 16:39:14 joerg Exp $ */
+/* $NetBSD: strcmp.S,v 1.2 2014/03/22 19:38:46 jakllsch Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -29,7 +29,7 @@
*/
#include <machine/asm.h>
- RCSID("$NetBSD: strcmp.S,v 1.1 2011/06/16 16:39:14 joerg Exp $")
+ RCSID("$NetBSD: strcmp.S,v 1.2 2014/03/22 19:38:46 jakllsch Exp $")
ENTRY(strcmp)
pushl %esi
@@ -48,3 +48,4 @@ ENTRY(strcmp)
movsbl %al, %eax
popl %esi
ret
+END(strcmp)
Index: src/common/lib/libc/arch/i386/string/small/strcpy.S
diff -u src/common/lib/libc/arch/i386/string/small/strcpy.S:1.1 src/common/lib/libc/arch/i386/string/small/strcpy.S:1.2
--- src/common/lib/libc/arch/i386/string/small/strcpy.S:1.1 Thu Jun 16 16:39:14 2011
+++ src/common/lib/libc/arch/i386/string/small/strcpy.S Sat Mar 22 19:38:46 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: strcpy.S,v 1.1 2011/06/16 16:39:14 joerg Exp $ */
+/* $NetBSD: strcpy.S,v 1.2 2014/03/22 19:38:46 jakllsch Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -29,7 +29,7 @@
*/
#include <machine/asm.h>
- RCSID("$NetBSD: strcpy.S,v 1.1 2011/06/16 16:39:14 joerg Exp $")
+ RCSID("$NetBSD: strcpy.S,v 1.2 2014/03/22 19:38:46 jakllsch Exp $")
ENTRY(strcpy)
pushl %esi
@@ -46,3 +46,4 @@ ENTRY(strcpy)
popl %edi
popl %esi
ret
+END(strcpy)
Index: src/common/lib/libc/arch/i386/string/small/strlen.S
diff -u src/common/lib/libc/arch/i386/string/small/strlen.S:1.1 src/common/lib/libc/arch/i386/string/small/strlen.S:1.2
--- src/common/lib/libc/arch/i386/string/small/strlen.S:1.1 Thu Jun 16 16:39:14 2011
+++ src/common/lib/libc/arch/i386/string/small/strlen.S Sat Mar 22 19:38:46 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: strlen.S,v 1.1 2011/06/16 16:39:14 joerg Exp $ */
+/* $NetBSD: strlen.S,v 1.2 2014/03/22 19:38:46 jakllsch Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -29,7 +29,7 @@
*/
#include <machine/asm.h>
- RCSID("$NetBSD: strlen.S,v 1.1 2011/06/16 16:39:14 joerg Exp $")
+ RCSID("$NetBSD: strlen.S,v 1.2 2014/03/22 19:38:46 jakllsch Exp $")
ENTRY(strlen)
movl 8(%esp), %ecx
xorl %eax, %eax
@@ -39,3 +39,4 @@ ENTRY(strlen)
cmpb $0, 0(%ecx,%eax,1)
jnz 1b
ret
+END(strlen)