From patchwork Mon Jan 26 11:48:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Suchanek X-Patchwork-Id: 432728 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id DFB4014015A for ; Mon, 26 Jan 2015 22:48:45 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:content-type :content-transfer-encoding:mime-version; q=dns; s=default; b=gqO RQpI/uFmDlzGV9c0tyydXkFgo5idWPTU0HFnCfD3rtCeUZFOcL7k40EiGbnhj1R8 svTYKT3QUEBjHqgQ8BNRgKAiJtnhlALHI0YXox3OW9WjKr6hICl/HS40fvM4ZCjb TLMSlV+fI2pBGdVVmtwU9BStfk4LAW8depdy8SAY= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:content-type :content-transfer-encoding:mime-version; s=default; bh=UpUOrx8H6 DRei/ryYkl3gFqS0o8=; b=AwtU5lcq1YKWjIdmCdHxQPa53Jo33QYUwkiMbX+L9 1ObivqC3bAsPIzZTnRXXg1CshPGks/fjeuJ40HD/TQMagrs8Gz/UN/oKDiXKXket U0qGhL3gGHkHRRmNnoi5YL77VAgIvJt0YR/AJ+PObiSTw8wRUoImeKOuryYz+5wX 3o= Received: (qmail 24742 invoked by alias); 26 Jan 2015 11:48:38 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 24710 invoked by uid 89); 26 Jan 2015 11:48:34 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-0.0 required=5.0 tests=SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mailapp01.imgtec.com Received: from mailapp01.imgtec.com (HELO mailapp01.imgtec.com) (195.59.15.196) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 26 Jan 2015 11:48:32 +0000 Received: from KLMAIL01.kl.imgtec.org (unknown [192.168.5.35]) by Websense Email Security Gateway with ESMTPS id E1C92D48208D7; Mon, 26 Jan 2015 11:48:27 +0000 (GMT) Received: from hhmail02.hh.imgtec.org (10.100.10.20) by KLMAIL01.kl.imgtec.org (192.168.5.35) with Microsoft SMTP Server (TLS) id 14.3.195.1; Mon, 26 Jan 2015 11:48:29 +0000 Received: from hhmail02.hh.imgtec.org ([::1]) by hhmail02.hh.imgtec.org ([::1]) with mapi id 14.03.0224.002; Mon, 26 Jan 2015 11:48:29 +0000 From: Robert Suchanek To: "gcc-patches@gcc.gnu.org" CC: Matthew Fortune , "Catherine_Moore@mentor.com" Subject: [PATCH MIPS RFA] Regression cleanup for nan2008 toolchain Date: Mon, 26 Jan 2015 11:48:28 +0000 Message-ID: MIME-Version: 1.0 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-.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 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 + int main () { return 0; } + } "-mnan=legacy"] +} + # Return 1 if this is an ARM target that adheres to the ABI for the ARM # Architecture.