]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.target/i386/math-torture/math-torture.exp
ABOUT-GCC-NLS, [...]: Add copyright and license notices.
[thirdparty/gcc.git] / gcc / testsuite / gcc.target / i386 / math-torture / math-torture.exp
1 # Copyright (C) 2006, 2008 Free Software Foundation, Inc.
2 #
3 # This file is part of GCC.
4 #
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.
9 #
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.
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 # This harness is for tests that should be run at all optimisation levels.
20
21 # Exit immediately if this isn't a x86 target.
22 if { ![istarget i?86*-*-*] && ![istarget x86_64-*-*] } then {
23 return
24 }
25
26 set MATH_TORTURE_OPTIONS [list \
27 { -O0 } \
28 { -O0 -mfpmath=387 } \
29 { -O0 -msse -mno-sse2 -mfpmath=sse } \
30 { -O0 -msse -msse2 -mfpmath=sse } \
31 { -O0 -msse -mno-sse2 -mfpmath=sse,387 } \
32 { -O0 -msse -msse2 -mfpmath=sse,387 } \
33 { -O0 -mfpmath=387 -ffast-math } \
34 { -O0 -msse -mno-sse2 -mfpmath=sse -ffast-math } \
35 { -O0 -msse -msse2 -mfpmath=sse -ffast-math } \
36 { -O0 -msse -mno-sse2 -mfpmath=sse,387 -ffast-math } \
37 { -O0 -msse -msse2 -mfpmath=sse,387 -ffast-math } \
38 { -O2 } \
39 { -O2 -mfpmath=387 } \
40 { -O2 -msse -mno-sse2 -mfpmath=sse } \
41 { -O2 -msse -msse2 -mfpmath=sse } \
42 { -O2 -msse -mno-sse2 -mfpmath=sse,387 } \
43 { -O2 -msse -msse2 -mfpmath=sse,387 } \
44 { -O2 -mfpmath=387 -ffast-math } \
45 { -O2 -msse -mno-sse2 -mfpmath=sse -ffast-math } \
46 { -O2 -msse -msse2 -mfpmath=sse -ffast-math } \
47 { -O2 -msse -mno-sse2 -mfpmath=sse,387 -ffast-math } \
48 { -O2 -msse -msse2 -mfpmath=sse,387 -ffast-math } \
49 ]
50
51 load_lib gcc-dg.exp
52 load_lib torture-options.exp
53
54 torture-init
55 set-torture-options $MATH_TORTURE_OPTIONS
56
57 dg-init
58 gcc-dg-runtest [lsort [glob $srcdir/$subdir/*.c]] ""
59 torture-finish
60 dg-finish