summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--sysdeps/ia64/memchr.S11
2 files changed, 16 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 34212ee6c8..e0fd11c15e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-11-18 H.J. Lu <hongjiu.lu@intel.com>
+
+ [BZ #10162]
+ * sysdeps/ia64/memchr.S: Don't use a simple loop on data shorter
+ than software pipeline. Properly recover from shorter read.
+
2009-11-16 Jakub Jelinek <jakub@redhat.com>
* sysdeps/unix/sysv/linux/sync_file_range.c (sync_file_range):
diff --git a/sysdeps/ia64/memchr.S b/sysdeps/ia64/memchr.S
index cd062b2dd5..cdd71ca5a5 100644
--- a/sysdeps/ia64/memchr.S
+++ b/sysdeps/ia64/memchr.S
@@ -126,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: