arm: intreadwrite: disable inline asm for gcc 4.7 and later
authorMans Rullgard <mans@mansr.com>
Wed, 2 May 2012 14:09:54 +0000 (15:09 +0100)
committerMans Rullgard <mans@mansr.com>
Wed, 2 May 2012 16:26:39 +0000 (17:26 +0100)
Starting with version 4.7, gcc properly supports unaligned
memory accesses on ARM.  Not using the inline asm with these
compilers results in better code.

Signed-off-by: Mans Rullgard <mans@mansr.com>
libavutil/arm/intreadwrite.h

index ec92d4d..86b93c9 100644 (file)
@@ -21,8 +21,9 @@
 
 #include <stdint.h>
 #include "config.h"
+#include "libavutil/attributes.h"
 
-#if HAVE_FAST_UNALIGNED && HAVE_INLINE_ASM
+#if HAVE_FAST_UNALIGNED && HAVE_INLINE_ASM && !AV_GCC_VERSION_AT_LEAST(4,7)
 
 #define AV_RN16 AV_RN16
 static av_always_inline unsigned AV_RN16(const void *p)