This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] testsuite: Add new effective target keywords
- From: Björn Haase <bjoern dot m dot haase at web dot de>
- To: Janis Johnson <janis187 at us dot ibm dot com>
- Cc: "Joseph S. Myers" <joseph at codesourcery dot com>,gcc-patches at gcc dot gnu dot org
- Date: Tue, 19 Apr 2005 23:13:03 +0200
- Subject: Re: [PATCH] testsuite: Add new effective target keywords
- References: <200504072320.46784.bjoern.m.haase@web.de> <200504192009.18182.bjoern.m.haase@web.de> <20050419214750.GA6777@us.ibm.com>
Am Dienstag, 19. April 2005 23:47 schrieb Janis Johnson:
> On Tue, Apr 19, 2005 at 08:09:17PM +0200, Björn Haase wrote:
> > Am Montag, 18. April 2005 23:44 schrieb Janis Johnson:
> > > It's getting close!
> > >
> > > Please use get_compiler_messages, used in several other places in
> > > target-supports.exp, to compile the testcase. Use the same formatting
> > > (initial spacing and tabs, in particular) as the rest of the file.
> >
> > Hi,
> >
> > I hope that this time :-) it's ok.
>
> It appears to be the same patch that you submitted yesterday.
>
> Janis
Indeed, sorry, I got confused by my own numbering.
Yours,
Björn
? .target-supports.exp.swp
? dummy
Index: target-supports.exp
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/testsuite/lib/target-supports.exp,v
retrieving revision 1.50
diff -c -r1.50 target-supports.exp
*** target-supports.exp 14 Apr 2005 17:46:08 -0000 1.50
--- target-supports.exp 19 Apr 2005 22:05:52 -0000
***************
*** 252,257 ****
--- 252,302 ----
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 {
+ verbose "check_effective_target_int_larger_than_16_bits compiling testfile" 2
+ set lines [get_compiler_messages intsize object "
+ #if (__INT_MAX__ <= 32767)
+ this code triggers an error;
+ #endif
+ "]
+ 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 } {
***************
*** 287,292 ****
--- 332,338 ----
|| [istarget arm*-*-eabi*]
|| [istarget arm*-*-elf]
|| [istarget arm*-*-symbianelf*]
+ || [istarget avr-*-*]
|| [istarget powerpc-*-eabi*]
|| [istarget strongarm*-*-elf]
|| [istarget xscale*-*-elf]