Message ID | CAHRT7+SgvBi-1M+ReRFBdFNsvaXd77WXQidDCemR7td_yfTwrQ@mail.gmail.com |
---|---|
State | New |
Headers | show |
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@chromium.org" <liberato@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 [...]
On 5/30/2018 10:32 PM, Michael Niedermayer wrote: > 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@chromium.org" <liberato@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: That'd be because vf_amplify is calling av_clip_uintp2() with a non immediate value. The arm optimized function makes an immediate value as second argument a requirement, so av_clip_uintp2_c() should be used there instead. This means 3c56d673418/8c893aa3cd5 broke detection of arm inline asm features for your qemu builds as well, and this patch restores that functionality. > > 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
>On 5/30/2018 10:32 PM, Michael Niedermayer wrote: >> 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@chromium.org" <liberato@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: > >That'd be because vf_amplify is calling av_clip_uintp2() with a non >immediate value. The arm optimized function makes an immediate value as >second argument a requirement, so av_clip_uintp2_c() should be used >there instead. > >This means 3c56d673418/8c893aa3cd5 broke detection of arm inline asm >features for your qemu builds as well, and this patch restores that >functionality. > >> >> 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 master is now patched s.t. these should compile with HAVE_ARMV6_INLINE set Regards John Cox
From 58c96127b6f1510b956b2280049d1c3778e3cab4 Mon Sep 17 00:00:00 2001 From: "liberato@chromium.org" <liberato@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" } -- 2.17.0.921.gf22659ad46-goog