"Ronald S. Bultje" <[email protected]> writes: > From: "Ronald S. Bultje" <[email protected]> > > This will be useful to test more aggressively for failures to mark XMM > registers as clobbered in Win64 builds, and prevent regressions thereof. > --- > configure | 14 +++++ > libavcodec/Makefile | 3 + > libavcodec/w64xmmtest.c | 138 > +++++++++++++++++++++++++++++++++++++++++++++++ > 3 files changed, 155 insertions(+), 0 deletions(-) > create mode 100644 libavcodec/w64xmmtest.c > > diff --git a/configure b/configure > index 49f9af2..460db2b 100755 > --- a/configure > +++ b/configure > @@ -116,6 +116,9 @@ Configuration options: > disable buffer boundary checking in bitreaders > (faster, but may crash) > --enable-memalign-hack emulate memalign, interferes with memory debuggers > + --enable-win64-test-xmm-clobber > + check XMM registers for clobbering (Win64-only; > + should be used only for debugging purposes) > --disable-everything disable all components listed below > --disable-encoder=NAME disable encoder NAME > --enable-encoder=NAME enable encoder NAME > @@ -991,6 +994,7 @@ CONFIG_LIST=" > vda > vdpau > version3 > + win64_test_xmm_clobber > x11grab > zlib > "
I'd prefer calling it win64_xmm_clobber_test. > @@ -2583,6 +2587,16 @@ case $target_os in > ;; > esac > > +enabled win64_test_xmm_clobber && \ > + check_ldflags -Wl,--wrap,avcodec_open2 \ > + -Wl,--wrap,avcodec_decode_audio4 \ > + -Wl,--wrap,avcodec_decode_video2 \ > + -Wl,--wrap,avcodec_decode_subtitle2 \ > + -Wl,--wrap,avcodec_encode_audio2 \ > + -Wl,--wrap,avcodec_encode_video \ > + -Wl,--wrap,avcodec_encode_subtitle || \ > + disable win64_test_xmm_clobber Please put this next to the other linker flag settings. > echo "config:$arch:$subarch:$cpu:$target_os:$cc_ident:$LIBAV_CONFIGURATION" > >config.fate > > check_cpp_condition stdlib.h "defined(__PIC__) || defined(__pic__) || > defined(PIC)" && enable pic > diff --git a/libavcodec/Makefile b/libavcodec/Makefile > index 6308e82..580e31c 100644 > --- a/libavcodec/Makefile > +++ b/libavcodec/Makefile > @@ -663,6 +663,9 @@ OBJS-$(CONFIG_TEXT2MOVSUB_BSF) += movsub_bsf.o > OBJS-$(HAVE_PTHREADS) += pthread.o > OBJS-$(HAVE_W32THREADS) += pthread.o > > +# Win64 XMM clobber stuff > +OBJS-$(CONFIG_WIN64_TEST_XMM_CLOBBER) += w64xmmtest.o > + > OBJS-$(CONFIG_MLIB) += mlib/dsputil_mlib.o \ > > # inverse.o contains the ff_inverse table definition, which is used by This belongs in libavcodec/x86/Makefile > diff --git a/libavcodec/w64xmmtest.c b/libavcodec/w64xmmtest.c > new file mode 100644 > index 0000000..61e7461 > --- /dev/null > +++ b/libavcodec/w64xmmtest.c And this belongs in libavcodec/x86/. -- Måns Rullgård [email protected] _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
