about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--sysdeps/ia64/memchr.S3
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index a3c626c2aa..c3918b74c1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-11-09  H.J. Lu  <hongjiu.lu@intel.com>
+
+	[BZ #10162]
+	* sysdeps/ia64/memchr.S: Use a simple loop on data shorter than
+	software pipeline.
+
 2009-11-09  Mike Frysinger  <vapier@gentoo.org>
 
 	* sysdeps/unix/sysv/linux/i386/fallocate.c: Include errno.h.
diff --git a/sysdeps/ia64/memchr.S b/sysdeps/ia64/memchr.S
index cd062b2dd5..e721e1714f 100644
--- a/sysdeps/ia64/memchr.S
+++ b/sysdeps/ia64/memchr.S
@@ -71,7 +71,8 @@ ENTRY(__memchr)
 	cmp.ne	p7, p0 = r0, r0		// clear p7
 	extr.u	chr = in1, 0, 8		// chr = (unsigned char) in1
 	mov	len = in2
-	cmp.gtu	p6, p0 = 16, in2	// use a simple loop for short
+	// use a simple loop on data shorter than software pipeline
+	cmp.gtu	p6, p0 = ((MEMLAT + 1) * 8), in2
 (p6)	br.cond.spnt .srchfew ;;	// searches
 	sub	loopcnt = 8, tmp	// loopcnt = 8 - tmp
 	cmp.eq	p6, p0 = tmp, r0