diff options
author | Mans Rullgard <mans@mansr.com> | 2012-08-07 20:43:29 +0400 |
---|---|---|
committer | Mans Rullgard <mans@mansr.com> | 2012-08-08 00:13:30 +0400 |
commit | ec9d2c15c17ada4ebb5c8ca335a71a1f330dcaf9 (patch) | |
tree | 1ba65f9a25e479e3fa389cd09c3b3340fd2dde96 /libavutil | |
parent | 4ab26cb4cc9af2ab2199105aa273aa23e1f27911 (diff) |
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 <mans@mansr.com>
Diffstat (limited to 'libavutil')
-rw-r--r-- | libavutil/arm/intmath.h | 4 | ||||
-rw-r--r-- | libavutil/arm/intreadwrite.h | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/libavutil/arm/intmath.h b/libavutil/arm/intmath.h index b6a45c1395..fa31ecf6a5 100644 --- a/libavutil/arm/intmath.h +++ b/libavutil/arm/intmath.h @@ -97,6 +97,8 @@ static av_always_inline av_const int FASTDIV(int a, int b) #endif /* HAVE_ARMV6 */ +#if HAVE_ASM_MOD_Q + #define av_clipl_int32 av_clipl_int32_arm static av_always_inline av_const int32_t av_clipl_int32_arm(int64_t a) { @@ -110,6 +112,8 @@ static av_always_inline av_const int32_t av_clipl_int32_arm(int64_t a) return x; } +#endif /* HAVE_ASM_MOD_Q */ + #endif /* HAVE_INLINE_ASM */ #endif /* AVUTIL_ARM_INTMATH_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 */ |