[pypy-commit] pypy jit-targets: Fix the XXX.

arigo noreply at buildbot.pypy.org
Thu Nov 24 22:57:48 CET 2011


Author: Armin Rigo <arigo at tunes.org>
Branch: jit-targets
Changeset: r49763:b3e7310584d1
Date: 2011-11-24 22:19 +0100
http://bitbucket.org/pypy/pypy/changeset/b3e7310584d1/

Log:	Fix the XXX.

diff --git a/pypy/jit/backend/x86/regalloc.py b/pypy/jit/backend/x86/regalloc.py
--- a/pypy/jit/backend/x86/regalloc.py
+++ b/pypy/jit/backend/x86/regalloc.py
@@ -1408,13 +1408,18 @@
         self.xrm.force_allocate_reg(tmpvar, selected_reg=xmmtmp)
         self.xrm.possibly_free_var(tmpvar)
         #
+        # we need to make sure that no variable is stored in ebp
+        for arg in inputargs:
+            if self.loc(arg) is ebp:
+                loc2 = self.fm.loc(arg)
+                self.assembler.mc.MOV(loc2, ebp)
+        self.rm.bindings_to_frame_reg.clear()
+        #
         for i in range(len(inputargs)):
             arg = inputargs[i]
             assert not isinstance(arg, Const)
             loc = self.loc(arg)
-            if loc is ebp:
-                assert 0, "XXX move it away from ebp"
-            assert not (loc is tmpreg or loc is xmmtmp)
+            assert not (loc is tmpreg or loc is xmmtmp or loc is ebp)
             if arg.type == FLOAT:
                 floatlocs[i] = loc
             else:


More information about the pypy-commit mailing list