From: Luca Barbato Date: Fri, 25 Sep 2015 06:56:25 +0000 (+0200) Subject: configure: mips: Support mips r6, r2 and r1 X-Git-Tag: upstream/12.1~1^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=834b812f8a7820514e9683e1e6fd82b8dc4c61e9;p=platform%2Fupstream%2Flibav.git configure: mips: Support mips r6, r2 and r1 Detect the different MIPS architecture variants. Signed-off-by: Luca Barbato (cherry picked from commit 1016a75cf3170648dc9b59fdef170cbfc142f8ad) Signed-off-by: Luca Barbato --- diff --git a/configure b/configure index 5a7c602..a1a1803 100755 --- a/configure +++ b/configure @@ -1325,11 +1325,21 @@ ARCH_EXT_LIST_X86=" i686 " +ARCH_EXT_LIST_MIPS=" + loongson + mips32r1 + mips64r1 + mips32r2 + mips64r2 + mips32r6 + mips64r6 +" + ARCH_EXT_LIST=" $ARCH_EXT_LIST_ARM + $ARCH_EXT_LIST_MIPS $ARCH_EXT_LIST_PPC $ARCH_EXT_LIST_X86 - loongson vis " @@ -3884,6 +3894,19 @@ elif enabled mips; then check_inline_asm loongson '"dmult.g $1, $2, $3"' + # make sure that only an instruction set is enabled + disable mips64r6 mips32r6 mips64r2 mips32r2 mips64r1 mips32r1 + + if enabled mips64; then + check_inline_asm mips64r6 '"dlsa $0, $0, $0, 1"' || + check_inline_asm mips64r2 '"dext $0, $0, 0, 1"' || + check_inline_asm mips64r1 '"daddi $0, $0, 0"' + else + check_inline_asm mips32r6 '"aui $0, $0, 0"' || + check_inline_asm mips32r2 '"ext $0, $0, 0, 1"' || + check_inline_asm mips32r1 '"daddi $0, $0, 0"' + fi + elif enabled parisc; then if enabled gcc; then