Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Unity-Technologies/libatomic_ops.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2013-03-29 07:45:03 +0400
committerIvan Maidanski <ivmai@mail.ru>2013-03-29 13:50:34 +0400
commit2d8afff72a4d5f6d27022a2f7529406d61f57970 (patch)
treef959a0b1f2b93ff45b85dcfa54df169c72ab8a49
parent31df7fa54fda2e5f7f77d0c947413c3ac390d28d (diff)
Reformat asm instructions of sunc/x86.h
* src/atomic_ops/sysdeps/sunc/x86.h (AO_fetch_and_add_full, AO_char_fetch_and_add_full, AO_short_fetch_and_add_full, AO_and_full, AO_or_full, AO_xor_full, AO_compare_and_swap_full): Reformat code.
-rw-r--r--src/atomic_ops/sysdeps/sunc/x86.h32
1 files changed, 19 insertions, 13 deletions
diff --git a/src/atomic_ops/sysdeps/sunc/x86.h b/src/atomic_ops/sysdeps/sunc/x86.h
index 3b8ddf7..a3cb922 100644
--- a/src/atomic_ops/sysdeps/sunc/x86.h
+++ b/src/atomic_ops/sysdeps/sunc/x86.h
@@ -51,8 +51,9 @@
{
AO_t result;
- __asm__ __volatile__ ("lock; xadd %0, %1" :
- "=r" (result), "+m" (*p) : "0" (incr)
+ __asm__ __volatile__ ("lock; xadd %0, %1"
+ : "=r" (result), "+m" (*p)
+ : "0" (incr)
: "memory");
return result;
}
@@ -64,8 +65,9 @@ AO_char_fetch_and_add_full (volatile unsigned char *p, unsigned char incr)
{
unsigned char result;
- __asm__ __volatile__ ("lock; xaddb %0, %1" :
- "=q" (result), "+m" (*p) : "0" (incr)
+ __asm__ __volatile__ ("lock; xaddb %0, %1"
+ : "=q" (result), "+m" (*p)
+ : "0" (incr)
: "memory");
return result;
}
@@ -76,8 +78,9 @@ AO_short_fetch_and_add_full (volatile unsigned short *p, unsigned short incr)
{
unsigned short result;
- __asm__ __volatile__ ("lock; xaddw %0, %1" :
- "=r" (result), "+m" (*p) : "0" (incr)
+ __asm__ __volatile__ ("lock; xaddw %0, %1"
+ : "=r" (result), "+m" (*p)
+ : "0" (incr)
: "memory");
return result;
}
@@ -88,8 +91,9 @@ AO_short_fetch_and_add_full (volatile unsigned short *p, unsigned short incr)
AO_INLINE void
AO_and_full (volatile AO_t *p, AO_t value)
{
- __asm__ __volatile__ ("lock; and %1, %0" :
- "+m" (*p) : "r" (value)
+ __asm__ __volatile__ ("lock; and %1, %0"
+ : "+m" (*p)
+ : "r" (value)
: "memory");
}
# define AO_HAVE_and_full
@@ -97,8 +101,9 @@ AO_short_fetch_and_add_full (volatile unsigned short *p, unsigned short incr)
AO_INLINE void
AO_or_full (volatile AO_t *p, AO_t value)
{
- __asm__ __volatile__ ("lock; or %1, %0" :
- "+m" (*p) : "r" (value)
+ __asm__ __volatile__ ("lock; or %1, %0"
+ : "+m" (*p)
+ : "r" (value)
: "memory");
}
# define AO_HAVE_or_full
@@ -106,8 +111,9 @@ AO_short_fetch_and_add_full (volatile unsigned short *p, unsigned short incr)
AO_INLINE void
AO_xor_full (volatile AO_t *p, AO_t value)
{
- __asm__ __volatile__ ("lock; xor %1, %0" :
- "+m" (*p) : "r" (value)
+ __asm__ __volatile__ ("lock; xor %1, %0"
+ : "+m" (*p)
+ : "r" (value)
: "memory");
}
# define AO_HAVE_xor_full
@@ -134,7 +140,7 @@ AO_test_and_set_full (volatile AO_TS_t *addr)
char result;
__asm__ __volatile__ ("lock; cmpxchg %2, %0; setz %1"
: "+m" (*addr), "=a" (result)
- : "r" (new_val), "a"(old)
+ : "r" (new_val), "a" (old)
: "memory");
return (int) result;
}