From patchwork Sun Jul 18 12:16:16 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [committed] Handle -mflip-mips16 in mips.exp Date: Sun, 18 Jul 2010 02:16:16 -0000 From: Richard Sandiford X-Patchwork-Id: 59165 Message-Id: <877hktrnn3.fsf@firetop.home> To: gcc-patches@gcc.gnu.org -mflip-mips16 testruns included the Loongson tests, which are supposed to be skipped for MIPS16. This patch makes mips.exp aware of -mflip-mips16. Tested on mipsisa64-elfoabi and applied. Richard gcc/testsuite/ * gcc.target/mips/mips.exp (mips_option_groups): Add -mflip-mips16 to the "mips16" group. (mips_using_mips16_p): New procedure. (mips-dg-options): Use it. Index: gcc/testsuite/gcc.target/mips/mips.exp =================================================================== --- gcc/testsuite/gcc.target/mips/mips.exp 2010-07-18 13:03:44.000000000 +0100 +++ gcc/testsuite/gcc.target/mips/mips.exp 2010-07-18 13:14:33.000000000 +0100 @@ -233,7 +233,7 @@ set mips_option_groups { fp "-mfp(32|64)" gp "-mgp(32|64)" long "-mlong(32|64)" - mips16 "-mips16|-mno-mips16" + mips16 "-mips16|-mno-mips16|-mflip-mips16" mips3d "-mips3d|-mno-mips3d" optimization "-O(|[0-3s])" pic "-f(no-|)(pic|PIC)" @@ -509,6 +509,14 @@ proc mips_have_option_p { upstatus optio $option] } +# Return true if the options described by UPSTATUS require MIPS16 support. +proc mips_using_mips16_p { upstatus } { + upvar $upstatus status + + return [expr { [mips_have_option_p status "-mips16"] + || [mips_have_option_p status "-mflip-mips16"] }] +} + # Return true if the test described by UPSTATUS requires option OPTION. proc mips_have_test_option_p { upstatus option } { upvar $upstatus status @@ -763,7 +771,7 @@ proc mips-dg-finish {} { # # START END # | | -# -mips16 -mno-mips16 +# -mips16/-mflip-mips16 -mno-mips16 # | | # -mips3d -mno-mips3d # | | @@ -1011,7 +1019,7 @@ proc mips-dg-options { args } { # EABI doesn't support -mabicalls. # EABI doesn't support the combination -mgp32 -mfp64. set force_abi 1 - } elseif { [mips_have_option_p options "-mips16"] + } elseif { [mips_using_mips16_p options] && ![mips_same_option_p $abi "-mabi=32"] && ![mips_same_option_p $abi "-mabi=o64"] && (![mips_have_option_p options "addressing=absolute"] @@ -1048,7 +1056,7 @@ proc mips-dg-options { args } { mips_make_test_option options "-mfp32" } } - if { [mips_have_option_p options "-mips16"] + if { [mips_using_mips16_p options] && ![mips_same_option_p $abi "-mabi=32"] && ![mips_same_option_p $abi "-mabi=o64"] && (![mips_have_option_p options "addressing=absolute"]