diff options
author | H.J. Lu <hongjiu.lu@intel.com> | 2009-11-20 08:30:20 -0800 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2009-11-20 08:30:20 -0800 |
commit | 66221417957963c1d2df8d79f43573e328df2275 (patch) | |
tree | fb61d07e4512b1aa04c27affdd5b03f3f2aacfa1 /sysdeps | |
parent | df1934daa7788ca5f19d82efb02cdf9b9c495b1a (diff) | |
download | glibc-66221417957963c1d2df8d79f43573e328df2275.tar glibc-66221417957963c1d2df8d79f43573e328df2275.tar.gz glibc-66221417957963c1d2df8d79f43573e328df2275.tar.bz2 glibc-66221417957963c1d2df8d79f43573e328df2275.zip |
Properly recover from shorter read.
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/ia64/memchr.S | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/sysdeps/ia64/memchr.S b/sysdeps/ia64/memchr.S index e721e1714f..cdd71ca5a5 100644 --- a/sysdeps/ia64/memchr.S +++ b/sysdeps/ia64/memchr.S @@ -71,8 +71,7 @@ ENTRY(__memchr) cmp.ne p7, p0 = r0, r0 // clear p7 extr.u chr = in1, 0, 8 // chr = (unsigned char) in1 mov len = in2 - // use a simple loop on data shorter than software pipeline - cmp.gtu p6, p0 = ((MEMLAT + 1) * 8), in2 + cmp.gtu p6, p0 = 16, in2 // use a simple loop for short (p6) br.cond.spnt .srchfew ;; // searches sub loopcnt = 8, tmp // loopcnt = 8 - tmp cmp.eq p6, p0 = tmp, r0 @@ -127,7 +126,16 @@ ENTRY(__memchr) br.ret.sptk.many b0 .recovery: - adds ret0 = -((MEMLAT + 1) * 8), ret0;; +#if MEMLAT != 6 +# error "MEMLAT must be 6!" +#endif +(p[MEMLAT-6]) add ret0 = -8, ret0;; +(p[MEMLAT-5]) add ret0 = -8, ret0;; +(p[MEMLAT-4]) add ret0 = -8, ret0;; +(p[MEMLAT-3]) add ret0 = -8, ret0;; +(p[MEMLAT-2]) add ret0 = -8, ret0;; +(p[MEMLAT-1]) add ret0 = -8, ret0;; +(p[MEMLAT]) add ret0 = -8, ret0;; (p[MEMLAT+1]) add ret0 = -8, ret0;; (p[MEMLAT+2]) add ret0 = -8, ret0;; .l4: |