diff options
author | Mans Rullgard <mans@mansr.com> | 2012-05-03 19:14:16 +0100 |
---|---|---|
committer | Mans Rullgard <mans@mansr.com> | 2012-05-03 21:40:19 +0100 |
commit | c02efacc8fd7b3758bf362712019decc907bb8e9 (patch) | |
tree | 63fb5e552bb452ea0788e1b2cf567590dc39235e /libavutil | |
parent | 58b2e0f0f2fc96c1158e04f8aba95cbe6157a1a3 (diff) | |
download | ffmpeg-c02efacc8fd7b3758bf362712019decc907bb8e9.tar.gz |
arm: intreadwrite: revert 16-bit load asm to old version for gcc < 4.6
Commit adebad0 "arm: intreadwrite: fix inline asm constraints for gcc
4.6 and later" caused some older gcc versions to miscompile code.
This reverts to the old version of the code for these compilers.
Signed-off-by: Mans Rullgard <mans@mansr.com>
Diffstat (limited to 'libavutil')
-rw-r--r-- | libavutil/arm/intreadwrite.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavutil/arm/intreadwrite.h b/libavutil/arm/intreadwrite.h index 86b93c940c..ed53330e39 100644 --- a/libavutil/arm/intreadwrite.h +++ b/libavutil/arm/intreadwrite.h @@ -30,7 +30,9 @@ static av_always_inline unsigned AV_RN16(const void *p) { const uint8_t *q = p; unsigned v; -#ifdef __thumb__ +#if !AV_GCC_VERSION_AT_LEAST(4,6) + __asm__ ("ldrh %0, %1" : "=r"(v) : "m"(*(const uint16_t *)q)); +#elif defined __thumb__ __asm__ ("ldrh %0, %1" : "=r"(v) : "m"(q[0]), "m"(q[1])); #else __asm__ ("ldrh %0, %1" : "=r"(v) : "Uq"(q[0]), "m"(q[1])); |