| 1 |
# GCC testsuite for C-SKY targets FPUV3 instructions. |
| 2 |
# Copyright (C) 2012-2025 Free Software Foundation, Inc. |
| 3 |
# Contributed by C-SKY Microsystems and Mentor Graphics. |
| 4 |
# |
| 5 |
# This program 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 of the License, or |
| 8 |
# (at your option) any later version. |
| 9 |
# |
| 10 |
# This program 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. |
| 14 |
# |
| 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/>. |
| 18 |
|
| 19 |
|
| 20 |
# Exit immediately if this isn't a csky target. |
| 21 |
if { ![istarget csky*-*-*]} then { |
| 22 |
return |
| 23 |
} |
| 24 |
|
| 25 |
set cflags [board_info target cflags] |
| 26 |
if { [string first "ck6" "${cflags}"] >= 0 } { |
| 27 |
verbose "the test is not support " |
| 28 |
return |
| 29 |
} |
| 30 |
if { [string first "ck5" "${cflags}"] >= 0 } { |
| 31 |
verbose "the test is not support " |
| 32 |
return |
| 33 |
} |
| 34 |
|
| 35 |
# Load support procs. |
| 36 |
load_lib gcc-dg.exp |
| 37 |
|
| 38 |
global DEFAULT_CFLAGS |
| 39 |
if ![info exists DEFAULT_CFLAGS] then { |
| 40 |
set DEFAULT_CFLAGS "" |
| 41 |
} |
| 42 |
|
| 43 |
# Initialize `dg'. |
| 44 |
dg-init |
| 45 |
|
| 46 |
# Main loop. |
| 47 |
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cCS\]]] \ |
| 48 |
"" $DEFAULT_CFLAGS |
| 49 |
|
| 50 |
# All done. |
| 51 |
dg-finish |