Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/libgc
diff options
context:
space:
mode:
authorAlex Rønne Petersen <alexrp@xamarin.com>2013-07-11 23:19:34 +0400
committerAlex Rønne Petersen <alexrp@xamarin.com>2013-07-12 00:11:29 +0400
commitf99f84a429374f4ce39e8376eb28f23e2a46a759 (patch)
tree2c6a0458e917c40d058aaf87dee395abf3e90c97 /libgc
parent718ceb860149fffc8a96e547e10ca7fad4909d2c (diff)
Add ARM version detection to configure and use the resulting macros.
This defines ARM_VERSION_{5,6,7}. Several of these can be defined at once. For example ARM_VERSION_5 and ARM_VERSION_6 will both be defined if the target is an ARM v6 CPU. Previously, we defined HAVE_ARMV6 based on running a program. This obviously didn't work for cross-compilation. This new approach does, and detects more cases (v5, v6, v7) than the previous check (v6).
Diffstat (limited to 'libgc')
-rw-r--r--libgc/include/private/gc_locks.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/libgc/include/private/gc_locks.h b/libgc/include/private/gc_locks.h
index e95cec0b4c1..36ccb8764d0 100644
--- a/libgc/include/private/gc_locks.h
+++ b/libgc/include/private/gc_locks.h
@@ -231,7 +231,7 @@
# define NACL_ALIGN()
# endif
inline static int GC_test_and_set(volatile unsigned int *addr) {
-#if defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7__)
+#if defined(__native_client__) || defined(HAVE_ARMV6)
int ret, tmp;
__asm__ __volatile__ (
"1:\n"
@@ -264,7 +264,7 @@
inline static void GC_clear(volatile unsigned int *addr) {
#ifdef HAVE_ARMV6
/* Memory barrier */
-#ifdef __native_client__
+#if defined(__native_client__) || defined(HAVE_ARMV7)
/* NaCl requires ARMv7 CPUs. */
__asm__ __volatile__("dsb" : : : "memory");
#else