From patchwork Thu Nov 2 09:17:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 833261 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-465714-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="VsNRc9Nm"; 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 3ySKJ81BwRz9sP1 for ; Thu, 2 Nov 2017 20:18:14 +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 :subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type; q=dns; s=default; b=yVvNO1klQVbuCkjVr Aqod5L337MwdVbUj+dQ9KTpJajF/Ne3/pKjcvvu+UGXebWwmozGGETwB5efuT4Xu JzehgeNLwTqQnoLaJwWsBSFzVDs8uoRvNNwbZ0Y6xACCmKMI6DJv7npwk1LD9iqG /srgB3atv7C14tMaJR38iWznmk= 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:cc:references:from:message-id:date:mime-version :in-reply-to:content-type; s=default; bh=gYcZaAGE3HhJu+9RpgoGc4Q 5rvA=; b=VsNRc9NmzSrk6k04MITvsuiNZlR0zqqq6xnAKCcbVekl+Hr9FFpjKHf TJDTW1s8rGia9u9AeHCcmi9pkGr0+VrzEqJINEpiPix5qlk3do854DE62MbCcU5v a6R8cgum68FSBG1UCvBBS3MvMDdaFvhFquq2kKRR1nvJ2zVrHO/M= Received: (qmail 6985 invoked by alias); 2 Nov 2017 09:18:04 -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 5421 invoked by uid 89); 2 Nov 2017 09:18:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.7 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS, URIBL_RED autolearn=ham version=3.3.2 spammy=naked, uros X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 02 Nov 2017 09:17:56 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-MBX-04.mgc.mentorg.com) by relay1.mentorg.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) id 1eABdJ-00030H-4V from Tom_deVries@mentor.com ; Thu, 02 Nov 2017 02:17:53 -0700 Received: from [127.0.0.1] (137.202.0.87) by SVR-IES-MBX-04.mgc.mentorg.com (139.181.222.4) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Thu, 2 Nov 2017 09:17:48 +0000 Subject: [testsuite, committed] Fix scan-assembler patterns in i386/naked-{1, 2}.c To: Uros Bizjak , "gcc-patches@gcc.gnu.org" CC: Daniel Santos References: From: Tom de Vries Message-ID: <3cf07f91-3617-cad6-82c1-a4a380d7ebf7@mentor.com> Date: Thu, 2 Nov 2017 10:17:45 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To SVR-IES-MBX-04.mgc.mentorg.com (139.181.222.4) [ was: Re: [PATCH, i386]: Implement attribute ((naked)) ] On 07/30/2017 10:14 PM, Uros Bizjak wrote: > Index: testsuite/gcc.target/i386/naked-1.c > +/* { dg-final { scan-assembler "ud2" } } */ > +/* { dg-final { scan-assembler-not "ret" } } */ > Index: testsuite/gcc.target/i386/naked-2.c > +/* { dg-final { scan-assembler-not "push" } } */ > +/* { dg-final { scan-assembler-not "pop" } } */ Hi, these single-word scan patterns can easily be triggered by running the tests with a source directory containing these words. Committed as obvious. Thanks, - Tom Fix scan-assembler patterns in i386/naked-{1,2}.c 2017-11-02 Tom de Vries PR testsuite/82415 * gcc.target/i386/naked-1.c: Make scan patterns more precise. * gcc.target/i386/naked-2.c: Same. --- gcc/testsuite/gcc.target/i386/naked-1.c | 4 ++-- gcc/testsuite/gcc.target/i386/naked-2.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gcc/testsuite/gcc.target/i386/naked-1.c b/gcc/testsuite/gcc.target/i386/naked-1.c index cf62bb1..07bb10e 100644 --- a/gcc/testsuite/gcc.target/i386/naked-1.c +++ b/gcc/testsuite/gcc.target/i386/naked-1.c @@ -10,5 +10,5 @@ foo (void) __asm__ ("# naked"); } /* { dg-final { scan-assembler "# naked" } } */ -/* { dg-final { scan-assembler "ud2" } } */ -/* { dg-final { scan-assembler-not "ret" } } */ +/* { dg-final { scan-assembler "(?n)^\\s*ud2$" } } */ +/* { dg-final { scan-assembler-not "(?n)^\\s*ret$" } } */ diff --git a/gcc/testsuite/gcc.target/i386/naked-2.c b/gcc/testsuite/gcc.target/i386/naked-2.c index adcd712..2da8b81 100644 --- a/gcc/testsuite/gcc.target/i386/naked-2.c +++ b/gcc/testsuite/gcc.target/i386/naked-2.c @@ -10,5 +10,5 @@ foo (void) __asm__ ("# naked"); } /* { dg-final { scan-assembler "# naked" } } */ -/* { dg-final { scan-assembler-not "push" } } */ -/* { dg-final { scan-assembler-not "pop" } } */ +/* { dg-final { scan-assembler-not "(?n)^\\s*push" } } */ +/* { dg-final { scan-assembler-not "(?n)^\\s*pop" } } */