[pypy-commit] pypy stmgc-c7: fixes

arigo noreply at buildbot.pypy.org
Mon Mar 24 12:36:28 CET 2014


Author: Armin Rigo <arigo at tunes.org>
Branch: stmgc-c7
Changeset: r70245:3a9be956c290
Date: 2014-03-24 12:35 +0100
http://bitbucket.org/pypy/pypy/changeset/3a9be956c290/

Log:	fixes

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
@@ -2521,7 +2521,7 @@
         #     pypy_stm_start_transaction(&jmpbuf);
 
         # save all registers and the gcmap
-        self.push_gcmap(mc, gcmap, mov=True)
+        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)
@@ -2532,15 +2532,15 @@
         # 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
-        # one byte, patched just below)
-        mc.LEARIP_rl8(eax.value, 0)
+        # 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)
         #
         offset = mc.get_relative_pos() - learip_location
         assert 0 < offset <= 127
-        mc.overwrite(learip_location - 1, chr(offset))
+        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)
@@ -2560,7 +2560,7 @@
         # 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)
+        mc.overwrite32(jae_location - 4, offset)
 
     def genop_discard_stm_read(self, op, arglocs):
         if not IS_X86_64:
diff --git a/rpython/jit/backend/x86/rx86.py b/rpython/jit/backend/x86/rx86.py
--- a/rpython/jit/backend/x86/rx86.py
+++ b/rpython/jit/backend/x86/rx86.py
@@ -696,8 +696,7 @@
         self.writechar(chr((imm >> 56) & 0xFF))
 
     CQO = insn(rex_w, '\x99')
-    LEARIP_rl8 = insn(rex_w, '\x8D', register(1, 8), chr(0x05),
-                      immediate(2, 'b'))
+    LEARIP_rl32 = insn(rex_w, '\x8D', register(1, 8), chr(0x05), immediate(2))
 
     # Three different encodings... following what gcc does.  From the
     # shortest encoding to the longest one.
diff --git a/rpython/translator/stm/inevitable.py b/rpython/translator/stm/inevitable.py
--- a/rpython/translator/stm/inevitable.py
+++ b/rpython/translator/stm/inevitable.py
@@ -22,6 +22,7 @@
     'stm_threadlocalref_count', 'stm_threadlocalref_addr',
     'jit_assembler_call', 'gc_writebarrier',
     'shrink_array', 'jit_stm_transaction_break_point',
+    'jit_stm_should_break_transaction',
     ])
 ALWAYS_ALLOW_OPERATIONS |= set(lloperation.enum_tryfold_ops())
 


More information about the pypy-commit mailing list