RE: [PATCH MIPS RFA] Regression cleanup for nan2008 toolchain
2015-02-02 Robert Suchanek robert.sucha...@imgtec.com * gcc.target/mips/loongson-simd.c: Update comment to clarify the need for mips_nanlegacy target. diff --git a/gcc/testsuite/gcc.target/mips/loongson-simd.c b/gcc/testsuite/gcc.target/mips/loongson-simd.c index 949632e..9c3ebce 100644 --- a/gcc/testsuite/gcc.target/mips/loongson-simd.c +++ b/gcc/testsuite/gcc.target/mips/loongson-simd.c @@ -21,7 +21,10 @@ along with GCC; see the file COPYING3. If not see /* { dg-do run } */ /* 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. */ + that the Loongson processors do not support either. The effective target + mips_nanlegacy is required for a toolchain without the legacy NaN support + because inclusion of some system headers e.g. stdint.h will fail due to not + finding stubs-o32_hard.h. */ /* { dg-require-effective-target mips_nanlegacy } */ /* { dg-options isa=loongson -mhard-float -mno-micromips -mno-mips16 - flax-vector-conversions } */ Thanks for the update. This is OK. Catherine Committed as r220393. Thanks and regards, Robert
RE: [PATCH MIPS RFA] Regression cleanup for nan2008 toolchain
-Original Message- From: Robert Suchanek [mailto:robert.sucha...@imgtec.com] Sent: Monday, February 02, 2015 11:18 AM To: Richard Sandiford Cc: gcc-patches@gcc.gnu.org; Matthew Fortune; Moore, Catherine Subject: RE: [PATCH MIPS RFA] Regression cleanup for nan2008 toolchain Please could you add a comment explaining that the mips_nanlegacy is there because of the #include of system headers that might not compile with -mnan=legacy? I agree that that's a good reason, but it's not obvious without a comment. (And without a comment this could start a precendent of things being skipped in cases where the mips.exp options machinery could be updated instead.) True. Clarification added. Ok for trunk? Regards, Robert 2015-02-02 Robert Suchanek robert.sucha...@imgtec.com * gcc.target/mips/loongson-simd.c: Update comment to clarify the need for mips_nanlegacy target. diff --git a/gcc/testsuite/gcc.target/mips/loongson-simd.c b/gcc/testsuite/gcc.target/mips/loongson-simd.c index 949632e..9c3ebce 100644 --- a/gcc/testsuite/gcc.target/mips/loongson-simd.c +++ b/gcc/testsuite/gcc.target/mips/loongson-simd.c @@ -21,7 +21,10 @@ along with GCC; see the file COPYING3. If not see /* { dg-do run } */ /* 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. */ + that the Loongson processors do not support either. The effective target + mips_nanlegacy is required for a toolchain without the legacy NaN support + because inclusion of some system headers e.g. stdint.h will fail due to not + finding stubs-o32_hard.h. */ /* { dg-require-effective-target mips_nanlegacy } */ /* { dg-options isa=loongson -mhard-float -mno-micromips -mno-mips16 - flax-vector-conversions } */ Thanks for the update. This is OK. Catherine
RE: [PATCH MIPS RFA] Regression cleanup for nan2008 toolchain
Please could you add a comment explaining that the mips_nanlegacy is there because of the #include of system headers that might not compile with -mnan=legacy? I agree that that's a good reason, but it's not obvious without a comment. (And without a comment this could start a precendent of things being skipped in cases where the mips.exp options machinery could be updated instead.) True. Clarification added. Ok for trunk? Regards, Robert 2015-02-02 Robert Suchanek robert.sucha...@imgtec.com * gcc.target/mips/loongson-simd.c: Update comment to clarify the need for mips_nanlegacy target. diff --git a/gcc/testsuite/gcc.target/mips/loongson-simd.c b/gcc/testsuite/gcc.target/mips/loongson-simd.c index 949632e..9c3ebce 100644 --- a/gcc/testsuite/gcc.target/mips/loongson-simd.c +++ b/gcc/testsuite/gcc.target/mips/loongson-simd.c @@ -21,7 +21,10 @@ along with GCC; see the file COPYING3. If not see /* { dg-do run } */ /* 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. */ + that the Loongson processors do not support either. The effective target + mips_nanlegacy is required for a toolchain without the legacy NaN support + because inclusion of some system headers e.g. stdint.h will fail due to not + finding stubs-o32_hard.h. */ /* { dg-require-effective-target mips_nanlegacy } */ /* { dg-options isa=loongson -mhard-float -mno-micromips -mno-mips16 -flax-vector-conversions } */
Re: [PATCH MIPS RFA] Regression cleanup for nan2008 toolchain
Robert Suchanek robert.sucha...@imgtec.com writes: diff --git a/gcc/testsuite/gcc.target/mips/loongson-simd.c b/gcc/testsuite/gcc.target/mips/loongson-simd.c index 160da6b..949632e 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 } */ Nit, but this splits the dg-options from the comment that explains the options. Please could you add a comment explaining that the mips_nanlegacy is there because of the #include of system headers that might not compile with -mnan=legacy? I agree that that's a good reason, but it's not obvious without a comment. (And without a comment this could start a precendent of things being skipped in cases where the mips.exp options machinery could be updated instead.) Thanks, Richard
RE: [PATCH MIPS RFA] Regression cleanup for nan2008 toolchain
2015-01-26 Robert Suchanek robert.sucha...@imgtec.com 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. --- This patch is OK. Committed as 220199. Regards, Robert
RE: [PATCH MIPS RFA] Regression cleanup for nan2008 toolchain
-Original Message- From: Robert Suchanek [mailto:robert.sucha...@imgtec.com] Sent: Monday, January 26, 2015 6:48 AM To: gcc-patches@gcc.gnu.org Cc: Matthew Fortune; Moore, Catherine Subject: [PATCH MIPS RFA] Regression cleanup for nan2008 toolchain Hi, Here is a patch to clean up a large number of reported failures when a toolchain is configured with --with-nan=2008 for mips*-linux-gnu triplet and clean up a failures for mips-img-linux-gnu where nan2008 is set by the default. In the former case, regression involves testing e.g. -mips4 with default options which causes emission of warnings that the -mips4 architecture does not support nan2008, and hence, the test is classified as a fail (test for excess errors type of error). The patch implies -mnan=legacy switch for all tests that are run for ISA rev 2. In the latter case, even if we decrease the ISA level for incompatible options for the loongson vector extension tests, especially loongson-simd.c, a test that includes stdint.h or stdlib.h will end up including the glibc header 'stubs-abi.h' and will fail as the mipsr6 toolchain will only have stubs-o32_hard_2008.h. A toolchain supporting nan1985 will have the required stubs-o32_hard.h. The only neat solution AFAICS was to add a new effective target that tries to compile and include stdlib.h to check if we have the proper support for the legacy NaN marking the concerned tests as UNSUPPORTED. Regards, Robert 2015-01-26 Robert Suchanek robert.sucha...@imgtec.com 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. --- This patch is OK.
[PATCH MIPS RFA] Regression cleanup for nan2008 toolchain
Hi, Here is a patch to clean up a large number of reported failures when a toolchain is configured with --with-nan=2008 for mips*-linux-gnu triplet and clean up a failures for mips-img-linux-gnu where nan2008 is set by the default. In the former case, regression involves testing e.g. -mips4 with default options which causes emission of warnings that the -mips4 architecture does not support nan2008, and hence, the test is classified as a fail (test for excess errors type of error). The patch implies -mnan=legacy switch for all tests that are run for ISA rev 2. In the latter case, even if we decrease the ISA level for incompatible options for the loongson vector extension tests, especially loongson-simd.c, a test that includes stdint.h or stdlib.h will end up including the glibc header 'stubs-abi.h' and will fail as the mipsr6 toolchain will only have stubs-o32_hard_2008.h. A toolchain supporting nan1985 will have the required stubs-o32_hard.h. The only neat solution AFAICS was to add a new effective target that tries to compile and include stdlib.h to check if we have the proper support for the legacy NaN marking the concerned tests as UNSUPPORTED. Regards, Robert 2015-01-26 Robert Suchanek robert.sucha...@imgtec.com 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. --- gcc/testsuite/gcc.target/mips/loongson-simd.c |1 + gcc/testsuite/gcc.target/mips/mips.exp|1 + gcc/testsuite/lib/target-supports.exp |9 + 3 files changed, 11 insertions(+) diff --git a/gcc/testsuite/gcc.target/mips/loongson-simd.c b/gcc/testsuite/gcc.target/mips/loongson-simd.c index 160da6b..949632e 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 b81d344..a0980a9 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 e51d07d..de2f599 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 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. -- 1.7.9.5