Author: Maciej Fijalkowski <[email protected]>
Branch: jitframe-on-heap
Changeset: r60722:bca909dfddfb
Date: 2013-01-30 13:38 +0200
http://bitbucket.org/pypy/pypy/changeset/bca909dfddfb/
Log: oops. a fresh frame *may* contain young pointers. a few debug checks
extra
diff --git a/rpython/jit/backend/llsupport/gc.py
b/rpython/jit/backend/llsupport/gc.py
--- a/rpython/jit/backend/llsupport/gc.py
+++ b/rpython/jit/backend/llsupport/gc.py
@@ -139,6 +139,7 @@
""" Allocate a new frame, overwritten by tests
"""
frame = jitframe.JITFRAME.allocate(frame_info)
+ llop.gc_assume_young_pointers(lltype.Void, frame)
return frame
class JitFrameDescrs:
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
@@ -1261,7 +1261,8 @@
dst_locs.append(r10)
x = r10
remap_frame_layout(self, src_locs, dst_locs, X86_64_SCRATCH_REG)
- self.push_gcmap(self.mc, self._regalloc.get_gcmap([eax]), store=True)
+ self.push_gcmap(self.mc, self._regalloc.get_gcmap([eax], noregs=True),
+ store=True)
self.mc.CALL(x)
self._reload_frame_if_necessary(self.mc)
if align:
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
@@ -749,8 +749,7 @@
# - at least the non-callee-saved registers
#
# - for shadowstack, we assume that any call can collect, and we
- # save also the callee-saved registers that contain GC pointers,
- # so that they can be found by follow_stack_frame_of_assembler()
+ # save also the callee-saved registers that contain GC pointers.
#
# - for CALL_MAY_FORCE or CALL_ASSEMBLER, we have to save all regs
# anyway, in case we need to do cpu.force(). The issue is that
@@ -894,13 +893,14 @@
gc_ll_descr.get_nursery_top_addr(),
sizeloc, gcmap)
- def get_gcmap(self, forbidden_regs=[]):
+ def get_gcmap(self, forbidden_regs=[], noregs=False):
frame_depth = self.fm.get_frame_depth()
gcmap = self.assembler.allocate_gcmap(frame_depth)
for box, loc in self.rm.reg_bindings.iteritems():
if loc in forbidden_regs:
continue
if box.type == REF:
+ assert not noregs
assert isinstance(loc, RegLoc)
val = gpr_reg_mgr_cls.all_reg_indexes[loc.value]
gcmap[val // WORD // 8] |= r_uint(1) << (val % (WORD * 8))
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit