This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RE: 0006-Part-6.-Add-x86-tests-for-Intel-CET-implementation
- From: "Tsimbalist, Igor V" <igor dot v dot tsimbalist at intel dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: Uros Bizjak <ubizjak at gmail dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, "Tsimbalist, Igor V" <igor dot v dot tsimbalist at intel dot com>
- Date: Sun, 22 Oct 2017 13:56:59 +0000
- Subject: RE: 0006-Part-6.-Add-x86-tests-for-Intel-CET-implementation
- Authentication-results: sourceware.org; auth=none
- Dlp-product: dlpe-windows
- Dlp-reaction: no-action
- Dlp-version: 11.0.0.116
- References: <CAFULd4Ykt=W0sBbixO+yN-UumzTGjriA+TJGiEkWm=Ktt6zGcw@mail.gmail.com> <D511F25789BA7F4EBA64C8A63891A0028ADB6112@irsmsx105.ger.corp.intel.com> <CAFULd4Z2Luro-Pengyd0zFxqsZM1e3cuPkuL9VXw8yzcyeRG2Q@mail.gmail.com> <D511F25789BA7F4EBA64C8A63891A0028ADB6406@irsmsx105.ger.corp.intel.com> <D511F25789BA7F4EBA64C8A63891A00291F42195@IRSMSX102.ger.corp.intel.com> <CAFULd4bjv5bdDigeOsTb5DLbOfAfz-tpwtdR5SxYuh3sA-8gPQ@mail.gmail.com> <D511F25789BA7F4EBA64C8A63891A00291F42954@IRSMSX102.ger.corp.intel.com> <CAMe9rOo4mu3a73M_-hOhhQkm2cpo=g0gKAMLBO7EpWhz8MHd8A@mail.gmail.com>
Those 2 tests were removed during reviewing as they tested __builtin versions. ChangeLog was not updated.
Igor
> -----Original Message-----
> From: H.J. Lu [mailto:hjl.tools@gmail.com]
> Sent: Sunday, October 22, 2017 1:59 PM
> To: Tsimbalist, Igor V <igor.v.tsimbalist@intel.com>
> Cc: Uros Bizjak <ubizjak@gmail.com>; gcc-patches@gcc.gnu.org
> Subject: Re: 0006-Part-6.-Add-x86-tests-for-Intel-CET-implementation
>
> On Fri, Oct 13, 2017 at 3:56 AM, 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.
> >
>
> ChangeLog has
>
> * gcc.target/i386/cet-intrin-1.c: Likewise.
> * gcc.target/i386/cet-intrin-10.c: Likewise.
> * gcc.target/i386/cet-intrin-2.c: Likewise.
> * gcc.target/i386/cet-intrin-3.c: Likewise.
> * gcc.target/i386/cet-intrin-4.c: Likewise.
> * gcc.target/i386/cet-intrin-5.c: Likewise.
> * gcc.target/i386/cet-intrin-6.c: Likewise.
> * gcc.target/i386/cet-intrin-7.c: Likewise.
> * gcc.target/i386/cet-intrin-8.c: Likewise.
> * gcc.target/i386/cet-intrin-9.c: Likewise.
>
> But there are no gcc.target/i386/cet-intrin-1.c nor
> gcc.target/i386/cet-intrin-2.c.
>
>
> --
> H.J.