[pypy-svn] pypy default: An experiemnt - for guards write a hint "branch unlikely taken". Let's see
fijal
commits-noreply at bitbucket.org
Mon Apr 11 01:26:07 CEST 2011
Author: Maciej Fijalkowski <fijall at gmail.com>
Branch:
Changeset: r43274:2e31ce2f1e90
Date: 2011-04-11 01:24 +0200
http://bitbucket.org/pypy/pypy/changeset/2e31ce2f1e90/
Log: An experiemnt - for guards write a hint "branch unlikely taken".
Let's see if it affects benchmarks at all
diff --git a/pypy/jit/backend/x86/assembler.py b/pypy/jit/backend/x86/assembler.py
--- a/pypy/jit/backend/x86/assembler.py
+++ b/pypy/jit/backend/x86/assembler.py
@@ -1849,6 +1849,9 @@
def implement_guard(self, guard_token, condition=None):
# These jumps are patched later.
if condition:
+ if condition not in ['B', 'E', 'BE']:
+ # this is a hint "branch not taken
+ self.mc.writechar('\x2E')
self.mc.J_il(rx86.Conditions[condition], 0)
else:
self.mc.JMP_l(0)
More information about the Pypy-commit
mailing list