From fdbc5fa24a9c73fbe8b205d80703633daa4e075e Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Wed, 16 Feb 2011 17:17:21 -0800 Subject: [PATCH] Fixed bug 1122 (spinlock fails to compile with -march=armv4t) --- src/atomic/SDL_spinlock.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/atomic/SDL_spinlock.c b/src/atomic/SDL_spinlock.c index 151686076..f841f77cf 100644 --- a/src/atomic/SDL_spinlock.c +++ b/src/atomic/SDL_spinlock.c @@ -62,7 +62,9 @@ SDL_AtomicTryLock(SDL_SpinLock *lock) #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"