Commits

David Schneider committed 017892f

fix for call_assembler with floats. The offset calculation for the arguments to call_assembler in rewrite.py assumes a double-word aligned JITFRAME

  • Participants
  • Parent commits 4132424
  • Branches jitframe-on-heap

Comments (0)

Files changed (2)

rpython/jit/backend/arm/arch.py

 # 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)

rpython/jit/backend/llsupport/rewrite.py

         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),