aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/mips
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/mips')
-rw-r--r--sysdeps/mips/atomic-machine.h27
1 files changed, 1 insertions, 26 deletions
diff --git a/sysdeps/mips/atomic-machine.h b/sysdeps/mips/atomic-machine.h
index 6db8fee..f0a8902 100644
--- a/sysdeps/mips/atomic-machine.h
+++ b/sysdeps/mips/atomic-machine.h
@@ -85,7 +85,7 @@ typedef uintmax_t uatomic_max_t;
#define MIPS_SYNC_STR_1(X) MIPS_SYNC_STR_2(X)
#define MIPS_SYNC_STR MIPS_SYNC_STR_1(MIPS_SYNC)
-#if __GNUC_PREREQ (4, 8) || (defined __mips16 && __GNUC_PREREQ (4, 7))
+#if __GNUC_PREREQ (4, 8) || defined __mips16
/* The __atomic_* builtins are available in GCC 4.7 and later, but MIPS
support for their efficient implementation was added only in GCC 4.8.
We still want to use them even with GCC 4.7 for MIPS16 code where we
@@ -213,31 +213,6 @@ typedef uintmax_t uatomic_max_t;
__atomic_val_bysize (__arch_exchange_and_add, int, mem, value, \
__ATOMIC_RELEASE)
-#elif defined __mips16 /* !__GNUC_PREREQ (4, 7) */
-/* This implementation using __sync* builtins will be removed once glibc
- requires GCC 4.7 or later to build. */
-
-# define atomic_compare_and_exchange_val_acq(mem, newval, oldval) \
- __sync_val_compare_and_swap ((mem), (oldval), (newval))
-# define atomic_compare_and_exchange_bool_acq(mem, newval, oldval) \
- (!__sync_bool_compare_and_swap ((mem), (oldval), (newval)))
-
-# define atomic_exchange_acq(mem, newval) \
- __sync_lock_test_and_set ((mem), (newval))
-
-# define atomic_exchange_and_add(mem, val) \
- __sync_fetch_and_add ((mem), (val))
-
-# define atomic_bit_test_set(mem, bit) \
- ({ __typeof (bit) __bit = (bit); \
- (__sync_fetch_and_or ((mem), 1 << (__bit)) & (1 << (__bit))); })
-
-# define atomic_and(mem, mask) (void) __sync_fetch_and_and ((mem), (mask))
-# define atomic_and_val(mem, mask) __sync_fetch_and_and ((mem), (mask))
-
-# define atomic_or(mem, mask) (void) __sync_fetch_and_or ((mem), (mask))
-# define atomic_or_val(mem, mask) __sync_fetch_and_or ((mem), (mask))
-
#else /* !__mips16 && !__GNUC_PREREQ (4, 8) */
/* This implementation using inline assembly will be removed once glibc
requires GCC 4.8 or later to build. */