[MPlayer-dev-eng] [PATCH 1/6] configure: add loongson series cpu support
周晓勇
zhouxiaoyong at loongson.cn
Wed Sep 2 12:05:33 CEST 2015
>From 5f958b5b16034d3114ec8b756d08e50d474ebc36 Mon Sep 17 00:00:00 2001
From: ZhouXiaoyong <zhouxiaoyong at loongson.cn>
Date: Thu, 20 Aug 2015 16:35:30 +0800
Subject: [PATCH 1/6] configure: add loongson series cpu support
Signed-off-by: ZhouXiaoyong <zhouxiaoyong at loongson.cn>
---
configure | 28 +++++++++++++++++++++++++++-
1 file changed, 27 insertions(+), 1 deletion(-)
diff --git a/configure b/configure
index 4dbcdf5..50eb59a 100755
--- a/configure
+++ b/configure
@@ -2025,7 +2025,7 @@ def_local_aligned_8='#define HAVE_LOCAL_ALIGNED_8 0'
def_local_aligned_16='#define HAVE_LOCAL_ALIGNED_16 0'
def_local_aligned_32='#define HAVE_LOCAL_ALIGNED_32 0'
arch_all='X86 IA64 SPARC ARM AVR32 SH4 PPC ALPHA MIPS PA_RISC S390 S390X VAX BFIN XTENSA TOMI GENERIC AARCH64'
-subarch_all='X86_32 X86_64 PPC64'
+subarch_all='X86_32 X86_64 PPC64 LOONGSON'
case "$host_arch" in
i[3-9]86|x86|x86pc|k5|k6|k6-2|k6-3|pentium*|athlon*|i586-i686)
arch='x86'
@@ -2620,6 +2620,32 @@ EOF
arch='mips'
iproc='mips'
+ if linux; then
+ echocheck "CPU type"
+ pname=$($_cpuinfo | grep 'model' | cut -d ':' -f 2 | head -n 1)
+ case $pname in
+ *Loongson-3*)
+ subarch='loongson'
+ def_fast_unaligned='#define HAVE_FAST_UNALIGNED 1'
+ def_av_fast_unaligned='#define AV_HAVE_FAST_UNALIGNED 1'
+ def_local_aligned_8='#define HAVE_LOCAL_ALIGNED_8 1'
+ def_local_aligned_16='#define HAVE_LOCAL_ALIGNED_16 1'
+ def_local_aligned_32='#define HAVE_LOCAL_ALIGNED_32 1'
+ def_fast_64bit='#define HAVE_FAST_64BIT 1'
+ _march='-march=loongson3a'
+ ;;
+ *Loongson-2*)
+ subarch='loongson'
+ _march='-march=mips3'
+ ;;
+ *Godson*)
+ subarch='loongson'
+ _march='-march=mips3'
+ ;;
+ esac
+ echores "$pname"
+ fi
+
if irix ; then
echocheck "CPU type"
proc=$(hinv -c processor | grep CPU | cut -d " " -f3)
--
2.1.4
More information about the MPlayer-dev-eng
mailing list