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]

Re: [PATCH] testsuite: Add new effective target keywords


Am Montag, 18. April 2005 19:31 schrieb Joseph S. Myers:
> On Mon, 18 Apr 2005, [utf-8] BjÃrn Haase wrote:
> > Joseph, could you send me then the explicit target triplets, that you
> > would like to have excluded from trampoline tests?
>
> hppa2.0w-hp-hpux11.23
> hppa64-hp-hpux11.23
>
> (Just those specific versions, not any later version, as we don't know
> whether later versions might provide a mechanism GCC can use to mark the
> object files using trampolines.)

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

    * lib/target-supports.exp: 
ÂÂÂÂÂÂÂÂAdd effective-target keywords "trampolines" and 
	"int_larger_than_16_bits".
	Add avr-*-*, hppa2.0w-hp-hpux11.23 and hppa64-hp-hpux11.23
	to the list of targets without trampoline support.
ÂÂÂÂÂÂÂÂAdd "avr-*-*" to the list of targets without support for profiling. 

Index: target-supports.exp
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/testsuite/lib/target-supports.exp,v
retrieving revision 1.50
diff -C8 -r1.50 target-supports.exp
*** target-supports.exp	14 Apr 2005 17:46:08 -0000	1.50
--- target-supports.exp	18 Apr 2005 20:42:42 -0000
***************
*** 247,262 ****
--- 247,314 ----
  	    set gc_sections_available_saved 1
  	} else {
  	    set gc_sections_available_saved 0
  	}
      }
      return $gc_sections_available_saved
  }
  
+ # Looks at target_info struct and explicit target list
+ # for finding out whether target is supposed to support
+ # trampolines. In case of missing support return 0.
+  
+ proc check_effective_target_trampolines { } {
+     if {[target_info exists no_trampolines]} {
+       return 0
+     }
+     if {   [istarget avr-*-*]
+         || [istarget hppa2.0w-hp-hpux11.23]
+         || [istarget hppa64-hp-hpux11.23] } {
+       return 0;   
+     }
+     
+     return 1
+ }
+ 
+ # Find out whether target defines int to be 
+ # larger than 16 bits and return 1 in this case.
+ 
+ proc check_effective_target_int_larger_than_16_bits { } {
+     global int_larger_than_16_bits_saved
+     global tool
+ 
+     if [info exists int_larger_than_16_bits_saved] {
+         verbose "check_effective_target_int_larger_than_16_bits  returning saved $int_larger_than_16_bits_saved" 2
+     } else {
+ 	set src intsize[pid].c
+ 	set obj intsize[pid].o
+         verbose "check_effective_target_int_larger_than_16_bits  compiling testfile $src" 2
+ 	set f [open $src "w"]
+ 	# Compile a small test program.  
+ 	puts $f "#if (__INT_MAX__ <= 32767) \n this code triggers an error; \n#endif\n"
+ 	puts $f "int dummy;\n \n"
+ 	close $f
+ 	set lines [${tool}_target_compile $src $obj object ""]
+ 	file delete $src
+ 	remote_file build delete $obj
+ 
+ 	if [string match "" $lines] then {
+ 	    # No error messages, so __INT_MAX__ > 32767.
+ 	    set int_larger_than_16_bits_saved 1
+ 	} else {
+ 	    set int_larger_than_16_bits_saved 0
+ 	}
+ 
+ 	verbose "check_effective_target_int_larger_than_16_bits  returning $int_larger_than_16_bits_saved" 2
+     }
+ 
+     return $int_larger_than_16_bits_saved
+ }
+ 
  # 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
***************
*** 282,297 ****
--- 334,350 ----
      # Now examine the cache variable.
      if {![info exists profiling_available_saved]} {
  	# Some targets don't have any implementation of __bb_init_func or are
  	# missing other needed machinery.
  	if { [istarget mmix-*-*]
  	     || [istarget arm*-*-eabi*]
  	     || [istarget arm*-*-elf]
  	     || [istarget arm*-*-symbianelf*]
+              || [istarget avr-*-*]
  	     || [istarget powerpc-*-eabi*]
  	     || [istarget strongarm*-*-elf]
  	     || [istarget xscale*-*-elf]
  	     || [istarget cris-*-*]
  	     || [istarget h8300-*-*]
  	     || [istarget mips*-*-elf]
  	     || [istarget *-*-windiss] } {
  	    set profiling_available_saved 0

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