diff options
author | Richard Sandiford <richard@codesourcery.com> | 2005-07-10 09:40:11 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2005-07-10 09:40:11 +0000 |
commit | 4cc93d9984a19dfeb89de04c6c5c01b2cb3b3c41 (patch) | |
tree | 414ebcd1a6305b2ac194d8f5d757625e24f4813c | |
parent | e8ca41599546a7131d276d99fd4e7bbf402190d3 (diff) | |
download | gcc-4cc93d9984a19dfeb89de04c6c5c01b2cb3b3c41.zip gcc-4cc93d9984a19dfeb89de04c6c5c01b2cb3b3c41.tar.gz gcc-4cc93d9984a19dfeb89de04c6c5c01b2cb3b3c41.tar.bz2 |
mips.exp (is_gp32_flag): New procedure.
* gcc.target/mips/mips.exp (is_gp32_flag): New procedure.
(dg-mips-options): Use it.
From-SVN: r101847
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/mips/mips.exp | 12 |
2 files changed, 16 insertions, 1 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 96d0a0b..3f48f22 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2005-07-10 Richard Sandiford <richard@codesourcery.com> + + * gcc.target/mips/mips.exp (is_gp32_flag): New procedure. + (dg-mips-options): Use it. + 2005-07-09 Diego Novillo <dnovillo@redhat.com> * gcc.dg/tree-ssa/pta-fp.c: Use -fdump-tree-alias1. diff --git a/gcc/testsuite/gcc.target/mips/mips.exp b/gcc/testsuite/gcc.target/mips/mips.exp index ee1c4f5..d88a867 100644 --- a/gcc/testsuite/gcc.target/mips/mips.exp +++ b/gcc/testsuite/gcc.target/mips/mips.exp @@ -83,9 +83,19 @@ proc setup_mips_tests {} { set mips_forced_float [regexp -- {-m(hard|soft)-float} $compiler_flags] } +# Return true if command-line option FLAG forces 32-bit code. +proc is_gp32_flag {flag} { + switch -glob -- $flag { + -march=mips32* - + -mgp32 { return 1 } + default { return 0 } + } +} + # Like dg-options, but treats certain MIPS-specific options specially: # # -mgp32 +# -march=mips32* # Force 32-bit code. Skip the test if the multilib flags force # a 64-bit ABI. # @@ -125,7 +135,7 @@ proc dg-mips-options {args} { # First handle the -mgp* options. Add an architecture option if necessary. foreach flag $flags { - if {$flag == "-mgp32" && $mips_mips64} { + if {[is_gp32_flag $flag] && $mips_mips64} { if {$mips_forced_abi} { set matches 0 } else { |