Normalize interface for all *-dg-runtest.
[official-gcc.git] / gcc / testsuite / gcc.target / frv / frv.exp
blob61d8ad5e0f59df3bbde311ccc51df6edbccb12c5
1 # Copyright (C) 2004-2014 Free Software Foundation, Inc.
3 # This file is part of GCC.
5 # GCC is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 3, or (at your option)
8 # any later version.
10 # GCC is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with GCC; see the file COPYING3. If not see
17 # <http://www.gnu.org/licenses/>.
19 # The name of each test starts with the architecture it requires. Tests that
20 # work on all variants start with "all".
22 if {![istarget frv-*-*]} {
23 return 0
26 load_lib gcc-dg.exp
28 # Find out which architecture is used by default.
29 set mainarch "fr500"
30 foreach flag [target_info multilib_flags] {
31 regexp "^-mcpu=(.*)" $flag dummy mainarch
32 if {$flag == "-mno-pack"} {
33 # -mno-pack disables media intrinsics.
34 return 0
38 # Set $archs to "all" plus the list of architectures we can test.
39 set archs [list "all" $mainarch]
40 switch $mainarch {
41 fr405 { lappend archs fr400 }
42 fr450 { lappend archs fr405 fr400 }
45 # Set $files to the list of files we can test.
46 set files ""
47 foreach arch $archs {
48 lappend files [lsort [glob -nocomplain $srcdir/$subdir/${arch}*.c]]
51 dg-init
52 gcc-dg-runtest [eval concat $files] "" ""
53 dg-finish