aboutsummaryrefslogtreecommitdiff
path: root/string
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-05-28 06:56:51 +0000
committerUlrich Drepper <drepper@redhat.com>2004-05-28 06:56:51 +0000
commit3dbfd8117c2d109b63e5bec1e4952aab40d19660 (patch)
tree056bec6d4cb34ebd2024c2b28443aed49f4a6c52 /string
parent44809672d3d71c8fc2d779e1d7ddbd5ca5a02f88 (diff)
downloadglibc-3dbfd8117c2d109b63e5bec1e4952aab40d19660.zip
glibc-3dbfd8117c2d109b63e5bec1e4952aab40d19660.tar.gz
glibc-3dbfd8117c2d109b63e5bec1e4952aab40d19660.tar.bz2
Update.
2004-05-27 Jakub Jelinek <jakub@redhat.com> * sysdeps/i386/fpu/bits/mathinline.h (__expm1_code): Define using __builtin_expm1l for GCC 3.5+. (__expl): Define using __builtin_expl for GCC 3.4+. (exp, expf, expl): Don't define for GCC 3.4+. (tan, tanf, tanl): Don't define for GCC 3.5+. (__atan2l): Define using __builtin_atan2l for GCC 3.4+. (atan2, atan2f, atan2l): Don't define for GCC 3.4+ or !__FAST_MATH__. (fmod, fmodf, fmodl): Don't define for GCC 3.5+ or !__FAST_MATH__. (fabsf, fabsl): Only provide if __USE_MISC or __USE_ISOC99. (sin, sinf, sinl, cos, cosf, cosl, log, logf, logl): Don't define for GCC 3.4+. (log10, log10f, log10l, asin, asinf, asinl, acos, acosf, acosl): Don't define for GCC 3.5+. (atan, atanf, atanl): Don't define for GCC 3.4+ or !__FAST_MATH__. (log1p, log1pf, log1pl, logb, logbf, logbl, log2, log2f, log2l): Don't define for GCC 3.5+. (drem, dremf, dreml): Don't define for GCC 3.5+ or !__FAST_MATH__. * sysdeps/sparc/fpu/bits/mathinline.h (sqrt, sqrtf, sqrtl): Don't define for GCC 3.2+. 2004-05-27 Jakub Jelinek <jakub@redhat.com> * string/bits/string2.h (__bzero): Define even for GCC 3.0+. * sysdeps/alpha/stpcpy.S (stpcpy): Add libc_hidden_builtin_def. * sysdeps/alpha/alphaev67/stpcpy.S (stpcpy): Likewise. * sysdeps/powerpc/powerpc32/stpcpy.S (stpcpy): Likewise. * sysdeps/powerpc/powerpc64/stpcpy.S (stpcpy): Likewise. * sysdeps/sparc/sparc32/stpcpy.S (stpcpy): Likewise. * sysdeps/sparc/sparc64/stpcpy.S (stpcpy): Likewise. * sysdeps/i386/stpcpy.S (stpcpy): Likewise. * sysdeps/i386/i586/stpcpy.S (stpcpy): Likewise. * sysdeps/generic/stpcpy.c (stpcpy): Likewise. * sysdeps/x86_64/stpcpy.S (stpcpy): Likewise. * sysdeps/i386/i586/memcpy.S (memcpy): Remove libc_hidden_builtin_def if MEMPCPY_P. * sysdeps/x86_64/memcpy.S (memcpy): Likewise. * sysdeps/i386/i686/mempcpy.S (mempcpy): Add libc_hidden_builtin_def. * sysdeps/i386/i586/mempcpy.S (mempcpy): Likewise. * sysdeps/generic/mempcpy.c (mempcpy): Likewise. * sysdeps/x86_64/mempcpy.S (mempcpy): Likewise.
Diffstat (limited to 'string')
-rw-r--r--string/bits/string2.h23
1 files changed, 14 insertions, 9 deletions
diff --git a/string/bits/string2.h b/string/bits/string2.h
index 665a711..ba84da2 100644
--- a/string/bits/string2.h
+++ b/string/bits/string2.h
@@ -94,9 +94,10 @@ __STRING2_COPY_TYPE (8);
((size_t)(const void *)((__x) + 1) - (size_t)(const void *)(__x) == 1)
/* Set N bytes of S to C. */
-#if !defined _HAVE_STRING_ARCH_memset && ! __GNUC_PREREQ (3, 0)
-# if _STRING_ARCH_unaligned
-# define memset(s, c, n) \
+#if !defined _HAVE_STRING_ARCH_memset
+# if !__GNUC_PREREQ (3, 0)
+# if _STRING_ARCH_unaligned
+# define memset(s, c, n) \
(__extension__ (__builtin_constant_p (n) && (n) <= 16 \
? ((n) == 1 \
? __memset_1 (s, c) \
@@ -105,10 +106,10 @@ __STRING2_COPY_TYPE (8);
? ({ void *__s = (s); __bzero (__s, n); __s; }) \
: memset (s, c, n))))
-# define __memset_1(s, c) ({ void *__s = (s); \
+# define __memset_1(s, c) ({ void *__s = (s); \
*((__uint8_t *) __s) = (__uint8_t) c; __s; })
-# define __memset_gc(s, c, n) \
+# define __memset_gc(s, c, n) \
({ void *__s = (s); \
union { \
unsigned int __ui; \
@@ -177,15 +178,19 @@ __STRING2_COPY_TYPE (8);
} \
\
__s; })
-# else
-# define memset(s, c, n) \
+# else
+# define memset(s, c, n) \
(__extension__ (__builtin_constant_p (c) && (c) == '\0' \
? ({ void *__s = (s); __bzero (__s, n); __s; }) \
: memset (s, c, n)))
+# endif
# endif
-/* GCC optimizes memset(s, 0, n) but not bzero(s, n).
- The optimization is broken before EGCS 1.1. */
+/* GCC < 3.0 optimizes memset(s, 0, n) but not bzero(s, n).
+ The optimization is broken before EGCS 1.1.
+ GCC 3.0+ has __builtin_bzero as well, but at least till GCC 3.4
+ if it decides to call the library function, it calls memset
+ and not bzero. */
# if __GNUC_PREREQ (2, 91)
# define __bzero(s, n) __builtin_memset (s, '\0', n)
# endif