From 65c73f3155df8e678e52d185d4fb31da3336384f Mon Sep 17 00:00:00 2001 From: Julian Seward Date: Fri, 30 Dec 2005 04:16:37 +0000 Subject: [PATCH] Fix up ppc64 dispatcher following the changes made by r5441. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5460 --- coregrind/m_dispatch/dispatch-ppc32-linux.S | 4 ++-- coregrind/m_dispatch/dispatch-ppc64-linux.S | 16 ++++++++++------ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/coregrind/m_dispatch/dispatch-ppc32-linux.S b/coregrind/m_dispatch/dispatch-ppc32-linux.S index 5103675b65..1b5e89fc15 100644 --- a/coregrind/m_dispatch/dispatch-ppc32-linux.S +++ b/coregrind/m_dispatch/dispatch-ppc32-linux.S @@ -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 diff --git a/coregrind/m_dispatch/dispatch-ppc64-linux.S b/coregrind/m_dispatch/dispatch-ppc64-linux.S index 5831e25166..f9b11dee18 100644 --- a/coregrind/m_dispatch/dispatch-ppc64-linux.S +++ b/coregrind/m_dispatch/dispatch-ppc64-linux.S @@ -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 */ -- 2.47.2