]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
speed optimisation: assuming that a tempreg not related to %esp before
authorDirk Mueller <daywalker@users.sourceforge.net>
Wed, 1 Oct 2003 10:19:08 +0000 (10:19 +0000)
committerDirk Mueller <daywalker@users.sourceforge.net>
Wed, 1 Oct 2003 10:19:08 +0000 (10:19 +0000)
is PUTed into %ESP, we do *know* that this tempreg points to %ESP afterwards,
so track it.

reduces the amount of expensive "DO_GENERIC" calls by 75% in Khtml. I've
not observed a problem with it, but consider it experimental.

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

coregrind/vg_translate.c

index 390f436e74d37cc27f5ff95aff5239885d08f339..cf6c9db0745d3d1feb5bf9b5753c8c9e1ea816a5 100644 (file)
@@ -1855,6 +1855,9 @@ UCodeBlock* vg_ESP_update_pass(UCodeBlock* cb_in)
          } else {
             /* Unknown delta */
             DO_GENERIC;
+            /* now we know the temp that points to %ESP */
+            if ( t_ESP == INVALID_TEMPREG )
+               t_ESP = u->val1;
          }
          delta = 0;