shithub: libvpx

Download patch

ref: 84ec68d21aad04858f19dd91a6280a2016a278a3
parent: ab788c53807bd6d12f60c3efaebe12107ab12354
author: Parag Salasakar <[email protected]>
date: Mon Mar 16 08:36:59 EDT 2015

mips msa configuration patch for MIPS SIMD Arch (MSA) P5600 and I6400

For P5600:
CROSS=$MTI/bin/mips-mti-linux-gnu- CFLAGS='-EL' CXXFLAGS='-EL' LDFLAGS='-EL'\
 ../configure --target=mips32-linux-gcc --cpu=p5600 --enable-msa

For I6400:
CROSS=$IMG/bin/mips-img-linux-gnu- CFLAGS='-EL' CXXFLAGS='-EL' LDFLAGS='-EL'\
 ../configure --target=mips64-linux-gcc --cpu=i6400 --enable-msa

Change-Id: Id25f721ea1f1991d5116e04dba713aebd7378f05

--- a/build/make/configure.sh
+++ b/build/make/configure.sh
@@ -1041,6 +1041,31 @@
         check_add_cflags -mips32r2 -mdspr2
         disable_feature fast_unaligned
       fi
+
+      if [ -n "${tune_cpu}" ]; then
+        case ${tune_cpu} in
+          p5600)
+            add_cflags -mips32r5 -funroll-loops -mload-store-pairs
+            add_cflags -msched-weight -mhard-float
+            add_asflags -mips32r5 -mhard-float
+            ;;
+          i6400)
+            add_cflags -mips64r6 -mabi=64 -funroll-loops -mload-store-pairs
+            add_cflags -msched-weight -mhard-float
+            add_asflags -mips64r6 -mabi=64 -mhard-float
+            add_ldflags -mips64r6 -mabi=64
+            ;;
+        esac
+
+        if enabled msa; then
+          add_cflags -mmsa -mfp64 -flax-vector-conversions
+          add_asflags -mmsa -mfp64 -flax-vector-conversions
+          add_ldflags -mmsa -mfp64 -flax-vector-conversions
+
+          disable_feature fast_unaligned
+        fi
+      fi
+
       check_add_cflags -march=${tgt_isa}
       check_add_asflags -march=${tgt_isa}
       check_add_asflags -KPIC
--- a/build/make/rtcd.pl
+++ b/build/make/rtcd.pl
@@ -376,6 +376,10 @@
       @ALL_ARCHS = filter("$opts{arch}", qw/dspr2/);
       last;
     }
+    if (/HAVE_MSA=yes/) {
+      @ALL_ARCHS = filter("$opts{arch}", qw/msa/);
+      last;
+    }
   }
   close CONFIG_FILE;
   mips;
--- a/configure
+++ b/configure
@@ -258,7 +258,7 @@
 
     mips32
     dspr2
-
+    msa
     mips64
 
     mmx