OSDN Git Service

* lib/target-supports.exp (is-effective-target): Simplify.
authorjanis <janis@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 30 Nov 2004 21:30:27 +0000 (21:30 +0000)
committerjanis <janis@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 30 Nov 2004 21:30:27 +0000 (21:30 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@91541 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/lib/target-supports.exp

index f642e1e..d2ca890 100644 (file)
@@ -1,5 +1,7 @@
 2004-11-30  Janis Johnson  <janis187@us.ibm.com>
 
+       * lib/target-supports.exp (is-effective-target): Simplify.
+
        * lib/target-supports.exp (check_effective_target_vect_long):
        Fix for powerpc64-*-*.
 
index ed1394c..0e122e0 100644 (file)
@@ -525,17 +525,15 @@ proc check_effective_target_vect_double { } {
 
 proc is-effective-target { arg } {
     set selected 0
-    switch $arg {
-       "ilp32"  { set selected [check_effective_target_ilp32] }
-       "lp64"   { set selected [check_effective_target_lp64] }
-       "vmx_hw" { set selected [check_vmx_hw_available] }
-       "named_sections" { set selected [check_named_sections_available] }
-       "gc_sections" { set selected [check_gc_sections_available] }
-       "vect_int" { set selected [check_effective_target_vect_int] }
-       "vect_long" { set selected [check_effective_target_vect_long] }
-       "vect_float" { set selected [check_effective_target_vect_float] }
-       "vect_double" { set selected [check_effective_target_vect_double] }
-       default  { error "unknown effective target selector `$arg'" }
+    if { [info procs check_effective_target_${arg}] != [list] } {
+       set selected [check_effective_target_${arg}]
+    } else {
+       switch $arg {
+         "vmx_hw"         { set selected [check_vmx_hw_available] }
+         "named_sections" { set selected [check_named_sections_available] }
+         "gc_sections"    { set selected [check_gc_sections_available] }
+         default          { error "unknown effective target keyword `$arg'" }
+       }
     }
     verbose "is-effective-target: $arg $selected" 2
     return $selected