[FFmpeg-devel] [PATCH 3/3] configure: loongson enable subarch mips64

周晓勇 zhouxiaoyong at loongson.cn
Fri May 8 12:17:59 CEST 2015


>From 1094ca8983b34492dece7da5cd09125dbda04726 Mon Sep 17 00:00:00 2001
From: ZhouXiaoyong <zhouxiaoyong at loongson.cn>
Date: Fri, 8 May 2015 09:08:00 +0800
Subject: [PATCH 3/3] configure: loongson enable subarch mips64

1.Fedora19(Loongson) has released 32bit version and 64bit will comming soon.
2.On 32bit OS check_64bit returns subarch as mips, but mips64 expected.
3.Loongson-3 compatible with mips64r2 instruction set, and added on with MMI.
4.-march=loongson3a conflict with -mips64 and -mips64r2.
5.Loongson-3A1000 and Loongson-3B1500 not support mipsdspr1 or mipsdapr2.
6.The new CPU 3A2000 support mipsdspr2.

Signed-off-by: ZhouXiaoyong <zhouxiaoyong at loongson.cn>
---
 configure | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/configure b/configure
index 0f79874..4e6fddd 100755
--- a/configure
+++ b/configure
@@ -2028,7 +2028,7 @@ mips32r2_deps="mips"
 mips32r5_deps="mips"
 mips64r6_deps="mips"
 msa_deps="mips"
-loongson3_deps="mips"
+loongson3_deps="mips64"
 
 altivec_deps="ppc"
 dcbzl_deps="ppc"
@@ -3923,6 +3923,7 @@ elif enabled mips; then
             check_ldflags "-mabi=64"
         ;;
         loongson3*)
+            subarch=mips64
             enable mipsfpu
             disable mips32r2
             disable mips32r5
@@ -3937,7 +3938,6 @@ elif enabled mips; then
             enable fast_cmov
             enable fast_unaligned
             disable aligned_stack
-            cpuflags="-march=$cpu"
         ;;
         generic)
             disable mips32r5
@@ -4087,7 +4087,9 @@ case "$arch" in
         spic=$shared
     ;;
     mips)
-        check_64bit mips mips64 '_MIPS_SIM > 1'
+        if [[ ! "$cpu" =~ "loongson" ]]; then
+            check_64bit mips mips64 '_MIPS_SIM > 1'
+        fi
         spic=$shared
     ;;
     parisc)
@@ -4692,7 +4694,7 @@ elif enabled mips; then
     if enabled mips64 && (enabled mipsdspr1 || enabled mipsdspr2); then
         add_cflags "-mips64r2"
         add_asflags "-mips64r2"
-    elif enabled mips64 && enabled mipsfpu; then
+    elif enabled mips64 && enabled mipsfpu && !(enabled loongson3); then
         add_cflags "-mips64"
         add_asflags "-mips64"
     elif enabled mipsdspr1 || enabled mipsdspr2; then
@@ -4717,8 +4719,6 @@ elif enabled mips; then
      check_inline_asm mipsfpu   '"madd.d $f0, $f2, $f4, $f6"'
     enabled msa       && check_cflags "-mmsa" && check_ldflags "-mmsa" &&
      check_inline_asm msa       '"addvi.b $w0, $w1, 1"'
-    enabled loongson3 && add_cflags "-mhard-float" && add_asflags "-mhard-float" &&
-        check_inline_asm loongson3 '"gsldxc1 $f0, 0($2, $3)"'
 
     enabled mips32r5 && add_asflags "-mips32r5 -mfp64"
     enabled mips64r6 && add_asflags "-mips64r6 -mfp64"
--
1.8.3.1



More information about the ffmpeg-devel mailing list