public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH v1] x86: Fix missing __wmemcmp def for disable-multiarch build
@ 2022-04-19 22:55 Noah Goldstein
  2022-04-19 23:36 ` H.J. Lu
  2022-04-19 23:52 ` [PATCH v2] " Noah Goldstein
  0 siblings, 2 replies; 9+ messages in thread
From: Noah Goldstein @ 2022-04-19 22:55 UTC (permalink / raw)
  To: libc-alpha

commit 8804157ad9da39631703b92315460808eac86b0c
Author: Noah Goldstein <goldstein.w.n@gmail.com>
Date:   Fri Apr 15 12:27:59 2022 -0500

    x86: Optimize memcmp SSE2 in memcmp.S

Only defined wmemcmp and missed __wmemcmp. This commit fixes that by
defining __wmemcmp and setting wmemcmp as a weak alias to __wmemcmp.

Both multiarch and disable-multiarch builds succeed and full xchecks
pass.
---
 sysdeps/x86_64/multiarch/wmemcmp-sse2.S | 8 +++++---
 sysdeps/x86_64/wmemcmp.S                | 6 ++++--
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/sysdeps/x86_64/multiarch/wmemcmp-sse2.S b/sysdeps/x86_64/multiarch/wmemcmp-sse2.S
index 57be1c446e..92d6819cb3 100644
--- a/sysdeps/x86_64/multiarch/wmemcmp-sse2.S
+++ b/sysdeps/x86_64/multiarch/wmemcmp-sse2.S
@@ -16,10 +16,12 @@
    License along with the GNU C Library; if not, see
    <https://www.gnu.org/licenses/>.  */
 
+#define USE_AS_WMEMCMP	1
 #if IS_IN (libc)
 # define MEMCMP	__wmemcmp_sse2
+# include "memcmp-sse2.S"
 #else
-# define MEMCMP	wmemcmp
+# define MEMCMP	__wmemcmp
+# include "../memcmp.S"
+weak_alias (__wmemcmp, wmemcmp)
 #endif
-#define USE_AS_WMEMCMP	1
-#include "memcmp-sse2.S"
diff --git a/sysdeps/x86_64/wmemcmp.S b/sysdeps/x86_64/wmemcmp.S
index 032f389158..8bd3cf80db 100644
--- a/sysdeps/x86_64/wmemcmp.S
+++ b/sysdeps/x86_64/wmemcmp.S
@@ -16,6 +16,8 @@
    License along with the GNU C Library; if not, see
    <https://www.gnu.org/licenses/>.  */
 
-#define MEMCMP	wmemcmp
+#define MEMCMP	__wmemcmp
 #define USE_AS_WMEMCMP	1
-#include "multiarch/memcmp-sse2.S"
+#include "memcmp.S"
+    
+weak_alias (__wmemcmp, wmemcmp)
-- 
2.25.1


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v1] x86: Fix missing __wmemcmp def for disable-multiarch build
  2022-04-19 22:55 [PATCH v1] x86: Fix missing __wmemcmp def for disable-multiarch build Noah Goldstein
@ 2022-04-19 23:36 ` H.J. Lu
  2022-04-19 23:39   ` Noah Goldstein
  2022-04-19 23:52 ` [PATCH v2] " Noah Goldstein
  1 sibling, 1 reply; 9+ messages in thread
From: H.J. Lu @ 2022-04-19 23:36 UTC (permalink / raw)
  To: Noah Goldstein; +Cc: GNU C Library, Carlos O'Donell

On Tue, Apr 19, 2022 at 3:55 PM Noah Goldstein <goldstein.w.n@gmail.com> wrote:
>
> commit 8804157ad9da39631703b92315460808eac86b0c
> Author: Noah Goldstein <goldstein.w.n@gmail.com>
> Date:   Fri Apr 15 12:27:59 2022 -0500
>
>     x86: Optimize memcmp SSE2 in memcmp.S
>
> Only defined wmemcmp and missed __wmemcmp. This commit fixes that by
> defining __wmemcmp and setting wmemcmp as a weak alias to __wmemcmp.
>
> Both multiarch and disable-multiarch builds succeed and full xchecks
> pass.
> ---
>  sysdeps/x86_64/multiarch/wmemcmp-sse2.S | 8 +++++---
>  sysdeps/x86_64/wmemcmp.S                | 6 ++++--
>  2 files changed, 9 insertions(+), 5 deletions(-)
>
> diff --git a/sysdeps/x86_64/multiarch/wmemcmp-sse2.S b/sysdeps/x86_64/multiarch/wmemcmp-sse2.S
> index 57be1c446e..92d6819cb3 100644
> --- a/sysdeps/x86_64/multiarch/wmemcmp-sse2.S
> +++ b/sysdeps/x86_64/multiarch/wmemcmp-sse2.S
> @@ -16,10 +16,12 @@
>     License along with the GNU C Library; if not, see
>     <https://www.gnu.org/licenses/>.  */
>
> +#define USE_AS_WMEMCMP 1
>  #if IS_IN (libc)

Do we need to check "IS_IN (libc)" here?

>  # define MEMCMP        __wmemcmp_sse2
> +# include "memcmp-sse2.S"
>  #else
> -# define MEMCMP        wmemcmp
> +# define MEMCMP        __wmemcmp
> +# include "../memcmp.S"
> +weak_alias (__wmemcmp, wmemcmp)
>  #endif
> -#define USE_AS_WMEMCMP 1
> -#include "memcmp-sse2.S"
> diff --git a/sysdeps/x86_64/wmemcmp.S b/sysdeps/x86_64/wmemcmp.S
> index 032f389158..8bd3cf80db 100644
> --- a/sysdeps/x86_64/wmemcmp.S
> +++ b/sysdeps/x86_64/wmemcmp.S
> @@ -16,6 +16,8 @@
>     License along with the GNU C Library; if not, see
>     <https://www.gnu.org/licenses/>.  */
>
> -#define MEMCMP wmemcmp
> +#define MEMCMP __wmemcmp
>  #define USE_AS_WMEMCMP 1
> -#include "multiarch/memcmp-sse2.S"
> +#include "memcmp.S"
> +
> +weak_alias (__wmemcmp, wmemcmp)
> --
> 2.25.1
>


-- 
H.J.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v1] x86: Fix missing __wmemcmp def for disable-multiarch build
  2022-04-19 23:36 ` H.J. Lu
@ 2022-04-19 23:39   ` Noah Goldstein
  2022-04-19 23:42     ` H.J. Lu
  0 siblings, 1 reply; 9+ messages in thread
From: Noah Goldstein @ 2022-04-19 23:39 UTC (permalink / raw)
  To: H.J. Lu; +Cc: GNU C Library, Carlos O'Donell

On Tue, Apr 19, 2022 at 6:36 PM H.J. Lu <hjl.tools@gmail.com> wrote:
>
> On Tue, Apr 19, 2022 at 3:55 PM Noah Goldstein <goldstein.w.n@gmail.com> wrote:
> >
> > commit 8804157ad9da39631703b92315460808eac86b0c
> > Author: Noah Goldstein <goldstein.w.n@gmail.com>
> > Date:   Fri Apr 15 12:27:59 2022 -0500
> >
> >     x86: Optimize memcmp SSE2 in memcmp.S
> >
> > Only defined wmemcmp and missed __wmemcmp. This commit fixes that by
> > defining __wmemcmp and setting wmemcmp as a weak alias to __wmemcmp.
> >
> > Both multiarch and disable-multiarch builds succeed and full xchecks
> > pass.
> > ---
> >  sysdeps/x86_64/multiarch/wmemcmp-sse2.S | 8 +++++---
> >  sysdeps/x86_64/wmemcmp.S                | 6 ++++--
> >  2 files changed, 9 insertions(+), 5 deletions(-)
> >
> > diff --git a/sysdeps/x86_64/multiarch/wmemcmp-sse2.S b/sysdeps/x86_64/multiarch/wmemcmp-sse2.S
> > index 57be1c446e..92d6819cb3 100644
> > --- a/sysdeps/x86_64/multiarch/wmemcmp-sse2.S
> > +++ b/sysdeps/x86_64/multiarch/wmemcmp-sse2.S
> > @@ -16,10 +16,12 @@
> >     License along with the GNU C Library; if not, see
> >     <https://www.gnu.org/licenses/>.  */
> >
> > +#define USE_AS_WMEMCMP 1
> >  #if IS_IN (libc)
>
> Do we need to check "IS_IN (libc)" here?

I'm not sure. Was essentially copying the existing memcmpeq code
for this:
https://sourceware.org/git/?p=glibc.git;a=blobdiff;f=sysdeps/x86_64/multiarch/memcmpeq-sse2.S;h=de7f5a7525ab41ea42ea581c6981ced63f8be976;hp=b80a29d4b05bd7401d16afdbeee96403480953d2;hb=a5659cf27d3ce6101c1632715d18ab6321755340;hpb=7a06be051c01b4325927efab5b4e4280bb4a5a42
>
> >  # define MEMCMP        __wmemcmp_sse2
> > +# include "memcmp-sse2.S"
> >  #else
> > -# define MEMCMP        wmemcmp
> > +# define MEMCMP        __wmemcmp
> > +# include "../memcmp.S"
> > +weak_alias (__wmemcmp, wmemcmp)
> >  #endif
> > -#define USE_AS_WMEMCMP 1
> > -#include "memcmp-sse2.S"
> > diff --git a/sysdeps/x86_64/wmemcmp.S b/sysdeps/x86_64/wmemcmp.S
> > index 032f389158..8bd3cf80db 100644
> > --- a/sysdeps/x86_64/wmemcmp.S
> > +++ b/sysdeps/x86_64/wmemcmp.S
> > @@ -16,6 +16,8 @@
> >     License along with the GNU C Library; if not, see
> >     <https://www.gnu.org/licenses/>.  */
> >
> > -#define MEMCMP wmemcmp
> > +#define MEMCMP __wmemcmp
> >  #define USE_AS_WMEMCMP 1
> > -#include "multiarch/memcmp-sse2.S"
> > +#include "memcmp.S"
> > +
> > +weak_alias (__wmemcmp, wmemcmp)
> > --
> > 2.25.1
> >
>
>
> --
> H.J.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v1] x86: Fix missing __wmemcmp def for disable-multiarch build
  2022-04-19 23:39   ` Noah Goldstein
@ 2022-04-19 23:42     ` H.J. Lu
  2022-04-19 23:52       ` Noah Goldstein
  0 siblings, 1 reply; 9+ messages in thread
From: H.J. Lu @ 2022-04-19 23:42 UTC (permalink / raw)
  To: Noah Goldstein; +Cc: GNU C Library, Carlos O'Donell

On Tue, Apr 19, 2022 at 4:40 PM Noah Goldstein <goldstein.w.n@gmail.com> wrote:
>
> On Tue, Apr 19, 2022 at 6:36 PM H.J. Lu <hjl.tools@gmail.com> wrote:
> >
> > On Tue, Apr 19, 2022 at 3:55 PM Noah Goldstein <goldstein.w.n@gmail.com> wrote:
> > >
> > > commit 8804157ad9da39631703b92315460808eac86b0c
> > > Author: Noah Goldstein <goldstein.w.n@gmail.com>
> > > Date:   Fri Apr 15 12:27:59 2022 -0500
> > >
> > >     x86: Optimize memcmp SSE2 in memcmp.S
> > >
> > > Only defined wmemcmp and missed __wmemcmp. This commit fixes that by
> > > defining __wmemcmp and setting wmemcmp as a weak alias to __wmemcmp.
> > >
> > > Both multiarch and disable-multiarch builds succeed and full xchecks
> > > pass.
> > > ---
> > >  sysdeps/x86_64/multiarch/wmemcmp-sse2.S | 8 +++++---
> > >  sysdeps/x86_64/wmemcmp.S                | 6 ++++--
> > >  2 files changed, 9 insertions(+), 5 deletions(-)
> > >
> > > diff --git a/sysdeps/x86_64/multiarch/wmemcmp-sse2.S b/sysdeps/x86_64/multiarch/wmemcmp-sse2.S
> > > index 57be1c446e..92d6819cb3 100644
> > > --- a/sysdeps/x86_64/multiarch/wmemcmp-sse2.S
> > > +++ b/sysdeps/x86_64/multiarch/wmemcmp-sse2.S
> > > @@ -16,10 +16,12 @@
> > >     License along with the GNU C Library; if not, see
> > >     <https://www.gnu.org/licenses/>.  */
> > >
> > > +#define USE_AS_WMEMCMP 1
> > >  #if IS_IN (libc)
> >
> > Do we need to check "IS_IN (libc)" here?
>
> I'm not sure. Was essentially copying the existing memcmpeq code
> for this:
> https://sourceware.org/git/?p=glibc.git;a=blobdiff;f=sysdeps/x86_64/multiarch/memcmpeq-sse2.S;h=de7f5a7525ab41ea42ea581c6981ced63f8be976;hp=b80a29d4b05bd7401d16afdbeee96403480953d2;hb=a5659cf27d3ce6101c1632715d18ab6321755340;hpb=7a06be051c01b4325927efab5b4e4280bb4a5a42

Can you follow wmemchr-sse2.S instead?

> >
> > >  # define MEMCMP        __wmemcmp_sse2
> > > +# include "memcmp-sse2.S"
> > >  #else
> > > -# define MEMCMP        wmemcmp
> > > +# define MEMCMP        __wmemcmp
> > > +# include "../memcmp.S"
> > > +weak_alias (__wmemcmp, wmemcmp)
> > >  #endif
> > > -#define USE_AS_WMEMCMP 1
> > > -#include "memcmp-sse2.S"
> > > diff --git a/sysdeps/x86_64/wmemcmp.S b/sysdeps/x86_64/wmemcmp.S
> > > index 032f389158..8bd3cf80db 100644
> > > --- a/sysdeps/x86_64/wmemcmp.S
> > > +++ b/sysdeps/x86_64/wmemcmp.S
> > > @@ -16,6 +16,8 @@
> > >     License along with the GNU C Library; if not, see
> > >     <https://www.gnu.org/licenses/>.  */
> > >
> > > -#define MEMCMP wmemcmp
> > > +#define MEMCMP __wmemcmp
> > >  #define USE_AS_WMEMCMP 1
> > > -#include "multiarch/memcmp-sse2.S"
> > > +#include "memcmp.S"
> > > +
> > > +weak_alias (__wmemcmp, wmemcmp)
> > > --
> > > 2.25.1
> > >
> >
> >
> > --
> > H.J.



-- 
H.J.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v2] x86: Fix missing __wmemcmp def for disable-multiarch build
  2022-04-19 22:55 [PATCH v1] x86: Fix missing __wmemcmp def for disable-multiarch build Noah Goldstein
  2022-04-19 23:36 ` H.J. Lu
@ 2022-04-19 23:52 ` Noah Goldstein
  2022-04-19 23:56   ` H.J. Lu
  1 sibling, 1 reply; 9+ messages in thread
From: Noah Goldstein @ 2022-04-19 23:52 UTC (permalink / raw)
  To: libc-alpha

commit 8804157ad9da39631703b92315460808eac86b0c
Author: Noah Goldstein <goldstein.w.n@gmail.com>
Date:   Fri Apr 15 12:27:59 2022 -0500

    x86: Optimize memcmp SSE2 in memcmp.S

Only defined wmemcmp and missed __wmemcmp. This commit fixes that by
defining __wmemcmp and setting wmemcmp as a weak alias to __wmemcmp.

Both multiarch and disable-multiarch builds succeed and full xchecks
pass.
---
 sysdeps/x86_64/multiarch/wmemcmp-sse2.S | 8 ++------
 sysdeps/x86_64/wmemcmp.S                | 6 ++++--
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/sysdeps/x86_64/multiarch/wmemcmp-sse2.S b/sysdeps/x86_64/multiarch/wmemcmp-sse2.S
index 57be1c446e..f09192ed77 100644
--- a/sysdeps/x86_64/multiarch/wmemcmp-sse2.S
+++ b/sysdeps/x86_64/multiarch/wmemcmp-sse2.S
@@ -16,10 +16,6 @@
    License along with the GNU C Library; if not, see
    <https://www.gnu.org/licenses/>.  */
 
-#if IS_IN (libc)
-# define MEMCMP	__wmemcmp_sse2
-#else
-# define MEMCMP	wmemcmp
-#endif
 #define USE_AS_WMEMCMP	1
-#include "memcmp-sse2.S"
+#define MEMCMP	__wmemcmp_sse2
+#include "../memcmp.S"
diff --git a/sysdeps/x86_64/wmemcmp.S b/sysdeps/x86_64/wmemcmp.S
index 032f389158..8bd3cf80db 100644
--- a/sysdeps/x86_64/wmemcmp.S
+++ b/sysdeps/x86_64/wmemcmp.S
@@ -16,6 +16,8 @@
    License along with the GNU C Library; if not, see
    <https://www.gnu.org/licenses/>.  */
 
-#define MEMCMP	wmemcmp
+#define MEMCMP	__wmemcmp
 #define USE_AS_WMEMCMP	1
-#include "multiarch/memcmp-sse2.S"
+#include "memcmp.S"
+    
+weak_alias (__wmemcmp, wmemcmp)
-- 
2.25.1


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v1] x86: Fix missing __wmemcmp def for disable-multiarch build
  2022-04-19 23:42     ` H.J. Lu
@ 2022-04-19 23:52       ` Noah Goldstein
  0 siblings, 0 replies; 9+ messages in thread
From: Noah Goldstein @ 2022-04-19 23:52 UTC (permalink / raw)
  To: H.J. Lu; +Cc: GNU C Library, Carlos O'Donell

On Tue, Apr 19, 2022 at 6:42 PM H.J. Lu <hjl.tools@gmail.com> wrote:
>
> On Tue, Apr 19, 2022 at 4:40 PM Noah Goldstein <goldstein.w.n@gmail.com> wrote:
> >
> > On Tue, Apr 19, 2022 at 6:36 PM H.J. Lu <hjl.tools@gmail.com> wrote:
> > >
> > > On Tue, Apr 19, 2022 at 3:55 PM Noah Goldstein <goldstein.w.n@gmail.com> wrote:
> > > >
> > > > commit 8804157ad9da39631703b92315460808eac86b0c
> > > > Author: Noah Goldstein <goldstein.w.n@gmail.com>
> > > > Date:   Fri Apr 15 12:27:59 2022 -0500
> > > >
> > > >     x86: Optimize memcmp SSE2 in memcmp.S
> > > >
> > > > Only defined wmemcmp and missed __wmemcmp. This commit fixes that by
> > > > defining __wmemcmp and setting wmemcmp as a weak alias to __wmemcmp.
> > > >
> > > > Both multiarch and disable-multiarch builds succeed and full xchecks
> > > > pass.
> > > > ---
> > > >  sysdeps/x86_64/multiarch/wmemcmp-sse2.S | 8 +++++---
> > > >  sysdeps/x86_64/wmemcmp.S                | 6 ++++--
> > > >  2 files changed, 9 insertions(+), 5 deletions(-)
> > > >
> > > > diff --git a/sysdeps/x86_64/multiarch/wmemcmp-sse2.S b/sysdeps/x86_64/multiarch/wmemcmp-sse2.S
> > > > index 57be1c446e..92d6819cb3 100644
> > > > --- a/sysdeps/x86_64/multiarch/wmemcmp-sse2.S
> > > > +++ b/sysdeps/x86_64/multiarch/wmemcmp-sse2.S
> > > > @@ -16,10 +16,12 @@
> > > >     License along with the GNU C Library; if not, see
> > > >     <https://www.gnu.org/licenses/>.  */
> > > >
> > > > +#define USE_AS_WMEMCMP 1
> > > >  #if IS_IN (libc)
> > >
> > > Do we need to check "IS_IN (libc)" here?
> >
> > I'm not sure. Was essentially copying the existing memcmpeq code
> > for this:
> > https://sourceware.org/git/?p=glibc.git;a=blobdiff;f=sysdeps/x86_64/multiarch/memcmpeq-sse2.S;h=de7f5a7525ab41ea42ea581c6981ced63f8be976;hp=b80a29d4b05bd7401d16afdbeee96403480953d2;hb=a5659cf27d3ce6101c1632715d18ab6321755340;hpb=7a06be051c01b4325927efab5b4e4280bb4a5a42
>
> Can you follow wmemchr-sse2.S instead?

Fixed in v2.


>
> > >
> > > >  # define MEMCMP        __wmemcmp_sse2
> > > > +# include "memcmp-sse2.S"
> > > >  #else
> > > > -# define MEMCMP        wmemcmp
> > > > +# define MEMCMP        __wmemcmp
> > > > +# include "../memcmp.S"
> > > > +weak_alias (__wmemcmp, wmemcmp)
> > > >  #endif
> > > > -#define USE_AS_WMEMCMP 1
> > > > -#include "memcmp-sse2.S"
> > > > diff --git a/sysdeps/x86_64/wmemcmp.S b/sysdeps/x86_64/wmemcmp.S
> > > > index 032f389158..8bd3cf80db 100644
> > > > --- a/sysdeps/x86_64/wmemcmp.S
> > > > +++ b/sysdeps/x86_64/wmemcmp.S
> > > > @@ -16,6 +16,8 @@
> > > >     License along with the GNU C Library; if not, see
> > > >     <https://www.gnu.org/licenses/>.  */
> > > >
> > > > -#define MEMCMP wmemcmp
> > > > +#define MEMCMP __wmemcmp
> > > >  #define USE_AS_WMEMCMP 1
> > > > -#include "multiarch/memcmp-sse2.S"
> > > > +#include "memcmp.S"
> > > > +
> > > > +weak_alias (__wmemcmp, wmemcmp)
> > > > --
> > > > 2.25.1
> > > >
> > >
> > >
> > > --
> > > H.J.
>
>
>
> --
> H.J.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2] x86: Fix missing __wmemcmp def for disable-multiarch build
  2022-04-19 23:52 ` [PATCH v2] " Noah Goldstein
@ 2022-04-19 23:56   ` H.J. Lu
  2022-04-20  1:19     ` Noah Goldstein
  0 siblings, 1 reply; 9+ messages in thread
From: H.J. Lu @ 2022-04-19 23:56 UTC (permalink / raw)
  To: Noah Goldstein; +Cc: GNU C Library, Carlos O'Donell

On Tue, Apr 19, 2022 at 4:53 PM Noah Goldstein <goldstein.w.n@gmail.com> wrote:
>
> commit 8804157ad9da39631703b92315460808eac86b0c
> Author: Noah Goldstein <goldstein.w.n@gmail.com>
> Date:   Fri Apr 15 12:27:59 2022 -0500
>
>     x86: Optimize memcmp SSE2 in memcmp.S
>
> Only defined wmemcmp and missed __wmemcmp. This commit fixes that by
> defining __wmemcmp and setting wmemcmp as a weak alias to __wmemcmp.
>
> Both multiarch and disable-multiarch builds succeed and full xchecks
> pass.
> ---
>  sysdeps/x86_64/multiarch/wmemcmp-sse2.S | 8 ++------
>  sysdeps/x86_64/wmemcmp.S                | 6 ++++--
>  2 files changed, 6 insertions(+), 8 deletions(-)
>
> diff --git a/sysdeps/x86_64/multiarch/wmemcmp-sse2.S b/sysdeps/x86_64/multiarch/wmemcmp-sse2.S
> index 57be1c446e..f09192ed77 100644
> --- a/sysdeps/x86_64/multiarch/wmemcmp-sse2.S
> +++ b/sysdeps/x86_64/multiarch/wmemcmp-sse2.S
> @@ -16,10 +16,6 @@
>     License along with the GNU C Library; if not, see
>     <https://www.gnu.org/licenses/>.  */
>
> -#if IS_IN (libc)
> -# define MEMCMP        __wmemcmp_sse2
> -#else
> -# define MEMCMP        wmemcmp
> -#endif
>  #define USE_AS_WMEMCMP 1
> -#include "memcmp-sse2.S"
> +#define MEMCMP __wmemcmp_sse2
> +#include "../memcmp.S"
> diff --git a/sysdeps/x86_64/wmemcmp.S b/sysdeps/x86_64/wmemcmp.S
> index 032f389158..8bd3cf80db 100644
> --- a/sysdeps/x86_64/wmemcmp.S
> +++ b/sysdeps/x86_64/wmemcmp.S
> @@ -16,6 +16,8 @@
>     License along with the GNU C Library; if not, see
>     <https://www.gnu.org/licenses/>.  */
>
> -#define MEMCMP wmemcmp
> +#define MEMCMP __wmemcmp
>  #define USE_AS_WMEMCMP 1
> -#include "multiarch/memcmp-sse2.S"
> +#include "memcmp.S"
> +
> +weak_alias (__wmemcmp, wmemcmp)
> --
> 2.25.1
>

LGTM.

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

Thanks.

-- 
H.J.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2] x86: Fix missing __wmemcmp def for disable-multiarch build
  2022-04-19 23:56   ` H.J. Lu
@ 2022-04-20  1:19     ` Noah Goldstein
  2022-05-12 20:04       ` Sunil Pandey
  0 siblings, 1 reply; 9+ messages in thread
From: Noah Goldstein @ 2022-04-20  1:19 UTC (permalink / raw)
  To: H.J. Lu; +Cc: GNU C Library, Carlos O'Donell

On Tue, Apr 19, 2022 at 6:56 PM H.J. Lu <hjl.tools@gmail.com> wrote:
>
> On Tue, Apr 19, 2022 at 4:53 PM Noah Goldstein <goldstein.w.n@gmail.com> wrote:
> >
> > commit 8804157ad9da39631703b92315460808eac86b0c
> > Author: Noah Goldstein <goldstein.w.n@gmail.com>
> > Date:   Fri Apr 15 12:27:59 2022 -0500
> >
> >     x86: Optimize memcmp SSE2 in memcmp.S
> >
> > Only defined wmemcmp and missed __wmemcmp. This commit fixes that by
> > defining __wmemcmp and setting wmemcmp as a weak alias to __wmemcmp.
> >
> > Both multiarch and disable-multiarch builds succeed and full xchecks
> > pass.
> > ---
> >  sysdeps/x86_64/multiarch/wmemcmp-sse2.S | 8 ++------
> >  sysdeps/x86_64/wmemcmp.S                | 6 ++++--
> >  2 files changed, 6 insertions(+), 8 deletions(-)
> >
> > diff --git a/sysdeps/x86_64/multiarch/wmemcmp-sse2.S b/sysdeps/x86_64/multiarch/wmemcmp-sse2.S
> > index 57be1c446e..f09192ed77 100644
> > --- a/sysdeps/x86_64/multiarch/wmemcmp-sse2.S
> > +++ b/sysdeps/x86_64/multiarch/wmemcmp-sse2.S
> > @@ -16,10 +16,6 @@
> >     License along with the GNU C Library; if not, see
> >     <https://www.gnu.org/licenses/>.  */
> >
> > -#if IS_IN (libc)
> > -# define MEMCMP        __wmemcmp_sse2
> > -#else
> > -# define MEMCMP        wmemcmp
> > -#endif
> >  #define USE_AS_WMEMCMP 1
> > -#include "memcmp-sse2.S"
> > +#define MEMCMP __wmemcmp_sse2
> > +#include "../memcmp.S"
> > diff --git a/sysdeps/x86_64/wmemcmp.S b/sysdeps/x86_64/wmemcmp.S
> > index 032f389158..8bd3cf80db 100644
> > --- a/sysdeps/x86_64/wmemcmp.S
> > +++ b/sysdeps/x86_64/wmemcmp.S
> > @@ -16,6 +16,8 @@
> >     License along with the GNU C Library; if not, see
> >     <https://www.gnu.org/licenses/>.  */
> >
> > -#define MEMCMP wmemcmp
> > +#define MEMCMP __wmemcmp
> >  #define USE_AS_WMEMCMP 1
> > -#include "multiarch/memcmp-sse2.S"
> > +#include "memcmp.S"
> > +
> > +weak_alias (__wmemcmp, wmemcmp)
> > --
> > 2.25.1
> >
>
> LGTM.
>
> Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
>
> Thanks.

Thanks pushed.
>
> --
> H.J.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2] x86: Fix missing __wmemcmp def for disable-multiarch build
  2022-04-20  1:19     ` Noah Goldstein
@ 2022-05-12 20:04       ` Sunil Pandey
  0 siblings, 0 replies; 9+ messages in thread
From: Sunil Pandey @ 2022-05-12 20:04 UTC (permalink / raw)
  To: Noah Goldstein, Libc-stable Mailing List; +Cc: H.J. Lu, GNU C Library

On Tue, Apr 19, 2022 at 6:20 PM Noah Goldstein via Libc-alpha
<libc-alpha@sourceware.org> wrote:
>
> On Tue, Apr 19, 2022 at 6:56 PM H.J. Lu <hjl.tools@gmail.com> wrote:
> >
> > On Tue, Apr 19, 2022 at 4:53 PM Noah Goldstein <goldstein.w.n@gmail.com> wrote:
> > >
> > > commit 8804157ad9da39631703b92315460808eac86b0c
> > > Author: Noah Goldstein <goldstein.w.n@gmail.com>
> > > Date:   Fri Apr 15 12:27:59 2022 -0500
> > >
> > >     x86: Optimize memcmp SSE2 in memcmp.S
> > >
> > > Only defined wmemcmp and missed __wmemcmp. This commit fixes that by
> > > defining __wmemcmp and setting wmemcmp as a weak alias to __wmemcmp.
> > >
> > > Both multiarch and disable-multiarch builds succeed and full xchecks
> > > pass.
> > > ---
> > >  sysdeps/x86_64/multiarch/wmemcmp-sse2.S | 8 ++------
> > >  sysdeps/x86_64/wmemcmp.S                | 6 ++++--
> > >  2 files changed, 6 insertions(+), 8 deletions(-)
> > >
> > > diff --git a/sysdeps/x86_64/multiarch/wmemcmp-sse2.S b/sysdeps/x86_64/multiarch/wmemcmp-sse2.S
> > > index 57be1c446e..f09192ed77 100644
> > > --- a/sysdeps/x86_64/multiarch/wmemcmp-sse2.S
> > > +++ b/sysdeps/x86_64/multiarch/wmemcmp-sse2.S
> > > @@ -16,10 +16,6 @@
> > >     License along with the GNU C Library; if not, see
> > >     <https://www.gnu.org/licenses/>.  */
> > >
> > > -#if IS_IN (libc)
> > > -# define MEMCMP        __wmemcmp_sse2
> > > -#else
> > > -# define MEMCMP        wmemcmp
> > > -#endif
> > >  #define USE_AS_WMEMCMP 1
> > > -#include "memcmp-sse2.S"
> > > +#define MEMCMP __wmemcmp_sse2
> > > +#include "../memcmp.S"
> > > diff --git a/sysdeps/x86_64/wmemcmp.S b/sysdeps/x86_64/wmemcmp.S
> > > index 032f389158..8bd3cf80db 100644
> > > --- a/sysdeps/x86_64/wmemcmp.S
> > > +++ b/sysdeps/x86_64/wmemcmp.S
> > > @@ -16,6 +16,8 @@
> > >     License along with the GNU C Library; if not, see
> > >     <https://www.gnu.org/licenses/>.  */
> > >
> > > -#define MEMCMP wmemcmp
> > > +#define MEMCMP __wmemcmp
> > >  #define USE_AS_WMEMCMP 1
> > > -#include "multiarch/memcmp-sse2.S"
> > > +#include "memcmp.S"
> > > +
> > > +weak_alias (__wmemcmp, wmemcmp)
> > > --
> > > 2.25.1
> > >
> >
> > LGTM.
> >
> > Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
> >
> > Thanks.
>
> Thanks pushed.
> >
> > --
> > H.J.

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

--Sunil

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-05-12 20:05 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-19 22:55 [PATCH v1] x86: Fix missing __wmemcmp def for disable-multiarch build Noah Goldstein
2022-04-19 23:36 ` H.J. Lu
2022-04-19 23:39   ` Noah Goldstein
2022-04-19 23:42     ` H.J. Lu
2022-04-19 23:52       ` Noah Goldstein
2022-04-19 23:52 ` [PATCH v2] " Noah Goldstein
2022-04-19 23:56   ` H.J. Lu
2022-04-20  1:19     ` Noah Goldstein
2022-05-12 20:04       ` Sunil Pandey

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).