From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15038 invoked by alias); 24 Oct 2017 16:02:29 -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 15029 invoked by uid 89); 24 Oct 2017 16:02:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-20.4 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,GIT_PATCH_0,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_LOW,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=ham version=3.3.2 spammy=HTo:U*ro X-HELO: mail-it0-f53.google.com Received: from mail-it0-f53.google.com (HELO mail-it0-f53.google.com) (209.85.214.53) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 24 Oct 2017 16:02:21 +0000 Received: by mail-it0-f53.google.com with SMTP id o135so10648954itb.0 for ; Tue, 24 Oct 2017 09:02:21 -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:in-reply-to:references:from:date :message-id:subject:to:cc; bh=uT4WOsMlTEdjDSebbH3dYwNj7qb04cx6FP3DQBlc2qs=; b=UAHNWz7O77WGNbiC1A9a7IkL4MZuXu8sD9DSWYH84uNFhppP5henQc3/xtL3qpzKQ0 YHEa6bwi6H5kFdxDf1KT9mcVGnMOf9PrgISRxqAoUwIOI5mPEhImFCXC7raBgo4isnCm vxHiGHIEd5cMrJVmvWi9f8M8ZNIrVj16AJTIlxT40qsVFf8IYzdqDov60cPTA9dY1PIG j4CILbFAMz3SxdcRIYAMGXVngJ7JcvOUfhFM18bNosvOeq4S/aVfca8gm7B1KP1W1JcI TOSIVZqPvE7aWEZYzMWeh9oftSya8HGJ2O9sPoetgZjAHbrHoArEFlJtB3aWZtgYWuKy kyAQ== X-Gm-Message-State: AMCzsaUZjk+PIJY+kceGeGuM3hvj3vMgU7mhPwPXsub+OtX+g5xVYl4z nAmYv9QRtvRKdaM/C5iAU1IcNEEn7I2ID0CEnzE= X-Google-Smtp-Source: ABhQp+TmqU/KmVW+o0f2kAQh0FqEY6zn/0H6O0JdFHExhHIgqPF4qxB/+pG5uKGL828ePAjGjgA8jVwrv/EdwjdQhI4= X-Received: by 10.36.253.9 with SMTP id m9mr14858227ith.105.1508860939994; Tue, 24 Oct 2017 09:02:19 -0700 (PDT) MIME-Version: 1.0 Received: by 10.2.74.18 with HTTP; Tue, 24 Oct 2017 09:02:19 -0700 (PDT) In-Reply-To: References: From: Uros Bizjak Date: Tue, 24 Oct 2017 16:04:00 -0000 Message-ID: Subject: Re: 0006-Part-6.-Add-x86-tests-for-Intel-CET-implementation To: Rainer Orth Cc: "Tsimbalist, Igor V" , "gcc-patches@gcc.gnu.org" Content-Type: text/plain; charset="UTF-8" X-SW-Source: 2017-10/txt/msg01725.txt.bz2 On Tue, Oct 24, 2017 at 5:35 PM, Rainer Orth wrote: > 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. OK. Thanks, Uros.