]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Followup to r12527. Use 32-bit arithmetic to increment xindir
authorFlorian Krohm <florian@eich-krohm.de>
Sun, 22 Apr 2012 15:37:15 +0000 (15:37 +0000)
committerFlorian Krohm <florian@eich-krohm.de>
Sun, 22 Apr 2012 15:37:15 +0000 (15:37 +0000)
performance counters. Remove #ifdef'ery.

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

coregrind/m_dispatch/dispatch-s390x-linux.S

index 5cc517fd89aa4fa909c7fb8ba0d602c9a3fafe7d..a0b5b08cdb501d3d479901f75f303924d5f646d2 100644 (file)
 
 #if defined(VGA_s390x)
 
-/*
-#define XINDIR_STATS
-*/
-
 /*------------------------------------------------------------*/
 /*---                                                      ---*/
 /*--- The dispatch loop.  VG_(disp_run_translations) is    ---*/
@@ -213,13 +209,11 @@ VG_(disp_cp_xindir):
        /* Where are we going? */
         lg      %r2, OFFSET_s390x_IA(%r13)
 
-#ifdef XINDIR_STATS
-        /* Increment VG_(stats__n_xindirs), an ULong value */
-        larl    %r8, VG_(stats__n_xindirs)
-        lg      %r10,0(%r8)
-        aghi    %r10,1
-        stg     %r10,0(%r8)
-#endif
+        /* Increment VG_(stats__n_xindirs_32) */
+        larl    %r8, VG_(stats__n_xindirs_32)
+        l       %r10,0(%r8)
+        ahi     %r10,1
+        st      %r10,0(%r8)
 
        /* Try a fast lookup in the translation cache:
            Compute offset (not index) into VT_(tt_fast):
@@ -246,21 +240,17 @@ VG_(disp_cp_xindir):
         
         /* Found a match.  Call .host.
            r11 is an address. There we will find the instrumented client code.
-           That code may modify the guest state register r13. The client code
-           will return to the beginning of this loop start by issuing br LR.
-           We can simply branch to the host code */
-        // FIXME Update comment
+           That code may modify the guest state register r13. */
         br      %r11
         .long   0x0   /* persuade insn decoders not to speculate past here */
 
 fast_lookup_failed:
-#ifdef XINDIR_STATS
-        /* Increment VG_(stats__n_xindir_misses), an ULong value */
-        larl    %r8, VG_(stats__n_xindir_misses)
-        lg      %r10,0(%r8)
-        aghi    %r10,1
-        stg     %r10,0(%r8)
-#endif
+        /* Increment VG_(stats__n_xindir_misses_32) */
+        larl    %r8, VG_(stats__n_xindir_misses_32)
+        l       %r10,0(%r8)
+        ahi     %r10,1
+        st      %r10,0(%r8)
+
         lghi    %r0,VG_TRC_INNER_FASTMISS
         lghi    %r1,0
         j       postamble