target-supports.exp (check_effective_target_vect_int, [...]): Check for ARM.

* lib/target-supports.exp (check_effective_target_vect_int,
	check_effective_target_vect_shift,
	check_effective_target_vect_long,
	check_effective_target_vect_float,
	check_effective_target_vect_no_align,
	check_effective_target_vect_int_mult): Check for ARM.
	(check_effective_target_arm_neon): New.
	(check_effective_target_vect_cmdline_needed): Use it.

From-SVN: r137328
This commit is contained in:
Joseph Myers 2008-07-01 23:15:47 +01:00 committed by Joseph Myers
parent 4d2a9850cf
commit b61b26e45f
2 changed files with 40 additions and 6 deletions

View file

@ -1,3 +1,14 @@
2008-07-01 Joseph Myers <joseph@codesourcery.com>
* lib/target-supports.exp (check_effective_target_vect_int,
check_effective_target_vect_shift,
check_effective_target_vect_long,
check_effective_target_vect_float,
check_effective_target_vect_no_align,
check_effective_target_vect_int_mult): Check for ARM.
(check_effective_target_arm_neon): New.
(check_effective_target_vect_cmdline_needed): Use it.
2008-07-01 Daniel Jacobowitz <dan@codesourcery.com>
* g++.dg/other/opaque-1.C, g++.dg/other/opaque-2.C,

View file

@ -1131,7 +1131,8 @@ proc check_effective_target_vect_cmdline_needed { } {
|| ([istarget powerpc*-*-*]
&& ([check_effective_target_powerpc_spe]
|| [check_effective_target_powerpc_altivec]))
|| [istarget spu-*-*] } {
|| [istarget spu-*-*]
|| ([istarget arm*-*-*] && [check_effective_target_arm_neon]) } {
set et_vect_cmdline_needed_saved 0
}
}
@ -1158,7 +1159,8 @@ proc check_effective_target_vect_int { } {
|| [istarget x86_64-*-*]
|| [istarget sparc*-*-*]
|| [istarget alpha*-*-*]
|| [istarget ia64-*-*] } {
|| [istarget ia64-*-*]
|| [check_effective_target_arm32] } {
set et_vect_int_saved 1
}
}
@ -1264,6 +1266,22 @@ proc check_effective_target_arm_neon_hw { } {
} "-mfpu=neon -mfloat-abi=softfp"]
}
# Return 1 if this is a ARM target with NEON enabled.
proc check_effective_target_arm_neon { } {
if { [check_effective_target_arm32] } {
return [check_no_compiler_messages arm_neon object {
#ifndef __ARM_NEON__
#error not NEON
#else
int dummy;
#endif
}]
} else {
return 0
}
}
# Return 1 if this a Loongson-2E or -2F target using an ABI that supports
# the Loongson vector modes.
@ -1395,7 +1413,8 @@ proc check_effective_target_vect_shift { } {
&& ![istarget powerpc-*-linux*paired*])
|| [istarget ia64-*-*]
|| [istarget i?86-*-*]
|| [istarget x86_64-*-*] } {
|| [istarget x86_64-*-*]
|| [check_effective_target_arm32] } {
set et_vect_shift_saved 1
}
}
@ -1414,6 +1433,7 @@ proc check_effective_target_vect_long { } {
&& ![istarget powerpc-*-linux*paired*])
&& [check_effective_target_ilp32])
|| [istarget x86_64-*-*]
|| [check_effective_target_arm32]
|| ([istarget sparc*-*-*] && [check_effective_target_ilp32]) } {
set answer 1
} else {
@ -1440,7 +1460,8 @@ proc check_effective_target_vect_float { } {
|| [istarget spu-*-*]
|| [istarget mipsisa64*-*-*]
|| [istarget x86_64-*-*]
|| [istarget ia64-*-*] } {
|| [istarget ia64-*-*]
|| [check_effective_target_arm32] } {
set et_vect_float_saved 1
}
}
@ -1819,7 +1840,8 @@ proc check_effective_target_vect_no_align { } {
set et_vect_no_align_saved 0
if { [istarget mipsisa64*-*-*]
|| [istarget sparc*-*-*]
|| [istarget ia64-*-*] } {
|| [istarget ia64-*-*]
|| [check_effective_target_arm32] } {
set et_vect_no_align_saved 1
}
}
@ -2008,7 +2030,8 @@ proc check_effective_target_vect_int_mult { } {
if { ([istarget powerpc*-*-*] && ![istarget powerpc-*-linux*paired*])
|| [istarget spu-*-*]
|| [istarget i?86-*-*]
|| [istarget x86_64-*-*] } {
|| [istarget x86_64-*-*]
|| [check_effective_target_arm32] } {
set et_vect_int_mult_saved 1
}
}