From f64c2e710fa1a7b59753224e717f57c48462076f Mon Sep 17 00:00:00 2001 From: Mans Rullgard Date: Mon, 12 Dec 2011 00:50:08 +0000 Subject: bswap: make generic implementation more compiler-friendly With these changes, gcc 4.5 and later recognise it as a bswap and use the proper instructions on ARM and x86. On x86, the 16-bit bswap is recognised from gcc 4.1. Signed-off-by: Mans Rullgard --- libavutil/arm/bswap.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libavutil/arm') diff --git a/libavutil/arm/bswap.h b/libavutil/arm/bswap.h index 478ae981fb..f94cbcf23f 100644 --- a/libavutil/arm/bswap.h +++ b/libavutil/arm/bswap.h @@ -51,6 +51,7 @@ static av_always_inline av_const unsigned av_bswap16(unsigned x) } #endif +#if !AV_GCC_VERSION_AT_LEAST(4,5) #define av_bswap32 av_bswap32 static av_always_inline av_const uint32_t av_bswap32(uint32_t x) { @@ -66,6 +67,7 @@ static av_always_inline av_const uint32_t av_bswap32(uint32_t x) #endif /* HAVE_ARMV6 */ return x; } +#endif /* !AV_GCC_VERSION_AT_LEAST(4,5) */ #endif /* __ARMCC_VERSION */ -- cgit v1.2.3