ref: a93b115cd6e536587b5c5e78a4b79601206f26a0
parent: d115cd8b124df6b0052da62dbdaf474069c6ff00
author: Jim Bankoski <jimbankoski@google.com>
date: Mon Aug 5 13:28:52 EDT 2013
reworked config for use_x86_inc Support enabling it or disabling it. Moved read out to configure.sh so that its done once instead of in make and in config. Change-Id: I73a9190cf31de9f03e8a577f478fa522f8c01c8b
--- a/build/make/configure.sh
+++ b/build/make/configure.sh
@@ -1189,6 +1189,12 @@
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
--- a/configure
+++ b/configure
@@ -257,7 +257,7 @@
install_bins
install_libs
install_srcs
- force_x86inc
+ use_x86inc
debug
gprof
gcov
--- a/libs.mk
+++ b/libs.mk
@@ -60,13 +60,7 @@
# 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
--- a/test/vp9_subtract_test.cc
+++ b/test/vp9_subtract_test.cc
@@ -93,7 +93,7 @@
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
--- a/vp9/common/vp9_rtcd_defs.sh
+++ b/vp9/common/vp9_rtcd_defs.sh
@@ -21,7 +21,7 @@
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
--- a/vp9/vp9cx.mk
+++ b/vp9/vp9cx.mk
@@ -83,11 +83,15 @@
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
--
⑨