aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/ia64
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-07-07 22:59:32 +0000
committerUlrich Drepper <drepper@redhat.com>2001-07-07 22:59:32 +0000
commit4dbb64174c5cc00dc2aa40784b57889f8e0b6c5e (patch)
tree0a5ac4e80a8c27a74046376f86685b8b110e02ce /sysdeps/ia64
parent6c112c15ad8d27dd8da9fdac1088ed274ecdf036 (diff)
downloadglibc-4dbb64174c5cc00dc2aa40784b57889f8e0b6c5e.tar
glibc-4dbb64174c5cc00dc2aa40784b57889f8e0b6c5e.tar.gz
glibc-4dbb64174c5cc00dc2aa40784b57889f8e0b6c5e.tar.bz2
glibc-4dbb64174c5cc00dc2aa40784b57889f8e0b6c5e.zip
Update.
2001-07-06 Jakub Jelinek <jakub@redhat.com> * sysdeps/unix/sysv/linux/i386/sigaction.c (RESTORE2): Put asm explicitly into .text section. 2001-04-16 Jes Sorensen <jes@linuxcare.com> * sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h (struct sigcontext): Add 16 longwords reserved for future use to match changes in the kernel. 2001-07-03 Jes Sorensen <jes@trained-monkey.org> * sysdeps/ia64/strncpy.S: Call strnlen() when determining the string length rather than strlen(). Solves the performance problem of doing strlen on a 5MB string when strncpy was called with a length argument of 5 bytes. 2001-07-02 Jakub Jelinek <jakub@redhat.com> * sysdeps/sparc/sparc32/dl-machine.h (elf_machine_rela): Handle R_SPARC_UA16 and R_SPARC_UA32. * sysdeps/sparc/sparc64/dl-machine.h (elf_machine_rela): Likewise. 2001-07-01 Stephen L Moshier <moshier@mediaone.net> * sysdeps/ieee754/ldbl-96/e_acoshl.c (__ieee754_acoshl): acosh(x) = ln(2x) if x > 2^30. * sysdeps/ieee754/ldbl-128/e_acoshl.c (__ieee754_acoshl): acosh(x) = ln(2x) if x > 2^54. * sysdeps/hppa/dl-machine.h (elf_machine_rela): Handle relocs
Diffstat (limited to 'sysdeps/ia64')
-rw-r--r--sysdeps/ia64/strncpy.S9
1 files changed, 5 insertions, 4 deletions
diff --git a/sysdeps/ia64/strncpy.S b/sysdeps/ia64/strncpy.S
index 17d677227f..051fefa05c 100644
--- a/sysdeps/ia64/strncpy.S
+++ b/sysdeps/ia64/strncpy.S
@@ -25,8 +25,8 @@
in1: src
in2: char count
- If n >= 24, do a memcpy(dest, src, min(strlen(src)+1, n)), followed by a
- memset(dest + strlen(src), 0, n - strlen(src) - 1) if necessary.
+ If n >= 24, do a memcpy(dest, src, min(strnlen(src, n)+1, n)), followed by a
+ memset(dest + strlen(src, n), 0, n - strlen(src, n) - 1) if necessary.
Otherwise, copy characters one by one and fill with nulls if necessary. */
@@ -58,8 +58,9 @@ ENTRY(strncpy)
cmp.gtu p6, p0 = 24, n
(p6) br.cond.spnt .cpyfew
mov out0 = src
- mov tmp = gp ;;
- br.call.sptk.many b0 = strlen# ;; // rc = strlen(src);
+ mov out1 = n
+ mov tmp = gp
+ br.call.sptk.many b0 = strnlen# ;; // rc = strnlen(src, n);
add len = 1, rc // include the null in len
mov gp = tmp
mov out0 = dest ;;