From 739ca6906afb26bcf3c01cdf47e8cca0bbeca635 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 7 Dec 2002 09:03:23 +0000 Subject: Update. 2002-12-07 Kenneth W. Chen . * sysdeps/ia64/strncpy.S (strncpy): Clear ar.ec. Fix .recovery4. 2002-12-07 Jakub Jelinek * string/test-strncpy.c (do_random_tests): Improve test coverage. --- sysdeps/ia64/strncpy.S | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sysdeps') diff --git a/sysdeps/ia64/strncpy.S b/sysdeps/ia64/strncpy.S index a285f90bfc..4fe686165b 100644 --- a/sysdeps/ia64/strncpy.S +++ b/sysdeps/ia64/strncpy.S @@ -63,6 +63,8 @@ ENTRY(strncpy) mov saved_pr = pr // save the predicate registers .save ar.lc, saved_lc mov saved_lc = ar.lc // save the loop counter + mov ar.ec = 0 // ec is not guaranteed to + // be zero upon function entry .body cmp.geu p6, p5 = 24, in2 (p6) br.cond.spnt .short_len @@ -221,7 +223,9 @@ ENTRY(strncpy) ld8 r[MEMLAT] = [tmp] br.cond.sptk .back3 .recovery4: + cmp.eq p5, p6 = len, r0 add tmp = -MEMLAT * 8, src ;; - ld8 r[MEMLAT - 1] = [tmp] +(p6) ld8 r[MEMLAT - 1] = [tmp] +(p5) mov r[MEMLAT - 1] = r0 br.cond.sptk .back4 END(strncpy) -- cgit 1.4.1