[pypy-svn] r65761 - in pypy/branch/pyjitpl5/pypy/jit/backend/x86: . test
fijal at codespeak.net
fijal at codespeak.net
Sat Jun 13 22:19:06 CEST 2009
Author: fijal
Date: Sat Jun 13 22:19:05 2009
New Revision: 65761
Modified:
pypy/branch/pyjitpl5/pypy/jit/backend/x86/assembler.py
pypy/branch/pyjitpl5/pypy/jit/backend/x86/regalloc.py
pypy/branch/pyjitpl5/pypy/jit/backend/x86/test/test_zrpy_gc.py
Log:
Use correct regalloc (sometimes a copy for a bridge). This probably requires
some cleanup, as position can be passed around cleaner than via regalloc.
(and _regalloc was intended for debug...)
Modified: pypy/branch/pyjitpl5/pypy/jit/backend/x86/assembler.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/jit/backend/x86/assembler.py (original)
+++ pypy/branch/pyjitpl5/pypy/jit/backend/x86/assembler.py Sat Jun 13 22:19:05 2009
@@ -847,6 +847,12 @@
if (isinstance(v, BoxPtr) and
regalloc.longevity[v][1] > regalloc.position):
gclocs.append(val)
+ #alllocs = []
+ #for loc in gclocs:
+ # assert isinstance(loc, MODRM)
+ # alllocs.append(str(loc.position))
+ #print self.mc.tell()
+ #print ", ".join(alllocs)
shape = self.gcrootmap.encode_callshape(gclocs)
self.gcrootmap.put(rffi.cast(llmemory.Address, self.mc.tell()),
shape)
Modified: pypy/branch/pyjitpl5/pypy/jit/backend/x86/regalloc.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/jit/backend/x86/regalloc.py (original)
+++ pypy/branch/pyjitpl5/pypy/jit/backend/x86/regalloc.py Sat Jun 13 22:19:05 2009
@@ -283,7 +283,10 @@
if arg not in self.reg_bindings:
assert arg in self.stack_bindings
assert arg not in self.dirty_stack
+ old_regalloc = self.assembler._regalloc
+ self.assembler._regalloc = self
self._walk_operations(operations)
+ self.assembler._regalloc = old_regalloc
def _walk_operations(self, operations):
i = 0
Modified: pypy/branch/pyjitpl5/pypy/jit/backend/x86/test/test_zrpy_gc.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/jit/backend/x86/test/test_zrpy_gc.py (original)
+++ pypy/branch/pyjitpl5/pypy/jit/backend/x86/test/test_zrpy_gc.py Sat Jun 13 22:19:05 2009
@@ -249,7 +249,6 @@
assert int(res) == 20
def test_compile_hybrid_7():
- py.test.skip("still crashing")
# Array of pointers (test the write barrier for setarrayitem_gc)
class X:
def __init__(self, x):
More information about the Pypy-commit
mailing list