Author: Armin Rigo <[email protected]>
Branch: stmgc-c7-rewindjmp
Changeset: r72869:f028586da4f9
Date: 2014-08-18 10:48 +0200
http://bitbucket.org/pypy/pypy/changeset/f028586da4f9/

Log:    Kill this code

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
@@ -2662,78 +2662,6 @@
         else:
             self.implement_guard(guard_token, 'AE')  # JAE goes to "no, don't"
 
-    def XXXgenop_guard_stm_transaction_break(self, op, guard_op, guard_token,
-                                          arglocs, result_loc):
-        assert self.cpu.gc_ll_descr.stm
-        if not we_are_translated():
-            return     # tests only
-
-        gcmap = self._regalloc.get_gcmap()
-        self._store_force_index(guard_op)
-
-        mc = self.mc
-        self._generate_cmp_break_transaction()
-        # use JAE to jump over the following piece of code if we don't need
-        # to break the transaction now
-        mc.J_il(rx86.Conditions['AE'], 0xfffff)    # patched later
-        jae_location = mc.get_relative_pos()
-
-        # This is the case in which we have to do the same as the logic
-        # in pypy_stm_perform_transaction().  We know that we're not in
-        # an atomic transaction (otherwise the jump above always triggers).
-        # So we only have to do the following three operations:
-        #     stm_commit_transaction();
-        #     __builtin_setjmp(jmpbuf);
-        #     pypy_stm_start_transaction(&jmpbuf);
-
-        # save all registers and the gcmap
-        self.push_gcmap(mc, gcmap, store=True)
-        grp_regs = self._regalloc.rm.reg_bindings.values()
-        xmm_regs = self._regalloc.xrm.reg_bindings.values()
-        self._push_pop_regs_to_frame(True, mc, grp_regs, xmm_regs)
-        #
-        # call stm_commit_transaction()
-        mc.CALL(imm(rstm.adr_stm_commit_transaction))
-        #
-        # update the two words in the STM_RESUME_BUF, as described
-        # in arch.py.  The "learip" pseudo-instruction turns into
-        # what is, in gnu as syntax: lea 0(%rip), %rax (the 0 is
-        # four bytes, patched just below)
-        mc.LEARIP_rl32(eax.value, 0)
-        learip_location = mc.get_relative_pos()
-        mc.MOV_sr(STM_JMPBUF_OFS_RIP, eax.value)
-        mc.MOV_sr(STM_JMPBUF_OFS_RSP, esp.value)
-        mc.XOR(ebp, ebp)
-        mc.MOV_sr(STM_JMPBUF_OFS_RBP, ebp.value)
-        #
-        offset = mc.get_relative_pos() - learip_location
-        assert 0 < offset <= 127
-        mc.overwrite32(learip_location - 4, offset)
-        # ** HERE ** is the place an aborted transaction retries
-        # (when resuming, ebp is garbage, but the STM_RESUME_BUF is
-        # still correct in case of repeated aborting)
-        #
-        # call pypy_stm_start_transaction(&jmpbuf, &v_counter)
-        # where v_counter is abusively stored in the jmpbuf at
-        # the location for ebp (so that the value in v_counter
-        # is here found in ebp, if we needed it).
-        mc.LEA_rs(edi.value, STM_JMPBUF_OFS)
-        mc.LEA_rs(esi.value, STM_JMPBUF_OFS_RBP)
-        mc.CALL(imm(rstm.adr_pypy_stm_start_transaction))
-        #
-        # reload ebp with the frame now
-        self._reload_frame_if_necessary(self.mc)
-        #
-        # restore regs
-        self._push_pop_regs_to_frame(False, mc, grp_regs, xmm_regs)
-        #
-        self._emit_guard_not_forced(guard_token)
-
-        # patch the JAE above (note that we also skip the guard_not_forced
-        # in the common situation where we jump over the code above)
-        offset = mc.get_relative_pos() - jae_location
-        mc.overwrite32(jae_location - 4, offset)
-
     def genop_discard_stm_read(self, op, arglocs):
         if not IS_X86_64:
             todo()   # "needed for X86_64_SCRATCH_REG"
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to