OSDN Git Service

gcc/testsuite/
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 18 Jul 2010 12:16:36 +0000 (12:16 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 18 Jul 2010 12:16:36 +0000 (12:16 +0000)
* 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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@162284 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/mips/mips.exp

index b09492d..0431161 100644 (file)
@@ -1,5 +1,12 @@
 2010-07-18  Richard Sandiford  <rdsandiford@googlemail.com>
 
+       * 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.
+
+2010-07-18  Richard Sandiford  <rdsandiford@googlemail.com>
+
        * gcc.target/mips/mips16-attributes-4.c: New test.
 
 2010-07-17  Iain Sandoe  <iains@gcc.gnu.org>
index 02e031c..0a7bc1d 100644 (file)
@@ -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 option } {
                $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"]