[pypy-svn] r71370 - pypy/branch/debug-vref2/pypy/jit/backend/x86

arigo at codespeak.net arigo at codespeak.net
Sun Feb 21 13:05:35 CET 2010


Author: arigo
Date: Sun Feb 21 13:05:32 2010
New Revision: 71370

Modified:
   pypy/branch/debug-vref2/pypy/jit/backend/x86/assembler.py
Log:
Fix: this is the way that really does not depend on
remember_young_pointer() not changing its arguments in the stack.



Modified: pypy/branch/debug-vref2/pypy/jit/backend/x86/assembler.py
==============================================================================
--- pypy/branch/debug-vref2/pypy/jit/backend/x86/assembler.py	(original)
+++ pypy/branch/debug-vref2/pypy/jit/backend/x86/assembler.py	Sun Feb 21 13:05:32 2010
@@ -1401,16 +1401,12 @@
         for i in range(len(arglocs)-1, 2, -1):
             mc.PUSH(arglocs[i])
         mc.CALL(rel32(op.args[2].getint()))
-        pop_count = 0
-        for i in range(3, len(arglocs)):
+        mc.POP(eax)
+        mc.POP(eax)
+        for i in range(5, len(arglocs)):
             loc = arglocs[i]
-            pop_count += 1
-            if isinstance(loc, REG):
-                while pop_count > 0:
-                    mc.POP(loc)
-                    pop_count -= 1
-        if pop_count:
-            mc.ADD(esp, imm(WORD * pop_count))
+            assert isinstance(loc, REG)
+            mc.POP(loc)
         # patch the JZ above
         offset = mc.get_relative_pos() - jz_location
         assert 0 < offset <= 127



More information about the Pypy-commit mailing list