Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/common/lib/libc/arch/x86_64/string For all x86_64 string ass...
details: https://anonhg.NetBSD.org/src/rev/29f7cbd0c069
branches: trunk
changeset: 327969:29f7cbd0c069
user: jakllsch <jakllsch%NetBSD.org@localhost>
date: Sat Mar 22 19:16:34 2014 +0000
description:
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.
diffstat:
common/lib/libc/arch/x86_64/string/bcmp.S | 3 ++-
common/lib/libc/arch/x86_64/string/bcopy.S | 12 +++++++++++-
common/lib/libc/arch/x86_64/string/ffs.S | 3 ++-
common/lib/libc/arch/x86_64/string/memchr.S | 5 +++--
common/lib/libc/arch/x86_64/string/memcmp.S | 3 ++-
common/lib/libc/arch/x86_64/string/strcat.S | 3 ++-
common/lib/libc/arch/x86_64/string/strchr.S | 10 ++++++++--
common/lib/libc/arch/x86_64/string/strcmp.S | 3 ++-
common/lib/libc/arch/x86_64/string/strcpy.S | 3 ++-
common/lib/libc/arch/x86_64/string/strlen.S | 10 ++++++++--
common/lib/libc/arch/x86_64/string/strrchr.S | 3 ++-
11 files changed, 44 insertions(+), 14 deletions(-)
diffs (244 lines):
diff -r b0101fb332e2 -r 29f7cbd0c069 common/lib/libc/arch/x86_64/string/bcmp.S
--- a/common/lib/libc/arch/x86_64/string/bcmp.S Sat Mar 22 19:05:30 2014 +0000
+++ b/common/lib/libc/arch/x86_64/string/bcmp.S Sat Mar 22 19:16:34 2014 +0000
@@ -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 @@
L1: incl %eax
L2: ret
+END(bcmp)
diff -r b0101fb332e2 -r 29f7cbd0c069 common/lib/libc/arch/x86_64/string/bcopy.S
--- a/common/lib/libc/arch/x86_64/string/bcopy.S Sat Mar 22 19:05:30 2014 +0000
+++ b/common/lib/libc/arch/x86_64/string/bcopy.S Sat Mar 22 19:16:34 2014 +0000
@@ -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 @@
cld
ret
#endif
+
+#ifdef MEMCOPY
+END(memcpy)
+#else
+#ifdef MEMMOVE
+END(memmove)
+#else
+END(bcopy)
+#endif
+#endif
diff -r b0101fb332e2 -r 29f7cbd0c069 common/lib/libc/arch/x86_64/string/ffs.S
--- a/common/lib/libc/arch/x86_64/string/ffs.S Sat Mar 22 19:05:30 2014 +0000
+++ b/common/lib/libc/arch/x86_64/string/ffs.S Sat Mar 22 19:16:34 2014 +0000
@@ -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 @@
1: xorl %eax,%eax /* clear result */
ret
+END(ffs)
diff -r b0101fb332e2 -r 29f7cbd0c069 common/lib/libc/arch/x86_64/string/memchr.S
--- a/common/lib/libc/arch/x86_64/string/memchr.S Sat Mar 22 19:05:30 2014 +0000
+++ b/common/lib/libc/arch/x86_64/string/memchr.S Sat Mar 22 19:16:34 2014 +0000
@@ -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 @@
/* Not found */
30: xorq %rax,%rax
ret
+END(memchr)
diff -r b0101fb332e2 -r 29f7cbd0c069 common/lib/libc/arch/x86_64/string/memcmp.S
--- a/common/lib/libc/arch/x86_64/string/memcmp.S Sat Mar 22 19:05:30 2014 +0000
+++ b/common/lib/libc/arch/x86_64/string/memcmp.S Sat Mar 22 19:16:34 2014 +0000
@@ -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 @@
movb -1(%rsi),%dl
subl %edx,%eax
ret
+END(memcmp)
diff -r b0101fb332e2 -r 29f7cbd0c069 common/lib/libc/arch/x86_64/string/strcat.S
--- a/common/lib/libc/arch/x86_64/string/strcat.S Sat Mar 22 19:05:30 2014 +0000
+++ b/common/lib/libc/arch/x86_64/string/strcat.S Sat Mar 22 19:16:34 2014 +0000
@@ -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 @@
.Ldone:
ret
+END(strcat)
diff -r b0101fb332e2 -r 29f7cbd0c069 common/lib/libc/arch/x86_64/string/strchr.S
--- a/common/lib/libc/arch/x86_64/string/strchr.S Sat Mar 22 19:05:30 2014 +0000
+++ b/common/lib/libc/arch/x86_64/string/strchr.S Sat Mar 22 19:16:34 2014 +0000
@@ -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 @@
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 @@
ret
2: lea -1(%rsi),%rax
ret
+END(strchr)
#endif
STRONG_ALIAS(index,strchr)
diff -r b0101fb332e2 -r 29f7cbd0c069 common/lib/libc/arch/x86_64/string/strcmp.S
--- a/common/lib/libc/arch/x86_64/string/strcmp.S Sat Mar 22 19:05:30 2014 +0000
+++ b/common/lib/libc/arch/x86_64/string/strcmp.S Sat Mar 22 19:16:34 2014 +0000
@@ -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 @@
movzbq %dl,%rdx
subq %rdx,%rax
ret
+END(strcmp)
diff -r b0101fb332e2 -r 29f7cbd0c069 common/lib/libc/arch/x86_64/string/strcpy.S
--- a/common/lib/libc/arch/x86_64/string/strcpy.S Sat Mar 22 19:05:30 2014 +0000
+++ b/common/lib/libc/arch/x86_64/string/strcpy.S Sat Mar 22 19:16:34 2014 +0000
@@ -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 @@
.Ldone:
ret
+END(strcpy)
diff -r b0101fb332e2 -r 29f7cbd0c069 common/lib/libc/arch/x86_64/string/strlen.S
--- a/common/lib/libc/arch/x86_64/string/strlen.S Sat Mar 22 19:05:30 2014 +0000
+++ b/common/lib/libc/arch/x86_64/string/strlen.S Sat Mar 22 19:16:34 2014 +0000
@@ -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 @@
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 @@
jmp 1b
2: sub %rdi,%rax
ret
+END(strlen)
#endif
diff -r b0101fb332e2 -r 29f7cbd0c069 common/lib/libc/arch/x86_64/string/strrchr.S
--- a/common/lib/libc/arch/x86_64/string/strrchr.S Sat Mar 22 19:05:30 2014 +0000
+++ b/common/lib/libc/arch/x86_64/string/strrchr.S Sat Mar 22 19:16:34 2014 +0000
@@ -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 @@
.Ldone:
ret
+END(strrchr)
STRONG_ALIAS(rindex,strrchr)
Home |
Main Index |
Thread Index |
Old Index