Dispatcher tweak. Saves ALU operation. Suggested by Julian Seward.

Implemented by Christian Borntraeger (borntraeger@de.ibm.com).
See bugzilla #274378


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12036
This commit is contained in:
Florian Krohm 2011-09-17 15:46:59 +00:00
parent 83f6f0137f
commit b1d64f9231
2 changed files with 18 additions and 8 deletions

2
NEWS
View File

@ -277,6 +277,8 @@ fixed
281883 - s390x: Fix system call wrapper for "clone".
274378 - s390x: Various dispatcher tweaks
Release 3.6.1 (16 February 2011)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@ -154,11 +154,15 @@ run_innerloop__dispatch_unprofiled:
and sizeof(FastCacheEntry) == 16
offset = ((addr >> 1) & VG_TT_FAST_MASK) << 4
which is
offset = ((addr & (VG_TT_FAST_MASK << 1) ) << 3
*/
lghi %r5,VG_TT_FAST_MASK
srlg %r7, %r2,1 /* next guest addr >> 1*/
ngr %r7,%r5
sllg %r7,%r7,4
llill %r5,( VG_TT_FAST_MASK << 1) & 0xffff
#if ((( VG_TT_FAST_MASK << 1) & 0xffff0000) >> 16 != 0)
iilh %r5,(( VG_TT_FAST_MASK << 1) & 0xffff0000) >> 16
#endif
ngr %r5,%r2
sllg %r7,%r5,3
/* Set the return address to the beginning of the loop here to
have some instruction between setting r7 and using it as an
@ -207,11 +211,15 @@ run_innerloop__dispatch_profiled:
and sizeof(FastCacheEntry) == 16
offset = ((addr >> 1) & VG_TT_FAST_MASK) << 4
which is
offset = ((addr & (VG_TT_FAST_MASK << 1) ) << 3
*/
lghi %r5,VG_TT_FAST_MASK
srlg %r7,%r2,1 /* next guest addr >> 1*/
ngr %r7,%r5
sllg %r7,%r7,4
llill %r5,( VG_TT_FAST_MASK << 1) & 0xffff
#if ((( VG_TT_FAST_MASK << 1) & 0xffff0000) >> 16 != 0)
iilh %r5,(( VG_TT_FAST_MASK << 1) & 0xffff0000) >> 16
#endif
ngr %r5,%r2
sllg %r7,%r5,3
/* Set the return address to the beginning of the loop here to
have some instruction between setting r7 and using it as an