]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Test for guest-state-pointer changes by checking its lowest bit.
authorJulian Seward <jseward@acm.org>
Sat, 28 May 2011 15:58:13 +0000 (15:58 +0000)
committerJulian Seward <jseward@acm.org>
Sat, 28 May 2011 15:58:13 +0000 (15:58 +0000)
Removes one memory reference from the dispatcher loop.  As per r11781
for arm-linux.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11783

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

index c8ba4e8e8e74eada3370fc975fbb84babfb8aa78..b2926b4aa11aa478b8faf78998f12e608ed2fe04 100644 (file)
@@ -179,7 +179,7 @@ LafterVMX1:
         /* r3 holds guest_state */
         /* r4 holds do_profiling */
         mr      31,3      /* r31 (generated code gsp) = r3 */
-        stw     3,28(1)   /* spill orig guest_state ptr */
+        stw     3,28(1)   /* spill orig guest_state ptr (UNUSED) */
 
         /* 24(sp) used later to stop ctr reg being clobbered */
         /* 20(sp) used later to load fpscr with zero */
@@ -254,16 +254,13 @@ VG_(run_innerloop__dispatch_unprofiled):
                r3  (=CIA = next guest address)
                r29 (=dispatch_ctr)
                r31 (=guest_state)
-          Stack state:
-               44(r1) (=orig guest_state)
        */
        /* Has the guest state pointer been messed with?  If yes, exit.
            Also set up & VG_(tt_fast) early in an attempt at better
            scheduling. */
-        lwz     9,44(1)              /* original guest_state ptr */
         lis    5,VG_(tt_fast)@ha
         addi    5,5,VG_(tt_fast)@l   /* & VG_(tt_fast) */
-        cmpw    9,31
+        andi.   0,31,1
         bne    gsp_changed
 
         /* save the jump address in the guest state */
@@ -308,16 +305,13 @@ VG_(run_innerloop__dispatch_profiled):
                r3  (=CIA = next guest address)
                r29 (=dispatch_ctr)
                r31 (=guest_state)
-          Stack state:
-               44(r1) (=orig guest_state)
        */
        /* Has the guest state pointer been messed with?  If yes, exit.
            Also set up & VG_(tt_fast) early in an attempt at better
            scheduling. */
-        lwz     9,44(1)              /* original guest_state ptr */
         lis    5,VG_(tt_fast)@ha
         addi    5,5,VG_(tt_fast)@l   /* & VG_(tt_fast) */
-        cmpw    9,31
+        andi.   0,31,1
         bne    gsp_changed
 
         /* save the jump address in the guest state */
index a8f46334873fafbd67df6f89cdba95b0518132f5..6eb4fc919d75a2fb94b6baea5d0f1f562392dbf7 100644 (file)
@@ -186,7 +186,7 @@ VG_(run_innerloop):
         /* r3 holds guest_state */
         /* r4 holds do_profiling */
         mr      31,3
-        std     3,104(1)       /* spill orig guest_state ptr */
+        std     3,104(1)       /* spill orig guest_state ptr (UNUSED) */
 
         /* 96(sp) used later to check FPSCR[RM] */
         /* 88(sp) used later to load fpscr with zero */
@@ -268,15 +268,13 @@ VG_(run_innerloop__dispatch_unprofiled):
                r29 (=dispatch_ctr)
                r31 (=guest_state)
           Stack state:
-               152(r1) (=orig guest_state)
                144(r1) (=var space for FPSCR[RM])
        */
        /* Has the guest state pointer been messed with?  If yes, exit.
            Also set up & VG_(tt_fast) early in an attempt at better
            scheduling. */
-        ld      9,152(1)        /* original guest_state ptr */
        ld      5, .tocent__vgPlain_tt_fast@toc(2) /* &VG_(tt_fast) */
-        cmpd    9,31
+        rldicl. 0,31,0,63
         bne    .gsp_changed
 
         /* save the jump address in the guest state */
@@ -335,15 +333,13 @@ VG_(run_innerloop__dispatch_profiled):
                r29 (=dispatch_ctr)
                r31 (=guest_state)
           Stack state:
-               152(r1) (=orig guest_state)
                144(r1) (=var space for FPSCR[RM])
        */
        /* Has the guest state pointer been messed with?  If yes, exit.
            Also set up & VG_(tt_fast) early in an attempt at better
            scheduling. */
-        ld      9,152(1)        /* original guest_state ptr */
        ld      5, .tocent__vgPlain_tt_fast@toc(2) /* &VG_(tt_fast) */
-        cmpd    9,31
+        rldicl. 0,31,0,63
         bne    .gsp_changed
 
         /* save the jump address in the guest state */