about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2002-09-30 20:15:35 +0000
committerRoland McGrath <roland@gnu.org>2002-09-30 20:15:35 +0000
commitf1bd8f456d1d03e0d9609cc2c61f92c2a850d605 (patch)
tree9d09b97d96c92254c1a4cc077a5939433cbed1db
parentfe27057d1765c1cc42023bff4fdd71ce190fe35d (diff)
downloadglibc-f1bd8f456d1d03e0d9609cc2c61f92c2a850d605.tar.gz
glibc-f1bd8f456d1d03e0d9609cc2c61f92c2a850d605.tar.xz
glibc-f1bd8f456d1d03e0d9609cc2c61f92c2a850d605.zip
* sysdeps/ia64/strncpy.S: Only segfault in .recovery2 if some bits
	from the next quad are needed.
-rw-r--r--ChangeLog5
-rw-r--r--sysdeps/ia64/strncpy.S7
2 files changed, 10 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 0d63f41895..d46b7d1728 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2002-09-30  Jakub Jelinek  <jakub@redhat.com>
+
+	* sysdeps/ia64/strncpy.S: Only segfault in .recovery2 if some bits
+	from the next quad are needed.
+
 2002-09-30  Roland McGrath  <roland@redhat.com>
 
 	* elf/tls-macros.h (TLS_LD, TLS_GD): Use call insn, not callq.
diff --git a/sysdeps/ia64/strncpy.S b/sysdeps/ia64/strncpy.S
index f5c1c9da6f..202741f980 100644
--- a/sysdeps/ia64/strncpy.S
+++ b/sysdeps/ia64/strncpy.S
@@ -1,6 +1,6 @@
 /* Optimized version of the standard strncpy() function.
    This file is part of the GNU C Library.
-   Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
    Contributed by Dan Pop <Dan.Pop@cern.ch>
 	      and Jakub Jelinek <jakub@redhat.com>.
 
@@ -210,8 +210,11 @@ ENTRY(strncpy)
 	mov	pr = saved_pr, -1	// restore the predicate registers
 	br.ret.sptk.many b0
 .recovery2:
+	add	c = 8, len
 	add	tmp = -8, asrc ;;
-	ld8	r[0] = [tmp]
+	cmp.gtu	p8, p5 = c, thresh ;;
+(p8)	ld8	r[0] = [tmp]
+(p5)	mov	r[0] = r0
 	br.cond.sptk .back2
 .recovery3:
 	add	tmp = -MEMLAT * 8, src ;;