summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2015-05-10 02:47:31 +0200
committerLuca Barbato <lu_zero@gentoo.org>2015-05-31 12:07:10 +0200
commitf22ebd2555d15b59e109a5b630dd71374b076d0b (patch)
treeeb3d6a124d3ee8265e56b198a6cf039848c36a70 /configure
parent3058872c293e239e3b51e86fe18cfbe720aadff1 (diff)
downloadffmpeg-f22ebd2555d15b59e109a5b630dd71374b076d0b.tar.gz
ppc: configure: Support ISA 2.06 and later
POWER 7 and POWER 8 support VSX and ldbrx. POWER 8 supports additional extended VSX instructions introduced with ISA 2.07.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure28
1 files changed, 27 insertions, 1 deletions
diff --git a/configure b/configure
index 863e33b529..d59f5e45ac 100755
--- a/configure
+++ b/configure
@@ -276,6 +276,8 @@ Advanced options (experts only):
Optimization options (experts only):
--disable-asm disable all assembly optimizations
--disable-altivec disable AltiVec optimizations
+ --disable-vsx disable VSX optimizations
+ --disable-power8 disable POWER8 optimizations
--disable-amd3dnow disable 3DNow! optimizations
--disable-amd3dnowext disable 3DNow! extended optimizations
--disable-mmx disable MMX optimizations
@@ -1339,7 +1341,9 @@ ARCH_EXT_LIST_PPC="
altivec
dcbzl
ldbrx
+ power8
ppc4xx
+ vsx
"
ARCH_EXT_LIST_X86="
@@ -1709,6 +1713,8 @@ map 'eval ${v}_inline_deps=inline_asm' $ARCH_EXT_LIST_ARM
altivec_deps="ppc"
ppc4xx_deps="ppc"
+vsx_deps="altivec"
+power8_deps="vsx"
cpunop_deps="i686"
x86_64_select="i686"
@@ -3323,19 +3329,28 @@ elif enabled ppc; then
;;
g4|745*|ppc745*|powerpc745*)
cpuflags="-mcpu=7450"
+ disable vsx
;;
74*|ppc74*|powerpc74*)
cpuflags="-mcpu=7400"
+ disable vsx
;;
g5|970|ppc970|powerpc970)
cpuflags="-mcpu=970"
+ disable vsx
;;
- power[3-7]*)
+ power[3-6]*)
cpuflags="-mcpu=$cpu"
+ disable vsx
+ ;;
+ power[7-8]*)
+ cpuflags="-mcpu=$cpu"
+ enable ldbrx
;;
cell)
cpuflags="-mcpu=cell"
enable ldbrx
+ disable vsx
;;
e500mc)
cpuflags="-mcpu=e500mc"
@@ -4012,6 +4027,15 @@ EOF
enabled altivec || warn "Altivec disabled, possibly missing --cpu flag"
fi
+ if enabled vsx; then
+ check_cflags -mvsx &&
+ check_builtin vec_vsx_ld "altivec.h" "__builtin_vec_vsx_ld" || disable vsx
+ fi
+
+ if enabled power8; then
+ check_cpp_condition "altivec.h" "defined(_ARCH_PWR8)" || disable power8
+ fi
+
elif enabled x86; then
check_builtin rdtsc intrin.h "__rdtsc()"
@@ -4706,6 +4730,8 @@ if enabled arm; then
fi
if enabled ppc; then
echo "AltiVec enabled ${altivec-no}"
+ echo "VSX enabled ${vsx-no}"
+ echo "POWER8 enabled ${power8-no}"
echo "PPC 4xx optimizations ${ppc4xx-no}"
echo "dcbzl available ${dcbzl-no}"
fi