Author: Remi Meier <[email protected]>
Branch: stmgc-c4
Changeset: r67428:ac7daebd5480
Date: 2013-10-15 17:43 +0200
http://bitbucket.org/pypy/pypy/changeset/ac7daebd5480/
Log: remove unnecessary write barrier on jitframe
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
@@ -965,19 +965,9 @@
return rst
def _call_header_shadowstack(self, gcrootmap):
- # do a write-barrier on ebp / frame for stm
- # XXX: may not be necessary if we are sure that we only get
- # freshly allocated frames or already write-ready frames
- # from the caller...
- gc_ll_descr = self.cpu.gc_ll_descr
- gcrootmap = gc_ll_descr.gcrootmap
- if gcrootmap and gcrootmap.is_stm:
- if not hasattr(gc_ll_descr, 'P2Wdescr'):
- raise Exception("unreachable code")
- wbdescr = gc_ll_descr.P2Wdescr
- self._stm_barrier_fastpath(self.mc, wbdescr, [ebp], is_frame=True)
-
# put the frame in ebp on the shadowstack for the GC to find
+ # (ebp is a writeable object and does not need a write-barrier
+ # again (ensured by the code calling the loop))
rst = self._load_shadowstack_top_in_ebx(self.mc, gcrootmap)
self.mc.MOV_mr((ebx.value, 0), ebp.value) # MOV [ebx], ebp
self.mc.ADD_ri(ebx.value, WORD)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit