summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorShiyou Yin <yinshiyou-hf@loongson.cn>2021-12-15 11:51:04 +0800
committerMichael Niedermayer <michael@niedermayer.cc>2021-12-15 18:37:40 +0100
commit9a840ffa176038d44e0197283590f891b2cf9eeb (patch)
tree0ffdbc383bd1bdd8a7af3963c27e7ff7999d3f02 /configure
parent571e8ca2ddb90a05e0e0091110f8aeed78620edd (diff)
avutil: [loongarch] Add support for loongarch SIMD.
LSX and LASX is loongarch SIMD extention. They are enabled by default if compiler support it, and can be disabled with '--disable-lsx' '--disable-lasx'. Change-Id: Ie2608ea61dbd9b7fffadbf0ec2348bad6c124476 Reviewed-by: Shiyou Yin <yinshiyou-hf@loongson.cn> Reviewed-by: guxiwei <guxiwei-hf@loongson.cn> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure20
1 files changed, 18 insertions, 2 deletions
diff --git a/configure b/configure
index a7593ec2db..c4afde4c5c 100755
--- a/configure
+++ b/configure
@@ -452,7 +452,9 @@ Optimization options (experts only):
--disable-mipsdspr2 disable MIPS DSP ASE R2 optimizations
--disable-msa disable MSA optimizations
--disable-mipsfpu disable floating point MIPS optimizations
- --disable-mmi disable Loongson SIMD optimizations
+ --disable-mmi disable Loongson MMI optimizations
+ --disable-lsx disable Loongson LSX optimizations
+ --disable-lasx disable Loongson LASX optimizations
--disable-fast-unaligned consider unaligned accesses slow
Developer options (useful when working on FFmpeg itself):
@@ -2081,6 +2083,8 @@ ARCH_EXT_LIST_LOONGSON="
loongson2
loongson3
mmi
+ lsx
+ lasx
"
ARCH_EXT_LIST_X86_SIMD="
@@ -2617,6 +2621,10 @@ power8_deps="vsx"
loongson2_deps="mips"
loongson3_deps="mips"
+mmi_deps_any="loongson2 loongson3"
+lsx_deps="loongarch"
+lasx_deps="lsx"
+
mips32r2_deps="mips"
mips32r5_deps="mips"
mips32r6_deps="mips"
@@ -2625,7 +2633,6 @@ mips64r6_deps="mips"
mipsfpu_deps="mips"
mipsdsp_deps="mips"
mipsdspr2_deps="mips"
-mmi_deps_any="loongson2 loongson3"
msa_deps="mipsfpu"
cpunop_deps="i686"
@@ -6134,6 +6141,9 @@ EOF
;;
esac
+elif enabled loongarch; then
+ enabled lsx && check_inline_asm lsx '"vadd.b $vr0, $vr1, $vr2"' '-mlsx' && append LSXFLAGS '-mlsx'
+ enabled lasx && check_inline_asm lasx '"xvadd.b $xr0, $xr1, $xr2"' '-mlasx' && append LASXFLAGS '-mlasx'
fi
check_cc intrinsics_neon arm_neon.h "int16x8_t test = vdupq_n_s16(0)"
@@ -7484,6 +7494,10 @@ if enabled ppc; then
echo "PPC 4xx optimizations ${ppc4xx-no}"
echo "dcbzl available ${dcbzl-no}"
fi
+if enabled loongarch; then
+ echo "LSX enabled ${lsx-no}"
+ echo "LASX enabled ${lasx-no}"
+fi
echo "debug symbols ${debug-no}"
echo "strip symbols ${stripping-no}"
echo "optimize for size ${small-no}"
@@ -7645,6 +7659,8 @@ ASMSTRIPFLAGS=$ASMSTRIPFLAGS
X86ASMFLAGS=$X86ASMFLAGS
MSAFLAGS=$MSAFLAGS
MMIFLAGS=$MMIFLAGS
+LSXFLAGS=$LSXFLAGS
+LASXFLAGS=$LASXFLAGS
BUILDSUF=$build_suffix
PROGSSUF=$progs_suffix
FULLNAME=$FULLNAME