[pypy-commit] pypy jitframe-on-heap: more fixes
fijal
noreply at buildbot.pypy.org
Sun Feb 3 23:04:39 CET 2013
Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: jitframe-on-heap
Changeset: r60844:2f6015f5228e
Date: 2013-02-04 00:04 +0200
http://bitbucket.org/pypy/pypy/changeset/2f6015f5228e/
Log: more fixes
diff --git a/rpython/jit/backend/x86/arch.py b/rpython/jit/backend/x86/arch.py
--- a/rpython/jit/backend/x86/arch.py
+++ b/rpython/jit/backend/x86/arch.py
@@ -33,10 +33,10 @@
# ebp + ebx + esi + edi + 6 extra words + return address = 9 words
FRAME_FIXED_SIZE = 11
PASS_ON_MY_FRAME = 6
- JITFRAME_FIXED_SIZE = 28 # 13 GPR + 15 XMM
+ JITFRAME_FIXED_SIZE = 6 + 8 # 6 GPR + 8 XMM
else:
# rbp + rbx + r12 + r13 + r14 + r15 + 12 extra words + return address = 19
FRAME_FIXED_SIZE = 19
PASS_ON_MY_FRAME = 12
- JITFRAME_FIXED_SIZE = 6 + 8 # 6 GPR + 8 XMM
+ JITFRAME_FIXED_SIZE = 28 # 13 GPR + 15 XMM
diff --git a/rpython/jit/backend/x86/assembler.py b/rpython/jit/backend/x86/assembler.py
--- a/rpython/jit/backend/x86/assembler.py
+++ b/rpython/jit/backend/x86/assembler.py
@@ -70,7 +70,7 @@
if isinstance(loc, RegLoc):
val = gpr_reg_mgr_cls.all_reg_indexes[loc.value]
else:
- val = loc.value // WORD
+ val = loc.position + JITFRAME_FIXED_SIZE
gcmap[val // WORD // 8] |= r_uint(1) << (val % (WORD * 8))
return gcmap
@@ -1939,6 +1939,7 @@
locs = []
GPR_REGS = len(gpr_reg_mgr_cls.all_regs)
XMM_REGS = len(xmm_reg_mgr_cls.all_regs)
+ base_ofs = self.cpu.get_baseofs_of_frame_field()
input_i = 0
for pos in descr.rd_locs:
if pos == -1:
@@ -1952,7 +1953,7 @@
i = pos // WORD - JITFRAME_FIXED_SIZE
assert i >= 0
tp = inputargs[input_i].type
- locs.append(StackLoc(i, pos, tp))
+ locs.append(StackLoc(i, get_ebp_ofs(base_ofs, i), tp))
input_i += 1
return locs
diff --git a/rpython/jit/backend/x86/regalloc.py b/rpython/jit/backend/x86/regalloc.py
--- a/rpython/jit/backend/x86/regalloc.py
+++ b/rpython/jit/backend/x86/regalloc.py
@@ -910,7 +910,7 @@
for box, loc in self.fm.bindings.iteritems():
if box.type == REF:
assert isinstance(loc, StackLoc)
- val = loc.value // WORD
+ val = loc.position + JITFRAME_FIXED_SIZE
gcmap[val // WORD // 8] |= r_uint(1) << (val % (WORD * 8))
for i in range(len(gcmap)):
debug_print(str(gcmap[i]))
More information about the pypy-commit
mailing list