]> granicus.if.org Git - libvpx/commitdiff
mips msa configuration patch for MIPS SIMD Arch (MSA) P5600 and I6400
authorParag Salasakar <img.mips1@gmail.com>
Mon, 16 Mar 2015 07:06:59 +0000 (12:36 +0530)
committerGerrit Code Review <gerrit@gerrit.golo.chromium.org>
Tue, 24 Mar 2015 22:18:38 +0000 (15:18 -0700)
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

build/make/configure.sh
build/make/rtcd.pl
configure

index 25c9f801440ca029a70b02f3de00b6d1b7a4cf05..e54de21ca23b30e64eaedef2fef932cd5036b96b 100644 (file)
@@ -1041,6 +1041,31 @@ EOF
         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
index da44c6164b99aa3d5be673b7a46d9f9955f65512..6753ee776a26bbb9012b75ce2366d6960382c05e 100755 (executable)
@@ -376,6 +376,10 @@ if ($opts{arch} eq 'x86') {
       @ALL_ARCHS = filter("$opts{arch}", qw/dspr2/);
       last;
     }
+    if (/HAVE_MSA=yes/) {
+      @ALL_ARCHS = filter("$opts{arch}", qw/msa/);
+      last;
+    }
   }
   close CONFIG_FILE;
   mips;
index f3708f9d093d3cfc2d8adf1c6549d033bde6708c..728521acf2b755f6e29764b82e6d2ef9c7cf9669 100755 (executable)
--- a/configure
+++ b/configure
@@ -258,7 +258,7 @@ ARCH_EXT_LIST="
 
     mips32
     dspr2
-
+    msa
     mips64
 
     mmx