[pypy-svn] r75545 - pypy/branch/x86-64-jit-backend/pypy/jit/backend/x86

jcreigh at codespeak.net jcreigh at codespeak.net
Thu Jun 24 00:33:21 CEST 2010


Author: jcreigh
Date: Thu Jun 24 00:33:19 2010
New Revision: 75545

Modified:
   pypy/branch/x86-64-jit-backend/pypy/jit/backend/x86/codebuf.py
Log:
when testing on 64-bit, try to allocate mcs more than 32-bits apart

Modified: pypy/branch/x86-64-jit-backend/pypy/jit/backend/x86/codebuf.py
==============================================================================
--- pypy/branch/x86-64-jit-backend/pypy/jit/backend/x86/codebuf.py	(original)
+++ pypy/branch/x86-64-jit-backend/pypy/jit/backend/x86/codebuf.py	Thu Jun 24 00:33:19 2010
@@ -7,6 +7,7 @@
 from pypy.rlib.rmmap import PTR, alloc, free
 from pypy.rlib.debug import make_sure_not_resized
 from pypy.jit.backend.x86.arch import IS_X86_32, IS_X86_64
+from pypy.rlib.objectmodel import we_are_translated
 
 # XXX: Seems nasty to change the superclass of InMemoryCodeBuilder like this
 if IS_X86_32:
@@ -141,6 +142,12 @@
 
     def __init__(self, map_size):
         data = alloc(map_size)
+        if IS_X86_64 and not we_are_translated():
+            # Hack to make sure that mcs are not within 32-bits of one
+            # another for testing purposes
+            from pypy.rlib.rmmap import hint
+            hint.pos += 0xFFFFFFFF
+            
         self._init(data, map_size)
 
     def __del__(self):



More information about the Pypy-commit mailing list