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>
| ... | ... |
@@ -21,8 +21,9 @@ |
| 21 | 21 |
|
| 22 | 22 |
#include <stdint.h> |
| 23 | 23 |
#include "config.h" |
| 24 |
+#include "libavutil/attributes.h" |
|
| 24 | 25 |
|
| 25 |
-#if HAVE_FAST_UNALIGNED && HAVE_INLINE_ASM |
|
| 26 |
+#if HAVE_FAST_UNALIGNED && HAVE_INLINE_ASM && !AV_GCC_VERSION_AT_LEAST(4,7) |
|
| 26 | 27 |
|
| 27 | 28 |
#define AV_RN16 AV_RN16 |
| 28 | 29 |
static av_always_inline unsigned AV_RN16(const void *p) |