Correct prefetch hint in power7 memrchr
diff mbox

Message ID 20140325020430.GE18201@bubble.grove.modra.org
State New
Headers show

Commit Message

Alan Modra March 25, 2014, 2:04 a.m. UTC
Typo fix.  Discovered when looking at some disassembly, and wondering
why this disassembled as dcbtt.  My simple benchmark testing didn't
show any effect of using the wrong hint, but at a guess you'd only see
a difference on a very long memrchr with cold caches.

	* sysdeps/powerpc/powerpc64/power7/memrchr.S: Correct stream hint.

Comments

Adhemerval Zanella March 25, 2014, 7:07 p.m. UTC | #1
On 24-03-2014 23:04, Alan Modra wrote:
> Typo fix.  Discovered when looking at some disassembly, and wondering
> why this disassembled as dcbtt.  My simple benchmark testing didn't
> show any effect of using the wrong hint, but at a guess you'd only see
> a difference on a very long memrchr with cold caches.
>
> 	* sysdeps/powerpc/powerpc64/power7/memrchr.S: Correct stream hint.
>
> diff --git a/sysdeps/powerpc/powerpc64/power7/memrchr.S b/sysdeps/powerpc/powerpc64/power7/memrchr.S
> index 40e436f..0c01ca2 100644
> --- a/sysdeps/powerpc/powerpc64/power7/memrchr.S
> +++ b/sysdeps/powerpc/powerpc64/power7/memrchr.S
> @@ -29,7 +29,7 @@ ENTRY (__memrchr)
>  	mr	r10,r3
>  	clrrdi	r6,r7,7
>  	li	r9,3<<5
> -	dcbt	r9,r6,16      /* Stream hint, decreasing addresses.  */
> +	dcbt	r9,r6,8       /* Stream hint, decreasing addresses.  */
>
>  	/* Replicate BYTE to doubleword.  */
>  	insrdi	r4,r4,8,48
>
This patch is ok, thanks Alan.

Patch
diff mbox

diff --git a/sysdeps/powerpc/powerpc64/power7/memrchr.S b/sysdeps/powerpc/powerpc64/power7/memrchr.S
index 40e436f..0c01ca2 100644
--- a/sysdeps/powerpc/powerpc64/power7/memrchr.S
+++ b/sysdeps/powerpc/powerpc64/power7/memrchr.S
@@ -29,7 +29,7 @@  ENTRY (__memrchr)
 	mr	r10,r3
 	clrrdi	r6,r7,7
 	li	r9,3<<5
-	dcbt	r9,r6,16      /* Stream hint, decreasing addresses.  */
+	dcbt	r9,r6,8       /* Stream hint, decreasing addresses.  */
 
 	/* Replicate BYTE to doubleword.  */
 	insrdi	r4,r4,8,48