[pypy-commit] pypy continulet-jit-2: Large calls on 32-bit.
arigo
noreply at buildbot.pypy.org
Thu Mar 1 17:11:53 CET 2012
Author: Armin Rigo <arigo at tunes.org>
Branch: continulet-jit-2
Changeset: r53061:d6e3bdcf3b85
Date: 2012-03-01 16:53 +0100
http://bitbucket.org/pypy/pypy/changeset/d6e3bdcf3b85/
Log: Large calls on 32-bit.
diff --git a/pypy/jit/backend/x86/assembler.py b/pypy/jit/backend/x86/assembler.py
--- a/pypy/jit/backend/x86/assembler.py
+++ b/pypy/jit/backend/x86/assembler.py
@@ -1059,6 +1059,16 @@
n = len(arglocs)
for i in range(start, n):
loc = arglocs[i]
+ p += loc.get_width()
+ extra_esp = p//WORD - OFFSTACK_REAL_FRAME
+ if extra_esp > 0:
+ extra_esp = align_stack_words(extra_esp) * WORD
+ self.mc.SUB_ri(esp.value, extra_esp)
+
+ p = 0
+ n = len(arglocs)
+ for i in range(start, n):
+ loc = arglocs[i]
if isinstance(loc, RegLoc):
if loc.is_xmm:
self.mc.MOVSD_sx(p, loc.value)
@@ -1076,13 +1086,16 @@
self.mc.MOV(tmp, loc)
self.mc.MOV_sr(p, tmp.value)
p += loc.get_width()
- self._regalloc.reserve_param(p//WORD)
+ #self._regalloc.reserve_param(p//WORD)
# x is a location
self.mc.CALL(x)
self.mark_gc_roots(force_index)
#
if callconv != FFI_DEFAULT_ABI:
self._fix_stdcall(callconv, p)
+ #
+ if extra_esp > 0:
+ self.mc.ADD_ri(esp.value, extra_esp)
def _fix_stdcall(self, callconv, p):
from pypy.rlib.clibffi import FFI_STDCALL
More information about the pypy-commit
mailing list