diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2011-11-21 14:43:50 -0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2011-11-23 09:19:28 -0800 |
commit | 25e19952ba37ca9e12a62d4a6674005d1fdddc17 (patch) | |
tree | 7f7e570e0036e3b5f30f1c823f57948070fc63ce /sysdeps/x86_64 | |
parent | ab90a0dfffb4f5e1a011cc5cc37940026b58da18 (diff) | |
download | glibc-25e19952ba37ca9e12a62d4a6674005d1fdddc17.tar.gz |
Use long long on 64bit integer in atomic.h.
Diffstat (limited to 'sysdeps/x86_64')
-rw-r--r-- | sysdeps/x86_64/bits/atomic.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sysdeps/x86_64/bits/atomic.h b/sysdeps/x86_64/bits/atomic.h index 7c138eb2f3..2ded147f7a 100644 --- a/sysdeps/x86_64/bits/atomic.h +++ b/sysdeps/x86_64/bits/atomic.h @@ -87,8 +87,8 @@ typedef uintmax_t uatomic_max_t; ({ __typeof (*mem) ret; \ __asm __volatile (LOCK_PREFIX "cmpxchgq %q2, %1" \ : "=a" (ret), "=m" (*mem) \ - : "r" ((long int) (newval)), "m" (*mem), \ - "0" ((long int) (oldval))); \ + : "r" ((long long int) (newval)), "m" (*mem), \ + "0" ((long long int) (oldval))); \ ret; }) #endif @@ -133,8 +133,8 @@ typedef uintmax_t uatomic_max_t; "lock\n" \ "0:\tcmpxchgq %q2, %1" \ : "=a" (ret), "=m" (*mem) \ - : "q" ((long int) (newval)), "m" (*mem), \ - "0" ((long int)oldval), \ + : "q" ((long long int) (newval)), "m" (*mem), \ + "0" ((long long int) (oldval)), \ "i" (offsetof (tcbhead_t, multiple_threads))); \ ret; }) @@ -157,7 +157,7 @@ typedef uintmax_t uatomic_max_t; else \ __asm __volatile ("xchgq %q0, %1" \ : "=r" (result), "=m" (*mem) \ - : "0" ((long) (newvalue)), "m" (*mem)); \ + : "0" ((long long) (newvalue)), "m" (*mem)); \ result; }) @@ -181,7 +181,7 @@ typedef uintmax_t uatomic_max_t; else \ __asm __volatile (lock "xaddq %q0, %1" \ : "=r" (result), "=m" (*mem) \ - : "0" ((long) (value)), "m" (*mem), \ + : "0" ((long long) (value)), "m" (*mem), \ "i" (offsetof (tcbhead_t, multiple_threads))); \ result; }) @@ -224,7 +224,7 @@ typedef uintmax_t uatomic_max_t; else \ __asm __volatile (lock "addq %q1, %0" \ : "=m" (*mem) \ - : "ir" ((long) (value)), "m" (*mem), \ + : "ir" ((long long) (value)), "m" (*mem), \ "i" (offsetof (tcbhead_t, multiple_threads))); \ } while (0) @@ -255,7 +255,7 @@ typedef uintmax_t uatomic_max_t; else \ __asm __volatile (LOCK_PREFIX "addq %q2, %0; sets %1" \ : "=m" (*mem), "=qm" (__result) \ - : "ir" ((long) (value)), "m" (*mem)); \ + : "ir" ((long long) (value)), "m" (*mem)); \ __result; }) @@ -276,7 +276,7 @@ typedef uintmax_t uatomic_max_t; else \ __asm __volatile (LOCK_PREFIX "addq %q2, %0; setz %1" \ : "=m" (*mem), "=qm" (__result) \ - : "ir" ((long) (value)), "m" (*mem)); \ + : "ir" ((long long) (value)), "m" (*mem)); \ __result; }) |