[pypy-svn] r37558 - pypy/dist/pypy/jit/codegen/ppc

mwh at codespeak.net mwh at codespeak.net
Mon Jan 29 18:47:40 CET 2007


Author: mwh
Date: Mon Jan 29 18:47:38 2007
New Revision: 37558

Modified:
   pypy/dist/pypy/jit/codegen/ppc/instruction.py
Log:
fix a __repr__, and put things back in the lru when things get spilled to gprs
across labels


Modified: pypy/dist/pypy/jit/codegen/ppc/instruction.py
==============================================================================
--- pypy/dist/pypy/jit/codegen/ppc/instruction.py	(original)
+++ pypy/dist/pypy/jit/codegen/ppc/instruction.py	Mon Jan 29 18:47:38 2007
@@ -213,6 +213,9 @@
         self.result_regclass = GP_REGISTER
         self.reg_args = [arg]
         self.reg_arg_regclasses = [GP_REGISTER]
+
+        self.result_reg = None
+        self.arg_reg = None
     def allocate(self, allocator):
         self.result_reg = allocator.loc_of(self.result)
         self.arg_reg = allocator.loc_of(self.reg_args[0])
@@ -485,6 +488,7 @@
                 allocator.lru.remove(gv)
                 allocator.freeregs[loc.regclass].append(loc.alloc)
                 new_loc = allocator._allocate_reg(GP_REGISTER, gv)
+                allocator.lru.append(gv)
                 allocator.insns.append(loc.move_to_gpr(allocator, new_loc.number))
                 loc = new_loc
             self.label.arg_locations.append(loc)



More information about the Pypy-commit mailing list