diff mbox series

[v1,1/3] x86: Add definition for __wmemset_chk AVX2 RTM in ifunc impl list

Message ID 20220628152735.17863-1-goldstein.w.n@gmail.com
State New
Headers show
Series [v1,1/3] x86: Add definition for __wmemset_chk AVX2 RTM in ifunc impl list | expand

Commit Message

Noah Goldstein June 28, 2022, 3:27 p.m. UTC
This was simply missing and meant we weren't testing it properly.
---
 sysdeps/x86_64/multiarch/ifunc-impl-list.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

H.J. Lu June 29, 2022, 7:21 p.m. UTC | #1
On Tue, Jun 28, 2022 at 8:27 AM Noah Goldstein <goldstein.w.n@gmail.com> wrote:
>
> This was simply missing and meant we weren't testing it properly.
> ---
>  sysdeps/x86_64/multiarch/ifunc-impl-list.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/sysdeps/x86_64/multiarch/ifunc-impl-list.c b/sysdeps/x86_64/multiarch/ifunc-impl-list.c
> index 251b0022d9..3ae4d49bee 100644
> --- a/sysdeps/x86_64/multiarch/ifunc-impl-list.c
> +++ b/sysdeps/x86_64/multiarch/ifunc-impl-list.c
> @@ -1028,6 +1028,10 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
>               IFUNC_IMPL_ADD (array, i, __wmemset_chk,
>                               CPU_FEATURE_USABLE (AVX2),
>                               __wmemset_chk_avx2_unaligned)
> +             IFUNC_IMPL_ADD (array, i, wmemset_chk,
> +                             (CPU_FEATURE_USABLE (AVX2)
> +                              && CPU_FEATURE_USABLE (RTM)),
> +                             __wmemset_chk_avx2_unaligned_rtm)
>               IFUNC_IMPL_ADD (array, i, __wmemset_chk,
>                               (CPU_FEATURE_USABLE (AVX512VL)
>                                && CPU_FEATURE_USABLE (AVX512BW)
> --
> 2.34.1
>

LGTM.

Thanks.
Noah Goldstein June 29, 2022, 11:08 p.m. UTC | #2
On Wed, Jun 29, 2022 at 12:22 PM H.J. Lu <hjl.tools@gmail.com> wrote:
>
> On Tue, Jun 28, 2022 at 8:27 AM Noah Goldstein <goldstein.w.n@gmail.com> wrote:
> >
> > This was simply missing and meant we weren't testing it properly.
> > ---
> >  sysdeps/x86_64/multiarch/ifunc-impl-list.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/sysdeps/x86_64/multiarch/ifunc-impl-list.c b/sysdeps/x86_64/multiarch/ifunc-impl-list.c
> > index 251b0022d9..3ae4d49bee 100644
> > --- a/sysdeps/x86_64/multiarch/ifunc-impl-list.c
> > +++ b/sysdeps/x86_64/multiarch/ifunc-impl-list.c
> > @@ -1028,6 +1028,10 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
> >               IFUNC_IMPL_ADD (array, i, __wmemset_chk,
> >                               CPU_FEATURE_USABLE (AVX2),
> >                               __wmemset_chk_avx2_unaligned)
> > +             IFUNC_IMPL_ADD (array, i, wmemset_chk,
This wasn't __wmemset_chk
> > +                             (CPU_FEATURE_USABLE (AVX2)
> > +                              && CPU_FEATURE_USABLE (RTM)),
> > +                             __wmemset_chk_avx2_unaligned_rtm)
> >               IFUNC_IMPL_ADD (array, i, __wmemset_chk,
> >                               (CPU_FEATURE_USABLE (AVX512VL)
> >                                && CPU_FEATURE_USABLE (AVX512BW)
> > --
> > 2.34.1
> >
>
> LGTM.
>
> Thanks.
>

There was an issue with this patch standalone.

Fixed in V3.
> --
> H.J.
Sunil Pandey July 14, 2022, 3:03 a.m. UTC | #3
On Wed, Jun 29, 2022 at 4:09 PM Noah Goldstein via Libc-alpha
<libc-alpha@sourceware.org> wrote:
>
> On Wed, Jun 29, 2022 at 12:22 PM H.J. Lu <hjl.tools@gmail.com> wrote:
> >
> > On Tue, Jun 28, 2022 at 8:27 AM Noah Goldstein <goldstein.w.n@gmail.com> wrote:
> > >
> > > This was simply missing and meant we weren't testing it properly.
> > > ---
> > >  sysdeps/x86_64/multiarch/ifunc-impl-list.c | 4 ++++
> > >  1 file changed, 4 insertions(+)
> > >
> > > diff --git a/sysdeps/x86_64/multiarch/ifunc-impl-list.c b/sysdeps/x86_64/multiarch/ifunc-impl-list.c
> > > index 251b0022d9..3ae4d49bee 100644
> > > --- a/sysdeps/x86_64/multiarch/ifunc-impl-list.c
> > > +++ b/sysdeps/x86_64/multiarch/ifunc-impl-list.c
> > > @@ -1028,6 +1028,10 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
> > >               IFUNC_IMPL_ADD (array, i, __wmemset_chk,
> > >                               CPU_FEATURE_USABLE (AVX2),
> > >                               __wmemset_chk_avx2_unaligned)
> > > +             IFUNC_IMPL_ADD (array, i, wmemset_chk,
> This wasn't __wmemset_chk
> > > +                             (CPU_FEATURE_USABLE (AVX2)
> > > +                              && CPU_FEATURE_USABLE (RTM)),
> > > +                             __wmemset_chk_avx2_unaligned_rtm)
> > >               IFUNC_IMPL_ADD (array, i, __wmemset_chk,
> > >                               (CPU_FEATURE_USABLE (AVX512VL)
> > >                                && CPU_FEATURE_USABLE (AVX512BW)
> > > --
> > > 2.34.1
> > >
> >
> > LGTM.
> >
> > Thanks.
> >
>
> There was an issue with this patch standalone.
>
> Fixed in V3.
> > --
> > H.J.

I would like to backport this patch to release branches.
Any comments or objections?

--Sunil
diff mbox series

Patch

diff --git a/sysdeps/x86_64/multiarch/ifunc-impl-list.c b/sysdeps/x86_64/multiarch/ifunc-impl-list.c
index 251b0022d9..3ae4d49bee 100644
--- a/sysdeps/x86_64/multiarch/ifunc-impl-list.c
+++ b/sysdeps/x86_64/multiarch/ifunc-impl-list.c
@@ -1028,6 +1028,10 @@  __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
 	      IFUNC_IMPL_ADD (array, i, __wmemset_chk,
 			      CPU_FEATURE_USABLE (AVX2),
 			      __wmemset_chk_avx2_unaligned)
+	      IFUNC_IMPL_ADD (array, i, wmemset_chk,
+			      (CPU_FEATURE_USABLE (AVX2)
+			       && CPU_FEATURE_USABLE (RTM)),
+			      __wmemset_chk_avx2_unaligned_rtm)
 	      IFUNC_IMPL_ADD (array, i, __wmemset_chk,
 			      (CPU_FEATURE_USABLE (AVX512VL)
 			       && CPU_FEATURE_USABLE (AVX512BW)