[pypy-commit] pypy jit-targets: inject debug counter after initial label if present

hakanardo noreply at buildbot.pypy.org
Thu Nov 24 20:26:18 CET 2011


Author: Hakan Ardo <hakan at debian.org>
Branch: jit-targets
Changeset: r49752:24e9e6fb869c
Date: 2011-11-24 20:26 +0100
http://bitbucket.org/pypy/pypy/changeset/24e9e6fb869c/

Log:	inject debug counter after initial label if present

diff --git a/pypy/jit/backend/x86/assembler.py b/pypy/jit/backend/x86/assembler.py
--- a/pypy/jit/backend/x86/assembler.py
+++ b/pypy/jit/backend/x86/assembler.py
@@ -690,7 +690,10 @@
                    ResOperation(rop.INT_ADD, [box, ConstInt(1)], box2),
                    ResOperation(rop.SETFIELD_RAW, [c_adr, box2],
                                 None, descr=self.debug_counter_descr)]
-            operations = ops + operations
+            if operations[0].getopnum() == rop.LABEL:
+                operations = [operations[0]] + ops + operations[1:]
+            else:
+                operations =  ops + operations
         return operations
 
     def _assemble(self, regalloc, operations):


More information about the pypy-commit mailing list