loongson mmi configuration patch.

enable loongson mmi optimization: ../configure --enable-mmi

Change-Id: I7792c3adeac1d5b573917d7857bba6c1cc05fea5
This commit is contained in:
YinShiyou 2017-06-23 16:26:30 +08:00 committed by Johann Koenig
parent ebb023deb6
commit 2758de5cb2
3 changed files with 26 additions and 0 deletions

View File

@ -702,6 +702,12 @@ process_common_toolchain() {
power*)
tgt_isa=ppc
;;
*mips64el*)
tgt_isa=mips64
;;
*mips32el*)
tgt_isa=mips32
;;
esac
# detect tgt_os
@ -1163,6 +1169,11 @@ EOF
fi
fi
if enabled mmi; then
tgt_isa=loongson3a
check_add_ldflags -march=loongson3a
fi
check_add_cflags -march=${tgt_isa}
check_add_asflags -march=${tgt_isa}
check_add_asflags -KPIC
@ -1440,6 +1451,10 @@ EOF
echo "msa optimizations are available only for little endian platforms"
disable_feature msa
fi
if enabled mmi; then
echo "mmi optimizations are available only for little endian platforms"
disable_feature mmi
fi
fi
;;
esac

View File

@ -411,6 +411,10 @@ if ($opts{arch} eq 'x86') {
@ALL_ARCHS = filter("$opts{arch}", qw/msa/);
last;
}
if (/HAVE_MMI=yes/) {
@ALL_ARCHS = filter("$opts{arch}", qw/mmi/);
last;
}
}
close CONFIG_FILE;
mips;

7
configure vendored
View File

@ -242,6 +242,11 @@ ARCH_EXT_LIST_X86="
avx
avx2
"
ARCH_EXT_LIST_LOONGSON="
mmi
"
ARCH_EXT_LIST="
neon
neon_asm
@ -254,6 +259,8 @@ ARCH_EXT_LIST="
${ARCH_EXT_LIST_X86}
vsx
${ARCH_EXT_LIST_LOONGSON}
"
HAVE_LIST="
${ARCH_EXT_LIST}