From 6b18ab83aa0c84b8f4dc6d457511c6e19c409bb1 Mon Sep 17 00:00:00 2001 From: Robert Suchanek Date: Wed, 28 Jan 2015 09:22:20 +0000 Subject: [PATCH] Regression cleanup for MIPS nan2008 toolchain. gcc/testsuite/ * lib/target-supports.exp (check_effective_target_mips_nanlegacy): New. * gcc.target/mips/loongson-simd.c: Require legacy NaN support. * gcc.target/mips/mips.exp (mips-dg-options): Imply -mnan=legacy for ISA rev < 2. From-SVN: r220199 --- gcc/testsuite/ChangeLog | 7 +++++++ gcc/testsuite/gcc.target/mips/loongson-simd.c | 1 + gcc/testsuite/gcc.target/mips/mips.exp | 1 + gcc/testsuite/lib/target-supports.exp | 9 +++++++++ 4 files changed, 18 insertions(+) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 12c1c57d65d..08d6ec01268 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2015-01-28 Robert Suchanek + + * lib/target-supports.exp (check_effective_target_mips_nanlegacy): New. + * gcc.target/mips/loongson-simd.c: Require legacy NaN support. + * gcc.target/mips/mips.exp (mips-dg-options): Imply -mnan=legacy for + ISA rev < 2. + 2015-01-28 Jakub Jelinek PR bootstrap/64612 diff --git a/gcc/testsuite/gcc.target/mips/loongson-simd.c b/gcc/testsuite/gcc.target/mips/loongson-simd.c index 160da6be4d1..949632e3cad 100644 --- a/gcc/testsuite/gcc.target/mips/loongson-simd.c +++ b/gcc/testsuite/gcc.target/mips/loongson-simd.c @@ -22,6 +22,7 @@ along with GCC; see the file COPYING3. If not see /* loongson.h does not handle or check for MIPS16ness or microMIPSness. There doesn't seem any good reason for it to, given that the Loongson processors do not support either. */ +/* { dg-require-effective-target mips_nanlegacy } */ /* { dg-options "isa=loongson -mhard-float -mno-micromips -mno-mips16 -flax-vector-conversions" } */ #include "loongson.h" diff --git a/gcc/testsuite/gcc.target/mips/mips.exp b/gcc/testsuite/gcc.target/mips/mips.exp index b81d344e42a..a0980a90d05 100644 --- a/gcc/testsuite/gcc.target/mips/mips.exp +++ b/gcc/testsuite/gcc.target/mips/mips.exp @@ -1300,6 +1300,7 @@ proc mips-dg-options { args } { mips_make_test_option options "-mno-dsp" mips_make_test_option options "-mno-synci" mips_make_test_option options "-mno-micromips" + mips_make_test_option options "-mnan=legacy" } if { $isa_rev > 5 } { mips_make_test_option options "-mno-dsp" diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 2cc8c219dc6..cb8a6132559 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -3036,6 +3036,15 @@ proc check_effective_target_mips_loongson { } { }] } +# Return 1 if this is a MIPS target that supports the legacy NAN. + +proc check_effective_target_mips_nanlegacy { } { + return [check_no_compiler_messages nanlegacy assembly { + #include + int main () { return 0; } + } "-mnan=legacy"] +} + # Return 1 if this is an ARM target that adheres to the ABI for the ARM # Architecture. -- 2.30.2