Author: Armin Rigo <[email protected]>
Branch: fast-gil
Changeset: r69823:7ee265600e15
Date: 2014-03-09 12:26 +0100
http://bitbucket.org/pypy/pypy/changeset/7ee265600e15/

Log:    fixes

diff --git a/rpython/translator/c/gcc/trackgcroot.py 
b/rpython/translator/c/gcc/trackgcroot.py
--- a/rpython/translator/c/gcc/trackgcroot.py
+++ b/rpython/translator/c/gcc/trackgcroot.py
@@ -846,6 +846,10 @@
         return []
 
     def _visit_xchg(self, line):
+        # ignore the special locking xchg put there by custom assembler
+        # in thread_pthread.c, with an associated comment
+        if line.endswith('*/\n'):
+            return []
         # only support the format used in VALGRIND_DISCARD_TRANSLATIONS
         # which is to use a marker no-op "xchgl %ebx, %ebx"
         match = self.r_binaryinsn.match(line)
diff --git a/rpython/translator/c/src/thread_pthread.c 
b/rpython/translator/c/src/thread_pthread.c
--- a/rpython/translator/c/src/thread_pthread.c
+++ b/rpython/translator/c/src/thread_pthread.c
@@ -597,10 +597,10 @@
 {
     void *result;
 #if defined(__amd64__)
-    asm volatile ("xchgq %0, %1  /* automatically locked */"
+    asm volatile ("xchgq %0, %2  /* automatically locked */"
                   : "=r"(result) : "0"(value), "m"(*ptr) : "memory");
 #elif defined(__i386__)
-    asm volatile ("xchgl %0, %1  /* automatically locked */"
+    asm volatile ("xchgl %0, %2  /* automatically locked */"
                   : "=r"(result) : "0"(value), "m"(*ptr) : "memory");
 #else
     /* requires gcc >= 4.1 */
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to