Commits

Ivan Sichmann Freitas committed e20b769

Define JITFRAME_FIXED_SIZE

Comments (0)

Files changed (2)

rpython/jit/backend/ppc/arch.py

 
 FORCE_INDEX_OFS         = (len(MANAGED_REGS) + len(MANAGED_FP_REGS)) * WORD
 
+# The JITFRAME_FIXED_SIZE is measured in words, not bytes or bits.
+# Follwing the PPC ABI, we are saving:
+# - volatile fpr's
+# - volatile gpr's
+# - vrsave word
+# - alignment padding
+# - vector register save area (quadword aligned)
+# 3 + 27 + 1 + 4 + 1
+JITFRAME_FIXED_SIZE = len(MANAGED_FP_REGS) + len(MANAGED_REGS) + 1 + 4 + 1
+
 # offset to LR in BACKCHAIN
 if IS_PPC_32:
     LR_BC_OFFSET = WORD

rpython/jit/backend/ppc/locations.py

 from rpython.jit.metainterp.history import INT, FLOAT
 import sys
 
+# TODO: solve the circular import: runner -> arch -> register -> locations ->
+# arch
 # XXX import from arch.py, currently we have a circular import
 if sys.maxint == (2**31 - 1):
     WORD = 4
     FWORD = 8
 DWORD = 2 * WORD
 
+# JITFRAME_FIXED_SIZE is also duplicated because of the circular import
+JITFRAME_FIXED_SIZE = 27 + 31 + 1 + 4 + 1
+
 class AssemblerLocation(object):
     _immutable_ = True
     type = INT