From ec9d2c15c17ada4ebb5c8ca335a71a1f330dcaf9 Mon Sep 17 00:00:00 2001 From: Mans Rullgard Date: Tue, 7 Aug 2012 17:43:29 +0100 Subject: ARM: use Q/R inline asm operand modifiers only if supported Some compilers do not support the Q/R modifiers used to access the low/high parts of a 64-bit register pair. Check for this and disable all uses of it when not supported. Fixes bug #337. Signed-off-by: Mans Rullgard --- libavutil/arm/intreadwrite.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libavutil/arm/intreadwrite.h') diff --git a/libavutil/arm/intreadwrite.h b/libavutil/arm/intreadwrite.h index ed53330e39..6eff7332fb 100644 --- a/libavutil/arm/intreadwrite.h +++ b/libavutil/arm/intreadwrite.h @@ -61,6 +61,8 @@ static av_always_inline void AV_WN32(void *p, uint32_t v) __asm__ ("str %1, %0" : "=m"(*(uint32_t *)p) : "r"(v)); } +#if HAVE_ASM_MOD_Q + #define AV_RN64 AV_RN64 static av_always_inline uint64_t AV_RN64(const void *p) { @@ -82,6 +84,8 @@ static av_always_inline void AV_WN64(void *p, uint64_t v) : "r"(v)); } +#endif /* HAVE_ASM_MOD_Q */ + #endif /* HAVE_INLINE_ASM */ #endif /* AVUTIL_ARM_INTREADWRITE_H */ -- cgit v1.2.3