[pypy-svn] r79303 - pypy/branch/arm-backend/pypy/jit/backend/arm

david at codespeak.net david at codespeak.net
Sat Nov 20 16:02:22 CET 2010


Author: david
Date: Sat Nov 20 16:02:19 2010
New Revision: 79303

Modified:
   pypy/branch/arm-backend/pypy/jit/backend/arm/assembler.py
Log:
Ensure stack pointer patch location fits in the current piece of memory

Modified: pypy/branch/arm-backend/pypy/jit/backend/arm/assembler.py
==============================================================================
--- pypy/branch/arm-backend/pypy/jit/backend/arm/assembler.py	(original)
+++ pypy/branch/arm-backend/pypy/jit/backend/arm/assembler.py	Sat Nov 20 16:02:19 2010
@@ -321,8 +321,10 @@
     def _prepare_sp_patch_location(self):
         """Generate NOPs as placeholder to patch the instruction(s) to update the
         sp according to the number of spilled variables"""
+        size = (self.mc.size_of_gen_load_int+WORD)
+        self.mc.ensure_can_fit(size)
         l = self.mc.curraddr()
-        for _ in range((self.mc.size_of_gen_load_int+WORD)//WORD):
+        for _ in range(size//WORD):
             self.mc.MOV_rr(r.r0.value, r.r0.value)
         return l
 



More information about the Pypy-commit mailing list