src/atomic/SDL_atomic.c
changeset 7394 38dc4961ab15
parent 7191 75360622e65f
child 7860 2b0bcdea3a79
     1.1 --- a/src/atomic/SDL_atomic.c	Wed Jul 10 18:31:17 2013 -0700
     1.2 +++ b/src/atomic/SDL_atomic.c	Wed Jul 10 20:17:20 2013 -0700
     1.3 @@ -101,4 +101,18 @@
     1.4      return retval;
     1.5  }
     1.6  
     1.7 +#if defined(__GNUC__) && defined(__arm__) && \
     1.8 +   (defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__))
     1.9 +__asm__(
    1.10 +"   .align 2\n"
    1.11 +"   .globl _SDL_MemoryBarrierRelease\n"
    1.12 +"   .globl _SDL_MemoryBarrierAcquire\n"
    1.13 +"_SDL_MemoryBarrierRelease:\n"
    1.14 +"_SDL_MemoryBarrierAcquire:\n"
    1.15 +"   mov r0, #0\n"
    1.16 +"   mcr p15, 0, r0, c7, c10, 5\n"
    1.17 +"   bx lr\n"
    1.18 +);
    1.19 +#endif /* __GNUC__ && __arm__ && ARMV6 */
    1.20 +
    1.21  /* vi: set ts=4 sw=4 expandtab: */