(__arch_compare_and_exchange_val_*_acq): Remove setne instruction.

This commit is contained in:
Ulrich Drepper 2003-03-21 08:19:35 +00:00
parent 9f07eae298
commit b97ccf3d1e

View File

@ -57,28 +57,28 @@ typedef uintmax_t uatomic_max_t;
#define __arch_compare_and_exchange_val_8_acq(mem, newval, oldval) \ #define __arch_compare_and_exchange_val_8_acq(mem, newval, oldval) \
({ __typeof (*mem) ret; \ ({ __typeof (*mem) ret; \
__asm __volatile (LOCK "cmpxchgb %b2, %1; setne %0" \ __asm __volatile (LOCK "cmpxchgb %b2, %1" \
: "=a" (ret), "=m" (*mem) \ : "=a" (ret), "=m" (*mem) \
: "q" (newval), "1" (*mem), "0" (oldval)); \ : "q" (newval), "1" (*mem), "0" (oldval)); \
ret; }) ret; })
#define __arch_compare_and_exchange_val_16_acq(mem, newval, oldval) \ #define __arch_compare_and_exchange_val_16_acq(mem, newval, oldval) \
({ __typeof (*mem) ret; \ ({ __typeof (*mem) ret; \
__asm __volatile (LOCK "cmpxchgw %w2, %1; setne %0" \ __asm __volatile (LOCK "cmpxchgw %w2, %1" \
: "=a" (ret), "=m" (*mem) \ : "=a" (ret), "=m" (*mem) \
: "r" (newval), "1" (*mem), "0" (oldval)); \ : "r" (newval), "1" (*mem), "0" (oldval)); \
ret; }) ret; })
#define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \ #define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \
({ __typeof (*mem) ret; \ ({ __typeof (*mem) ret; \
__asm __volatile (LOCK "cmpxchgl %2, %1; setne %0" \ __asm __volatile (LOCK "cmpxchgl %2, %1" \
: "=a" (ret), "=m" (*mem) \ : "=a" (ret), "=m" (*mem) \
: "r" (newval), "1" (*mem), "0" (oldval)); \ : "r" (newval), "1" (*mem), "0" (oldval)); \
ret; }) ret; })
#define __arch_compare_and_exchange_val_64_acq(mem, newval, oldval) \ #define __arch_compare_and_exchange_val_64_acq(mem, newval, oldval) \
({ __typeof (*mem) ret; \ ({ __typeof (*mem) ret; \
__asm __volatile (LOCK "cmpxchgq %q2, %1; setne %0" \ __asm __volatile (LOCK "cmpxchgq %q2, %1" \
: "=a" (ret), "=m" (*mem) \ : "=a" (ret), "=m" (*mem) \
: "r" (newval), "1" (*mem), "0" (oldval)); \ : "r" (newval), "1" (*mem), "0" (oldval)); \
ret; }) ret; })