1 # Copyright
(C
) 2014-2024 Free Software Foundation
, Inc.
3 # This
program is free software
; you can redistribute it and
/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation
; either version
3 of the License
, or
6 #
(at your option
) any later version.
8 # This
program is distributed in the hope that it will be useful
,
9 # but WITHOUT
ANY WARRANTY
; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License
for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with GCC
; see the file COPYING3.
If not see
15 #
<http
://www.gnu.org
/licenses
/>.
17 # GCC testsuite that uses the `dg.exp
' driver.
19 # Exit immediately if this isn't an ARM or AArch64 target.
20 if {![istarget arm
*-*-*]
21 && ![istarget aarch64
*-*-*]} then {
29 load_lib c-torture.exp
33 # The default action for a test is 'run
'. Save current default.
34 global dg-do-what-default
35 set save-dg-do-what-default ${dg-do-what-default}
37 # For ARM, make sure that we have a target compatible with NEON, and do
38 # not attempt to run execution tests if the hardware doesn't support it.
39 if {[istarget arm
*-*-*]} then {
40 if {![check_effective_target_arm_neon_ok
]} then {
43 if {![is
-effective
-target arm_neon_hw
]} then {
44 set dg
-do-what
-default
compile
46 set dg
-do-what
-default run
49 set dg
-do-what
-default run
53 set-torture
-options $C_TORTURE_OPTIONS
{{}} $LTO_TORTURE_OPTIONS
55 # Make sure Neon flags are provided
, if necessary. Use fp16
if we can.
56 # Use fp16 arithmetic operations
if the hardware supports it.
57 if {[check_effective_target_arm_v8_2a_fp16_neon_hw
]} then {
58 set additional_flags
[add_options_for_arm_v8_2a_fp16_neon
""]
59 } elseif
{[check_effective_target_arm_neon_fp16_ok
]} then {
60 set additional_flags
[add_options_for_arm_neon_fp16
""]
62 set additional_flags
[add_options_for_arm_neon
""]
66 gcc
-dg
-runtest
[lsort
[glob
-nocomplain $srcdir
/$subdir
/*.c
]] \
67 "" ${additional_flags}
70 set dg
-do-what
-default $
{save
-dg
-do-what
-default
}