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
+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
/* 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"
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"
}]
}
+# 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.