1 # Copyright (C) 2006, 2008 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)
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 # This harness is for tests that should be run at all optimisation levels.
21 # Exit immediately if this isn't a x86 target.
22 if { ![istarget i?86*-*-*] && ![istarget x86_64-*-*] } then {
26 set MATH_TORTURE_OPTIONS [list \
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 } \
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 } \
52 load_lib torture-options.exp
55 set-torture-options $MATH_TORTURE_OPTIONS {{}} $LTO_TORTURE_OPTIONS
58 gcc-dg-runtest [lsort [glob $srcdir/$subdir/*.c]] ""