public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Noah Goldstein <goldstein.w.n@gmail.com>
To: "H.J. Lu" <hjl.tools@gmail.com>
Cc: GNU C Library <libc-alpha@sourceware.org>,
	"Carlos O'Donell" <carlos@systemhalted.org>
Subject: Re: [PATCH v1 3/7] x86: Add macro for NOT of a cpu arch feature and improve comments
Date: Fri, 24 Jun 2022 09:43:29 -0700	[thread overview]
Message-ID: <CAFUsyfK4DqMuT-mDaimx3oXCLKz-2jaN3Tmqj5GucjKmWxJxjA@mail.gmail.com> (raw)
In-Reply-To: <CAMe9rOoB1g7=ZF0NiokFLWcpiDKMW-XD_zNE1LxD4b71wdmUng@mail.gmail.com>

On Fri, Jun 24, 2022 at 7:33 AM H.J. Lu <hjl.tools@gmail.com> wrote:
>
> On Thu, Jun 23, 2022 at 11:37 PM Noah Goldstein <goldstein.w.n@gmail.com> wrote:
> >
> > Some ARCH_P features such as Prefer_No_VZEROUPPER used to disable
> > implementations if true as opposed fo the majority of features
> > such as AVX2 which are used to enabled features.
> >
> > Different ISA build levels want override certain disabling
> > features. For example ISA build level >= 3 should ignore
> > Prefer_No_VZEROUPPER which means converting the check to
> > false (as opposed to true for a feature like AVX2).
> > ---
> >  sysdeps/x86/isa-ifunc-macros.h | 4 ++++
> >  sysdeps/x86/isa-level.h        | 7 ++++---
> >  2 files changed, 8 insertions(+), 3 deletions(-)
> >
> > diff --git a/sysdeps/x86/isa-ifunc-macros.h b/sysdeps/x86/isa-ifunc-macros.h
> > index ba6826d518..e229e612a4 100644
> > --- a/sysdeps/x86/isa-ifunc-macros.h
> > +++ b/sysdeps/x86/isa-ifunc-macros.h
> > @@ -67,4 +67,8 @@
> >    (X86_ISA_CPU_FEATURE_CONST_CHECK_ENABLED (name)                      \
> >     || CPU_FEATURES_ARCH_P (ptr, name))
> >
> > +#define X86_ISA_CPU_FEATURES_ARCH_P_NOT(ptr, name)                            \
> > +  (!X86_ISA_CPU_FEATURE_CONST_CHECK_ENABLED (name)                           \
> > +     && !CPU_FEATURES_ARCH_P (ptr, name))
> > +
> >  #endif
> > diff --git a/sysdeps/x86/isa-level.h b/sysdeps/x86/isa-level.h
> > index 7cae11c228..e1a30ed83e 100644
> > --- a/sysdeps/x86/isa-level.h
> > +++ b/sysdeps/x86/isa-level.h
> > @@ -66,10 +66,10 @@
> >
> >
> >  /*
> > - * CPU Features that are hard coded as enabled depending on ISA build
> > - *   level.
> > + * CPU Features that are hard coded as enabled/disabled depending on
> > + * ISA build level.
> >   *    - Values > 0 features are always ENABLED if:
> > - *          Value >= MINIMUM_X86_ISA_LEVEL
> > + *          Value <= MINIMUM_X86_ISA_LEVEL
> >   */
> >
> >
> > @@ -92,6 +92,7 @@
> >  /*
> >   * KNL (the only cpu that sets this supported in cpu-features.h)
> >   * builds with ISA V1 so this shouldn't harm any architectures.
> > + * NB: Only use this feature with the ARCH_P_NOT macro.
> >   */
> >  #define Prefer_No_VZEROUPPER_X86_ISA_LEVEL 3
> >
> > --
> > 2.34.1
> >
>
> This is a bug fix.  Please make it a separate patch set.   Please also
> send individual patches,
> instead of a set, if there are no dependencies between patches.

Split patches. This and the change to ifunc-evex in series. Rest standalone.
>
> Thanks.
>
> --
> H.J.

  parent reply	other threads:[~2022-06-24 16:43 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-24  6:36 [PATCH v1 1/7] x86: Align entry for memrchr to 64-bytes Noah Goldstein
2022-06-24  6:36 ` [PATCH v1 2/7] x86: Rename strstr_sse2 to strstr_generic as it uses string/strstr.c Noah Goldstein
2022-06-24  6:36 ` [PATCH v1 3/7] x86: Add macro for NOT of a cpu arch feature and improve comments Noah Goldstein
2022-06-24 14:32   ` H.J. Lu
2022-06-24 14:49     ` H.J. Lu
2022-06-24 16:43     ` Noah Goldstein [this message]
2022-06-24 20:10   ` [PATCH v2] x86: Fix backwards Prefer_No_VZEROUPPER check in ifunc-evex.h Noah Goldstein
2022-06-24 20:32     ` H.J. Lu
2022-06-24 21:26       ` Noah Goldstein
2022-06-24 21:36         ` H.J. Lu
2022-06-24 21:46   ` [PATCH v3] " Noah Goldstein
2022-06-24 22:15     ` H.J. Lu
2022-06-24 22:29       ` Noah Goldstein
2022-06-24 22:29   ` [PATCH v4] " Noah Goldstein
2022-06-24 22:41     ` H.J. Lu
2022-06-24 22:57       ` Noah Goldstein
2022-06-24 23:05         ` H.J. Lu
2022-06-24 23:16           ` Noah Goldstein
2022-06-24 23:15   ` [PATCH v5] " Noah Goldstein
2022-06-24 23:20     ` H.J. Lu
2022-06-24  6:36 ` [PATCH v1 4/7] x86: Add comment with ISA level for all targets support by GCC12.1 Noah Goldstein
2022-06-24  6:36 ` [PATCH v1 5/7] x86: Use ARCH_P_NOT to check Prefer_No_VZeroupper in ifunc-evex.h Noah Goldstein
2022-06-24  6:36 ` [PATCH v1 6/7] x86: Put wcs{n}len-sse4.1 in the sse4.1 text section Noah Goldstein
2022-06-24  6:36 ` [PATCH v1 7/7] x86: Remove unused file wmemcmp-sse4 Noah Goldstein

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAFUsyfK4DqMuT-mDaimx3oXCLKz-2jaN3Tmqj5GucjKmWxJxjA@mail.gmail.com \
    --to=goldstein.w.n@gmail.com \
    --cc=carlos@systemhalted.org \
    --cc=hjl.tools@gmail.com \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).