This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: 0006-Part-6.-Add-x86-tests-for-Intel-CET-implementation


On Tue, Oct 24, 2017 at 5:35 PM, Rainer Orth
<ro@cebitec.uni-bielefeld.de> wrote:
> Uros Bizjak <ubizjak@gmail.com> writes:
>
>> On Fri, Oct 13, 2017 at 12:56 PM, Tsimbalist, Igor V
>> <igor.v.tsimbalist@intel.com> wrote:
>>>> -----Original Message-----
>>>> From: Uros Bizjak [mailto:ubizjak@gmail.com]
>>>> Sent: Friday, October 13, 2017 10:02 AM
>>>> To: Tsimbalist, Igor V <igor.v.tsimbalist@intel.com>
>>>> 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
>>>> <igor.v.tsimbalist@intel.com> 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  <ro@CeBiTec.Uni-Bielefeld.DE>
>
>         * gcc.target/i386/cet-sjlj-3.c: Allow for emtpy user label prefix
>         in setjmp call.

OK.

Thanks,
Uros.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]