From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 35479 invoked by alias); 24 Oct 2017 15:35:25 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 35468 invoked by uid 89); 24 Oct 2017 15:35:24 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-19.6 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_2,GIT_PATCH_3,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-HELO: smtp.CeBiTec.Uni-Bielefeld.DE Received: from smtp.CeBiTec.Uni-Bielefeld.DE (HELO smtp.CeBiTec.Uni-Bielefeld.DE) (129.70.160.84) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 24 Oct 2017 15:35:22 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 8BC9A32F; Tue, 24 Oct 2017 17:35:14 +0200 (CEST) Received: from smtp.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (malfoy.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 2TN5bmUp2LZd; Tue, 24 Oct 2017 17:35:11 +0200 (CEST) Received: from manam.CeBiTec.Uni-Bielefeld.DE (p54ACF783.dip0.t-ipconnect.de [84.172.247.131]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPSA id DA8E132E; Tue, 24 Oct 2017 17:35:10 +0200 (CEST) From: Rainer Orth To: Uros Bizjak Cc: "Tsimbalist\, Igor V" , "gcc-patches\@gcc.gnu.org" Subject: Re: 0006-Part-6.-Add-x86-tests-for-Intel-CET-implementation References: Date: Tue, 24 Oct 2017 15:37:00 -0000 In-Reply-To: (Uros Bizjak's message of "Fri, 13 Oct 2017 13:25:47 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (usg-unix-v) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-IsSubscribed: yes X-SW-Source: 2017-10/txt/msg01718.txt.bz2 --=-=-= Content-Type: text/plain Content-length: 4039 Uros Bizjak writes: > On Fri, Oct 13, 2017 at 12:56 PM, Tsimbalist, Igor V > wrote: >>> -----Original Message----- >>> From: Uros Bizjak [mailto:ubizjak@gmail.com] >>> Sent: Friday, October 13, 2017 10:02 AM >>> To: Tsimbalist, Igor V >>> Cc: gcc-patches@gcc.gnu.org >>> Subject: Re: 0006-Part-6.-Add-x86-tests-for-Intel-CET-implementation >>> >>> On Thu, Oct 12, 2017 at 8:54 PM, Tsimbalist, Igor V >>> wrote: >>> > Attached is an updated patch according to your comments. New tests are >>> > added to test ICF optimization in presence of nocf_check attribute. >>> --- a/gcc/testsuite/c-c++-common/fcf-protection-2.c >>> +++ b/gcc/testsuite/c-c++-common/fcf-protection-2.c >>> @@ -1,4 +1,4 @@ >>> /* { dg-do compile } */ >>> /* { dg-options "-fcf-protection=branch" } */ >>> -/* { dg-error "'-fcf-protection=branch' is not supported for this >>> target" "" { >>> target { "i?86-*-* x86_64-*-*" } } 0 } */ >>> +/* { dg-error "'-fcf-protection=branch' requires CET support on this >>> target. Use -mcet or one of -mibt, -mshstk options to enable CET" "" { >>> target { >>> "i?86-*-* x86_64-*-*" } } 0 } */ >>> >>> Checking for "-fcf-protection=branch' requires CET support on this target" >>> should be enough. No need to check the whole message here and in other >>> tests. >> >> Fixed as you suggested. Also shortened the checking string for ignoring the >> attribute in attr-nocf-check-1.c and attr-nocf-check-3.c. >> >>> /* { dg-error "'-fcf-protection=branch' is not supported for this >>> target" "" { >>> target { ! "i?86-*-* x86_64-*-*" } } 0 } */ diff --git a/gcc/testsuite/c-c++- >>> common/fcf-protection-3.c >>> b/gcc/testsuite/c-c++-common/fcf-protection-3.c >>> >>> >>> --- a/gcc/testsuite/c-c++-common/fcf-protection-4.c >>> +++ b/gcc/testsuite/c-c++-common/fcf-protection-4.c >>> @@ -1,4 +1,4 @@ >>> /* { dg-do compile } */ >>> /* { dg-options "-fcf-protection=none" } */ >>> -/* { dg-bogus "'-fcf-protection=none' is not supported for this target" "" { >>> target { "i?86-*-* x86_64-*-*" } } 0 } */ >>> +/* { dg-bogus "'-fcf-protection=none' res CET support on this target. >>> Use -mcet or one of -mibt, -mshstk options to enable CET" "" { target { >>> "i?86- >>> *-* x86_64-*-*" } } 0 } */ >>> /* { dg-bogus "'-fcf-protection=none' is not supported for this target" "" { >>> target { ! "i?86-*-* x86_64-*-*" } } 0 } */ diff --git a/gcc/testsuite/c-c++- >>> common/fcf-protection-5.c >>> b/gcc/testsuite/c-c++-common/fcf-protection-5.c >>> >>> The above test checks for bogus messages? -fcf-protection=none option >>> should not generate any messages. So, the test should check that -fcf- >>> protection=none doesn't generate any error. (And, there is a typo in the >>> message, /s/res/requires.) >> >> The gcc documentation says about dg-bogus >> >> This DejaGnu directive appears on a source line that should not get a message >> matching regexp... >> >> I decided to use dg-bogus to check the absence of the error. Now I >> removed both >> lines as any additional messages should be caught as an extra >> messages. Actually >> I will update the fcf-protection-4.c test in the generic patch. >> >> Updated patch is attached. > > OK. The new cet effective-target keyword needs documenting in sourcebuild.texi, as usual. Besides, the gcc.target/i386/cet-sjlj-3.c test FAILs on Solaris/x86 and FreeBSD: FAIL: gcc.target/i386/cet-sjlj-3.c scan-assembler-times call\\t_setjmp 1 (found 0 times) On Solaris, this happens because USER_LABEL_PREFIX is empty. The following patch accounts for that. Tested with the appropriate runtest invocation on i386-pc-solaris2.11 and x86_64-pc-linux-gnu. Ok for mainline? Rainer -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University 2017-10-24 Rainer Orth * gcc.target/i386/cet-sjlj-3.c: Allow for emtpy user label prefix in setjmp call. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=testsuite-i386-cet-sjlj-3.patch Content-length: 742 # HG changeset patch # Parent c00d342bbb5c474b5b0be8c7311107ad56a76edd Fix gcc.target/i386/cet-sjlj-3.c on Solaris diff --git a/gcc/testsuite/gcc.target/i386/cet-sjlj-3.c b/gcc/testsuite/gcc.target/i386/cet-sjlj-3.c --- a/gcc/testsuite/gcc.target/i386/cet-sjlj-3.c +++ b/gcc/testsuite/gcc.target/i386/cet-sjlj-3.c @@ -2,7 +2,7 @@ /* { dg-options "-O -fcf-protection -mcet" } */ /* { dg-final { scan-assembler-times "endbr32" 4 { target ia32 } } } */ /* { dg-final { scan-assembler-times "endbr64" 4 { target { ! ia32 } } } } */ -/* { dg-final { scan-assembler-times "call _setjmp" 1 } } */ +/* { dg-final { scan-assembler-times "call _?setjmp" 1 } } */ /* { dg-final { scan-assembler-times "call longjmp" 1 } } */ #include --=-=-=--