src/atomic/SDL_atomic.c
changeset 7394 38dc4961ab15
parent 7191 75360622e65f
child 7860 2b0bcdea3a79
--- a/src/atomic/SDL_atomic.c	Wed Jul 10 18:31:17 2013 -0700
+++ b/src/atomic/SDL_atomic.c	Wed Jul 10 20:17:20 2013 -0700
@@ -101,4 +101,18 @@
     return retval;
 }
 
+#if defined(__GNUC__) && defined(__arm__) && \
+   (defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__))
+__asm__(
+"   .align 2\n"
+"   .globl _SDL_MemoryBarrierRelease\n"
+"   .globl _SDL_MemoryBarrierAcquire\n"
+"_SDL_MemoryBarrierRelease:\n"
+"_SDL_MemoryBarrierAcquire:\n"
+"   mov r0, #0\n"
+"   mcr p15, 0, r0, c7, c10, 5\n"
+"   bx lr\n"
+);
+#endif /* __GNUC__ && __arm__ && ARMV6 */
+
 /* vi: set ts=4 sw=4 expandtab: */