Commit 19073ebc by Uros Bizjak

g++.exp (g++_init): Use istarget.

	* lib/g++.exp (g++_init):  Use istarget.  Remove target_triplet global.
	* lib/obj-c++.exp (obj-c++_init): Ditto.
	* lib/file-format.exp (gcc_target_object_format): Ditto.
	* lib/target-supports-dg.exp (dg-require-dll): Ditto.
	* lib/target-supports-dg-exp (check_weak_available): Ditto.
	(check_visibility_available): Ditto.
	(check_effective_target_tls_native): Ditto.
	(check_effective_target_tls_emulated): Ditto.
	(check_effective_target_function_sections): Ditto.

From-SVN: r176240
parent e141542e
2011-07-13 Uros Bizjak <ubizjak@gmail.com>
* lib/g++.exp (g++_init): Use istarget. Remove target_triplet global.
* lib/obj-c++.exp (obj-c++_init): Ditto.
* lib/file-format.exp (gcc_target_object_format): Ditto.
* lib/target-supports-dg.exp (dg-require-dll): Ditto.
* lib/target-supports-dg-exp (check_weak_available): Ditto.
(check_visibility_available): Ditto.
(check_effective_target_tls_native): Ditto.
(check_effective_target_tls_emulated): Ditto.
(check_effective_target_function_sections): Ditto.
2011-07-13 Chung-Lin Tang <cltang@codesourcery.com> 2011-07-13 Chung-Lin Tang <cltang@codesourcery.com>
* gcc.target/arm/pr48183.c: New test. * gcc.target/arm/pr48183.c: New test.
...@@ -35,12 +47,11 @@ ...@@ -35,12 +47,11 @@
2011-07-11 H.J. Lu <hongjiu.lu@intel.com> 2011-07-11 H.J. Lu <hongjiu.lu@intel.com>
* gcc.dg/vect/costmodel/x86_64/x86_64-costmodel-vect.exp: Check * gcc.dg/vect/costmodel/x86_64/x86_64-costmodel-vect.exp: Check ia32.
ia32.
* go.test/go-test.exp (go-set-goarch): Likewise. * go.test/go-test.exp (go-set-goarch): Likewise.
2011-07-11 Georg-Johann Lay <avr@gjlay.de> 2011-07-11 Georg-Johann Lay <avr@gjlay.de>
PR target/39633 PR target/39633
* gcc.target/avr/torture/pr39633.c: New test case. * gcc.target/avr/torture/pr39633.c: New test case.
...@@ -50,7 +61,7 @@ ...@@ -50,7 +61,7 @@
* gfortran.dg/coarray_lock_3.f90: Remove bogus dg-error. * gfortran.dg/coarray_lock_3.f90: Remove bogus dg-error.
2011-07-11 Georg-Johann Lay <avr@gjlay.de> 2011-07-11 Georg-Johann Lay <avr@gjlay.de>
* lib/target-supports.exp (check_effective_target_scheduling): * lib/target-supports.exp (check_effective_target_scheduling):
New Function. New Function.
* gcc.dg/pr46614.c: Add dg-require-effective-target scheduling. * gcc.dg/pr46614.c: Add dg-require-effective-target scheduling.
...@@ -59,7 +70,7 @@ ...@@ -59,7 +70,7 @@
* g++.dg/pr45056.C: Ditto. * g++.dg/pr45056.C: Ditto.
2011-07-11 Georg-Johann Lay <avr@gjlay.de> 2011-07-11 Georg-Johann Lay <avr@gjlay.de>
* gcc.dg/compat/struct-by-value-16_main.c: Skip AVR. * gcc.dg/compat/struct-by-value-16_main.c: Skip AVR.
* gcc.dg/compat/struct-by-value-17_main.c: Skip AVR. * gcc.dg/compat/struct-by-value-17_main.c: Skip AVR.
* gcc.dg/compat/struct-by-value-18_main.c: Skip AVR. * gcc.dg/compat/struct-by-value-18_main.c: Skip AVR.
...@@ -588,7 +599,7 @@ ...@@ -588,7 +599,7 @@
* gcc.dg/debug/pr49522.c: New test. * gcc.dg/debug/pr49522.c: New test.
2011-07-07 Georg-Johann Lay <avr@gjlay.de> 2011-07-07 Georg-Johann Lay <avr@gjlay.de>
* gcc.dg/pragma-align.c: Run only if target !default_packed. * gcc.dg/pragma-align.c: Run only if target !default_packed.
* gcc.dg/pr46212.c: Run only if target int32plus. * gcc.dg/pr46212.c: Run only if target int32plus.
* gcc.dg/torture/pr48146.c: Ditto. * gcc.dg/torture/pr48146.c: Ditto.
......
...@@ -24,17 +24,16 @@ ...@@ -24,17 +24,16 @@
proc gcc_target_object_format { } { proc gcc_target_object_format { } {
global gcc_target_object_format_saved global gcc_target_object_format_saved
global target_triplet
global tool global tool
if [info exists gcc_target_object_format_saved] { if [info exists gcc_target_object_format_saved] {
verbose "gcc_target_object_format returning saved $gcc_target_object_format_saved" 2 verbose "gcc_target_object_format returning saved $gcc_target_object_format_saved" 2
} elseif { [string match "*-*-darwin*" $target_triplet] } { } elseif { [istarget *-*-darwin*] } {
# Darwin doesn't necessarily have objdump, so hand-code it. # Darwin doesn't necessarily have objdump, so hand-code it.
set gcc_target_object_format_saved mach-o set gcc_target_object_format_saved mach-o
} elseif { [string match "hppa*-*-hpux*" $target_triplet] } { } elseif { [istarget hppa*-*-hpux*] } {
# HP-UX doesn't necessarily have objdump, so hand-code it. # HP-UX doesn't necessarily have objdump, so hand-code it.
if { [string match "hppa*64*-*-hpux*" $target_triplet] } { if { [istarget hppa*64*-*-hpux*] } {
set gcc_target_object_format_saved elf set gcc_target_object_format_saved elf
} else { } else {
set gcc_target_object_format_saved som set gcc_target_object_format_saved som
......
...@@ -37,33 +37,33 @@ proc get-fortran-torture-options { } { ...@@ -37,33 +37,33 @@ proc get-fortran-torture-options { } {
set vectorizer_options [list "-O2" "-ftree-vectorize"] set vectorizer_options [list "-O2" "-ftree-vectorize"]
if { [istarget "powerpc*-*-*"] if { [istarget powerpc*-*-*]
&& [is-effective-target powerpc_altivec_ok] && [is-effective-target powerpc_altivec_ok]
&& [check_vmx_hw_available] } { && [check_vmx_hw_available] } {
lappend vectorizer_options "-maltivec" lappend vectorizer_options "-maltivec"
set test_tree_vectorize 1 set test_tree_vectorize 1
} elseif { [istarget "spu-*-*"] } { } elseif { [istarget spu-*-*] } {
set test_tree_vectorize 1 set test_tree_vectorize 1
} elseif { ( [istarget "i?86-*-*"] || [istarget "x86_64-*-*"] ) } elseif { ( [istarget i?86-*-*] || [istarget x86_64-*-*] )
&& [check_effective_target_sse2] && [check_effective_target_sse2]
&& [check_sse2_hw_available] && [check_sse2_hw_available]
&& [check_sse_os_support_available] } { && [check_sse_os_support_available] } {
lappend vectorizer_options "-msse2" lappend vectorizer_options "-msse2"
set test_tree_vectorize 1 set test_tree_vectorize 1
} elseif { [istarget "mips*-*-*"] } elseif { [istarget mips*-*-*]
&& [check_effective_target_mpaired_single] && [check_effective_target_mpaired_single]
&& [check_effective_target_nomips16] } { && [check_effective_target_nomips16] } {
lappend vectorizer_options "-mpaired-single" lappend vectorizer_options "-mpaired-single"
set test_tree_vectorize 1 set test_tree_vectorize 1
} elseif { [istarget "sparc*-*-*"] } elseif { [istarget sparc*-*-*]
&& [check_effective_target_ultrasparc_hw] } { && [check_effective_target_ultrasparc_hw] } {
lappend vectorizer_options "-mcpu=ultrasparc" "-mvis" lappend vectorizer_options "-mcpu=ultrasparc" "-mvis"
set test_tree_vectorize 1 set test_tree_vectorize 1
} elseif { [istarget "alpha*-*-*"] } elseif { [istarget alpha*-*-*]
&& [check_alpha_max_hw_available] } { && [check_alpha_max_hw_available] } {
lappend vectorizer_options "-mmax" lappend vectorizer_options "-mmax"
set test_tree_vectorize 1 set test_tree_vectorize 1
} elseif [istarget "ia64-*-*"] { } elseif [istarget ia64-*-*] {
set test_tree_vectorize 1 set test_tree_vectorize 1
} else { } else {
set test_tree_vectorize 0 set test_tree_vectorize 0
...@@ -414,14 +414,14 @@ proc fortran-torture { args } { ...@@ -414,14 +414,14 @@ proc fortran-torture { args } {
# #
proc add-ieee-options { } { proc add-ieee-options { } {
# Ensure that excess precision does not cause problems. # Ensure that excess precision does not cause problems.
if { [istarget "i?86-*-*"] if { [istarget i?86-*-*]
|| [istarget "m68k-*-*"] } then { || [istarget m68k-*-*] } then {
uplevel 1 lappend additional_flags "-ffloat-store" uplevel 1 lappend additional_flags "-ffloat-store"
} }
# Enable full IEEE compliance mode. # Enable full IEEE compliance mode.
if { [istarget "alpha*-*-*"] if { [istarget alpha*-*-*]
|| [istarget "sh*-*-*"] } then { || [istarget sh*-*-*] } then {
uplevel 1 lappend additional_flags "-mieee" uplevel 1 lappend additional_flags "-mieee"
} }
} }
...@@ -188,7 +188,6 @@ proc g++_init { args } { ...@@ -188,7 +188,6 @@ proc g++_init { args } {
global TOOL_EXECUTABLE TOOL_OPTIONS global TOOL_EXECUTABLE TOOL_OPTIONS
global GXX_UNDER_TEST global GXX_UNDER_TEST
global TESTING_IN_BUILD_TREE global TESTING_IN_BUILD_TREE
global target_triplet
global gcc_warning_prefix global gcc_warning_prefix
global gcc_error_prefix global gcc_error_prefix
...@@ -263,7 +262,7 @@ proc g++_init { args } { ...@@ -263,7 +262,7 @@ proc g++_init { args } {
set gcc_warning_prefix "warning:" set gcc_warning_prefix "warning:"
set gcc_error_prefix "error:" set gcc_error_prefix "error:"
if { [string match "*-*-darwin*" $target_triplet] } { if { [istarget *-*-darwin*] } {
lappend ALWAYS_CXXFLAGS "ldflags=-multiply_defined suppress" lappend ALWAYS_CXXFLAGS "ldflags=-multiply_defined suppress"
} }
......
...@@ -157,8 +157,8 @@ proc ${tool}_check_unsupported_p { output } { ...@@ -157,8 +157,8 @@ proc ${tool}_check_unsupported_p { output } {
if [regexp "(^|\n)\[^\n\]*: region \[^\n\]* is full" $output] { if [regexp "(^|\n)\[^\n\]*: region \[^\n\]* is full" $output] {
return "memory full" return "memory full"
} }
if {[istarget spu-*-*] && \ if { [istarget spu-*-*] && \
[string match "*exceeds local store*" $output]} { [string match "*exceeds local store*" $output] } {
return "memory full" return "memory full"
} }
return "" return ""
......
...@@ -356,14 +356,14 @@ proc go-torture { args } { ...@@ -356,14 +356,14 @@ proc go-torture { args } {
# #
proc add-ieee-options { } { proc add-ieee-options { } {
# Ensure that excess precision does not cause problems. # Ensure that excess precision does not cause problems.
if { [istarget "i?86-*-*"] if { [istarget i?86-*-*]
|| [istarget "m68k-*-*"] } then { || [istarget m68k-*-*] } then {
uplevel 1 lappend additional_flags "-ffloat-store" uplevel 1 lappend additional_flags "-ffloat-store"
} }
# Enable full IEEE compliance mode. # Enable full IEEE compliance mode.
if { [istarget "alpha*-*-*"] if { [istarget alpha*-*-*]
|| [istarget "sh*-*-*"] } then { || [istarget sh*-*-*] } then {
uplevel 1 lappend additional_flags "-mieee" uplevel 1 lappend additional_flags "-mieee"
} }
} }
...@@ -210,7 +210,6 @@ proc obj-c++_init { args } { ...@@ -210,7 +210,6 @@ proc obj-c++_init { args } {
global TOOL_EXECUTABLE TOOL_OPTIONS global TOOL_EXECUTABLE TOOL_OPTIONS
global OBJCXX_UNDER_TEST global OBJCXX_UNDER_TEST
global TESTING_IN_BUILD_TREE global TESTING_IN_BUILD_TREE
global target_triplet
global gcc_warning_prefix global gcc_warning_prefix
global gcc_error_prefix global gcc_error_prefix
...@@ -270,7 +269,7 @@ proc obj-c++_init { args } { ...@@ -270,7 +269,7 @@ proc obj-c++_init { args } {
set gcc_warning_prefix "warning:" set gcc_warning_prefix "warning:"
set gcc_error_prefix "error:" set gcc_error_prefix "error:"
if { [string match "*-*-darwin*" $target_triplet] } { if { [istarget *-*-darwin*] } {
lappend ALWAYS_OBJCXXFLAGS "ldflags=-multiply_defined suppress" lappend ALWAYS_OBJCXXFLAGS "ldflags=-multiply_defined suppress"
} }
...@@ -299,7 +298,7 @@ proc obj-c++_target_compile { source dest type options } { ...@@ -299,7 +298,7 @@ proc obj-c++_target_compile { source dest type options } {
# we need to add the include path for the gnu runtime if that is in # we need to add the include path for the gnu runtime if that is in
# use. # use.
# First, set the default... # First, set the default...
if { [istarget "*-*-darwin*"] } { if { [istarget *-*-darwin*] } {
set nextruntime 1 set nextruntime 1
} else { } else {
set nextruntime 0 set nextruntime 0
......
...@@ -30,7 +30,7 @@ proc objc-set-runtime-options { dowhat args } { ...@@ -30,7 +30,7 @@ proc objc-set-runtime-options { dowhat args } {
# installation can have the objc headers present in the same locations # installation can have the objc headers present in the same locations
# that Darwin uses. If NeXT is ported to another target, then it should # that Darwin uses. If NeXT is ported to another target, then it should
# be listed here. # be listed here.
if [istarget "*-*-darwin*" ] { if [istarget *-*-darwin*] {
lappend rtlist "-fnext-runtime" lappend rtlist "-fnext-runtime"
} }
if [info exists OBJC_RUNTIME_OPTIONS] { if [info exists OBJC_RUNTIME_OPTIONS] {
......
...@@ -150,7 +150,7 @@ proc objc_target_compile { source dest type options } { ...@@ -150,7 +150,7 @@ proc objc_target_compile { source dest type options } {
# we need to add the include path for the gnu runtime if that is in # we need to add the include path for the gnu runtime if that is in
# use. # use.
# First set the default... # First set the default...
if { [istarget "*-*-darwin*"] } { if { [istarget *-*-darwin*] } {
set nextruntime 1 set nextruntime 1
} else { } else {
set nextruntime 0 set nextruntime 0
......
...@@ -461,10 +461,10 @@ proc dg-function-on-line { args } { ...@@ -461,10 +461,10 @@ proc dg-function-on-line { args } {
} }
} }
if { [istarget "hppa*-*-*"] } { if { [istarget hppa*-*-*] } {
set pattern [format {\t;[^:]+:%d\n(\t[^\t]+\n)+%s:\n\t.PROC} \ set pattern [format {\t;[^:]+:%d\n(\t[^\t]+\n)+%s:\n\t.PROC} \
$line $symbol] $line $symbol]
} elseif { [istarget "mips-sgi-irix*"] } { } elseif { [istarget mips-sgi-irix*] } {
set pattern [format {\t\.loc [0-9]+ %d 0( [^\n]*)?\n\t\.set\t(no)?mips16\n\t\.ent\t%s\n\t\.type\t%s, @function\n%s:\n} \ set pattern [format {\t\.loc [0-9]+ %d 0( [^\n]*)?\n\t\.set\t(no)?mips16\n\t\.ent\t%s\n\t\.type\t%s, @function\n%s:\n} \
$line $symbol $symbol $symbol] $line $symbol $symbol $symbol]
} else { } else {
......
...@@ -272,11 +272,11 @@ proc restore_ld_library_path_env_vars { } { ...@@ -272,11 +272,11 @@ proc restore_ld_library_path_env_vars { } {
proc get_shlib_extension { } { proc get_shlib_extension { } {
global shlib_ext global shlib_ext
if { [ istarget *-*-darwin* ] } { if { [istarget *-*-darwin*] } {
set shlib_ext "dylib" set shlib_ext "dylib"
} elseif { [ istarget *-*-cygwin* ] || [ istarget *-*-mingw* ] } { } elseif { [istarget *-*-cygwin*] || [istarget *-*-mingw*] } {
set shlib_ext "dll" set shlib_ext "dll"
} elseif { [ istarget hppa*-*-hpux* ] } { } elseif { [istarget hppa*-*-hpux*] } {
set shlib_ext "sl" set shlib_ext "sl"
} else { } else {
set shlib_ext "so" set shlib_ext "so"
......
...@@ -122,11 +122,10 @@ proc dg-require-profiling { args } { ...@@ -122,11 +122,10 @@ proc dg-require-profiling { args } {
# If this target does not support DLL attributes skip this test. # If this target does not support DLL attributes skip this test.
proc dg-require-dll { args } { proc dg-require-dll { args } {
global target_triplet
# As a special case, the mcore-*-elf supports these attributes. # As a special case, the mcore-*-elf supports these attributes.
# All Symbian OS targets also support these attributes. # All Symbian OS targets also support these attributes.
if { [string match "mcore-*-elf" $target_triplet] if { [istarget mcore-*-elf]
|| [string match "*-*-symbianelf" $target_triplet]} { || [istarget *-*-symbianelf] } {
return return
} }
# PE/COFF targets support dllimport/dllexport. # PE/COFF targets support dllimport/dllexport.
......
...@@ -219,7 +219,6 @@ proc check_runtime {prop args} { ...@@ -219,7 +219,6 @@ proc check_runtime {prop args} {
# this proc returns 1 if they're supported, 0 if they're not, or -1 if unsure # this proc returns 1 if they're supported, 0 if they're not, or -1 if unsure
proc check_weak_available { } { proc check_weak_available { } {
global target_triplet
global target_cpu global target_cpu
# All mips targets should support it # All mips targets should support it
...@@ -230,25 +229,25 @@ proc check_weak_available { } { ...@@ -230,25 +229,25 @@ proc check_weak_available { } {
# All solaris2 targets should support it # All solaris2 targets should support it
if { [regexp ".*-solaris2.*" $target_triplet] } { if { [istarget *-*-solaris2*] } {
return 1 return 1
} }
# DEC OSF/1/Digital UNIX/Tru64 UNIX supports it # DEC OSF/1/Digital UNIX/Tru64 UNIX supports it
if { [regexp "alpha.*osf.*" $target_triplet] } { if { [istarget alpha*-dec-osf*] } {
return 1 return 1
} }
# Windows targets Cygwin and MingW32 support it # Windows targets Cygwin and MingW32 support it
if { [regexp ".*mingw32|.*cygwin" $target_triplet] } { if { [istarget *-*-cygwin*] || [istarget *-*-mingw*] } {
return 1 return 1
} }
# HP-UX 10.X doesn't support it # HP-UX 10.X doesn't support it
if { [istarget "hppa*-*-hpux10*"] } { if { [istarget hppa*-*-hpux10*] } {
return 0 return 0
} }
...@@ -276,7 +275,7 @@ proc check_weak_available { } { ...@@ -276,7 +275,7 @@ proc check_weak_available { } {
# cannot be overridden. # cannot be overridden.
proc check_weak_override_available { } { proc check_weak_override_available { } {
if { [istarget "*-*-mingw*"] } { if { [istarget *-*-mingw*] } {
return 0 return 0
} }
return [check_weak_available] return [check_weak_available]
...@@ -291,9 +290,6 @@ proc check_weak_override_available { } { ...@@ -291,9 +290,6 @@ proc check_weak_override_available { } {
# The argument is the kind of visibility, default/protected/hidden/internal. # The argument is the kind of visibility, default/protected/hidden/internal.
proc check_visibility_available { what_kind } { proc check_visibility_available { what_kind } {
global tool
global target_triplet
# On NetWare, support makes no sense. # On NetWare, support makes no sense.
if { [istarget *-*-netware*] } { if { [istarget *-*-netware*] } {
return 0 return 0
...@@ -627,7 +623,7 @@ proc check_effective_target_pcc_bitfield_type_matters { } { ...@@ -627,7 +623,7 @@ proc check_effective_target_pcc_bitfield_type_matters { } {
proc add_options_for_tls { flags } { proc add_options_for_tls { flags } {
# Tru64 UNIX uses emutls, which relies on a couple of pthread functions # Tru64 UNIX uses emutls, which relies on a couple of pthread functions
# which only live in libpthread, so always pass -pthread for TLS. # which only live in libpthread, so always pass -pthread for TLS.
if { [istarget *-*-osf*] } { if { [istarget alpha*-dec-osf*] } {
return "$flags -pthread" return "$flags -pthread"
} }
# On Solaris 8 and 9, __tls_get_addr/___tls_get_addr only lives in # On Solaris 8 and 9, __tls_get_addr/___tls_get_addr only lives in
...@@ -660,8 +656,7 @@ proc check_effective_target_tls {} { ...@@ -660,8 +656,7 @@ proc check_effective_target_tls {} {
proc check_effective_target_tls_native {} { proc check_effective_target_tls_native {} {
# VxWorks uses emulated TLS machinery, but with non-standard helper # VxWorks uses emulated TLS machinery, but with non-standard helper
# functions, so we fail to automatically detect it. # functions, so we fail to automatically detect it.
global target_triplet if { [istarget *-*-vxworks*] } {
if { [regexp ".*-.*-vxworks.*" $target_triplet] } {
return 0 return 0
} }
...@@ -677,8 +672,7 @@ proc check_effective_target_tls_native {} { ...@@ -677,8 +672,7 @@ proc check_effective_target_tls_native {} {
proc check_effective_target_tls_emulated {} { proc check_effective_target_tls_emulated {} {
# VxWorks uses emulated TLS machinery, but with non-standard helper # VxWorks uses emulated TLS machinery, but with non-standard helper
# functions, so we fail to automatically detect it. # functions, so we fail to automatically detect it.
global target_triplet if { [istarget *-*-vxworks*] } {
if { [regexp ".*-.*-vxworks.*" $target_triplet] } {
return 1 return 1
} }
...@@ -702,8 +696,7 @@ proc check_effective_target_tls_runtime {} { ...@@ -702,8 +696,7 @@ proc check_effective_target_tls_runtime {} {
proc check_effective_target_function_sections {} { proc check_effective_target_function_sections {} {
# Darwin has its own scheme and silently accepts -ffunction-sections. # Darwin has its own scheme and silently accepts -ffunction-sections.
global target_triplet if { [istarget *-*-darwin*] } {
if { [regexp ".*-.*-darwin.*" $target_triplet] } {
return 0 return 0
} }
...@@ -1435,7 +1428,7 @@ proc check_fork_available {} { ...@@ -1435,7 +1428,7 @@ proc check_fork_available {} {
# Returns true iff "mkfifo" is available on the target system. # Returns true iff "mkfifo" is available on the target system.
proc check_mkfifo_available {} { proc check_mkfifo_available {} {
if {[istarget *-*-cygwin*]} { if { [istarget *-*-cygwin*] } {
# Cygwin has mkfifo, but support is incomplete. # Cygwin has mkfifo, but support is incomplete.
return 0 return 0
} }
...@@ -1447,10 +1440,10 @@ proc check_mkfifo_available {} { ...@@ -1447,10 +1440,10 @@ proc check_mkfifo_available {} {
proc check_cxa_atexit_available { } { proc check_cxa_atexit_available { } {
return [check_cached_effective_target cxa_atexit_available { return [check_cached_effective_target cxa_atexit_available {
if { [istarget "hppa*-*-hpux10*"] } { if { [istarget hppa*-*-hpux10*] } {
# HP-UX 10 doesn't have __cxa_atexit but subsequent test passes. # HP-UX 10 doesn't have __cxa_atexit but subsequent test passes.
expr 0 expr 0
} elseif { [istarget "*-*-vxworks"] } { } elseif { [istarget *-*-vxworks] } {
# vxworks doesn't have __cxa_atexit but subsequent test passes. # vxworks doesn't have __cxa_atexit but subsequent test passes.
expr 0 expr 0
} else { } else {
...@@ -2282,7 +2275,7 @@ proc check_effective_target_powerpc_ppu_ok { } { ...@@ -2282,7 +2275,7 @@ proc check_effective_target_powerpc_ppu_ok { } {
# Return 1 if this is a PowerPC target that supports SPU. # Return 1 if this is a PowerPC target that supports SPU.
proc check_effective_target_powerpc_spu { } { proc check_effective_target_powerpc_spu { } {
if [istarget powerpc*-*-linux*] { if { [istarget powerpc*-*-linux*] } {
return [check_effective_target_powerpc_altivec_ok] return [check_effective_target_powerpc_altivec_ok]
} else { } else {
return 0 return 0
...@@ -3705,11 +3698,11 @@ proc add_options_for_c99_runtime { flags } { ...@@ -3705,11 +3698,11 @@ proc add_options_for_c99_runtime { flags } {
# full IEEE compliance mode. # full IEEE compliance mode.
proc add_options_for_ieee { flags } { proc add_options_for_ieee { flags } {
if { [istarget "alpha*-*-*"] if { [istarget alpha*-*-*]
|| [istarget "sh*-*-*"] } { || [istarget sh*-*-*] } {
return "$flags -mieee" return "$flags -mieee"
} }
if { [istarget "rx-*-*"] } { if { [istarget rx-*-*] } {
return "$flags -mnofpu" return "$flags -mnofpu"
} }
return $flags return $flags
...@@ -3999,21 +3992,21 @@ proc check_vect_support_and_set_flags { } { ...@@ -3999,21 +3992,21 @@ proc check_vect_support_and_set_flags { } {
global DEFAULT_VECTCFLAGS global DEFAULT_VECTCFLAGS
global dg-do-what-default global dg-do-what-default
if [istarget "powerpc-*paired*"] { if [istarget powerpc-*paired*] {
lappend DEFAULT_VECTCFLAGS "-mpaired" lappend DEFAULT_VECTCFLAGS "-mpaired"
if [check_750cl_hw_available] { if [check_750cl_hw_available] {
set dg-do-what-default run set dg-do-what-default run
} else { } else {
set dg-do-what-default compile set dg-do-what-default compile
} }
} elseif [istarget "powerpc*-*-*"] { } elseif [istarget powerpc*-*-*] {
# Skip targets not supporting -maltivec. # Skip targets not supporting -maltivec.
if ![is-effective-target powerpc_altivec_ok] { if ![is-effective-target powerpc_altivec_ok] {
return 0 return 0
} }
lappend DEFAULT_VECTCFLAGS "-maltivec" lappend DEFAULT_VECTCFLAGS "-maltivec"
if [check_vsx_hw_available] { if [check_vsx_hw_available] {
lappend DEFAULT_VECTCFLAGS "-mvsx" "-mno-allow-movmisalign" lappend DEFAULT_VECTCFLAGS "-mvsx" "-mno-allow-movmisalign"
} }
...@@ -4026,16 +4019,16 @@ proc check_vect_support_and_set_flags { } { ...@@ -4026,16 +4019,16 @@ proc check_vect_support_and_set_flags { } {
} }
set dg-do-what-default compile set dg-do-what-default compile
} }
} elseif { [istarget "spu-*-*"] } { } elseif { [istarget spu-*-*] } {
set dg-do-what-default run set dg-do-what-default run
} elseif { [istarget "i?86-*-*"] || [istarget "x86_64-*-*"] } { } elseif { [istarget i?86-*-*] || [istarget x86_64-*-*] } {
lappend DEFAULT_VECTCFLAGS "-msse2" lappend DEFAULT_VECTCFLAGS "-msse2"
if { [check_effective_target_sse2_runtime] } { if { [check_effective_target_sse2_runtime] } {
set dg-do-what-default run set dg-do-what-default run
} else { } else {
set dg-do-what-default compile set dg-do-what-default compile
} }
} elseif { [istarget "mips*-*-*"] } elseif { [istarget mips*-*-*]
&& ([check_effective_target_mpaired_single] && ([check_effective_target_mpaired_single]
|| [check_effective_target_mips_loongson]) || [check_effective_target_mips_loongson])
&& [check_effective_target_nomips16] } { && [check_effective_target_nomips16] } {
...@@ -4043,14 +4036,14 @@ proc check_vect_support_and_set_flags { } { ...@@ -4043,14 +4036,14 @@ proc check_vect_support_and_set_flags { } {
lappend DEFAULT_VECTCFLAGS "-mpaired-single" lappend DEFAULT_VECTCFLAGS "-mpaired-single"
} }
set dg-do-what-default run set dg-do-what-default run
} elseif [istarget "sparc*-*-*"] { } elseif [istarget sparc*-*-*] {
lappend DEFAULT_VECTCFLAGS "-mcpu=ultrasparc" "-mvis" lappend DEFAULT_VECTCFLAGS "-mcpu=ultrasparc" "-mvis"
if [check_effective_target_ultrasparc_hw] { if [check_effective_target_ultrasparc_hw] {
set dg-do-what-default run set dg-do-what-default run
} else { } else {
set dg-do-what-default compile set dg-do-what-default compile
} }
} elseif [istarget "alpha*-*-*"] { } elseif [istarget alpha*-*-*] {
# Alpha's vectorization capabilities are extremely limited. # Alpha's vectorization capabilities are extremely limited.
# It's more effort than its worth disabling all of the tests # It's more effort than its worth disabling all of the tests
# that it cannot pass. But if you actually want to see what # that it cannot pass. But if you actually want to see what
...@@ -4063,7 +4056,7 @@ proc check_vect_support_and_set_flags { } { ...@@ -4063,7 +4056,7 @@ proc check_vect_support_and_set_flags { } {
} else { } else {
set dg-do-what-default compile set dg-do-what-default compile
} }
} elseif [istarget "ia64-*-*"] { } elseif [istarget ia64-*-*] {
set dg-do-what-default run set dg-do-what-default run
} elseif [is-effective-target arm_neon_ok] { } elseif [is-effective-target arm_neon_ok] {
eval lappend DEFAULT_VECTCFLAGS [add_options_for_arm_neon ""] eval lappend DEFAULT_VECTCFLAGS [add_options_for_arm_neon ""]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment