From 3cd00dfc57b6b95e1585afd152a4fa4e67fccf6b Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Sat, 6 Oct 2012 21:32:40 +0400 Subject: [PATCH] Define AO_int_X operations for ARM and avr32 * src/atomic_ops/sysdeps/armcc/arm_v6.h (AO_T_IS_INT): Define macro (signifying that AO_t is in fact int and, thus, defining AO_int_... primitives). * src/atomic_ops/sysdeps/gcc/arm.h b/src/atomic_ops/sysdeps/gcc/arm.h (AO_T_IS_INT): Likewise. * src/atomic_ops/sysdeps/gcc/avr32.h (AO_T_IS_INT): Likewise. * src/atomic_ops/sysdeps/msftc/arm.h (AO_T_IS_INT): Likewise. * src/atomic_ops/sysdeps/gcc/arm.h (AO_T_IS_INT): Add FIXME (AO_T_IS_INT should be defined conditionally on adding 64-bit ABI support). * src/atomic_ops/sysdeps/gcc/mips.h (AO_T_IS_INT): Likewise. --- src/atomic_ops/sysdeps/armcc/arm_v6.h | 2 ++ src/atomic_ops/sysdeps/gcc/arm.h | 3 +++ src/atomic_ops/sysdeps/gcc/avr32.h | 2 ++ src/atomic_ops/sysdeps/gcc/mips.h | 1 + src/atomic_ops/sysdeps/msftc/arm.h | 2 ++ 5 files changed, 10 insertions(+) diff --git a/src/atomic_ops/sysdeps/armcc/arm_v6.h b/src/atomic_ops/sysdeps/armcc/arm_v6.h index 57b8476..2ce31b1 100644 --- a/src/atomic_ops/sysdeps/armcc/arm_v6.h +++ b/src/atomic_ops/sysdeps/armcc/arm_v6.h @@ -254,3 +254,5 @@ AO_compare_double_and_swap_double(volatile AO_double_t *addr, #define AO_HAVE_compare_double_and_swap_double #endif /* __TARGET_ARCH_ARM >= 6 */ + +#define AO_T_IS_INT diff --git a/src/atomic_ops/sysdeps/gcc/arm.h b/src/atomic_ops/sysdeps/gcc/arm.h index b994bbb..324f4a5 100644 --- a/src/atomic_ops/sysdeps/gcc/arm.h +++ b/src/atomic_ops/sysdeps/gcc/arm.h @@ -388,3 +388,6 @@ AO_fetch_compare_and_swap(volatile AO_t *addr, AO_t old_val, AO_t new_val) } # define AO_HAVE_test_and_set_full #endif /* !AO_HAVE_test_and_set[_full] && AO_ARM_HAVE_SWP */ + +/* FIXME: 32-bit ABI is assumed. */ +#define AO_T_IS_INT diff --git a/src/atomic_ops/sysdeps/gcc/avr32.h b/src/atomic_ops/sysdeps/gcc/avr32.h index 89baa7b..b0c52c7 100644 --- a/src/atomic_ops/sysdeps/gcc/avr32.h +++ b/src/atomic_ops/sysdeps/gcc/avr32.h @@ -67,3 +67,5 @@ AO_compare_and_swap_full(volatile AO_t *addr, AO_t old, AO_t new_val) #define AO_HAVE_compare_and_swap_full /* TODO: implement AO_fetch_compare_and_swap. */ + +#define AO_T_IS_INT diff --git a/src/atomic_ops/sysdeps/gcc/mips.h b/src/atomic_ops/sysdeps/gcc/mips.h index 63f9e48..9373c1d 100644 --- a/src/atomic_ops/sysdeps/gcc/mips.h +++ b/src/atomic_ops/sysdeps/gcc/mips.h @@ -167,4 +167,5 @@ 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: 32-bit ABI is assumed. */ #define AO_T_IS_INT diff --git a/src/atomic_ops/sysdeps/msftc/arm.h b/src/atomic_ops/sysdeps/msftc/arm.h index d254a3f..68727cc 100644 --- a/src/atomic_ops/sysdeps/msftc/arm.h +++ b/src/atomic_ops/sysdeps/msftc/arm.h @@ -87,3 +87,5 @@ AO_store_full(volatile AO_t *addr, AO_t value) /* AO_test_and_set_full() is emulated using CAS. */ #endif /* _M_ARM < 6 */ + +#define AO_T_IS_INT -- 2.49.0