summaryrefslogtreecommitdiff
path: root/sysdeps/i386
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/i386')
-rw-r--r--sysdeps/i386/Versions11
-rw-r--r--sysdeps/i386/fpu/fesetround.c4
-rw-r--r--sysdeps/i386/fpu/ftestexcept.c12
-rw-r--r--sysdeps/i386/i486/strcat.S3
-rw-r--r--sysdeps/i386/i486/string-inlines.c65
-rw-r--r--sysdeps/i386/i486/strlen.S3
-rw-r--r--sysdeps/i386/i586/memcpy.S3
-rw-r--r--sysdeps/i386/i586/memset.S3
-rw-r--r--sysdeps/i386/i586/strchr.S3
-rw-r--r--sysdeps/i386/i586/strcpy.S5
-rw-r--r--sysdeps/i386/i586/strlen.S3
-rw-r--r--sysdeps/i386/i686/memcpy.S3
-rw-r--r--sysdeps/i386/i686/memmove.S1
-rw-r--r--sysdeps/i386/i686/memset.S3
-rw-r--r--sysdeps/i386/i686/strcmp.S3
-rw-r--r--sysdeps/i386/memchr.S3
-rw-r--r--sysdeps/i386/memset.c3
-rw-r--r--sysdeps/i386/strchr.S3
-rw-r--r--sysdeps/i386/strcspn.S3
-rw-r--r--sysdeps/i386/string-inlines.c189
-rw-r--r--sysdeps/i386/strlen.c3
-rw-r--r--sysdeps/i386/strpbrk.S3
-rw-r--r--sysdeps/i386/strrchr.S3
-rw-r--r--sysdeps/i386/strspn.S3
24 files changed, 314 insertions, 24 deletions
diff --git a/sysdeps/i386/Versions b/sysdeps/i386/Versions
index 57951ebdf6..b20d7cc027 100644
--- a/sysdeps/i386/Versions
+++ b/sysdeps/i386/Versions
@@ -9,7 +9,14 @@ libc {
}
GLIBC_2.1.1 {
# extern inline functions used by <bits/string.h>
- __memcpy_c; __memset_cc; __memset_cg; __memset_gg; __strchr_c; __strchr_g;
- __strchrnul_c; __strchrnul_g;
+ __memcpy_c; __memset_cc; __memset_cg; __memset_gg;
+ __memcpy_by2; __memcpy_by4; __memcpy_g; __mempcpy_by2; __mempcpy_by4;
+ __mempcpy_byn; __memset_ccn_by2; __memset_ccn_by4; __memset_gcn_by2;
+ __memset_gcn_by4; __stpcpy_g; __strcat_c; __strcat_g; __strchr_c;
+ __strchr_g; __strchrnul_c; __strchrnul_g; __strcmp_gg; __strcpy_g;
+ __strcspn_c1; __strcspn_cg; __strcspn_g; __strlen_g; __strncat_g;
+ __strncmp_g; __strncpy_by2; __strncpy_by4; __strncpy_byn; __strncpy_gg;
+ __strpbrk_cg; __strpbrk_g; __strrchr_c; __strrchr_g; __strspn_c1;
+ __strspn_cg; __strspn_g; __strstr_cg; __strstr_g;
}
}
diff --git a/sysdeps/i386/fpu/fesetround.c b/sysdeps/i386/fpu/fesetround.c
index 342ed42318..fae74d33b6 100644
--- a/sysdeps/i386/fpu/fesetround.c
+++ b/sysdeps/i386/fpu/fesetround.c
@@ -43,8 +43,8 @@ fesetround (int round)
unsigned int xcw;
__asm__ ("stmxcsr %0" : "=m" (*&xcw));
- cw &= ~0x6000;
- cw |= round << 3;
+ xcw &= ~0x6000;
+ xcw |= round << 3;
__asm__ ("ldmxcsr %0" : : "m" (*&xcw));
}
diff --git a/sysdeps/i386/fpu/ftestexcept.c b/sysdeps/i386/fpu/ftestexcept.c
index cee7b83bb4..e449571c04 100644
--- a/sysdeps/i386/fpu/ftestexcept.c
+++ b/sysdeps/i386/fpu/ftestexcept.c
@@ -1,5 +1,5 @@
/* Test exception in current environment.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -19,14 +19,22 @@
02111-1307 USA. */
#include <fenv.h>
+#include <unistd.h>
+#include <dl-procinfo.h>
+#include <ldsodefs.h>
int
fetestexcept (int excepts)
{
int temp;
+ int xtemp = 0;
/* Get current exceptions. */
__asm__ ("fnstsw %0" : "=a" (temp));
- return temp & excepts & FE_ALL_EXCEPT;
+ /* If the CPU supports SSE we test the MXCSR as well. */
+ if ((GL(dl_hwcap_mask) & HWCAP_I386_XMM) != 0)
+ __asm__ ("stmxcsr %0" : "=m" (*&xtemp));
+
+ return (temp | xtemp) & excepts & FE_ALL_EXCEPT;
}
diff --git a/sysdeps/i386/i486/strcat.S b/sysdeps/i386/i486/strcat.S
index a206e40c64..7d8279fe14 100644
--- a/sysdeps/i386/i486/strcat.S
+++ b/sysdeps/i386/i486/strcat.S
@@ -1,6 +1,6 @@
/* strcat(dest, src) -- Append SRC on the end of DEST.
For Intel 80x86, x>=4.
- Copyright (C) 1994, 1995, 1996, 1997, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1994,1995,1996,1997,2000,2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@ipd.info.uni-karlsruhe.de>.
Optimised a little by Alan Modra <Alan@SPRI.Levels.UniSA.Edu.Au>
@@ -267,3 +267,4 @@ L(8): /* GKM FIXME: check high bounds */
LEAVE
RET_PTR
END (BP_SYM (strcat))
+libc_hidden_builtin_def (strcat)
diff --git a/sysdeps/i386/i486/string-inlines.c b/sysdeps/i386/i486/string-inlines.c
new file mode 100644
index 0000000000..7136d2c60a
--- /dev/null
+++ b/sysdeps/i386/i486/string-inlines.c
@@ -0,0 +1,65 @@
+/* Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+/* <bits/string.h> and <bits/string2.h> declare some extern inline
+ functions. These functions are declared additionally here if
+ inlining is not possible. */
+
+#undef __USE_STRING_INLINES
+#define __USE_STRING_INLINES
+#define _FORCE_INLINES
+#define __STRING_INLINE /* empty */
+#define __NO_INLINE__
+
+/* This is to avoid PLT entries for the x86 version. */
+#define __memcpy_g __memcpy_g_internal
+#define __strchr_g __strchr_g_internal
+
+#include <string.h>
+#undef index
+#undef rindex
+
+#undef __NO_INLINE__
+#include <bits/string.h>
+#include <bits/string2.h>
+
+void *
+(__memcpy_c) (void *d, const void *s, size_t n)
+{
+ return memcpy (d, s, n);
+}
+
+void *
+__memset_cc (void *s, unsigned long int pattern, size_t n)
+{
+ return memset (s, pattern & 0xff, n);
+}
+strong_alias (__memset_cc, __memset_cg)
+
+void *
+__memset_gg (void *s, char c, size_t n)
+{
+ return memset (s, c, n);
+}
+
+#ifdef __memcpy_c
+# undef __memcpy_g
+strong_alias (__memcpy_g_internal, __memcpy_g)
+# undef __strchr_g
+strong_alias (__strchr_g_internal, __strchr_g)
+#endif
diff --git a/sysdeps/i386/i486/strlen.S b/sysdeps/i386/i486/strlen.S
index eed0c76499..7557b2d217 100644
--- a/sysdeps/i386/i486/strlen.S
+++ b/sysdeps/i386/i486/strlen.S
@@ -1,6 +1,6 @@
/* strlen(str) -- determine the length of the string STR.
Optimized for Intel 80x86, x>=4.
- Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1991-1997, 2000, 2003 Free Software Foundation, Inc.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>.
This file is part of the GNU C Library.
@@ -136,3 +136,4 @@ L(2): CHECK_BOUNDS_HIGH (%eax, STR(%esp), jb)
LEAVE
ret
END (BP_SYM (strlen))
+libc_hidden_builtin_def (strlen)
diff --git a/sysdeps/i386/i586/memcpy.S b/sysdeps/i386/i586/memcpy.S
index 0501d59fac..766d479602 100644
--- a/sysdeps/i386/i586/memcpy.S
+++ b/sysdeps/i386/i586/memcpy.S
@@ -1,5 +1,5 @@
/* Highly optimized version for i586.
- Copyright (C) 1997, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2000, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -116,3 +116,4 @@ L(1): rep; movsb
LEAVE
RET_PTR
END (BP_SYM (memcpy))
+libc_hidden_builtin_def (memcpy)
diff --git a/sysdeps/i386/i586/memset.S b/sysdeps/i386/i586/memset.S
index 1ff854fa23..0b59849f9e 100644
--- a/sysdeps/i386/i586/memset.S
+++ b/sysdeps/i386/i586/memset.S
@@ -1,6 +1,6 @@
/* memset/bzero -- set memory area to CH/0
Highly optimized version for ix86, x>=5.
- Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 2000, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Torbjorn Granlund, <tege@matematik.su.se>
@@ -114,3 +114,4 @@ L(2): shrl $2, %ecx /* convert byte count to longword count */
RET_PTR
#endif
END (BP_SYM (memset))
+libc_hidden_builtin_def (memset)
diff --git a/sysdeps/i386/i586/strchr.S b/sysdeps/i386/i586/strchr.S
index 02baf1cf50..9df504d335 100644
--- a/sysdeps/i386/i586/strchr.S
+++ b/sysdeps/i386/i586/strchr.S
@@ -1,6 +1,6 @@
/* Find character CH in a NUL terminated string.
Highly optimized version for ix85, x>=5.
- Copyright (C) 1995, 1996, 1997, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1997, 2000, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>.
@@ -339,3 +339,4 @@ END (BP_SYM (strchr))
#undef index
weak_alias (BP_SYM (strchr), BP_SYM (index))
+libc_hidden_builtin_def (strchr)
diff --git a/sysdeps/i386/i586/strcpy.S b/sysdeps/i386/i586/strcpy.S
index fcfeadbb6a..f7c1986b4b 100644
--- a/sysdeps/i386/i586/strcpy.S
+++ b/sysdeps/i386/i586/strcpy.S
@@ -1,5 +1,5 @@
/* strcpy/stpcpy implementation for i586.
- Copyright (C) 1997, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2000, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -159,3 +159,6 @@ L(end2):
LEAVE
RET_PTR
END (BP_SYM (STRCPY))
+#ifndef USE_AS_STPCPY
+libc_hidden_builtin_def (strcpy)
+#endif
diff --git a/sysdeps/i386/i586/strlen.S b/sysdeps/i386/i586/strlen.S
index 34151305cf..9ef22b0c78 100644
--- a/sysdeps/i386/i586/strlen.S
+++ b/sysdeps/i386/i586/strlen.S
@@ -1,6 +1,6 @@
/* strlen -- Compute length of NUL terminated string.
Highly optimized version for ix86, x>=5.
- Copyright (C) 1995, 1996, 1997, 2000, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1995,1996,1997,2000,2002,2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>.
@@ -186,3 +186,4 @@ L(2): CHECK_BOUNDS_HIGH (%eax, STR(%esp), jb)
LEAVE
ret
END (BP_SYM (strlen))
+libc_hidden_builtin_def (strlen)
diff --git a/sysdeps/i386/i686/memcpy.S b/sysdeps/i386/i686/memcpy.S
index b2a78973e2..865967c5c8 100644
--- a/sysdeps/i386/i686/memcpy.S
+++ b/sysdeps/i386/i686/memcpy.S
@@ -1,7 +1,7 @@
/* Copy memory block and return pointer to beginning of destination block
For Intel 80x86, x>=6.
This file is part of the GNU C Library.
- Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2003 Free Software Foundation, Inc.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
The GNU C Library is free software; you can redistribute it and/or
@@ -59,3 +59,4 @@ ENTRY (BP_SYM (memcpy))
LEAVE
RET_PTR
END (BP_SYM (memcpy))
+libc_hidden_builtin_def (memcpy)
diff --git a/sysdeps/i386/i686/memmove.S b/sysdeps/i386/i686/memmove.S
index 76fda405c1..421b4effda 100644
--- a/sysdeps/i386/i686/memmove.S
+++ b/sysdeps/i386/i686/memmove.S
@@ -92,3 +92,4 @@ ENTRY (BP_SYM (memmove))
LEAVE
RET_PTR
END (BP_SYM (memmove))
+libc_hidden_builtin_def (memmove)
diff --git a/sysdeps/i386/i686/memset.S b/sysdeps/i386/i686/memset.S
index be4db96ea3..4ddcb39731 100644
--- a/sysdeps/i386/i686/memset.S
+++ b/sysdeps/i386/i686/memset.S
@@ -1,6 +1,6 @@
/* memset/bzero -- set memory area to CH/0
Highly optimized version for ix86, x>=6.
- Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
@@ -93,3 +93,4 @@ ENTRY (BP_SYM (memset))
RET_PTR
#endif
END (BP_SYM (memset))
+libc_hidden_builtin_def (memset)
diff --git a/sysdeps/i386/i686/strcmp.S b/sysdeps/i386/i686/strcmp.S
index 760d9d8a99..8601c1ca03 100644
--- a/sysdeps/i386/i686/strcmp.S
+++ b/sysdeps/i386/i686/strcmp.S
@@ -1,5 +1,5 @@
/* Highly optimized version for ix86, x>=6.
- Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
@@ -69,3 +69,4 @@ L(chk): CHECK_BOUNDS_HIGH (%ecx, STR1(%esp), jb)
LEAVE
ret
END (BP_SYM (strcmp))
+libc_hidden_builtin_def (strcmp)
diff --git a/sysdeps/i386/memchr.S b/sysdeps/i386/memchr.S
index 9f771982ee..3cfb3d666f 100644
--- a/sysdeps/i386/memchr.S
+++ b/sysdeps/i386/memchr.S
@@ -1,7 +1,7 @@
/* memchr (str, chr, len) -- Return pointer to first occurrence of CHR in STR less
than LEN.
For Intel 80x86, x>=3.
- Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1994-1998, 2000, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>
Optimised a little by Alan Modra <Alan@SPRI.Levels.UniSA.Edu.Au>
@@ -330,3 +330,4 @@ weak_alias (BP_SYM (__memchr), BP_SYM (memchr))
#if !__BOUNDED_POINTERS__
weak_alias (__memchr, __ubp_memchr)
#endif
+libc_hidden_builtin_def (memchr)
diff --git a/sysdeps/i386/memset.c b/sysdeps/i386/memset.c
index 1bbed73ef7..6a7fff8747 100644
--- a/sysdeps/i386/memset.c
+++ b/sysdeps/i386/memset.c
@@ -1,6 +1,6 @@
/* Set a block of memory to some byte value.
For Intel 80x86, x>=3.
- Copyright (C) 1991, 1992, 1993, 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1991,1992,1993,1997,1998,2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Torbjorn Granlund (tege@sics.se).
@@ -79,6 +79,7 @@ memset (void *dstpp, int c, size_t len)
return dstpp;
}
+libc_hidden_builtin_def (memset)
#else
#include <sysdeps/generic/memset.c>
diff --git a/sysdeps/i386/strchr.S b/sysdeps/i386/strchr.S
index f6a6de19a8..f5cee2f872 100644
--- a/sysdeps/i386/strchr.S
+++ b/sysdeps/i386/strchr.S
@@ -1,6 +1,6 @@
/* strchr (str, ch) -- Return pointer to first occurrence of CH in STR.
For Intel 80x86, x>=3.
- Copyright (C) 1994, 1995, 1996, 1997, 1999, 2000, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1994-1997,1999,2000,2002,2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>
Some optimisations by Alan Modra <Alan@SPRI.Levels.UniSA.Edu.Au>
@@ -289,3 +289,4 @@ L(6):
END (BP_SYM (strchr))
weak_alias (BP_SYM (strchr), BP_SYM (index))
+libc_hidden_builtin_def (strchr)
diff --git a/sysdeps/i386/strcspn.S b/sysdeps/i386/strcspn.S
index c5f3d52dd6..dc3a176bf1 100644
--- a/sysdeps/i386/strcspn.S
+++ b/sysdeps/i386/strcspn.S
@@ -1,7 +1,7 @@
/* strcspn (str, ss) -- Return the length of the initial segment of STR
which contains no characters from SS.
For Intel 80x86, x>=3.
- Copyright (C) 1994, 1995, 1996, 1997, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1994,1995,1996,1997,2000,2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>
Bug fixes by Alan Modra <Alan@SPRI.Levels.UniSA.Edu.Au>
@@ -179,3 +179,4 @@ L(4): addl $256, %esp /* remove stopset */
LEAVE
ret
END (BP_SYM (strcspn))
+libc_hidden_builtin_def (strcspn)
diff --git a/sysdeps/i386/string-inlines.c b/sysdeps/i386/string-inlines.c
new file mode 100644
index 0000000000..72a04b7d95
--- /dev/null
+++ b/sysdeps/i386/string-inlines.c
@@ -0,0 +1,189 @@
+/* Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+/* <bits/string.h> and <bits/string2.h> declare some extern inline
+ functions. These functions are declared additionally here if
+ inlining is not possible. */
+
+#undef __USE_STRING_INLINES
+#define __USE_STRING_INLINES
+#define _FORCE_INLINES
+#define __STRING_INLINE /* empty */
+#define __NO_INLINE__
+
+#include <string.h>
+#undef index
+#undef rindex
+
+#undef __NO_INLINE__
+#include <bits/string.h>
+#include <bits/string2.h>
+
+/* Functions which are inlines in i486 but not i386. */
+void *
+__memcpy_by2 (void *dest, const void *src, size_t n)
+{
+ return memcpy (dest, src, n);
+}
+strong_alias (__memcpy_by2, __memcpy_by4)
+strong_alias (__memcpy_by2, __memcpy_g)
+strong_alias (__memcpy_by2, __memcpy_g_internal)
+
+void *
+__memset_ccn_by2 (void *s, unsigned int c, size_t n)
+{
+ return memset (s, c & 0xff, n);
+}
+strong_alias (__memset_ccn_by2, __memset_ccn_by4)
+
+void *
+__memset_gcn_by2 (void *s, int c, size_t n)
+{
+ return memset (s, c, n);
+}
+strong_alias (__memset_gcn_by2, __memset_gcn_by4)
+
+size_t
+__strlen_g (const char *s)
+{
+ return strlen (s);
+}
+
+char *
+__strcpy_g (char *d, const char *s)
+{
+ return strcpy (d, s);
+}
+
+char *
+__mempcpy_by2 (char *d, const char *s, size_t n)
+{
+ return mempcpy (d, s, n);
+}
+strong_alias (__mempcpy_by2, __mempcpy_by4)
+strong_alias (__mempcpy_by2, __mempcpy_byn)
+
+char *
+__stpcpy_g (char *d, const char *s)
+{
+ return stpcpy (d, s);
+}
+
+char *
+__strncpy_by2 (char *d, const char s[], size_t srclen, size_t n)
+{
+ return strncpy (d, s, n);
+}
+strong_alias (__strncpy_by2, __strncpy_by4)
+strong_alias (__strncpy_by2, __strncpy_byn)
+
+char *
+__strncpy_gg (char *d, const char *s, size_t n)
+{
+ return strncpy (d, s, n);
+}
+
+char *
+__strcat_c (char *d, const char s[], size_t srclen)
+{
+ return strcat (d, s);
+}
+
+char *
+__strcat_g (char *d, const char *s)
+{
+ return strcat (d, s);
+}
+
+char *
+__strncat_g (char *d, const char s[], size_t n)
+{
+ return strncat (d, s, n);
+}
+
+int
+__strcmp_gg (const char *s1, const char *s2)
+{
+ return strcmp (s1, s2);
+}
+
+int
+__strncmp_g (const char *s1, const char *s2, size_t n)
+{
+ return strncmp (s1, s2, n);
+}
+
+char *
+__strrchr_c (const char *s, int c)
+{
+ return strrchr (s, c >> 8);
+}
+
+char *
+__strrchr_g (const char *s, int c)
+{
+ return strrchr (s, c);
+}
+
+size_t
+__strcspn_cg (const char *s, const char reject[], size_t reject_len)
+{
+ return strcspn (s, reject);
+}
+
+size_t
+__strcspn_g (const char *s, const char *reject)
+{
+ return strcspn (s, reject);
+}
+
+size_t
+__strspn_cg (const char *s, const char accept[], size_t accept_len)
+{
+ return strspn (s, accept);
+}
+
+size_t
+__strspn_g (const char *s, const char *accept)
+{
+ return strspn (s, accept);
+}
+
+char *
+__strpbrk_cg (const char *s, const char accept[], size_t accept_len)
+{
+ return strpbrk (s, accept);
+}
+
+char *
+__strpbrk_g (const char *s, const char *accept)
+{
+ return strpbrk (s, accept);
+}
+
+char *
+__strstr_cg (const char *haystack, const char needle[], size_t needle_len)
+{
+ return strstr (haystack, needle);
+}
+
+char *
+__strstr_g (const char *haystack, const char needle[])
+{
+ return strstr (haystack, needle);
+}
diff --git a/sysdeps/i386/strlen.c b/sysdeps/i386/strlen.c
index b21414ee32..93bf1506ea 100644
--- a/sysdeps/i386/strlen.c
+++ b/sysdeps/i386/strlen.c
@@ -1,5 +1,5 @@
/* Determine the length of a string. For Intel 80x86, x>=3.
- Copyright (C) 1991, 1992, 1993, 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1991,1992,1993,1996,1997,2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Torbjorn Granlund (tege@sics.se).
@@ -33,3 +33,4 @@ strlen (const char *str)
return -2 - cnt;
}
+libc_hidden_builtin_def (strlen)
diff --git a/sysdeps/i386/strpbrk.S b/sysdeps/i386/strpbrk.S
index ddc3ceeca4..66136c209e 100644
--- a/sysdeps/i386/strpbrk.S
+++ b/sysdeps/i386/strpbrk.S
@@ -1,7 +1,7 @@
/* strcspn (str, ss) -- Return the length of the initial segement of STR
which contains no characters from SS.
For Intel 80x86, x>=3.
- Copyright (C) 1994, 1995, 1996, 1997, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1994-1997, 2000, 2003 Free Software Foundation, Inc.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>
Bug fixes by Alan Modra <Alan@SPRI.Levels.UniSA.Edu.Au>
This file is part of the GNU C Library.
@@ -188,3 +188,4 @@ L(7): RETURN_BOUNDED_POINTER (STR(%esp))
LEAVE
RET_PTR
END (BP_SYM (strpbrk))
+libc_hidden_builtin_def (strpbrk)
diff --git a/sysdeps/i386/strrchr.S b/sysdeps/i386/strrchr.S
index de6a28a8d3..0fd95b54f5 100644
--- a/sysdeps/i386/strrchr.S
+++ b/sysdeps/i386/strrchr.S
@@ -1,6 +1,6 @@
/* strrchr (str, ch) -- Return pointer to last occurrence of CH in STR.
For Intel 80x86, x>=3.
- Copyright (C) 1994, 1995, 1996, 1997, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1994-1997, 2000, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>
Some optimisations by Alan Modra <Alan@SPRI.Levels.UniSA.Edu.Au>
@@ -331,3 +331,4 @@ L(2): CHECK_BOUNDS_HIGH (%eax, STR(%esp), jb)
END (BP_SYM (strrchr))
weak_alias (BP_SYM (strrchr), BP_SYM (rindex))
+libc_hidden_builtin_def (strrchr)
diff --git a/sysdeps/i386/strspn.S b/sysdeps/i386/strspn.S
index 4ceb3c145b..e1c109e590 100644
--- a/sysdeps/i386/strspn.S
+++ b/sysdeps/i386/strspn.S
@@ -1,7 +1,7 @@
/* strcspn (str, ss) -- Return the length of the initial segment of STR
which contains only characters from SS.
For Intel 80x86, x>=3.
- Copyright (C) 1994, 1995, 1996, 1997, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1994-1997, 2000, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>
Bug fixes by Alan Modra <Alan@SPRI.Levels.UniSA.Edu.Au>
@@ -179,3 +179,4 @@ L(4): addl $256, %esp /* remove stopset */
LEAVE
ret
END (BP_SYM (strspn))
+libc_hidden_builtin_def (strspn)