[pypy-commit] pypy arm-backed-float: ensure stack alignment when patching the stack pointer to reserve space for spilling variables

bivab noreply at buildbot.pypy.org
Fri May 20 10:34:28 CEST 2011


Author: David Schneider <david.schneider at picle.org>
Branch: arm-backed-float
Changeset: r44313:cf9ada0b49ac
Date: 2011-05-20 10:40 +0200
http://bitbucket.org/pypy/pypy/changeset/cf9ada0b49ac/

Log:	ensure stack alignment when patching the stack pointer to reserve
	space for spilling variables

diff --git a/pypy/jit/backend/arm/assembler.py b/pypy/jit/backend/arm/assembler.py
--- a/pypy/jit/backend/arm/assembler.py
+++ b/pypy/jit/backend/arm/assembler.py
@@ -617,6 +617,12 @@
         if frame_depth == 1:
             return
         n = (frame_depth-1)*WORD
+
+        # ensure the sp is 8 byte aligned when patching it
+        if n % 8 != 0:
+            n += WORD
+        assert n % 8 == 0
+
         self._adjust_sp(n, cb, base_reg=r.fp)
 
     def _adjust_sp(self, n, cb=None, fcond=c.AL, base_reg=r.sp):


More information about the pypy-commit mailing list