1 # Copyright
(C
) 2007-2018 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 arc target.
20 if ![istarget arc
*-*-*] then {
27 #
Return 1 if this is a compiler supporting ARCv2 EM as default processor
28 proc check_effective_target_arcem
{ } {
29 return [check_no_compiler_messages arcem assembly
{
30 #
if !defined
(__ARCEM__
)
36 #
Return 1 if we
compile for ARC700
37 proc check_effective_target_arc700
{ } {
38 return [check_no_compiler_messages arc700 assembly
{
39 #
if !defined
(__ARC700__
)
45 #
Return 1 if we
compile for ARC6xx
46 proc check_effective_target_arc6xx
{ } {
47 return [check_no_compiler_messages arc6xx assembly
{
48 #
if !defined
(__ARC600__
) && !defined
(__ARC601__
)
54 #
Return 1 if we have mpy
55 proc check_effective_target_arcmpy
{ } {
56 return [check_no_compiler_messages arcmpy assembly
{
57 #
if !defined
(__ARC_MPY__
)
63 #
Return 1 if this is a compiler supporting ARC HS as default processor
64 proc check_effective_target_archs
{ } {
65 return [check_no_compiler_messages archs assembly
{
66 #
if !defined
(__ARCHS__
)
72 proc check_cl
{ flags
} {
73 return [check_no_compiler_messages check_$flags assembly
{
75 #error Extra mcpu options
80 #
Return 1 if there are no extra mcpu options given via command line
81 proc check_effective_target_clmcpu
{ } {
82 if { [check_cl
"-mcpu=arc700"]
83 && [check_cl
"-mcpu=arcem" ] } {
89 proc check_effective_target_barrelshifter
{ } {
90 return [check_no_compiler_messages barrelshifter assembly
{
91 #
if !defined
(__ARC_BARREL_SHIFTER__
)
92 #error No barrel shifter
for this confi
97 #
If a testcase doesn
't have special options, use these.
99 if ![info exists DEFAULT_CFLAGS] then {
100 set DEFAULT_CFLAGS " -ansi -pedantic-errors"
107 dg
-runtest
[lsort
[glob
-nocomplain $srcdir
/$subdir
/*.
{\
[cS\
],cpp
}]] \