about summary refs log tree commit diff
path: root/sysdeps/ia64
diff options
context:
space:
mode:
authorH.J. Lu <hongjiu.lu@intel.com>2009-11-14 19:20:19 -0800
committerUlrich Drepper <drepper@redhat.com>2009-11-14 19:20:19 -0800
commit65a1148bdd57d02fff9b0b5a2cc2627a5dfd6445 (patch)
treee9378b9942425e73ab78dfd08ee7415fa3faf795 /sysdeps/ia64
parentfabe43aba8fb46614eb2a74b2916bfbbf8fec10e (diff)
downloadglibc-65a1148bdd57d02fff9b0b5a2cc2627a5dfd6445.tar.gz
glibc-65a1148bdd57d02fff9b0b5a2cc2627a5dfd6445.tar.xz
glibc-65a1148bdd57d02fff9b0b5a2cc2627a5dfd6445.zip
Use a simple loop on data shorter than software pipeline.
When data is shorter than software pipeline, recovery may fail. This
patch avoids it by using a simple loop on data shorter than software
pipeline.
Diffstat (limited to 'sysdeps/ia64')
-rw-r--r--sysdeps/ia64/memchr.S3
1 files changed, 2 insertions, 1 deletions
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