]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] Don't prefetch beyond end of patch to avoid bringing in cache-lines needlessly.
authorAsit K. Mallick <asit.k.mallick@intel.com>
Fri, 19 Apr 2002 07:02:11 +0000 (00:02 -0700)
committerDavid Mosberger <davidm@wailua.hpl.hp.com>
Fri, 19 Apr 2002 07:02:11 +0000 (00:02 -0700)
arch/ia64/lib/copy_page.S

index a1dbc40262cc31e5044a5cdb41686b8558668b50..127d1d050d788212ddf27348304befd7ac7dc4bd 100644 (file)
@@ -30,6 +30,7 @@
 #define tgt2           r23
 #define srcf           r24
 #define tgtf           r25
+#define tgt_last       r26
 
 #define Nrot           ((8*PIPE_DEPTH+7)&~7)
 
@@ -55,18 +56,21 @@ GLOBAL_ENTRY(copy_page)
 
        mov src1=in1
        adds src2=8,in1
+       mov tgt_last = PAGE_SIZE
        ;;
        adds tgt2=8,in0
        add srcf=512,in1
        mov ar.lc=lcount
        mov tgt1=in0
        add tgtf=512,in0
+       add tgt_last = tgt_last, in0
        ;;
 1:
 (p[0]) ld8 t1[0]=[src1],16
 (EPI)  st8 [tgt1]=t1[PIPE_DEPTH-1],16
 (p[0]) ld8 t2[0]=[src2],16
 (EPI)  st8 [tgt2]=t2[PIPE_DEPTH-1],16
+       cmp.ltu p6,p0 = tgtf, tgt_last
        ;;
 (p[0]) ld8 t3[0]=[src1],16
 (EPI)  st8 [tgt1]=t3[PIPE_DEPTH-1],16
@@ -83,8 +87,8 @@ GLOBAL_ENTRY(copy_page)
 (p[0]) ld8 t8[0]=[src2],16
 (EPI)  st8 [tgt2]=t8[PIPE_DEPTH-1],16
 
-       lfetch [srcf], 64
-       lfetch [tgtf], 64
+(p6)   lfetch [srcf], 64
+(p6)   lfetch [tgtf], 64
        br.ctop.sptk.few 1b
        ;;
        mov pr=saved_pr,0xffffffffffff0000      // restore predicates