[pypy-svn] r69808 - in pypy/branch/esp-params/pypy/jit/backend/x86: . test

pedronis at codespeak.net pedronis at codespeak.net
Tue Dec 1 16:19:33 CET 2009


Author: pedronis
Date: Tue Dec  1 16:19:32 2009
New Revision: 69808

Modified:
   pypy/branch/esp-params/pypy/jit/backend/x86/assembler.py
   pypy/branch/esp-params/pypy/jit/backend/x86/test/test_regalloc.py
Log:
work-in-progress

Modified: pypy/branch/esp-params/pypy/jit/backend/x86/assembler.py
==============================================================================
--- pypy/branch/esp-params/pypy/jit/backend/x86/assembler.py	(original)
+++ pypy/branch/esp-params/pypy/jit/backend/x86/assembler.py	Tue Dec  1 16:19:32 2009
@@ -194,7 +194,10 @@
         jump_target_descr = regalloc.jump_target_descr
         if jump_target_descr is not None:
             target_frame_depth = jump_target_descr._x86_frame_depth
+            target_param_depth = jump_target_descr._x86_param_depth
             frame_depth = max(frame_depth, target_frame_depth)
+            # xxx tested?
+            param_depth = max(param_depth, target_param_depth)
         return frame_depth, param_depth
 
     def _patchable_stackadjust(self):

Modified: pypy/branch/esp-params/pypy/jit/backend/x86/test/test_regalloc.py
==============================================================================
--- pypy/branch/esp-params/pypy/jit/backend/x86/test/test_regalloc.py	(original)
+++ pypy/branch/esp-params/pypy/jit/backend/x86/test/test_regalloc.py	Tue Dec  1 16:19:32 2009
@@ -575,6 +575,9 @@
         finish(i3, descr=fdescr2)        
         '''
         bridge = self.attach_bridge(ops, loop, -2)
+
+        assert loop.operations[-2].descr._x86_bridge_param_depth == 2
+
         self.cpu.set_future_value_int(0, 4)
         self.cpu.set_future_value_int(1, 7)        
         self.run(loop)
@@ -595,7 +598,11 @@
         finish(i3, descr=fdescr2)        
         '''
         bridge = self.attach_bridge(ops, loop, -2)
+
+        assert loop.operations[-2].descr._x86_bridge_param_depth == 2        
+
         self.cpu.set_future_value_int(0, 4)
         self.cpu.set_future_value_int(1, 7)        
         self.run(loop)
         assert self.getint(0) == 29
+



More information about the Pypy-commit mailing list