aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-05-01 09:59:45 +0000
committerUlrich Drepper <drepper@redhat.com>1999-05-01 09:59:45 +0000
commita97d1494f7dc5ec6978aa234b15faff29a4607ee (patch)
treef62452d0d55dce0b97bbe9b8c650fb5d9d23cbd4
parent0d3fe819f6e584ccd1146ffba91c24ae06374ffa (diff)
downloadglibc-a97d1494f7dc5ec6978aa234b15faff29a4607ee.zip
glibc-a97d1494f7dc5ec6978aa234b15faff29a4607ee.tar.gz
glibc-a97d1494f7dc5ec6978aa234b15faff29a4607ee.tar.bz2
Update.
* string/bits/string2.h: Only use __builtin_memset for egcs 1.1 and gcc3.
-rw-r--r--ChangeLog3
-rw-r--r--string/bits/string2.h5
-rw-r--r--sysdeps/i386/i486/bits/string.h2
3 files changed, 7 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index d94efcf..c1bcefe 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
1999-05-01 Ulrich Drepper <drepper@cygnus.com>
+ * string/bits/string2.h: Only use __builtin_memset for egcs 1.1 and
+ gcc3.
+
* sysdeps/i386/i486/bits/string.h: Don't use and define __memset_gg.
Prevent warnings from multiplication with 0x01010101 by another cast.
diff --git a/string/bits/string2.h b/string/bits/string2.h
index aedadf4..4d67c57 100644
--- a/string/bits/string2.h
+++ b/string/bits/string2.h
@@ -166,8 +166,9 @@ __STRING2_COPY_TYPE (8);
# endif
/* GCC optimizes memset(s, 0, n) but not bzero(s, n). */
-# if defined __GNUC__ && __GNUC__ >= 2
-# define __bzero(s, n) __builtin_memset(s, '\0', n)
+#if defined __GNUC__ \
+ && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 90))
+# define __bzero(s, n) __builtin_memset (s, '\0', n)
# endif
#endif
diff --git a/sysdeps/i386/i486/bits/string.h b/sysdeps/i386/i486/bits/string.h
index 70a6000..e726a34 100644
--- a/sysdeps/i386/i486/bits/string.h
+++ b/sysdeps/i386/i486/bits/string.h
@@ -296,7 +296,7 @@ __memset_ccn_by4 (void *__s, unsigned int __c, size_t __n)
"addl $4,%1\n\t"
"decl %2\n\t"
"jnz 1b\n"
- : "=&q" (__c), "=&r" (__tmp), "=&r" (__d0)
+ : "=&r" (__c), "=&r" (__tmp), "=&r" (__d0)
: "0" ((unsigned int) __c), "1" (__tmp), "2" (__n / 4)
: "memory", "cc");
#endif