summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2012-08-27 03:07:11 +0200
committerDiego Biurrun <diego@biurrun.de>2012-08-31 01:53:25 +0200
commit43b73d59a8b6cba60b0401b39f0f577bc6c1df9e (patch)
tree970e329f0ce28f487f59e56d044e8663749db774
parent21411a4102757cb5ee9b4b16550a55055f54af8f (diff)
configure: x86: Separate inline from standalone assembler capabilities
-rwxr-xr-xconfigure27
1 files changed, 23 insertions, 4 deletions
diff --git a/configure b/configure
index f6a7d1f527..efc01adfc5 100755
--- a/configure
+++ b/configure
@@ -373,6 +373,12 @@ map(){
for v; do eval $m; done
}
+add_suffix(){
+ suffix=$1
+ shift
+ for v; do echo ${v}${suffix}; done
+}
+
set_all(){
value=$1
shift
@@ -1101,6 +1107,8 @@ HAVE_LIST_PUB='
HAVE_LIST="
$ARCH_EXT_LIST
+ $(add_suffix _external $ARCH_EXT_LIST)
+ $(add_suffix _inline $ARCH_EXT_LIST)
$HAVE_LIST_PUB
$THREADS_LIST
aligned_malloc
@@ -1351,6 +1359,17 @@ sse42_deps="sse4"
avx_deps="sse42"
fma4_deps="avx"
+mmx_external_deps="yasm"
+mmx_inline_deps="inline_asm"
+mmx_suggest="mmx_external mmx_inline"
+
+for ext in $(filter_out mmx $ARCH_EXT_LIST_X86); do
+ eval dep=\$${ext}_deps
+ eval ${ext}_external_deps='"${dep}_external"'
+ eval ${ext}_inline_deps='"${dep}_inline"'
+ eval ${ext}_suggest='"${ext}_external ${ext}_inline"'
+done
+
aligned_stack_if_any="ppc x86"
fast_64bit_if_any="alpha ia64 mips64 parisc64 ppc64 sparc64 x86_64"
fast_clz_if_any="alpha armv5te avr32 mips ppc x86"
@@ -2964,8 +2983,8 @@ EOF
check_inline_asm xmm_clobbers '"":::"%xmm0"'
# check whether binutils is new enough to compile SSSE3/MMXEXT
- enabled ssse3 && check_inline_asm ssse3 '"pabsw %xmm0, %xmm0"'
- enabled mmxext && check_inline_asm mmxext '"pmaxub %mm0, %mm1"'
+ enabled ssse3 && check_inline_asm ssse3_inline '"pabsw %xmm0, %xmm0"'
+ enabled mmxext && check_inline_asm mmxext_inline '"pmaxub %mm0, %mm1"'
if ! disabled_any asm mmx yasm; then
if check_cmd $yasmexe --version; then
@@ -2986,8 +3005,8 @@ EOF
check_yasm "pextrd [eax], xmm0, 1" && enable yasm ||
die "yasm not found, use --disable-yasm for a crippled build"
- check_yasm "vextractf128 xmm0, ymm0, 0" || disable avx
- check_yasm "vfmaddps ymm0, ymm1, ymm2, ymm3" || disable fma4
+ check_yasm "vextractf128 xmm0, ymm0, 0" || disable avx_external
+ check_yasm "vfmaddps ymm0, ymm1, ymm2, ymm3" || disable fma4_external
check_yasm "CPU amdnop" && enable cpunop
fi