]>
Commit | Line | Data |
---|---|---|
fbd26352 | 1 | # Copyright (C) 2014-2019 Free Software Foundation, Inc. |
7138832a | 2 | |
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. | |
7 | # | |
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. | |
12 | # | |
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/>. | |
16 | ||
17 | # GCC testsuite that uses the `dg.exp' driver. | |
18 | ||
19 | # Exit immediately if this isn't an ARM or AArch64 target. | |
20 | if {![istarget arm*-*-*] | |
21 | && ![istarget aarch64*-*-*]} then { | |
22 | return | |
23 | } | |
24 | ||
25 | # Load support procs. | |
26 | load_lib gcc-dg.exp | |
27 | ||
28 | # Initialize `dg'. | |
29 | load_lib c-torture.exp | |
7138832a | 30 | |
31 | dg-init | |
32 | ||
33bd76b5 | 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} | |
33bd76b5 | 36 | |
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 { | |
41 | return | |
42 | } | |
43 | if {![is-effective-target arm_neon_hw]} then { | |
44 | set dg-do-what-default compile | |
e81ad0db | 45 | } else { |
46 | set dg-do-what-default run | |
33bd76b5 | 47 | } |
e81ad0db | 48 | } else { |
49 | set dg-do-what-default run | |
388a5b26 | 50 | } |
51 | ||
cf8ffb1d | 52 | torture-init |
7138832a | 53 | set-torture-options $C_TORTURE_OPTIONS {{}} $LTO_TORTURE_OPTIONS |
54 | ||
dbebdfff | 55 | # Make sure Neon flags are provided, if necessary. Use fp16 if we can. |
5f4626d8 | 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 { | |
dbebdfff | 60 | set additional_flags [add_options_for_arm_neon_fp16 ""] |
61 | } else { | |
62 | set additional_flags [add_options_for_arm_neon ""] | |
63 | } | |
7138832a | 64 | |
65 | # Main loop. | |
764e5294 | 66 | gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.c]] \ |
67 | "" ${additional_flags} | |
7138832a | 68 | |
69 | # All done. | |
33bd76b5 | 70 | set dg-do-what-default ${save-dg-do-what-default} |
cf8ffb1d | 71 | torture-finish |
7138832a | 72 | dg-finish |