Regression cleanup for MIPS nan2008 toolchain.
authorrts <rts@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 28 Jan 2015 09:22:20 +0000 (09:22 +0000)
committerrts <rts@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 28 Jan 2015 09:22:20 +0000 (09:22 +0000)
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@220199 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/mips/loongson-simd.c
gcc/testsuite/gcc.target/mips/mips.exp
gcc/testsuite/lib/target-supports.exp

index 12c1c57..08d6ec0 100644 (file)
@@ -1,3 +1,10 @@
+2015-01-28  Robert Suchanek  <robert.suchanek@imgtec.com>
+
+       * 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  <jakub@redhat.com>
 
        PR bootstrap/64612
index 160da6b..949632e 100644 (file)
@@ -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"
index b81d344..a0980a9 100644 (file)
@@ -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"
index 2cc8c21..cb8a613 100644 (file)
@@ -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 <stdlib.h>
+       int main () { return 0; }
+    } "-mnan=legacy"]
+}
+
 # Return 1 if this is an ARM target that adheres to the ABI for the ARM
 # Architecture.