]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Fix up ppc64 dispatcher following the changes made by r5441.
authorJulian Seward <jseward@acm.org>
Fri, 30 Dec 2005 04:16:37 +0000 (04:16 +0000)
committerJulian Seward <jseward@acm.org>
Fri, 30 Dec 2005 04:16:37 +0000 (04:16 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5460

coregrind/m_dispatch/dispatch-ppc32-linux.S
coregrind/m_dispatch/dispatch-ppc64-linux.S

index 5103675b65cbb755692eb11142e40d75cd3a4c6d..1b5e89fc15a529621588ff54cf32a04cd2f8f83d 100644 (file)
@@ -259,7 +259,7 @@ VG_(run_innerloop__dispatch_unprofiled):
         beq    counter_is_zero
 
         /* try a fast lookup in the translation cache */
-        /* r4 = VG_TT_FAST_HASH(addr)           * sizeof(ULong)
+        /* r4 = VG_TT_FAST_HASH(addr)           * sizeof(ULong*)
               = ((r3 >>u 2) & VG_TT_FAST_MASK)  << 2 */
         rlwinm  4,3, 0, 32-2-VG_TT_FAST_BITS, 31-2  
         addis   5,4,VG_(tt_fast)@ha
@@ -315,7 +315,7 @@ VG_(run_innerloop__dispatch_profiled):
         beq    counter_is_zero
 
         /* try a fast lookup in the translation cache */
-        /* r4 = VG_TT_FAST_HASH(addr)           * sizeof(ULong)
+        /* r4 = VG_TT_FAST_HASH(addr)           * sizeof(ULong*)
               = ((r3 >>u 2) & VG_TT_FAST_MASK)  << 2 */
         rlwinm  4,3, 0, 32-2-VG_TT_FAST_BITS, 31-2 
         addis   5,4,VG_(tt_fast)@ha
index 5831e2516658dd8d5e689ffdc4d0ffdb34bdbf0d..f9b11dee18fc89965b7e492b5509b9c6140d32b3 100644 (file)
@@ -276,14 +276,16 @@ VG_(run_innerloop__dispatch_unprofiled):
         std     3,OFFSET_ppc64_CIA(31)
 
         /* Are we out of timeslice?  If yes, defer to scheduler. */
-//     subic.  29,29,1
        subi    29,29,1
        cmpldi  29,0
         beq    .counter_is_zero
 
         /* try a fast lookup in the translation cache */
-        /* r4=((r3<<3) & (VG_TT_FAST_MASK<<3)) */
-       rldic   4,3, 3, 64-3-VG_TT_FAST_BITS
+        /* r4 = VG_TT_FAST_HASH(addr)           * sizeof(ULong*)
+              = ((r3 >>u 2) & VG_TT_FAST_MASK)  << 3 */
+       rldicl  4,3, 62, 64-VG_TT_FAST_BITS
+       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] */
        ld      6, 0(5)    /* r6 = (r5)->orig_addr */
@@ -344,14 +346,16 @@ VG_(run_innerloop__dispatch_profiled):
         std     3,OFFSET_ppc64_CIA(31)
 
         /* Are we out of timeslice?  If yes, defer to scheduler. */
-//     subic.  29,29,1
        subi    29,29,1
        cmpldi  29,0
         beq    .counter_is_zero
 
         /* try a fast lookup in the translation cache */
-        /* r4=((r3<<3) & (VG_TT_FAST_MASK<<3)) */
-       rldic   4,3, 3, 64-3-VG_TT_FAST_BITS
+        /* r4 = VG_TT_FAST_HASH(addr)           * sizeof(ULong*)
+              = ((r3 >>u 2) & VG_TT_FAST_MASK)  << 3 */
+       rldicl  4,3, 62, 64-VG_TT_FAST_BITS
+       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] */
        ld      6, 0(5)    /* r6 = (r5)->orig_addr */