]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
util_atomic_xadd32 - hmpf
authorWolfgang Bumiller <wry.git@bumiller.com>
Wed, 17 Apr 2013 15:37:53 +0000 (17:37 +0200)
committerWolfgang Bumiller <wry.git@bumiller.com>
Wed, 17 Apr 2013 15:37:53 +0000 (17:37 +0200)
thread.c

index 741ac0fc0f6323d374406ec758bba77206db6e74..8ea036fc8f0b2f64dc8092ff66a2fc52ecf159be 100644 (file)
--- a/thread.c
+++ b/thread.c
@@ -2,12 +2,11 @@
 
 GMQCC_INLINE uint32_t util_atomic_xadd32(volatile uint32_t *x, uint32_t v)
 {
-    uint32_t r;
     asm volatile (
-        "lock xadd %1, %0"
-        : "+m"(*x), "=r"(r)
+        "lock xaddl %1, %0"
+        : "+m"(*x), "=r"(v)
         : "1"(v)
-        : "memory", "cc"
+        : "cc"
     );
-    return r;
+    return v;
 }