wrap math.h for M_PI et al in target/i386 tests
authorAlexandre Oliva <oliva@adacore.com>
Wed, 7 Aug 2019 06:35:39 +0000 (06:35 +0000)
committerAlexandre Oliva <aoliva@gcc.gnu.org>
Wed, 7 Aug 2019 06:35:39 +0000 (06:35 +0000)
commitb69e0fabc2f58fe29dea74ff87f85a9b9a51bc02
treed818e4b2abdb5bd63c2cd15da08b579bdfb86a47
parent609d9bdeab1365b04b84891e5d75cd86d003c8e2
wrap math.h for M_PI et al in target/i386 tests

Most but not all of the tests that expect M_PI, M_PI_2 and/or M_PI_4
to be defined in math.h explicitly exclude one target system that does
not satisfy this non-standard assumption.

This patch introduces a wrapper header that includes math.h and then
conditionally supplies the missing non-standard macro definitions.
With that, we can drop the dg-skip-if "no M_PI" exclusions.

for  gcc/testsuite/ChangeLog

* gcc.target/i386/math_m_pi.h: New.
* gcc.target/i386/sse4_1-round.h: Use it.
* gcc.target/i386/pr73350.c: Likewise.
* gcc.target/i386/avx512f-vfixupimmpd-2.c: Likewise.
* gcc.target/i386/avx512f-vfixupimmps-2.c: Likewise.
* gcc.target/i386/avx512f-vfixupimmsd-2.c: Likewise.
* gcc.target/i386/avx512f-vfixupimmss-2.c: Likewise.
* gcc.target/i386/avx512f-vfixupimmss-2.c: Likewise.
* gcc.target/i386/avx-ceil-sfix-2-vec.c: Likewise.  Drop
dg-skip-if "no M_PI".
* gcc.target/i386/avx-cvt-2-vec.c: Likewise.
* gcc.target/i386/avx-floor-sfix-2-vec.c: Likewise.
* gcc.target/i386/avx-rint-sfix-2-vec.c: Likewise.
* gcc.target/i386/avx-round-sfix-2-vec.c: Likewise.
* gcc.target/i386/avx512f-ceil-sfix-vec-1.c: Likewise.
* gcc.target/i386/avx512f-ceil-vec-1.c: Likewise.
* gcc.target/i386/avx512f-ceilf-sfix-vec-1.c: Likewise.
* gcc.target/i386/avx512f-ceilf-vec-1.c: Likewise.
* gcc.target/i386/avx512f-floor-sfix-vec-1.c: Likewise.
* gcc.target/i386/avx512f-floor-vec-1.c: Likewise.
* gcc.target/i386/avx512f-floorf-sfix-vec-1.c: Likewise.
* gcc.target/i386/avx512f-floorf-vec-1.c: Likewise.
* gcc.target/i386/avx512f-rint-sfix-vec-1.c: Likewise.
* gcc.target/i386/avx512f-rintf-sfix-vec-1.c: Likewise.
* gcc.target/i386/avx512f-round-sfix-vec-1.c: Likewise.
* gcc.target/i386/avx512f-roundf-sfix-vec-1.c: Likewise.
* gcc.target/i386/avx512f-trunc-vec-1.c: Likewise.
* gcc.target/i386/avx512f-truncf-vec-1.c: Likewise.
* gcc.target/i386/sse2-cvt-vec.c: Likewise.
* gcc.target/i386/sse4_1-ceil-sfix-vec.c: Likewise.
* gcc.target/i386/sse4_1-ceil-vec.c: Likewise.
* gcc.target/i386/sse4_1-ceilf-sfix-vec.c: Likewise.
* gcc.target/i386/sse4_1-ceilf-vec.c: Likewise.
* gcc.target/i386/sse4_1-floor-sfix-vec.c: Likewise.
* gcc.target/i386/sse4_1-floor-vec.c: Likewise.
* gcc.target/i386/sse4_1-floorf-sfix-vec.c: Likewise.
* gcc.target/i386/sse4_1-floorf-vec.c: Likewise.
* gcc.target/i386/sse4_1-rint-sfix-vec.c: Likewise.
* gcc.target/i386/sse4_1-rint-vec.c: Likewise.
* gcc.target/i386/sse4_1-rintf-sfix-vec.c: Likewise.
* gcc.target/i386/sse4_1-rintf-vec.c: Likewise.
* gcc.target/i386/sse4_1-round-sfix-vec.c: Likewise.
* gcc.target/i386/sse4_1-round-vec.c: Likewise.
* gcc.target/i386/sse4_1-roundf-sfix-vec.c: Likewise.
* gcc.target/i386/sse4_1-roundf-vec.c: Likewise.
* gcc.target/i386/sse4_1-roundsd-4.c: Likewise.
* gcc.target/i386/sse4_1-roundss-4.c: Likewise.
* gcc.target/i386/sse4_1-trunc-vec.c: Likewise.
* gcc.target/i386/sse4_1-truncf-vec.c: Likewise.

From-SVN: r274157
79 files changed:
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/avx-ceil-sfix-2-vec.c
gcc/testsuite/gcc.target/i386/avx-ceil-sfix-vec.c
gcc/testsuite/gcc.target/i386/avx-ceil-vec.c
gcc/testsuite/gcc.target/i386/avx-ceilf-sfix-vec.c
gcc/testsuite/gcc.target/i386/avx-ceilf-vec.c
gcc/testsuite/gcc.target/i386/avx-cvt-2-vec.c
gcc/testsuite/gcc.target/i386/avx-cvt-vec.c
gcc/testsuite/gcc.target/i386/avx-floor-sfix-2-vec.c
gcc/testsuite/gcc.target/i386/avx-floor-sfix-vec.c
gcc/testsuite/gcc.target/i386/avx-floor-vec.c
gcc/testsuite/gcc.target/i386/avx-floorf-sfix-vec.c
gcc/testsuite/gcc.target/i386/avx-floorf-vec.c
gcc/testsuite/gcc.target/i386/avx-rint-sfix-2-vec.c
gcc/testsuite/gcc.target/i386/avx-rint-sfix-vec.c
gcc/testsuite/gcc.target/i386/avx-rint-vec.c
gcc/testsuite/gcc.target/i386/avx-rintf-sfix-vec.c
gcc/testsuite/gcc.target/i386/avx-rintf-vec.c
gcc/testsuite/gcc.target/i386/avx-round-sfix-2-vec.c
gcc/testsuite/gcc.target/i386/avx-round-sfix-vec.c
gcc/testsuite/gcc.target/i386/avx-round-vec.c
gcc/testsuite/gcc.target/i386/avx-roundf-sfix-vec.c
gcc/testsuite/gcc.target/i386/avx-roundf-vec.c
gcc/testsuite/gcc.target/i386/avx-trunc-vec.c
gcc/testsuite/gcc.target/i386/avx-truncf-vec.c
gcc/testsuite/gcc.target/i386/avx512f-ceil-sfix-vec-1.c
gcc/testsuite/gcc.target/i386/avx512f-ceil-vec-1.c
gcc/testsuite/gcc.target/i386/avx512f-ceilf-sfix-vec-1.c
gcc/testsuite/gcc.target/i386/avx512f-ceilf-vec-1.c
gcc/testsuite/gcc.target/i386/avx512f-floor-sfix-vec-1.c
gcc/testsuite/gcc.target/i386/avx512f-floor-vec-1.c
gcc/testsuite/gcc.target/i386/avx512f-floorf-sfix-vec-1.c
gcc/testsuite/gcc.target/i386/avx512f-floorf-vec-1.c
gcc/testsuite/gcc.target/i386/avx512f-rint-sfix-vec-1.c
gcc/testsuite/gcc.target/i386/avx512f-rintf-sfix-vec-1.c
gcc/testsuite/gcc.target/i386/avx512f-round-sfix-vec-1.c
gcc/testsuite/gcc.target/i386/avx512f-roundf-sfix-vec-1.c
gcc/testsuite/gcc.target/i386/avx512f-trunc-vec-1.c
gcc/testsuite/gcc.target/i386/avx512f-truncf-vec-1.c
gcc/testsuite/gcc.target/i386/avx512f-vfixupimmpd-2.c
gcc/testsuite/gcc.target/i386/avx512f-vfixupimmps-2.c
gcc/testsuite/gcc.target/i386/avx512f-vfixupimmsd-2.c
gcc/testsuite/gcc.target/i386/avx512f-vfixupimmss-2.c
gcc/testsuite/gcc.target/i386/math_m_pi.h [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr73350.c
gcc/testsuite/gcc.target/i386/sse2-cvt-vec.c
gcc/testsuite/gcc.target/i386/sse4_1-ceil-sfix-vec.c
gcc/testsuite/gcc.target/i386/sse4_1-ceil-vec.c
gcc/testsuite/gcc.target/i386/sse4_1-ceilf-sfix-vec.c
gcc/testsuite/gcc.target/i386/sse4_1-ceilf-vec.c
gcc/testsuite/gcc.target/i386/sse4_1-floor-sfix-vec.c
gcc/testsuite/gcc.target/i386/sse4_1-floor-vec.c
gcc/testsuite/gcc.target/i386/sse4_1-floorf-sfix-vec.c
gcc/testsuite/gcc.target/i386/sse4_1-floorf-vec.c
gcc/testsuite/gcc.target/i386/sse4_1-rint-sfix-vec.c
gcc/testsuite/gcc.target/i386/sse4_1-rint-vec.c
gcc/testsuite/gcc.target/i386/sse4_1-rintf-sfix-vec.c
gcc/testsuite/gcc.target/i386/sse4_1-rintf-vec.c
gcc/testsuite/gcc.target/i386/sse4_1-round-sfix-vec.c
gcc/testsuite/gcc.target/i386/sse4_1-round-vec.c
gcc/testsuite/gcc.target/i386/sse4_1-round.h
gcc/testsuite/gcc.target/i386/sse4_1-roundf-sfix-vec.c
gcc/testsuite/gcc.target/i386/sse4_1-roundf-vec.c
gcc/testsuite/gcc.target/i386/sse4_1-roundpd-1.c
gcc/testsuite/gcc.target/i386/sse4_1-roundpd-2.c
gcc/testsuite/gcc.target/i386/sse4_1-roundpd-3.c
gcc/testsuite/gcc.target/i386/sse4_1-roundps-1.c
gcc/testsuite/gcc.target/i386/sse4_1-roundps-2.c
gcc/testsuite/gcc.target/i386/sse4_1-roundps-3.c
gcc/testsuite/gcc.target/i386/sse4_1-roundsd-1.c
gcc/testsuite/gcc.target/i386/sse4_1-roundsd-2.c
gcc/testsuite/gcc.target/i386/sse4_1-roundsd-3.c
gcc/testsuite/gcc.target/i386/sse4_1-roundsd-4.c
gcc/testsuite/gcc.target/i386/sse4_1-roundss-1.c
gcc/testsuite/gcc.target/i386/sse4_1-roundss-2.c
gcc/testsuite/gcc.target/i386/sse4_1-roundss-3.c
gcc/testsuite/gcc.target/i386/sse4_1-roundss-4.c
gcc/testsuite/gcc.target/i386/sse4_1-trunc-vec.c
gcc/testsuite/gcc.target/i386/sse4_1-truncf-vec.c