diff options
author | Mans Rullgard <mans@mansr.com> | 2012-08-02 22:53:47 +0100 |
---|---|---|
committer | Mans Rullgard <mans@mansr.com> | 2012-08-04 00:59:14 +0100 |
commit | 9829a81bcd3e9ef26c4bbc2959bfb65159dbd314 (patch) | |
tree | f89c367c4da94be04b7fbf7453e1e5fc05744a47 | |
parent | 4a8143e73ccb805a2e5a54f752d77f20efe20bd3 (diff) | |
download | ffmpeg-9829a81bcd3e9ef26c4bbc2959bfb65159dbd314.tar.gz |
ARM: vp56: allow inline asm to build with clang
The clang integrated assembler does not support pre-UAL syntax,
while gcc requires pre-UAL syntax for ARM code. A patch[1] for
clang to support the old syntax as well has been ignored since
January.
This patch chooses the syntax appropriate for each compiler,
allowing both to build the code. Notably, this change allows
building for iphone with the latest Apple Xcode update.
[1] http://llvm.org/bugs/show_bug.cgi?id=11855
Signed-off-by: Mans Rullgard <mans@mansr.com>
-rw-r--r-- | libavcodec/arm/vp56_arith.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/libavcodec/arm/vp56_arith.h b/libavcodec/arm/vp56_arith.h index ef30ffe897..d1a8837000 100644 --- a/libavcodec/arm/vp56_arith.h +++ b/libavcodec/arm/vp56_arith.h @@ -29,6 +29,14 @@ # define T(x) #endif +#if CONFIG_THUMB || defined __clang__ +# define L(x) +# define U(x) x +#else +# define L(x) x +# define U(x) +#endif + #if HAVE_ARMV6 && HAVE_INLINE_ASM #define vp56_rac_get_prob vp56_rac_get_prob_armv6 @@ -42,8 +50,8 @@ static inline int vp56_rac_get_prob_armv6(VP56RangeCoder *c, int pr) __asm__ ("adds %3, %3, %0 \n" "itt cs \n" "cmpcs %7, %4 \n" - A("ldrcsh %2, [%4], #2 \n") - T("ldrhcs %2, [%4], #2 \n") + L("ldrcsh %2, [%4], #2 \n") + U("ldrhcs %2, [%4], #2 \n") "rsb %0, %6, #256 \n" "smlabb %0, %5, %6, %0 \n" T("itttt cs \n") @@ -80,8 +88,8 @@ static inline int vp56_rac_get_prob_branchy_armv6(VP56RangeCoder *c, int pr) __asm__ ("adds %3, %3, %0 \n" "itt cs \n" "cmpcs %7, %4 \n" - A("ldrcsh %2, [%4], #2 \n") - T("ldrhcs %2, [%4], #2 \n") + L("ldrcsh %2, [%4], #2 \n") + U("ldrhcs %2, [%4], #2 \n") "rsb %0, %6, #256 \n" "smlabb %0, %5, %6, %0 \n" T("itttt cs \n") |