This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] testsuite: Add new effective target keywords


Hi,

when preparing to prepare the testsuite to be better adapted also for small 
targets, I have made use of the approach that you had suggested. You will 
find attached a patch that defines three new effective-target keywords:

nested_functions
trampolines
int_larger_than_16_bits

All of those make use of the knowledge stored in the board information 
variables. With the new keyword "trampolines" it now will also be possible to 
uprightly skip tests that use trampolines instead of continuing to report the 
testcases to pass. Difference to the previous patch is, that now explicit 
functions are used for implementing the new keywords.

The attached patch also adds "avr-*-*" to the list of targets that do not 
support profiling.

Yours,

Björn


2005-04-15  Bjoern Haase  <bjoern.m.haase@web.de>

        * lib/target-supports.exp: Add effective-target keywords 
"nested_functions",
          "trampolines" and "int_larger_than_16_bits". Add "avr-*-*" to the 
list of
          targets without support for profiling. 

? dummy
Index: target-supports.exp
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/testsuite/lib/target-supports.exp,v
retrieving revision 1.50
diff -U8 -r1.50 target-supports.exp
--- target-supports.exp	14 Apr 2005 17:46:08 -0000	1.50
+++ target-supports.exp	17 Apr 2005 23:13:55 -0000
@@ -247,16 +247,46 @@
 	    set gc_sections_available_saved 1
 	} else {
 	    set gc_sections_available_saved 0
 	}
     }
     return $gc_sections_available_saved
 }
 
+# Looks at target_info struct for finding out whether target is known to
+# lack support for trampolines.
+ 
+proc check_effective_target_trampolines { } {
+    if {[target_info exists no_trampolines]} {
+      return 0
+    }
+    return 1
+}
+
+# Looks at target_info struct for finding out whether target is known to
+# lack support for nested functions.
+
+proc check_effective_target_nested_functions { } {
+    if {[target_info exists no_nested_functions]} {
+      return 0
+    }
+    return 1
+}
+
+# Looks at target_info struct for finding out whether target defines int to be 
+# less than 32 bit. 
+
+proc check_effective_target_int_larger_than_16_bits { } {
+    if {[target_info exists int_size_16_bits]} {
+      return 0
+    }
+    return 1
+}
+
 # Return true if profiling is supported on the target.
 
 proc check_profiling_available { test_what } {
     global profiling_available_saved
 
     verbose "Profiling argument is <$test_what>" 1
 
     # These conditions depend on the argument so examine them before

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]