Fixed bug 1122 (spinlock fails to compile with -march=armv4t)
authorSam Lantinga <slouken@libsdl.org>
Wed, 16 Feb 2011 17:17:21 -0800
changeset 5328 f34a5f9ce9f6
parent 5327 42b3eb7984e1
child 5329 07317a2730ab
Fixed bug 1122 (spinlock fails to compile with -march=armv4t)
src/atomic/SDL_spinlock.c
--- a/src/atomic/SDL_spinlock.c	Wed Feb 16 15:56:37 2011 -0800
+++ b/src/atomic/SDL_spinlock.c	Wed Feb 16 17:17:21 2011 -0800
@@ -62,7 +62,9 @@
 #elif HAVE_GCC_ATOMICS || HAVE_GCC_SYNC_LOCK_TEST_AND_SET
     return (__sync_lock_test_and_set(lock, 1) == 0);
 
-#elif defined(__GNUC__) && defined(__arm__) && (defined(__ARM_ARCH_5__) || defined(__ARM_ARCH_5TE__))
+#elif defined(__GNUC__) && defined(__arm__) && \
+        (defined(__ARM_ARCH_4__) || defined(__ARM_ARCH_4T__) || \
+         defined(__ARM_ARCH_5__) || defined(__ARM_ARCH_5TE__))
     int result;
     __asm__ __volatile__ (
         "swp %0, %1, [%2]\n"