[FFmpeg-devel] Patch: Replace quotes for inline asm detection.

Michael Niedermayer michael at niedermayer.cc
Thu May 31 04:32:37 EEST 2018


On Wed, May 30, 2018 at 09:48:51AM -0700, Frank Liberato wrote:
> Please find attached a one line patch:
> 
> 
> > Commit 8c893aa3cd5 removed quotes that were required to detect
> >     inline asm in clank:
> >
> >     check_insn armv5te qadd r0, r0, r0
> >     .../test.c:1:34: error: expected string literal in 'asm'
> >     void foo(void){ __asm__ volatile(qadd r0, r0, r0); }
> >
> >     The correct code is:
> >
> >     void foo(void){ __asm__ volatile("qadd r0, r0, r0"); }
> 
> 
> Thanks
> Frank

>  configure |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 2d51797903ad2f3cab321e72bf5e7209116c3dae  0001-Replace-quotes-for-inline-asm-detection.patch
> From 58c96127b6f1510b956b2280049d1c3778e3cab4 Mon Sep 17 00:00:00 2001
> From: "liberato at chromium.org" <liberato at chromium.org>
> Date: Tue, 29 May 2018 11:35:04 -0700
> Subject: [PATCH] Replace quotes for inline asm detection.
> 
> Commit 8c893aa3cd5 removed quotes that were required to detect
> inline asm in clank:
> 
> check_insn armv5te qadd r0, r0, r0
> .../test.c:1:34: error: expected string literal in 'asm'
> void foo(void){ __asm__ volatile(qadd r0, r0, r0); }
> 
> The correct code is:
> 
> void foo(void){ __asm__ volatile("qadd r0, r0, r0"); }
> ---
>  configure | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/configure b/configure
> index 22eeca22a5..4dbee8d349 100755
> --- a/configure
> +++ b/configure
> @@ -1040,7 +1040,7 @@ EOF
>  
>  check_insn(){
>      log check_insn "$@"
> -    check_inline_asm ${1}_inline "$2"
> +    check_inline_asm ${1}_inline "\"$2\""
>      check_as ${1}_external "$2"
>  }

This seems to break my arm qemu build:

In file included from src/libavutil/intmath.h:30:0,
                 from src/libavutil/common.h:106,
                 from src/libavutil/avutil.h:296,
                 from src/libavutil/imgutils.h:30,
                 from src/libavfilter/vf_amplify.c:21:
src/libavutil/arm/intmath.h: In function ‘amplify_frame’:
src/libavutil/arm/intmath.h:77:5: warning: asm operand 2 probably doesn’t match constraints [enabled by default]
src/libavutil/arm/intmath.h:77:5: error: impossible constraint in ‘asm’
make: *** [libavfilter/vf_amplify.o] Error 1
make: *** Waiting for unfinished jobs....
src/libavfilter/src_movie.c: In function ‘open_stream’:
src/libavfilter/src_movie.c:175:5: warning: ‘refcounted_frames’ is deprecated (declared at src/libavcodec/avcodec.h:2345) [-Wdeprecated-declarations]
src/libavfilter/src_movie.c: In function ‘movie_push_frame’:
src/libavfilter/src_movie.c:529:9: warning: ‘avcodec_decode_video2’ is deprecated (declared at src/libavcodec/avcodec.h:4756) [-Wdeprecated-declarations]
src/libavfilter/src_movie.c:532:9: warning: ‘avcodec_decode_audio4’ is deprecated (declared at src/libavcodec/avcodec.h:4707) [-Wdeprecated-declarations]
src/libavfilter/vaf_spectrumsynth.c: In function ‘try_push_frame’:
src/libavfilter/vaf_spectrumsynth.c:429:12: warning: ‘end’ may be used uninitialized in this function [-Wuninitialized]
src/libavfilter/vaf_spectrumsynth.c:428:14: warning: ‘start’ may be used uninitialized in this function [-Wuninitialized]
src/libavfilter/vaf_spectrumsynth.c: In function ‘try_push_frames’:
src/libavfilter/vaf_spectrumsynth.c:437:9: warning: ‘ret’ may be used uninitialized in this function [-Wuninitialized]

arm-linux-gnueabi-gcc-4.6 (Debian 4.6.3-15) 4.6.3

[...]


-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

When the tyrant has disposed of foreign enemies by conquest or treaty, and
there is nothing more to fear from them, then he is always stirring up
some war or other, in order that the people may require a leader. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20180531/37723fb7/attachment.sig>


More information about the ffmpeg-devel mailing list