shithub: libvpx

Download patch

ref: 2758de5cb259b37e92fbf22ba6325bb84531c0f4
parent: ebb023deb64a5707d0627f55ea0a701945cd6940
author: YinShiyou <yinshiyou-hf@loongson.cn>
date: Fri Jun 23 12:26:30 EDT 2017

loongson mmi configuration patch.

enable loongson mmi optimization: ../configure --enable-mmi

Change-Id: I7792c3adeac1d5b573917d7857bba6c1cc05fea5

--- a/build/make/configure.sh
+++ b/build/make/configure.sh
@@ -702,6 +702,12 @@
       power*)
         tgt_isa=ppc
         ;;
+      *mips64el*)
+        tgt_isa=mips64
+        ;;
+      *mips32el*)
+        tgt_isa=mips32
+        ;;
     esac
 
     # detect tgt_os
@@ -1163,6 +1169,11 @@
         fi
       fi
 
+      if enabled mmi; then
+        tgt_isa=loongson3a
+        check_add_ldflags -march=loongson3a
+      fi
+
       check_add_cflags -march=${tgt_isa}
       check_add_asflags -march=${tgt_isa}
       check_add_asflags -KPIC
@@ -1439,6 +1450,10 @@
         if enabled msa; then
           echo "msa optimizations are available only for little endian platforms"
           disable_feature msa
+        fi
+        if enabled mmi; then
+          echo "mmi optimizations are available only for little endian platforms"
+          disable_feature mmi
         fi
       fi
       ;;
--- a/build/make/rtcd.pl
+++ b/build/make/rtcd.pl
@@ -411,6 +411,10 @@
       @ALL_ARCHS = filter("$opts{arch}", qw/msa/);
       last;
     }
+    if (/HAVE_MMI=yes/) {
+      @ALL_ARCHS = filter("$opts{arch}", qw/mmi/);
+      last;
+    }
   }
   close CONFIG_FILE;
   mips;
--- a/configure
+++ b/configure
@@ -242,6 +242,11 @@
     avx
     avx2
 "
+
+ARCH_EXT_LIST_LOONGSON="
+    mmi
+"
+
 ARCH_EXT_LIST="
     neon
     neon_asm
@@ -254,6 +259,8 @@
     ${ARCH_EXT_LIST_X86}
 
     vsx
+
+    ${ARCH_EXT_LIST_LOONGSON}
 "
 HAVE_LIST="
     ${ARCH_EXT_LIST}