Skip to content

Commit

Permalink
Use a simple loop on data shorter than software pipeline.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
H.J. Lu authored and Ulrich Drepper committed Nov 15, 2009
1 parent fabe43a commit 65a1148
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
3 changes: 2 additions & 1 deletion sysdeps/ia64/memchr.S
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 65a1148

Please sign in to comment.