diff --git a/build/make/configure.sh b/build/make/configure.sh index 30a61067fc2db00e7f5810117bee95e3617c4a6c..e2566b0a7aaae2f8bcb57e4258abe9b3ce1acc9e 100755 --- a/build/make/configure.sh +++ b/build/make/configure.sh @@ -1189,6 +1189,12 @@ EOF fi fi + # default use_x86inc to yes if pic is no or 64bit or we are not on darwin + echo " checking here for x86inc \"${tgt_isa}\" \"$pic\" " + if [ ${tgt_isa} = x86_64 -o ! "$pic" == "yes" -o ! ${tgt_os:0:6} = darwin ]; then + soft_enable use_x86inc + fi + # Position Independent Code (PIC) support, for building relocatable # shared objects enabled gcc && enabled pic && check_add_cflags -fPIC diff --git a/configure b/configure index c45f908d9b02907a588cba7ee4f0e240a1a38ab4..24be893f7ad731b595434fa0ec038ae0d5d3da2f 100755 --- a/configure +++ b/configure @@ -257,7 +257,7 @@ CONFIG_LIST=" install_bins install_libs install_srcs - force_x86inc + use_x86inc debug gprof gcov diff --git a/libs.mk b/libs.mk index ac2e73a43ab310bb970b8daea26f47ab86879a2a..2338631085ed680c024afc22f8925456ccd81337 100644 --- a/libs.mk +++ b/libs.mk @@ -60,13 +60,7 @@ endef # x86inc.asm is not compatible with pic 32bit builds. Restrict # files which use it to 64bit builds or 32bit without pic USE_X86INC = no -ifneq ($(CONFIG_PIC),yes) - USE_X86INC = yes -endif -ifeq ($(ARCH_X86_64),yes) - USE_X86INC = yes -endif -ifeq ($(CONFIG_FORCE_X86INC),yes) +ifeq ($(CONFIG_USE_X86INC),yes) USE_X86INC = yes endif diff --git a/test/vp9_subtract_test.cc b/test/vp9_subtract_test.cc index 4e53e7734263c7cfc5c803628f242f15eea3b983..dbe37563cc97f36ddb8005cfeb476b427129f617 100644 --- a/test/vp9_subtract_test.cc +++ b/test/vp9_subtract_test.cc @@ -93,7 +93,7 @@ TEST_P(VP9SubtractBlockTest, SimpleSubtract) { INSTANTIATE_TEST_CASE_P(C, VP9SubtractBlockTest, ::testing::Values(vp9_subtract_block_c)); -#if HAVE_SSE2 +#if HAVE_SSE2 && CONFIG_USE_X86INC INSTANTIATE_TEST_CASE_P(SSE2, VP9SubtractBlockTest, ::testing::Values(vp9_subtract_block_sse2)); #endif diff --git a/vp9/common/vp9_rtcd_defs.sh b/vp9/common/vp9_rtcd_defs.sh index 2b16cfaff0891c9be146838e823af43a56fe9fc3..5ada2260d51be83ae5ad9a495ebe753ab582e1da 100644 --- a/vp9/common/vp9_rtcd_defs.sh +++ b/vp9/common/vp9_rtcd_defs.sh @@ -21,7 +21,7 @@ EOF forward_decls vp9_common_forward_decls # x86inc.asm doesn't work if pic is enabled on 32 bit platforms so no assembly. -[ $arch = "x86_64" -o ! "$CONFIG_PIC" = "yes" -o "$CONFIG_FORCE_X86INC" == "yes" ] && mmx_x86inc=mmx && sse2_x86inc=sse2 && ssse3_x86inc=ssse3 +[ "$CONFIG_USE_X86INC" = "yes" ] && mmx_x86inc=mmx && sse2_x86inc=sse2 && ssse3_x86inc=ssse3 # this variable is for functions that are 64 bit only. [ $arch = "x86_64" ] && mmx_x86_64=mmx && sse2_x86_64=sse2 && ssse3_x86_64=ssse3 diff --git a/vp9/vp9cx.mk b/vp9/vp9cx.mk index dee83c9e41c8e56373bef79233eec77f382b5081..bd0792d67d7d9f2521c90f68dab602de0446c383 100644 --- a/vp9/vp9cx.mk +++ b/vp9/vp9cx.mk @@ -83,11 +83,15 @@ VP9_CX_SRCS-$(HAVE_SSE2) += encoder/x86/vp9_variance_impl_sse2.asm VP9_CX_SRCS-$(HAVE_SSE2) += encoder/x86/vp9_sad_sse2.asm VP9_CX_SRCS-$(HAVE_SSE2) += encoder/x86/vp9_sad4d_sse2.asm VP9_CX_SRCS-$(HAVE_SSE2) += encoder/x86/vp9_subpel_variance.asm -VP9_CX_SRCS-$(HAVE_SSE2) += encoder/x86/vp9_subtract_sse2.asm VP9_CX_SRCS-$(HAVE_SSE2) += encoder/x86/vp9_error_sse2.asm VP9_CX_SRCS-$(HAVE_SSE2) += encoder/x86/vp9_subpel_variance_impl_sse2.asm VP9_CX_SRCS-$(HAVE_SSE2) += encoder/x86/vp9_temporal_filter_apply_sse2.asm VP9_CX_SRCS-$(HAVE_SSE3) += encoder/x86/vp9_sad_sse3.asm + +ifeq ($(USE_X86INC),yes) +VP9_CX_SRCS-$(HAVE_SSE2) += encoder/x86/vp9_subtract_sse2.asm +endif + ifeq ($(ARCH_X86_64),yes) VP9_CX_SRCS-$(HAVE_SSSE3) += encoder/x86/vp9_quantize_ssse3.asm endif