[libav-commits] arm: intreadwrite: disable inline asm for gcc 4.7 and later

Mans Rullgard git at libav.org
Wed May 2 18:26:52 CEST 2012


Module: libav
Branch: master
Commit: ababec7b95d84e911ecda6056e8b8c90287a6e7a

Author:    Mans Rullgard <mans at mansr.com>
Committer: Mans Rullgard <mans at mansr.com>
Date:      Wed May  2 15:09:54 2012 +0100

arm: intreadwrite: disable inline asm for gcc 4.7 and later

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 at mansr.com>

---

 libavutil/arm/intreadwrite.h |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/libavutil/arm/intreadwrite.h b/libavutil/arm/intreadwrite.h
index ec92d4d..86b93c9 100644
--- a/libavutil/arm/intreadwrite.h
+++ b/libavutil/arm/intreadwrite.h
@@ -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)



More information about the libav-commits mailing list