-# Copyright (C) 1999, 2001, 2003, 2004, 2005, 2006
+# Copyright (C) 1999, 2001, 2003, 2004, 2005, 2006, 2007
# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# HP-UX 10.X doesn't support it
- if { [regexp "hppa.*hpux10" $target_triplet] } {
+ if { [istarget "hppa*-*-hpux10*"] } {
return 0
}
if [info exists et_cxa_atexit] {
verbose "check_cxa_atexit_available: using cached result" 2
+ } elseif { [istarget "hppa*-*-hpux10*"] } {
+ # HP-UX 10 doesn't have __cxa_atexit but subsequent test passes.
+ set et_cxa_atexit 0
} else {
set et_cxa_atexit 0
set et_vect_cmdline_needed_saved 1
if { [istarget ia64-*-*]
|| (([istarget x86_64-*-*] || [istarget i?86-*-*])
- && [check_effective_target_lp64])} {
+ && [check_effective_target_lp64])
+ || ([istarget powerpc*-*-*]
+ && ([check_effective_target_powerpc_spe]
+ || [check_effective_target_powerpc_altivec]))} {
set et_vect_cmdline_needed_saved 0
}
}
}
}
+# Return 1 if this is a PowerPC target with SPE enabled.
+
+proc check_effective_target_powerpc_spe { } {
+ if { [istarget powerpc*-*-*] } {
+ return [check_no_compiler_messages powerpc_spe object {
+ #ifndef __SPE__
+ #error not SPE
+ #else
+ int dummy;
+ #endif
+ }]
+ } else {
+ return 0
+ }
+}
+
+# Return 1 if this is a PowerPC target with Altivec enabled.
+
+proc check_effective_target_powerpc_altivec { } {
+ if { [istarget powerpc*-*-*] } {
+ return [check_no_compiler_messages powerpc_altivec object {
+ #ifndef __ALTIVEC__
+ #error not Altivec
+ #else
+ int dummy;
+ #endif
+ }]
+ } else {
+ return 0
+ }
+}
+
# Return 1 if the target supports hardware vector shift operation.
proc check_effective_target_vect_shift { } {
set et_vect_widen_mult_hi_to_si_saved 0
}
if { [istarget powerpc*-*-*]
+ || [istarget spu-*-*]
|| [istarget i?86-*-*]
|| [istarget x86_64-*-*] } {
set et_vect_widen_mult_hi_to_si_saved 1
} else {
set et_vect_no_align_saved 0
if { [istarget mipsisa64*-*-*]
- || [istarget spu-*-*]
|| [istarget sparc*-*-*]
|| [istarget ia64-*-*] } {
set et_vect_no_align_saved 1
const char *var = "String";
} {-O2}]
}
+
+# Return 1 if target has the basic signed and unsigned types in
+# <stdint.h>, 0 otherwise.
+
+proc check_effective_target_stdint_types { } {
+ return [check_no_compiler_messages stdint_types assembly {
+ #include <stdint.h>
+ int8_t a; int16_t b; int32_t c; int64_t d;
+ uint8_t e; uint16_t f; uint32_t g; uint64_t h;
+ }]
+}
+
+# Return 1 if programs are intended to be run on a simulator
+# (i.e. slowly) rather than hardware (i.e. fast).
+
+proc check_effective_target_simulator { } {
+
+ # All "src/sim" simulators set this one.
+ if [board_info target exists is_simulator] {
+ return [board_info target is_simulator]
+ }
+
+ # The "sid" simulators don't set that one, but at least they set
+ # this one.
+ if [board_info target exists slow_simulator] {
+ return [board_info target slow_simulator]
+ }
+
+ return 0
+}