]>
Commit | Line | Data |
---|---|---|
8d9254fc | 1 | # Copyright (C) 1997-2020 Free Software Foundation, Inc. |
de7b5723 AV |
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 for ARMv8-M Security Extensions using the `dg.exp' driver. | |
18 | ||
19 | # Load support procs. | |
20 | load_lib gcc-dg.exp | |
21 | ||
22 | # Exit immediately if the target does not support -mcmse. | |
23 | if ![check_effective_target_arm_cmse_ok] then { | |
24 | return | |
25 | } | |
26 | ||
27 | # If a testcase doesn't have special options, use these. | |
28 | global DEFAULT_CFLAGS | |
29 | if ![info exists DEFAULT_CFLAGS] then { | |
30 | set DEFAULT_CFLAGS " -ansi -pedantic-errors" | |
31 | } | |
32 | ||
33 | # Initialize `dg'. | |
34 | dg-init | |
35 | ||
36 | set saved-dg-do-what-default ${dg-do-what-default} | |
37 | set dg-do-what-default "assemble" | |
38 | ||
39 | set saved-lto_torture_options ${LTO_TORTURE_OPTIONS} | |
40 | set LTO_TORTURE_OPTIONS "" | |
41 | ||
42 | # These are for both baseline and mainline. | |
43 | gcc-dg-runtest [lsort [glob $srcdir/$subdir/*.c]] \ | |
44 | "" $DEFAULT_CFLAGS | |
45 | ||
de954d6a AV |
46 | if {[check_effective_target_arm_arch_v8m_base_ok]} then { |
47 | # Baseline only | |
cdee9e6b | 48 | set BASELINE_FLAGS [add_options_for_arm_arch_v8m_base ""] |
de954d6a | 49 | gcc-dg-runtest [lsort [glob $srcdir/$subdir/baseline/*.c]] \ |
cdee9e6b | 50 | "$BASELINE_FLAGS" $DEFAULT_CFLAGS |
de954d6a AV |
51 | } |
52 | ||
53 | if {[check_effective_target_arm_arch_v8m_main_ok]} then { | |
cdee9e6b | 54 | set MAINLINE_FLAGS [add_options_for_arm_arch_v8m_main ""] |
c92e08e3 | 55 | gcc-dg-runtest [lsort [glob $srcdir/$subdir/mainline/*.c]] \ |
cdee9e6b | 56 | "$MAINLINE_FLAGS" $DEFAULT_CFLAGS |
de954d6a AV |
57 | # Mainline -mfloat-abi=soft |
58 | gcc-dg-runtest [lsort [glob $srcdir/$subdir/mainline/soft/*.c]] \ | |
cdee9e6b | 59 | "$MAINLINE_FLAGS -mfloat-abi=soft" $DEFAULT_CFLAGS |
de954d6a | 60 | gcc-dg-runtest [lsort [glob $srcdir/$subdir/mainline/softfp/*.c]] \ |
cdee9e6b | 61 | "$MAINLINE_FLAGS" $DEFAULT_CFLAGS |
de954d6a | 62 | gcc-dg-runtest [lsort [glob $srcdir/$subdir/mainline/softfp-sp/*.c]] \ |
cdee9e6b | 63 | "$MAINLINE_FLAGS" $DEFAULT_CFLAGS |
de954d6a | 64 | gcc-dg-runtest [lsort [glob $srcdir/$subdir/mainline/hard/*.c]] \ |
cdee9e6b | 65 | "$MAINLINE_FLAGS" $DEFAULT_CFLAGS |
de954d6a | 66 | gcc-dg-runtest [lsort [glob $srcdir/$subdir/mainline/hard-sp/*.c]] \ |
cdee9e6b | 67 | "$MAINLINE_FLAGS" $DEFAULT_CFLAGS |
de954d6a AV |
68 | } |
69 | ||
de7b5723 AV |
70 | set LTO_TORTURE_OPTIONS ${saved-lto_torture_options} |
71 | set dg-do-what-default ${saved-dg-do-what-default} | |
72 | ||
73 | # All done. | |
74 | dg-finish |