* Re: [PATCH] x86-64: Define __memcmpeq in ld.so
[not found] ` <CAFUsyf+gNqSZmaaTAsc6ZHc3VzkevYm-3eD8utNu01tL+QuXzA@mail.gmail.com>
@ 2022-05-12 19:24 ` Sunil Pandey
0 siblings, 0 replies; only message in thread
From: Sunil Pandey @ 2022-05-12 19:24 UTC (permalink / raw)
To: Noah Goldstein, Libc-stable Mailing List; +Cc: H.J. Lu, GNU C Library
On Mon, Feb 14, 2022 at 5:20 PM Noah Goldstein via Libc-alpha
<libc-alpha@sourceware.org> wrote:
>
> On Mon, Feb 14, 2022 at 7:50 AM H.J. Lu <hjl.tools@gmail.com> wrote:
> >
> > On Mon, Feb 14, 2022 at 1:18 AM Noah Goldstein <goldstein.w.n@gmail.com> wrote:
> > >
> > > On Sun, Feb 13, 2022 at 8:46 PM H.J. Lu <hjl.tools@gmail.com> wrote:
> > > >
> > > > Define __memcmpeq in ld.so so that compiler can generate __memcmpeq call
> > > > when compiling for ld.so.
> > > > ---
> > > > sysdeps/x86_64/multiarch/memcmpeq-sse2.S | 4 +++-
> > > > 1 file changed, 3 insertions(+), 1 deletion(-)
> > > >
> > > > diff --git a/sysdeps/x86_64/multiarch/memcmpeq-sse2.S b/sysdeps/x86_64/multiarch/memcmpeq-sse2.S
> > > > index b80a29d4b0..de7f5a7525 100644
> > > > --- a/sysdeps/x86_64/multiarch/memcmpeq-sse2.S
> > > > +++ b/sysdeps/x86_64/multiarch/memcmpeq-sse2.S
> > > > @@ -16,8 +16,10 @@
> > > > License along with the GNU C Library; if not, see
> > > > <https://www.gnu.org/licenses/>. */
> > > >
> > > > -#ifndef memcmp
> > > > +#if IS_IN (libc)
> > > > # define memcmp __memcmpeq_sse2
> > > > +#else
> > > > +# define memcmp __memcmpeq
> > > > #endif
> > > > #define USE_AS_MEMCMPEQ 1
> > > > #include "memcmp-sse2.S"
> > >
> > > How can I test this patch?
> >
> > Please build this GCC branch:
> >
> > https://gitlab.com/x86-gcc/gcc/-/commits/users/hjl/memcmpeq/master
> >
> > and use it to build glibc with
> >
> > CC="gcc -fextra-libc-function=memcmpeq"
> >
> > It will call __memcmpeq when possible.
>
> LGTM.
> >
> > --
> > H.J.
I would like to backport this patch to release branches.
Any comments or objections?
--Sunil
^ permalink raw reply [flat|nested] only message in thread