[FFmpeg-cvslog] configure: mips: Support mips r6, r2 and r1

Luca Barbato git at videolan.org
Tue Sep 29 14:35:41 CEST 2015


ffmpeg | branch: master | Luca Barbato <lu_zero at gentoo.org> | Fri Sep 25 08:56:25 2015 +0200| [1016a75cf3170648dc9b59fdef170cbfc142f8ad] | committer: Luca Barbato

configure: mips: Support mips r6, r2 and r1

Detect the different MIPS architecture variants.

Signed-off-by: Luca Barbato <lu_zero at gentoo.org>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1016a75cf3170648dc9b59fdef170cbfc142f8ad
---

 configure |   25 ++++++++++++++++++++++++-
 1 file changed, 24 insertions(+), 1 deletion(-)

diff --git a/configure b/configure
index 381d24a..cb48ee1 100755
--- a/configure
+++ b/configure
@@ -1357,11 +1357,21 @@ ARCH_EXT_LIST_X86="
     i686
 "
 
+ARCH_EXT_LIST_MIPS="
+    loongson
+    mips32r1
+    mips64r1
+    mips32r2
+    mips64r2
+    mips32r6
+    mips64r6
+"
+
 ARCH_EXT_LIST="
     $ARCH_EXT_LIST_ARM
+    $ARCH_EXT_LIST_MIPS
     $ARCH_EXT_LIST_PPC
     $ARCH_EXT_LIST_X86
-    loongson
     vis
 "
 
@@ -4059,6 +4069,19 @@ elif enabled mips; then
 
     check_inline_asm loongson '"dmult.g $1, $2, $3"'
 
+    # make sure that only an instruction set is enabled
+    disable mips64r6 mips32r6 mips64r2 mips32r2 mips64r1 mips32r1
+
+    if enabled mips64; then
+        check_inline_asm mips64r6 '"dlsa $0, $0, $0, 1"' ||
+            check_inline_asm mips64r2 '"dext $0, $0, 0, 1"' ||
+                check_inline_asm mips64r1 '"daddi $0, $0, 0"'
+    else
+        check_inline_asm mips32r6 '"aui $0, $0, 0"' ||
+            check_inline_asm mips32r2 '"ext $0, $0, 0, 1"' ||
+                check_inline_asm mips32r1 '"daddi $0, $0, 0"'
+    fi
+
 elif enabled parisc; then
 
     if enabled gcc; then



More information about the ffmpeg-cvslog mailing list