aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-12-08 17:27:11 +0000
committerUlrich Drepper <drepper@redhat.com>2000-12-08 17:27:11 +0000
commit104d0bd3ef1ea7a97ae7b3e4a8a63a08b92cfc1c (patch)
tree211aa48f0dbfe5720f4fadaf86e33f9a7dbb5dc8
parent4e9b4067d74d2d943de6918f39c15eb8f8f11b22 (diff)
downloadglibc-104d0bd3ef1ea7a97ae7b3e4a8a63a08b92cfc1c.tar.xz
glibc-104d0bd3ef1ea7a97ae7b3e4a8a63a08b92cfc1c.zip
Update.
2000-12-08 Jakub Jelinek <jakub@redhat.com> * elf/dl-load.c (fillin_rpath): Don't assume there is '\0' at cp + len. Compute where from dirname. Reported by <jreiser@BitWagon.com>. 2000-12-08 Richard Henderson <rth@twiddle.net> * sysdeps/alpha/_mcount.S: Fix typo. * sysdeps/alpha/strncpy.S: Likewise. * sysdeps/alpha/alphaev6/Implies: New file. * sysdeps/alpha/alphaev67/Implies: New file. * sysdeps/alpha/alphaev67/ffs.S: New file. * sysdeps/alpha/alphaev67/ffsll.S: New file. * sysdeps/alpha/alphaev67/rawmemchr.S: New file. * sysdeps/alpha/alphaev67/stpcpy.S: New file. * sysdeps/alpha/alphaev67/stpncpy.S: New file. * sysdeps/alpha/rawmemchr.S: New file. * sysdeps/alpha/strcat.S: Tail call to __stxcpy. * sysdeps/alpha/strcpy.S: Likewise. From GMP 3.1.1: * sysdeps/alpha/alphaev6/addmul_1.s: New file. From rick.gorton@alpha-processor.com: * sysdeps/alpha/alphaev6/memchr.S: New file. * sysdeps/alpha/alphaev6/memcpy.S: New file. * sysdeps/alpha/alphaev6/memset.S: New file. * sysdeps/alpha/alphaev6/stxcpy.S: New file. * sysdeps/alpha/alphaev6/stxncpy.S: New file. * sysdeps/alpha/alphaev67/strcat.S: New file. * sysdeps/alpha/alphaev67/strchr.S: New file. * sysdeps/alpha/alphaev67/strlen.S: New file. * sysdeps/alpha/alphaev67/strncat.S: New file. * sysdeps/alpha/htonl.S: Use a shorter sequence. 2000-12-08 Jakub Jelinek <jakub@redhat.com> * inet/getnameinfo.c (getnameinfo): Fix NI_NOFQDN support. Reported by <pspencer@fields.utoronto.ca>. 2000-12-07 Jes Sorensen <jes@linuxcare.com> * sysdeps/ia64/elf/start.S (__data_start): Add __data_start variable. Pointed out by Hans Boehm. 2000-12-07 H.J. Lu <hjl@gnu.org> * elf/dl-version.c (match_symbol): Check map->l_name[0] for printing. 2000-12-07 Andreas Jaeger <aj@suse.de> * misc/error.c: Add format attributes for __error and __error_at_line. * nscd/dbg_log.h: Add format attribute. 2000-12-08 Ulrich Drepper <drepper@redhat.com> * misc/sys/syslog.h: Add format attributes to syslog and vsyslog. Patch by Joseph S. Myers <jsm28@cam.ac.uk>. * sysdeps/generic/dl-cache.c (HWCAP_CHECK): Fix access to _dl_hwcap. * manual/install.texi: Recommend to set LANGUAGE=C LC_ALL=C during
-rw-r--r--ChangeLog67
-rw-r--r--elf/dl-load.c2
-rw-r--r--elf/dl-version.c2
-rw-r--r--inet/getnameinfo.c2
-rw-r--r--misc/error.c6
-rw-r--r--misc/sys/syslog.h5
-rw-r--r--nscd/dbg_log.h3
-rw-r--r--sysdeps/alpha/_mcount.S2
-rw-r--r--sysdeps/alpha/alphaev6/Implies1
-rw-r--r--sysdeps/alpha/alphaev6/addmul_1.s479
-rw-r--r--sysdeps/alpha/alphaev6/memchr.S192
-rw-r--r--sysdeps/alpha/alphaev6/memcpy.S254
-rw-r--r--sysdeps/alpha/alphaev6/memset.S224
-rw-r--r--sysdeps/alpha/alphaev6/stxcpy.S329
-rw-r--r--sysdeps/alpha/alphaev6/stxncpy.S405
-rw-r--r--sysdeps/alpha/alphaev67/Implies1
-rw-r--r--sysdeps/alpha/alphaev67/ffs.S50
-rw-r--r--sysdeps/alpha/alphaev67/ffsll.S45
-rw-r--r--sysdeps/alpha/alphaev67/rawmemchr.S93
-rw-r--r--sysdeps/alpha/alphaev67/stpcpy.S52
-rw-r--r--sysdeps/alpha/alphaev67/stpncpy.S116
-rw-r--r--sysdeps/alpha/alphaev67/strcat.S62
-rw-r--r--sysdeps/alpha/alphaev67/strchr.S101
-rw-r--r--sysdeps/alpha/alphaev67/strlen.S61
-rw-r--r--sysdeps/alpha/alphaev67/strncat.S101
-rw-r--r--sysdeps/alpha/htonl.S18
-rw-r--r--sysdeps/alpha/rawmemchr.S89
-rw-r--r--sysdeps/alpha/strcat.S4
-rw-r--r--sysdeps/alpha/strcpy.S4
-rw-r--r--sysdeps/alpha/strncpy.S1
-rw-r--r--sysdeps/ia64/elf/start.S8
31 files changed, 2752 insertions, 27 deletions
diff --git a/ChangeLog b/ChangeLog
index b72227c923..e6ebbb82b6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,65 @@
+2000-12-08 Jakub Jelinek <jakub@redhat.com>
+
+ * elf/dl-load.c (fillin_rpath): Don't assume there is '\0' at
+ cp + len. Compute where from dirname.
+ Reported by <jreiser@BitWagon.com>.
+
+2000-12-08 Richard Henderson <rth@twiddle.net>
+
+ * sysdeps/alpha/_mcount.S: Fix typo.
+ * sysdeps/alpha/strncpy.S: Likewise.
+
+ * sysdeps/alpha/alphaev6/Implies: New file.
+ * sysdeps/alpha/alphaev67/Implies: New file.
+ * sysdeps/alpha/alphaev67/ffs.S: New file.
+ * sysdeps/alpha/alphaev67/ffsll.S: New file.
+ * sysdeps/alpha/alphaev67/rawmemchr.S: New file.
+ * sysdeps/alpha/alphaev67/stpcpy.S: New file.
+ * sysdeps/alpha/alphaev67/stpncpy.S: New file.
+ * sysdeps/alpha/rawmemchr.S: New file.
+ * sysdeps/alpha/strcat.S: Tail call to __stxcpy.
+ * sysdeps/alpha/strcpy.S: Likewise.
+
+ From GMP 3.1.1:
+ * sysdeps/alpha/alphaev6/addmul_1.s: New file.
+
+ From rick.gorton@alpha-processor.com:
+ * sysdeps/alpha/alphaev6/memchr.S: New file.
+ * sysdeps/alpha/alphaev6/memcpy.S: New file.
+ * sysdeps/alpha/alphaev6/memset.S: New file.
+ * sysdeps/alpha/alphaev6/stxcpy.S: New file.
+ * sysdeps/alpha/alphaev6/stxncpy.S: New file.
+ * sysdeps/alpha/alphaev67/strcat.S: New file.
+ * sysdeps/alpha/alphaev67/strchr.S: New file.
+ * sysdeps/alpha/alphaev67/strlen.S: New file.
+ * sysdeps/alpha/alphaev67/strncat.S: New file.
+ * sysdeps/alpha/htonl.S: Use a shorter sequence.
+
+2000-12-08 Jakub Jelinek <jakub@redhat.com>
+
+ * inet/getnameinfo.c (getnameinfo): Fix NI_NOFQDN support.
+ Reported by <pspencer@fields.utoronto.ca>.
+
+2000-12-07 Jes Sorensen <jes@linuxcare.com>
+
+ * sysdeps/ia64/elf/start.S (__data_start): Add __data_start variable.
+ Pointed out by Hans Boehm.
+
+2000-12-07 H.J. Lu <hjl@gnu.org>
+
+ * elf/dl-version.c (match_symbol): Check map->l_name[0] for printing.
+
+2000-12-07 Andreas Jaeger <aj@suse.de>
+
+ * misc/error.c: Add format attributes for __error and __error_at_line.
+
+ * nscd/dbg_log.h: Add format attribute.
+
+2000-12-08 Ulrich Drepper <drepper@redhat.com>
+
+ * misc/sys/syslog.h: Add format attributes to syslog and vsyslog.
+ Patch by Joseph S. Myers <jsm28@cam.ac.uk>.
+
2000-12-07 Dan Pop <Dan.Pop@cern.ch>
* sysdeps/ia64/strcpy.S: Fix a bug in a recovery code sequence.
@@ -948,8 +1010,7 @@
2000-11-14 Andreas Jaeger <aj@suse.de>
- * sysdeps/generic/dl-cache.c (HWCAP_CHECK): Fix access to
- _dl_hwcap.
+ * sysdeps/generic/dl-cache.c (HWCAP_CHECK): Fix access to _dl_hwcap.
2000-11-13 Roland McGrath <roland@frob.com>
@@ -992,7 +1053,7 @@
2000-11-03 Bruno Haible <haible@clisp.cons.org>
- * manual/install.texi: Recommend to set LANGUAGE=C LC_ALL-C during
+ * manual/install.texi: Recommend to set LANGUAGE=C LC_ALL=C during
"make install", to work around a binary incompatibility between
glibc 2.1 and glibc 2.2 gconv modules.
diff --git a/elf/dl-load.c b/elf/dl-load.c
index 600f5f9fe9..f42cb61ea3 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -419,7 +419,7 @@ fillin_rpath (char *rpath, struct r_search_path_elem **result, const char *sep,
dirp->dirname = ((char *) dirp + sizeof (*dirp)
+ ncapstr * sizeof (enum r_dir_status));
- memcpy ((char *) dirp->dirname, cp, len + 1);
+ *((char *) __mempcpy ((char *) dirp->dirname, cp, len)) = '\0';
dirp->dirnamelen = len;
if (len > max_dirnamelen)
diff --git a/elf/dl-version.c b/elf/dl-version.c
index bb0fc71e9d..1ae49587f4 100644
--- a/elf/dl-version.c
+++ b/elf/dl-version.c
@@ -95,7 +95,7 @@ match_symbol (const char *name, ElfW(Word) hash, const char *string,
only print a message if verbose output is requested. */
if (verbose)
/* XXX We cannot translate the messages. */
- _dl_signal_cerror (0, map->l_name,
+ _dl_signal_cerror (0, map->l_name[0] ? map->l_name : _dl_argv[0],
make_string ("\
no version information available (required by ",
name, ")"));
diff --git a/inet/getnameinfo.c b/inet/getnameinfo.c
index 435ba76ee5..9d37786441 100644
--- a/inet/getnameinfo.c
+++ b/inet/getnameinfo.c
@@ -259,7 +259,7 @@ getnameinfo (const struct sockaddr *sa, socklen_t addrlen, char *host,
if (h)
{
char *c;
- if ((flags & NI_NOFQDN) == 0
+ if ((flags & NI_NOFQDN)
&& (c = nrl_domainname ())
&& (c = strstr (h->h_name, c))
&& (c != h->h_name) && (*(--c) == '.'))
diff --git a/misc/error.c b/misc/error.c
index 599de78629..8758bd0ade 100644
--- a/misc/error.c
+++ b/misc/error.c
@@ -74,10 +74,12 @@ unsigned int error_message_count;
/* In GNU libc we want do not want to use the common name `error' directly.
Instead make it a weak alias. */
-extern void __error (int status, int errnum, const char *message, ...);
+extern void __error (int status, int errnum, const char *message, ...)
+ __attribute__ ((__format__ (__printf__, 3, 4)));
extern void __error_at_line (int status, int errnum, const char *file_name,
unsigned int line_number, const char *message,
- ...);
+ ...)
+ __attribute__ ((__format__ (__printf__, 5, 6)));;
# define error __error
# define error_at_line __error_at_line
diff --git a/misc/sys/syslog.h b/misc/sys/syslog.h
index a2b720909a..940ee2dec3 100644
--- a/misc/sys/syslog.h
+++ b/misc/sys/syslog.h
@@ -179,12 +179,13 @@ extern void openlog (__const char *__ident, int __option, int __facility)
extern int setlogmask (int __mask) __THROW;
/* Generate a log message using FMT string and option arguments. */
-extern void syslog (int __pri, __const char *__fmt, ...) __THROW;
+extern void syslog (int __pri, __const char *__fmt, ...) __THROW
+ __attribute__ ((__format__(__printf__, 2, 3)));
#ifdef __USE_BSD
/* Generate a log message using FMT and using arguments pointed to by AP. */
extern void vsyslog (int __pri, __const char *__fmt, __gnuc_va_list __ap)
- __THROW;
+ __THROW __attribute__ ((__format__(__printf__, 2, 0)));
#endif
__END_DECLS
diff --git a/nscd/dbg_log.h b/nscd/dbg_log.h
index 5aeff89f6a..70530982e5 100644
--- a/nscd/dbg_log.h
+++ b/nscd/dbg_log.h
@@ -22,7 +22,8 @@
extern int debug_level;
-extern void dbg_log (const char *str, ...);
+extern void dbg_log (const char *str, ...)
+ __attribute__ ((__format__ (__printf__, 1, 0)));;
extern int set_logfile (const char *logfile);
diff --git a/sysdeps/alpha/_mcount.S b/sysdeps/alpha/_mcount.S
index f4c234db38..615f43938d 100644
--- a/sysdeps/alpha/_mcount.S
+++ b/sysdeps/alpha/_mcount.S
@@ -27,7 +27,7 @@
compiler treats those calls as if they were instructions. In
particular, it doesn't save any of the temporary registers (caller
saved registers). It is therefore necessary to preserve all
- caller-saved registers as well
+ caller-saved registers as well.
Upon entering _mcount, register $at holds the return address and ra
holds the return address of the function's caller (selfpc and frompc,
diff --git a/sysdeps/alpha/alphaev6/Implies b/sysdeps/alpha/alphaev6/Implies
new file mode 100644
index 0000000000..0e7fc170ba
--- /dev/null
+++ b/sysdeps/alpha/alphaev6/Implies
@@ -0,0 +1 @@
+alpha/alphaev5
diff --git a/sysdeps/alpha/alphaev6/addmul_1.s b/sysdeps/alpha/alphaev6/addmul_1.s
new file mode 100644
index 0000000000..a061fb9edb
--- /dev/null
+++ b/sysdeps/alpha/alphaev6/addmul_1.s
@@ -0,0 +1,479 @@
+ # Alpha ev6 mpn_addmul_1 -- Multiply a limb vector with a limb and add
+ # the result to a second limb vector.
+ #
+ # Copyright (C) 2000 Free Software Foundation, Inc.
+ #
+ # This file is part of the GNU MP Library.
+ #
+ # The GNU MP 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 MP 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 MP Library; see the file COPYING.LIB. If not, write to
+ # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ # MA 02111-1307, USA.
+
+ # INPUT PARAMETERS
+ # res_ptr $16
+ # s1_ptr $17
+ # size $18
+ # s2_limb $19
+ #
+ # This code runs at 42 cycles/limb on EV4, 18 cycles/limb on EV5, and
+ # exactly 3.625 cycles/limb on EV6...
+ #
+ # This code was written in close cooperation with ev6 pipeline expert
+ # Steve Root (root@toober.hlo.dec.com). Any errors are tege's fault, though.
+ #
+ # Register usages for unrolled loop:
+ # 0-3 mul's
+ # 4-7 acc's
+ # 8-15 mul results
+ # 20,21 carry's
+ # 22,23 save for stores
+ #
+ # Sustains 8 mul-adds in 29 cycles in the unrolled inner loop.
+ #
+ # The stores can issue a cycle late so we have paired no-op's to 'catch'
+ # them, so that further disturbance to the schedule is damped.
+ #
+ # We couldn't pair the loads, because the entangled schedule of the
+ # carry's has to happen on one side {0} of the machine. Note, the total
+ # use of U0, and the total use of L0 (after attending to the stores).
+ # which is part of the reason why....
+ #
+ # This is a great schedule for the d_cache, a poor schedule for the
+ # b_cache. The lockup on U0 means that any stall can't be recovered
+ # from. Consider a ldq in L1. say that load gets stalled because it
+ # collides with a fill from the b_Cache. On the next cycle, this load
+ # gets priority. If first looks at L0, and goes there. The instruction
+ # we intended for L0 gets to look at L1, which is NOT where we want
+ # it. It either stalls 1, because it can't go in L0, or goes there, and
+ # causes a further instruction to stall.
+ #
+ # So for b_cache, we're likely going to want to put one or more cycles
+ # back into the code! And, of course, put in prefetches. For the
+ # accumulator, lds, intent to modify. For the multiplier, you might
+ # want ldq, evict next, if you're not wanting to use it again soon. Use
+ # 256 ahead of present pointer value. At a place where we have an mt
+ # followed by a bookkeeping, put the bookkeeping in upper, and the
+ # prefetch into lower.
+ #
+ # Note, the usage of physical registers per cycle is smoothed off, as
+ # much as possible.
+ #
+ # Note, the ldq's and stq's are at the end of the quadpacks. note, we'd
+ # like not to have a ldq or stq to preceded a conditional branch in a
+ # quadpack. The conditional branch moves the retire pointer one cycle
+ # later.
+ #
+ # Optimization notes:
+ # Callee-saves regs: $9 $10 $11 $12 $13 $14 $15 $26 ?$27?
+ # Reserved regs: $29 $30 $31
+ # Free caller-saves regs in unrolled code: $24 $25 $28
+ # We should swap some of the callee-saves regs for some of the free
+ # caller-saves regs, saving some overhead cycles.
+ # Most importantly, we should write fast code for the 0-7 case.
+ # The code we use there are for the 21164, and runs at 7 cycles/limb
+ # on the 21264. Should not be hard, if we write specialized code for
+ # 1-7 limbs (the one for 0 limbs should be straightforward). We then just
+ # need a jump table indexed by the low 3 bits of the count argument.
+
+ .set noreorder
+ .set noat
+ .text
+
+ .globl __mpn_addmul_1
+ .ent __mpn_addmul_1
+__mpn_addmul_1:
+ .frame $30,0,$26,0
+ .prologue 0
+
+ cmpult $18, 8, $1
+ beq $1, $Large
+
+ ldq $2, 0($17) # $2 = s1_limb
+ addq $17, 8, $17 # s1_ptr++
+ subq $18, 1, $18 # size--
+ mulq $2, $19, $3 # $3 = prod_low
+ ldq $5, 0($16) # $5 = *res_ptr
+ umulh $2, $19, $0 # $0 = prod_high
+ beq $18, $Lend0b # jump if size was == 1
+ ldq $2, 0($17) # $2 = s1_limb
+ addq $17, 8, $17 # s1_ptr++
+ subq $18, 1, $18 # size--
+ addq $5, $3, $3
+ cmpult $3, $5, $4
+ stq $3, 0($16)
+ addq $16, 8, $16 # res_ptr++
+ beq $18, $Lend0a # jump if size was == 2
+
+ .align 3
+$Loop0: mulq $2, $19, $3 # $3 = prod_low
+ ldq $5, 0($16) # $5 = *res_ptr
+ addq $4, $0, $0 # cy_limb = cy_limb + 'cy'
+ subq $18, 1, $18 # size--
+ umulh $2, $19, $4 # $4 = cy_limb
+ ldq $2, 0($17) # $2 = s1_limb
+ addq $17, 8, $17 # s1_ptr++
+ addq $3, $0, $3 # $3 = cy_limb + prod_low
+ cmpult $3, $0, $0 # $0 = carry from (cy_limb + prod_low)
+ addq $5, $3, $3
+ cmpult $3, $5, $5
+ stq $3, 0($16)
+ addq $16, 8, $16 # res_ptr++
+ addq $5, $0, $0 # combine carries
+ bne $18, $Loop0
+$Lend0a:
+ mulq $2, $19, $3 # $3 = prod_low
+ ldq $5, 0($16) # $5 = *res_ptr
+ addq $4, $0, $0 # cy_limb = cy_limb + 'cy'
+ umulh $2, $19, $4 # $4 = cy_limb
+ addq $3, $0, $3 # $3 = cy_limb + prod_low
+ cmpult $3, $0, $0 # $0 = carry from (cy_limb + prod_low)
+ addq $5, $3, $3
+ cmpult $3, $5, $5
+ stq $3, 0($16)
+ addq $5, $0, $0 # combine carries
+ addq $4, $0, $0 # cy_limb = prod_high + cy
+ ret $31, ($26), 1
+$Lend0b:
+ addq $5, $3, $3
+ cmpult $3, $5, $5
+ stq $3, 0($16)
+ addq $0, $5, $0
+ ret $31, ($26), 1
+
+$Large:
+ lda $30, -240($30)
+ stq $9, 8($30)
+ stq $10, 16($30)
+ stq $11, 24($30)
+ stq $12, 32($30)
+ stq $13, 40($30)
+ stq $14, 48($30)
+ stq $15, 56($30)
+
+ and $18, 7, $20 # count for the first loop, 0-7
+ srl $18, 3, $18 # count for unrolled loop
+ bis $31, $31, $0
+ beq $20, $Lunroll
+ ldq $2, 0($17) # $2 = s1_limb
+ addq $17, 8, $17 # s1_ptr++
+ subq $20, 1, $20 # size--
+ mulq $2, $19, $3 # $3 = prod_low
+ ldq $5, 0($16) # $5 = *res_ptr
+ umulh $2, $19, $0 # $0 = prod_high
+ beq $20, $Lend1b # jump if size was == 1
+ ldq $2, 0($17) # $2 = s1_limb
+ addq $17, 8, $17 # s1_ptr++
+ subq $20, 1, $20 # size--
+ addq $5, $3, $3
+ cmpult $3, $5, $4
+ stq $3, 0($16)
+ addq $16, 8, $16 # res_ptr++
+ beq $20, $Lend1a # jump if size was == 2
+
+ .align 3
+$Loop1: mulq $2, $19, $3 # $3 = prod_low
+ ldq $5, 0($16) # $5 = *res_ptr
+ addq $4, $0, $0 # cy_limb = cy_limb + 'cy'
+ subq $20, 1, $20 # size--
+ umulh $2, $19, $4 # $4 = cy_limb
+ ldq $2, 0($17) # $2 = s1_limb
+ addq $17, 8, $17 # s1_ptr++
+ addq $3, $0, $3 # $3 = cy_limb + prod_low
+ cmpult $3, $0, $0 # $0 = carry from (cy_limb + prod_low)
+ addq $5, $3, $3
+ cmpult $3, $5, $5
+ stq $3, 0($16)
+ addq $16, 8, $16 # res_ptr++
+ addq $5, $0, $0 # combine carries
+ bne $20, $Loop1
+
+$Lend1a:
+ mulq $2, $19, $3 # $3 = prod_low
+ ldq $5, 0($16) # $5 = *res_ptr
+ addq $4, $0, $0 # cy_limb = cy_limb + 'cy'
+ umulh $2, $19, $4 # $4 = cy_limb