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