[pypy-commit] pypy jitframe-on-heap: fix for call_assembler with floats. The offset calculation for the arguments to call_assembler in rewrite.py assumes a double-word aligned JITFRAME
bivab
noreply at buildbot.pypy.org
Sun Feb 17 03:00:25 CET 2013
Author: David Schneider <david.schneider at picle.org>
Branch: jitframe-on-heap
Changeset: r61341:017892f48c74
Date: 2013-02-17 02:59 +0100
http://bitbucket.org/pypy/pypy/changeset/017892f48c74/
Log: fix for call_assembler with floats. The offset calculation for the
arguments to call_assembler in rewrite.py assumes a double-word
aligned JITFRAME
diff --git a/rpython/jit/backend/arm/arch.py b/rpython/jit/backend/arm/arch.py
--- a/rpython/jit/backend/arm/arch.py
+++ b/rpython/jit/backend/arm/arch.py
@@ -17,4 +17,4 @@
# A jitframe is a jit.backend.llsupport.llmodel.jitframe.JITFRAME
# Stack frame fixed area
# Currently only the force_index
-JITFRAME_FIXED_SIZE = 11 + 16 * 2 # 11 GPR + 16 VFP Regs (64bit)
+JITFRAME_FIXED_SIZE = 12 + 16 * 2 # 11 GPR + one word to keep alignment + 16 VFP Regs (64bit)
diff --git a/rpython/jit/backend/llsupport/rewrite.py b/rpython/jit/backend/llsupport/rewrite.py
--- a/rpython/jit/backend/llsupport/rewrite.py
+++ b/rpython/jit/backend/llsupport/rewrite.py
@@ -179,6 +179,9 @@
for i, arg in enumerate(arglist):
descr = self.cpu.getarraydescr_for_frame(arg.type)
_, itemsize, _ = self.cpu.unpack_arraydescr_size(descr)
+ # XXX
+ # this calculation breaks for floats on 32 bit if
+ # base_ofs of JITFRAME + index * 8 is not double-word aligned
index = index_list[i] // itemsize # index is in bytes
self.newops.append(ResOperation(rop.SETARRAYITEM_GC,
[frame, ConstInt(index),
More information about the pypy-commit
mailing list