Rebase.
[official-gcc.git] / gcc / testsuite / gcc.target / aarch64 / aapcs64 / aapcs64.exp
blobfdfbff103ad6f2cad0cf6dc73dbfed0dfd9dde54
1 # Copyright (C) 2009-2014 Free Software Foundation, Inc.
2 # Contributed by ARM Ltd.
4 # This file is part of GCC.
6 # GCC is free software; you can redistribute it and/or modify it
7 # under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 3, or (at your option)
9 # any later version.
11 # GCC is distributed in the hope that it will be useful, but
12 # WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 # General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with GCC; see the file COPYING3. If not see
18 # <http://www.gnu.org/licenses/>. */
20 load_lib c-torture.exp
21 load_lib target-supports.exp
22 load_lib torture-options.exp
24 if { ![istarget aarch64*-*-*] } then {
25 return
28 torture-init
29 set-torture-options $C_TORTURE_OPTIONS
30 set additional_flags "-W -Wall -Wno-abi"
32 # Test parameter passing.
33 foreach src [lsort [glob -nocomplain $srcdir/$subdir/test_*.c]] {
34 if {[runtest_file_p $runtests $src]} {
35 c-torture-execute [list $src \
36 $srcdir/$subdir/abitest.S] \
37 $additional_flags
41 # Test unnamed argument retrieval via the va_arg macro.
42 foreach src [lsort [glob -nocomplain $srcdir/$subdir/va_arg-*.c]] {
43 if {[runtest_file_p $runtests $src]} {
44 c-torture-execute [list $src \
45 $srcdir/$subdir/abitest.S] \
46 $additional_flags
50 # Test function return value.
51 # Disable -fuse-caller-save to prevent the compiler from generating
52 # conflicting code.
53 set additional_flags_for_func_ret $additional_flags
54 append additional_flags_for_func_ret " -fno-use-caller-save"
55 foreach src [lsort [glob -nocomplain $srcdir/$subdir/func-ret-*.c]] {
56 if {[runtest_file_p $runtests $src]} {
57 c-torture-execute [list $src \
58 $srcdir/$subdir/abitest.S] \
59 $additional_flags_for_func_ret
63 # Test no internal compiler errors.
64 foreach src [lsort [glob -nocomplain $srcdir/$subdir/ice_*.c]] {
65 if {[runtest_file_p $runtests $src]} {
66 c-torture [list $src] \
67 $additional_flags
71 torture-finish