Recognize AO_PREFER_GENERALIZED to favor generalization over asm (MIPS)
authorIvan Maidanski <ivmai@mail.ru>
Thu, 8 Dec 2011 13:17:21 +0000 (17:17 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Thu, 8 Dec 2011 13:35:11 +0000 (17:35 +0400)
* src/atomic_ops/sysdeps/gcc/mips.h (AO_fetch_and_add,
AO_HAVE_fetch_and_add, AO_test_and_set, AO_HAVE_test_and_set): Do not
define if AO_PREFER_GENERALIZED.

src/atomic_ops/sysdeps/gcc/mips.h

index a1db844..525a54a 100644 (file)
@@ -50,6 +50,7 @@ AO_nop_full(void)
 }
 #define AO_HAVE_nop_full
 
+#ifndef AO_PREFER_GENERALIZED
 AO_INLINE AO_t
 AO_fetch_and_add(volatile AO_t *addr, AO_t incr)
 {
@@ -101,6 +102,9 @@ AO_test_and_set(volatile AO_TS_t *addr)
 }
 #define AO_HAVE_test_and_set
 
+  /* FIXME: Implement AO_and/or/xor primitives directly.        */
+#endif /* !AO_PREFER_GENERALIZED */
+
 #ifndef AO_GENERALIZE_ASM_BOOL_CAS
   AO_INLINE int
   AO_compare_and_swap(volatile AO_t *addr, AO_t old, AO_t new_val)
@@ -161,6 +165,4 @@ AO_fetch_compare_and_swap(volatile AO_t *addr, AO_t old, AO_t new_val)
 /* generated automatically (and AO_int_... primitives are       */
 /* defined properly after the first generalization pass).       */
 
-/* FIXME: Implement AO_and/or/xor primitives directly.          */
-
 #define AO_T_IS_INT