From patchwork Fri Dec 9 16:55:42 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Preudhomme X-Patchwork-Id: 87528 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp407892qgi; Fri, 9 Dec 2016 08:56:15 -0800 (PST) X-Received: by 10.84.213.144 with SMTP id g16mr159083757pli.134.1481302574938; Fri, 09 Dec 2016 08:56:14 -0800 (PST) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id i4si34683377pfi.67.2016.12.09.08.56.14 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Dec 2016 08:56:14 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-return-444034-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; spf=pass (google.com: domain of gcc-patches-return-444034-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-444034-patch=linaro.org@gcc.gnu.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type; q=dns; s=default; b=l5Phcbn2qIQngSPQV Onl5x8qhgof3YP3veUKNDEOtTUSkbVVi0w361nk50YbSQ9SNQSuyj5vvcEu0FJVT IdCAZoap/XqRyKQ/0S1fP6ftJa7W1kyxeHK5duq7UFUkf//tw0LrXe6AWugJUJET HnxYq8RqzWKu1sxAawesqnR43w= 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 :subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type; s=default; bh=uSM+Se6ijtcPjqHQhexizxY yxJI=; b=XztBRjtcBD9xk4hY3gqe0SgnTCo3Yyxik3eGUeIq+pqYCGc7O3szPVa CNDoXC0eUWPkO3+nLm/mWivQ1oEzaliBlnO1EPGN9vj/LP0YT2r29BSSmZa8zkI8 zMkxlQ5oVeh8inM5ll/Q9V0o6SdF9h1tAisKZYXZIwKRQ7iS7Xlk= Received: (qmail 84848 invoked by alias); 9 Dec 2016 16:55:56 -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 84829 invoked by uid 89); 9 Dec 2016 16:55:56 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.9 required=5.0 tests=BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=H*i:sk:584AD04, H*f:sk:584AD04, Christophe, H*MI:sk:584AD04 X-HELO: foss.arm.com Received: from foss.arm.com (HELO foss.arm.com) (217.140.101.70) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 09 Dec 2016 16:55:46 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 4370BAD7; Fri, 9 Dec 2016 08:55:44 -0800 (PST) Received: from [10.2.206.52] (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 844903F445; Fri, 9 Dec 2016 08:55:43 -0800 (PST) Subject: Re: [PATCH, GCC/testsuite/ARM] Fix empty_fiq_handler target selector To: Kyrill Tkachov , Ramana Radhakrishnan , Richard Earnshaw , "gcc-patches@gcc.gnu.org" References: <477e3617-d4d3-1381-fb17-9b205dd7e670@foss.arm.com> <584AD041.4000602@foss.arm.com> From: Thomas Preudhomme Message-ID: <9f82dde0-c3b1-9b95-0f93-07b1a9c13454@foss.arm.com> Date: Fri, 9 Dec 2016 16:55:42 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <584AD041.4000602@foss.arm.com> X-IsSubscribed: yes On 09/12/16 15:39, Kyrill Tkachov wrote: > > On 09/12/16 15:28, Thomas Preudhomme wrote: >> Hi, >> >> The current target selector for empty_fiq_handler.c testcase skips the test >> when targeting Thumb mode on a device with ARM execution state. Because it >> checks Thumb mode by looking for an -mthumb option it fails to work when GCC >> was configured with --with-mode=thumb. It is also too restrictive because >> interrupt handler can be compiled in Thumb-2. This patch checks the arm_thumb1 >> effective target instead of the -mthumb flag to fix both issues. >> >> ChangeLog entry is as follows: >> >> >> *** gcc/testsuite/ChangeLog *** >> >> 2016-12-09 Thomas Preud'homme >> >> * gcc.target/arm/empty_fiq_handler: Skip instead if targeting Thumb-1 >> on a non Thumb-only target. >> >> >> Tested with GCC built for ARMv5T and ARMv7-A with --with-mode=thumb and >> --with-mode=arm and for ARMv6S-M with --with-mode=thumb: >> >> * test pass in all cases for ARMv5T and ARMv7-A with -marm >> * test pass in all cases for ARMv6S-M and ARMv7-A with -mthumb >> * test pass without option when defaulting to ARM for ARMv5T and ARMv7-A >> * test pass without option when defaulting to Thumb for ARMv6S-M and ARMv7-A >> * test is unsupported with -marm for ARMv5T >> * test is unsupported without option when defaulting to Thumb for ARMv5T >> >> Is this ok for stage3? >> > > ENOPATCH ;) Doh. Thanks also to Christophe for notifying me. Please find the patch attached now. Best regards, Thomas diff --git a/gcc/testsuite/gcc.target/arm/empty_fiq_handler.c b/gcc/testsuite/gcc.target/arm/empty_fiq_handler.c index 8313f2199122be153a737946e817a5e3bee60372..69bb0669dd416e1fcb015c278d62961d071fc42f 100644 --- a/gcc/testsuite/gcc.target/arm/empty_fiq_handler.c +++ b/gcc/testsuite/gcc.target/arm/empty_fiq_handler.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-skip-if "" { ! arm_cortex_m } { "-mthumb" } } */ +/* { dg-do compile { target { {! arm_thumb1 } || arm_cortex_m } } } */ /* Below code used to trigger an ICE due to missing constraints for sp = fp + cst pattern. */