From patchwork Wed Nov 15 17:04:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Preudhomme X-Patchwork-Id: 838257 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-466891-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="Aw4J9mAG"; dkim-atps=neutral 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 3ycW2F2mVxz9s7v for ; Thu, 16 Nov 2017 04:04:37 +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:to :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=ArtvMolQCdsYujOUv/9JD1WcQNoQKXnYBM880/NkE+ng8aDo22 D0Vl3t41OR6lmSER846BWeWIPyEdWzbVVoteQ6dAduEDjF3kNF6soTrEURJlFjYI IRqfbecRsPfsDgrObTi8KBWV5VrAqnvIKobuIb3OBDARV1r93jcWXeOWU= 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:to :from:subject:message-id:date:mime-version:content-type; s= default; bh=LaS6RXBmCXNGPASO8JasavYDxy0=; b=Aw4J9mAG69kI9PF66obQ IObP3Q+rgjUTs9TJACn8Mhc9KDOCOfnSz79CB8Urgm3iltymXLh7UydoCQ+3AkJb z//BbiwS18kbehE49ZWJr19QOOuGKMWvdHC3p19tkccexCLG8lsTInEQJv305l7s M55o+WVSnnbsbnxJsKilCnc= Received: (qmail 8987 invoked by alias); 15 Nov 2017 17:04:20 -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 8758 invoked by uid 89); 15 Nov 2017 17:04:20 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.7 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, KB_WAM_FROM_NAME_SINGLEWORD, RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=letter X-HELO: foss.arm.com Received: from usa-sjc-mx-foss1.foss.arm.com (HELO foss.arm.com) (217.140.101.70) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 15 Nov 2017 17:04:17 +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 57EFC1529; Wed, 15 Nov 2017 09:04:16 -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 8DEBA3F246; Wed, 15 Nov 2017 09:04:15 -0800 (PST) To: Kyrill Tkachov , Ramana Radhakrishnan , Richard Earnshaw , "gcc-patches@gcc.gnu.org" From: Thomas Preudhomme Subject: [PATCH, GCC/testsuite/ARM] Rework expectation for call to Armv8-M nonsecure function Message-ID: <8cd89f8f-675a-4def-7e94-8c594c686afe@foss.arm.com> Date: Wed, 15 Nov 2017 17:04:14 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 X-IsSubscribed: yes Hi, Testcase gcc.target/arm/cmse/cmse-14.c checks whether bar is called via __gnu_cmse_nonsecure_call libcall and not via a direct call. However the pattern is a bit surprising in that it needs to explicitely allow "by" due to allowing anything before the 'b'. This patch rewrites the logic to look for b as a first non-whitespace letter followed iby anything (to match bl and conditional branches) followed by some spaces and then bar. ChangeLog entry is as follows: *** gcc/ChangeLog *** 2017-11-01 Thomas Preud'homme * gcc.target/arm/cmse/cmse-14.c: Change logic to match branch instruction to bar. Testing: Test still passes for both Armv8-M Baseline and Mainline. Is this ok for trunk? Best regards, Thomas diff --git a/gcc/testsuite/gcc.target/arm/cmse/cmse-14.c b/gcc/testsuite/gcc.target/arm/cmse/cmse-14.c index 701e9ee7e318a07278099548f9b7042a1fde1204..df1ea52bec533c36a738d7d3b2b2ff749b0f3713 100644 --- a/gcc/testsuite/gcc.target/arm/cmse/cmse-14.c +++ b/gcc/testsuite/gcc.target/arm/cmse/cmse-14.c @@ -10,4 +10,4 @@ int foo (void) } /* { dg-final { scan-assembler "bl\t__gnu_cmse_nonsecure_call" } } */ -/* { dg-final { scan-assembler-not "b\[^ y\n\]*\\s+bar" } } */ +/* { dg-final { scan-assembler-not "^(.*\\s)?bl?\[^\\s]*\\s+bar" } } */