|
From: <sv...@va...> - 2011-05-28 16:03:04
|
Author: sewardj
Date: 2011-05-28 16:58:13 +0100 (Sat, 28 May 2011)
New Revision: 11783
Log:
Test for guest-state-pointer changes by checking its lowest bit.
Removes one memory reference from the dispatcher loop. As per r11781
for arm-linux.
Modified:
trunk/coregrind/m_dispatch/dispatch-ppc32-linux.S
trunk/coregrind/m_dispatch/dispatch-ppc64-linux.S
Modified: trunk/coregrind/m_dispatch/dispatch-ppc32-linux.S
===================================================================
--- trunk/coregrind/m_dispatch/dispatch-ppc32-linux.S 2011-05-28 15:34:17 UTC (rev 11782)
+++ trunk/coregrind/m_dispatch/dispatch-ppc32-linux.S 2011-05-28 15:58:13 UTC (rev 11783)
@@ -179,7 +179,7 @@
/* 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 @@
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 @@
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 */
Modified: trunk/coregrind/m_dispatch/dispatch-ppc64-linux.S
===================================================================
--- trunk/coregrind/m_dispatch/dispatch-ppc64-linux.S 2011-05-28 15:34:17 UTC (rev 11782)
+++ trunk/coregrind/m_dispatch/dispatch-ppc64-linux.S 2011-05-28 15:58:13 UTC (rev 11783)
@@ -186,7 +186,7 @@
/* 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 @@
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 @@
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 */
|