]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Fix profiling dispatcher.
authorJulian Seward <jseward@acm.org>
Mon, 23 Jan 2006 00:09:07 +0000 (00:09 +0000)
committerJulian Seward <jseward@acm.org>
Mon, 23 Jan 2006 00:09:07 +0000 (00:09 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5587

coregrind/m_dispatch/dispatch-ppc64-linux.S

index 2e3021ec75bec14a23fbe028ebaf9f9223272f7b..6d110b901ea890a361bbb83ef626f99a18d86815 100644 (file)
@@ -290,7 +290,7 @@ VG_(run_innerloop__dispatch_unprofiled):
        sldi    4,4,3
 
        ld      5, .tocent__vgPlain_tt_fast@toc(2)
-       ldx     5, 5,4     /* r5 = VG_(tt_fast)[r3 & VG_TT_FAST_MASK] */
+       ldx     5, 5,4     /* r5 = VG_(tt_fast)[VG_TT_FAST_HASH(addr)] */
        ld      6, 0(5)    /* r6 = (r5)->orig_addr */
         cmpd    3,6
         bne     .fast_lookup_failed
@@ -360,17 +360,17 @@ VG_(run_innerloop__dispatch_profiled):
        sldi    4,4,3
 
        ld      5, .tocent__vgPlain_tt_fast@toc(2)
-       ldx     5, 5,4     /* r5 = VG_(tt_fast)[r3 & VG_TT_FAST_MASK] */
+       ldx     5, 5,4     /* r5 = VG_(tt_fast)[VG_TT_FAST_HASH(addr)] */
        ld      6, 0(5)    /* r6 = (r5)->orig_addr */
         cmpd    3,6
         bne     .fast_lookup_failed
 
         /* increment bb profile counter VG_(tt_fastN)[x] (=32bit val) */
        ld      7, .tocent__vgPlain_tt_fastN@toc(2)
-       srdi    4, 4,1   /* r4 = ((r3<<2) & (VG_TT_FAST_MASK<<2)) */
-       lwzx    6, 7,4   /* r6 = VG_(tt_fastN)[(r4)] */
+       ldx     7, 7,4     /* r7 = VG_(tt_fastN)[VG_TT_HASH(addr)] */
+       lwz     6, 0(7)    /* *(UInt*)r7 ++ */
        addi    6, 6,1
-       stwx    6, 7,4
+       stw     6, 0(7)
 
         /* Found a match.  Call tce[1], which is 8 bytes along, since
            each tce element is a 64-bit int. */