From 84ec68d21aad04858f19dd91a6280a2016a278a3 Mon Sep 17 00:00:00 2001 From: Parag Salasakar Date: Mon, 16 Mar 2015 12:36:59 +0530 Subject: [PATCH] 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 --- build/make/configure.sh | 25 +++++++++++++++++++++++++ build/make/rtcd.pl | 4 ++++ configure | 2 +- 3 files changed, 30 insertions(+), 1 deletion(-) diff --git a/build/make/configure.sh b/build/make/configure.sh index 25c9f8014..e54de21ca 100644 --- a/build/make/configure.sh +++ b/build/make/configure.sh @@ -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 diff --git a/build/make/rtcd.pl b/build/make/rtcd.pl index da44c6164..6753ee776 100755 --- a/build/make/rtcd.pl +++ b/build/make/rtcd.pl @@ -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; diff --git a/configure b/configure index f3708f9d0..728521acf 100755 --- a/configure +++ b/configure @@ -258,7 +258,7 @@ ARCH_EXT_LIST=" mips32 dspr2 - + msa mips64 mmx -- 2.40.0