From patchwork Thu Sep 21 08:32:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Lyon X-Patchwork-Id: 113198 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp1745107qgf; Thu, 21 Sep 2017 01:32:51 -0700 (PDT) X-Received: by 10.84.238.143 with SMTP id v15mr4909042plk.303.1505982771538; Thu, 21 Sep 2017 01:32:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505982771; cv=none; d=google.com; s=arc-20160816; b=yVLMy6flKmDYay7CgjE/DBZg+BR/iXrUKbCyTB82DgZz/EbqAZ9HyVjKaW7GGVBmj3 2HFmBsi8wcXQ+ip6hPEJkaF2zqhrQuZQQUo+YcZN7j3ecoWwbkX3WYeXFJloR/h7z741 AWzwagSYA3glGOMDZFhSlPczaEASkFvI1ZDutPKRrUcSkonheW7vvWgMx29c5ubOGKh6 8DYYnOPrjr0OBhcZnC/WqWXfFZx2TdqNFzd4MuKZeAqwxNnN585XOYq7O2lUM50IX2oY zFYJ7CmBSATDc7FQg+1wGX4h9jHh/JmEcjERFdifiXm62JJ/YUFbQBLBOGYlK91BIu3W dbFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:subject:message-id:date:from:mime-version:delivered-to:sender :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mailing-list:dkim-signature:domainkey-signature :arc-authentication-results; bh=CTgIHBjB9x2u0VONmh8yb1/AM9DO0EtWhDNm8aSgPTk=; b=DWOAn4U9qMzmp1/P8dPvfnko9U5bVWpeSuAXVykboNR0sZVhYjXhYfTUuQKxJYYCGf L7cF1wYD2uhPMVfgD/eDQtG2SEw9srT+gP7nod12gMylanewh2WKUw8ib9dDuIlzTRxI xucUAZ4ceR09Amt+xavh3h4ZUGVf2nKAI5t/5Q993L8dQA5I5y2IdYCxAme2HOm7CS6f /7vgS0YEhGOe5eeJLnNHPZzjEfOME7xXMZ2YZksKtKgh5Y9O1M3akKGrxABTAOkpvj7u JlUrt/wdQ85LhKm4JnVBPmoNGnUcDWFsbtq/7WS4l/k/YL1xDZsgxSPfroGkd+WTvDo7 exMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=Wqm8HU4s; spf=pass (google.com: domain of gcc-patches-return-462675-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-462675-patch=linaro.org@gcc.gnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id d186si674171pfa.285.2017.09.21.01.32.51 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Sep 2017 01:32:51 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-return-462675-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=Wqm8HU4s; spf=pass (google.com: domain of gcc-patches-return-462675-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-462675-patch=linaro.org@gcc.gnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:from:date:message-id:subject:to:content-type; q= dns; s=default; b=MxhOjs7yGh/CgAFx5lsnN4EbFE98hZwbGZMVCecfec0d38 tbb7txS1wPAmlQYsi/V6Fg/vwnzrCHQKo9kZM9eu1SrpzmA58LujGxgj4PKTVaKQ 0VNOc8qnQpka6o7laHREvX0RxLQjS5dERJt6H96fOuLG5Ite2qbXIG5EXXZ0k= 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 :mime-version:from:date:message-id:subject:to:content-type; s= default; bh=z0lZ86V3XHS09GWq54tVq8teLug=; b=Wqm8HU4sHHgAd613cl4Y X+/Kwrrse/XcJ/TzuXtGnFWyVDKALBbfc652YgfyCtMHs5pFRGFww5VOVzT9TAxp YWU5sxCJds8BXZpBK4t9pURmqol7wUx6Yp+Q7bZbg4Rs9SgJkOsv0crnvnveE5L7 W0zzgnT+mpsnWEsnSaXsqH8= Received: (qmail 39412 invoked by alias); 21 Sep 2017 08:32:37 -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 38882 invoked by uid 89); 21 Sep 2017 08:32:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.6 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=ham version=3.3.2 spammy=our X-HELO: mail-vk0-f42.google.com Received: from mail-vk0-f42.google.com (HELO mail-vk0-f42.google.com) (209.85.213.42) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 21 Sep 2017 08:32:34 +0000 Received: by mail-vk0-f42.google.com with SMTP id g68so2678301vki.8 for ; Thu, 21 Sep 2017 01:32:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=9QlkCaZx8GhgTbpCkvBjM/uVzQ2PEz0FItR8XOkr9qs=; b=iz5dZLhgx7rwDXeeXbEn1UerzbQ20Wa4U8eyiIUFlIWkjUGvmwsz2tqZ3uC6zee715 Ew6zfLYB7Ja7UOAdggAHM17BwFp+Bw38XVQnzdvZJlq8AY+GlEdF+tfjZ+br8g1J48ig pg83Uqa/ray9ESlm8Dze2ZK0bZmlBSaZT7wS4eEMkDObJPYaAV6JqDuZvN0TGmBefmuG ZHmBEgGXD24Heho525YSaT76GCib3ou7N1ttb8zYJjYxTFNLdxaEmX+TlDX4hCVKeqdV 29bahERQF4NIPSRzqJii5G6or/0NoMWK5ugcn+aFTqmQaO7q0IQ5qYfMEBy/7+IGA6K5 DSbg== X-Gm-Message-State: AHPjjUhQ5TyHnAU3k9d5KBmDzTw8KWYv8MfN8JrBa39+YfW1rrwuSQvy 3fJHTZiYa1JJ4r8DL7sJLQmj40Y2YfS/1jbKeTK/JdVHBbI= X-Google-Smtp-Source: AOwi7QDOxDFQy4EsIuHhgnpJJeNztes4EcwwUe8SoHs6qj1jlOTQiwxAromXhvawSar4HJDpoY8NVGGq9fsuNxotLS4= X-Received: by 10.31.213.132 with SMTP id m126mr1060067vkg.169.1505982752196; Thu, 21 Sep 2017 01:32:32 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.81.3 with HTTP; Thu, 21 Sep 2017 01:32:31 -0700 (PDT) From: Christophe Lyon Date: Thu, 21 Sep 2017 10:32:31 +0200 Message-ID: Subject: [PATCH] [testsuite, ARM] Backport to GCC 7 branch To: "gcc-patches@gcc.gnu.org" X-IsSubscribed: yes Hi, Can I backport my patch r249639 (Add -mfloat-abi=hard to arm_neon_ok) to the gcc-7 branch ? It fixes a few false failures. It applies cleanly to current trunk, and we have had it in our linaro-7-branch for a while. Thanks. Christophe gcc/ Backport from trunk r249639. 2017-06-26 Christophe Lyon * doc/sourcebuild.texi (ARM-specific attributes): Document new arm_neon_ok_no_float_abi effective target. gcc/testsuite/ Backport from trunk r249639. 2017-06-26 Christophe Lyon * lib/target-supports.exp (check_effective_target_arm_neon_ok_nocache): Add flags with -mfloat-abi=hard. Include arm_neon.h. (check_effective_target_arm_neon_ok_no_float_abi_nocache): New. (check_effective_target_arm_neon_ok_no_float_abi): New. * gcc.target/arm/lto/pr65837_0.c: Require arm_neon_ok_no_float_abi. Add -mfpu=neon to dg-lto-options. * gcc.target/arm/lto/pr65837-attr_0.c: Require arm_neon_ok_no_float_abi. Remove dg-suppress-ld-options. diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi index 84d9a22..c7bb4b7 100644 --- a/gcc/doc/sourcebuild.texi +++ b/gcc/doc/sourcebuild.texi @@ -1570,6 +1570,12 @@ ARM Target supports @code{-mfpu=neon -mfloat-abi=softfp} or compatible options. Some multilibs may be incompatible with these options. +@item arm_neon_ok_no_float_abi +@anchor{arm_neon_ok_no_float_abi} +ARM Target supports NEON with @code{-mfpu=neon}, but without any +-mfloat-abi= option. Some multilibs may be incompatible with this +option. + @item arm_neonv2_ok @anchor{arm_neonv2_ok} ARM Target supports @code{-mfpu=neon-vfpv4 -mfloat-abi=softfp} or compatible diff --git a/gcc/testsuite/gcc.target/arm/lto/pr65837-attr_0.c b/gcc/testsuite/gcc.target/arm/lto/pr65837-attr_0.c index ebc5f44..f00480b 100644 --- a/gcc/testsuite/gcc.target/arm/lto/pr65837-attr_0.c +++ b/gcc/testsuite/gcc.target/arm/lto/pr65837-attr_0.c @@ -1,6 +1,7 @@ /* { dg-lto-do run } */ /* { dg-require-effective-target arm_neon_hw } */ -/* { dg-lto-options {{-flto}} } */ +/* { dg-require-effective-target arm_neon_ok_no_float_abi } */ +/* { dg-lto-options {{-flto -mfpu=neon}} } */ #include "arm_neon.h" diff --git a/gcc/testsuite/gcc.target/arm/lto/pr65837_0.c b/gcc/testsuite/gcc.target/arm/lto/pr65837_0.c index 6b2def9..5d7cea7 100644 --- a/gcc/testsuite/gcc.target/arm/lto/pr65837_0.c +++ b/gcc/testsuite/gcc.target/arm/lto/pr65837_0.c @@ -1,7 +1,7 @@ /* { dg-lto-do run } */ /* { dg-require-effective-target arm_neon_hw } */ +/* { dg-require-effective-target arm_neon_ok_no_float_abi } */ /* { dg-lto-options {{-flto -mfpu=neon}} } */ -/* { dg-suppress-ld-options {-mfpu=neon} } */ #include "arm_neon.h" diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 57caec7..d20e7d3 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -3428,8 +3428,9 @@ global et_arm_neon_flags set et_arm_neon_flags "" if { [check_effective_target_arm32] } { - foreach flags {"" "-mfloat-abi=softfp" "-mfpu=neon" "-mfpu=neon -mfloat-abi=softfp" "-mfpu=neon -mfloat-abi=softfp -march=armv7-a"} { + foreach flags {"" "-mfloat-abi=softfp" "-mfpu=neon" "-mfpu=neon -mfloat-abi=softfp" "-mfpu=neon -mfloat-abi=softfp -march=armv7-a" "-mfloat-abi=hard" "-mfpu=neon -mfloat-abi=hard" "-mfpu=neon -mfloat-abi=hard -march=armv7-a"} { if { [check_no_compiler_messages_nocache arm_neon_ok object { + #include int dummy; #ifndef __ARM_NEON__ #error not NEON @@ -3454,6 +3455,38 @@ check_effective_target_arm_neon_ok_nocache] } +# Return 1 if this is an ARM target supporting -mfpu=neon without any +# -mfloat-abi= option. Useful in tests where add_options is not +# supported (such as lto tests). + +proc check_effective_target_arm_neon_ok_no_float_abi_nocache { } { + if { [check_effective_target_arm32] } { + foreach flags {"-mfpu=neon"} { + if { [check_no_compiler_messages_nocache arm_neon_ok_no_float_abi object { + #include + int dummy; + #ifndef __ARM_NEON__ + #error not NEON + #endif + /* Avoid the case where a test adds -mfpu=neon, but the toolchain is + configured for -mcpu=arm926ej-s, for example. */ + #if __ARM_ARCH < 7 || __ARM_ARCH_PROFILE == 'M' + #error Architecture does not support NEON. + #endif + } "$flags"] } { + return 1 + } + } + } + + return 0 +} + +proc check_effective_target_arm_neon_ok_no_float_abi { } { + return [check_cached_effective_target arm_neon_ok_no_float_abi \ + check_effective_target_arm_neon_ok_no_float_abi_nocache] +} + proc check_effective_target_arm_crc_ok_nocache { } { global et_arm_crc_flags set et_arm_crc_flags "-march=armv8-a+crc"