diff mbox series

[v2] x86_64: Add memcmpeq.S to fix disable-multi-arch build

Message ID 20211028211026.2430103-1-goldstein.w.n@gmail.com
State Committed
Commit 1d56fd3baeaa67405b8a1d67275b4c6eecac77b8
Headers show
Series [v2] x86_64: Add memcmpeq.S to fix disable-multi-arch build | expand

Checks

Context Check Description
dj/TryBot-apply_patch success Patch applied to master at the time it was sent
dj/TryBot-32bit success Build for i686

Commit Message

Noah Goldstein Oct. 28, 2021, 9:10 p.m. UTC
The following commit:

    commit cf4fd28ea453d1a9cec93939bc88b58ccef5437a
    Author: Noah Goldstein <goldstein.w.n@gmail.com>
    Date:   Tue Oct 26 19:43:18 2021 -0500

Broke --disable-multi-arch build for x86_64 because x86_64/memcmpeq.S
was not defined outside of multiarch and the alias for __memcmpeq in
x86_64/memcmp.S was removed.

This commit fixes that issue by adding x86_64/memcmpeq.S.

make xcheck passes on x86_64 with and without --disable-multi-arch
---
 sysdeps/x86_64/memcmpeq.S | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 sysdeps/x86_64/memcmpeq.S

Comments

H.J. Lu Oct. 28, 2021, 9:14 p.m. UTC | #1
On Thu, Oct 28, 2021 at 2:10 PM Noah Goldstein via Libc-alpha
<libc-alpha@sourceware.org> wrote:
>
> The following commit:
>
>     commit cf4fd28ea453d1a9cec93939bc88b58ccef5437a
>     Author: Noah Goldstein <goldstein.w.n@gmail.com>
>     Date:   Tue Oct 26 19:43:18 2021 -0500
>
> Broke --disable-multi-arch build for x86_64 because x86_64/memcmpeq.S
> was not defined outside of multiarch and the alias for __memcmpeq in
> x86_64/memcmp.S was removed.
>
> This commit fixes that issue by adding x86_64/memcmpeq.S.
>
> make xcheck passes on x86_64 with and without --disable-multi-arch
> ---
>  sysdeps/x86_64/memcmpeq.S | 21 +++++++++++++++++++++
>  1 file changed, 21 insertions(+)
>  create mode 100644 sysdeps/x86_64/memcmpeq.S
>
> diff --git a/sysdeps/x86_64/memcmpeq.S b/sysdeps/x86_64/memcmpeq.S
> new file mode 100644
> index 0000000000..db1756915d
> --- /dev/null
> +++ b/sysdeps/x86_64/memcmpeq.S
> @@ -0,0 +1,21 @@
> +/* __memcmpeq optimized with SSE2.
> +   Copyright (C) 2017-2021 Free Software Foundation, Inc.
> +   This file is part of the GNU C Library.
> +
> +   The GNU C Library is free software; you can redistribute it and/or
> +   modify it under the terms of the GNU Lesser General Public
> +   License as published by the Free Software Foundation; either
> +   version 2.1 of the License, or (at your option) any later version.
> +
> +   The GNU C Library is distributed in the hope that it will be useful,
> +   but WITHOUT ANY WARRANTY; without even the implied warranty of
> +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> +   Lesser General Public License for more details.
> +
> +   You should have received a copy of the GNU Lesser General Public
> +   License along with the GNU C Library; if not, see
> +   <https://www.gnu.org/licenses/>.  */
> +
> +#define memcmp __memcmpeq
> +#define USE_AS_MEMCMPEQ        1
> +#include "multiarch/memcmp-sse2.S"
> --
> 2.25.1
>

LGTM.

Reviewed-by: H.J. Lu <hjl.tools@gmail.com>

Thanks.
Noah Goldstein Oct. 28, 2021, 9:36 p.m. UTC | #2
On Thu, Oct 28, 2021 at 4:14 PM H.J. Lu <hjl.tools@gmail.com> wrote:
>
> On Thu, Oct 28, 2021 at 2:10 PM Noah Goldstein via Libc-alpha
> <libc-alpha@sourceware.org> wrote:
> >
> > The following commit:
> >
> >     commit cf4fd28ea453d1a9cec93939bc88b58ccef5437a
> >     Author: Noah Goldstein <goldstein.w.n@gmail.com>
> >     Date:   Tue Oct 26 19:43:18 2021 -0500
> >
> > Broke --disable-multi-arch build for x86_64 because x86_64/memcmpeq.S
> > was not defined outside of multiarch and the alias for __memcmpeq in
> > x86_64/memcmp.S was removed.
> >
> > This commit fixes that issue by adding x86_64/memcmpeq.S.
> >
> > make xcheck passes on x86_64 with and without --disable-multi-arch
> > ---
> >  sysdeps/x86_64/memcmpeq.S | 21 +++++++++++++++++++++
> >  1 file changed, 21 insertions(+)
> >  create mode 100644 sysdeps/x86_64/memcmpeq.S
> >
> > diff --git a/sysdeps/x86_64/memcmpeq.S b/sysdeps/x86_64/memcmpeq.S
> > new file mode 100644
> > index 0000000000..db1756915d
> > --- /dev/null
> > +++ b/sysdeps/x86_64/memcmpeq.S
> > @@ -0,0 +1,21 @@
> > +/* __memcmpeq optimized with SSE2.
> > +   Copyright (C) 2017-2021 Free Software Foundation, Inc.
> > +   This file is part of the GNU C Library.
> > +
> > +   The GNU C Library is free software; you can redistribute it and/or
> > +   modify it under the terms of the GNU Lesser General Public
> > +   License as published by the Free Software Foundation; either
> > +   version 2.1 of the License, or (at your option) any later version.
> > +
> > +   The GNU C Library is distributed in the hope that it will be useful,
> > +   but WITHOUT ANY WARRANTY; without even the implied warranty of
> > +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> > +   Lesser General Public License for more details.
> > +
> > +   You should have received a copy of the GNU Lesser General Public
> > +   License along with the GNU C Library; if not, see
> > +   <https://www.gnu.org/licenses/>.  */
> > +
> > +#define memcmp __memcmpeq
> > +#define USE_AS_MEMCMPEQ        1
> > +#include "multiarch/memcmp-sse2.S"
> > --
> > 2.25.1
> >
>
> LGTM.

Thanks. Pushed.

>
> Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
>
> Thanks.
>
> --
> H.J.
diff mbox series

Patch

diff --git a/sysdeps/x86_64/memcmpeq.S b/sysdeps/x86_64/memcmpeq.S
new file mode 100644
index 0000000000..db1756915d
--- /dev/null
+++ b/sysdeps/x86_64/memcmpeq.S
@@ -0,0 +1,21 @@ 
+/* __memcmpeq optimized with SSE2.
+   Copyright (C) 2017-2021 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#define memcmp	__memcmpeq
+#define USE_AS_MEMCMPEQ	1
+#include "multiarch/memcmp-sse2.S"