unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Noah Goldstein via Libc-alpha <libc-alpha@sourceware.org>
To: Joseph Myers <joseph@codesourcery.com>
Cc: Florian Weimer <fweimer@redhat.com>,
	Zack Weinberg <zack@owlfolio.org>,
	Zack Weinberg via Libc-alpha <libc-alpha@sourceware.org>
Subject: Re: Re: [PATCH 1/5] x86_64: Add support for bcmp using sse2, sse 4_1,  avx2, and evex
Date: Sun, 26 Sep 2021 20:35:51 -0500	[thread overview]
Message-ID: <CAFUsyf+UazWdb-BHbW0BKZha_7B=_Ghfv8pVGHC+BKQocSpv9Q@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.22.394.2109151815270.1235114@digraph.polyomino.org.uk>

On Wed, Sep 15, 2021 at 1:30 PM Joseph Myers <joseph@codesourcery.com>
wrote:

> On Wed, 15 Sep 2021, Noah Goldstein via Libc-alpha wrote:
>
> > > > I do rather like the idea of a __gnu_memeq() that compilers could
> > > > optimize memcmp calls to, when they can prove that the result is used
> > > > only for its truth value.
> > >
> > > Yes, we should use a name in the implementation namespace because even
> > > if we pick an obvious like memequal, it will probably come back under a
> > > different name from the C committee.
> > >
> >
> > +1
> >
> > What would be the steps for getting that into GLIBC?
>
> Define what the exact interface you want is (the exact function type and
> (reserved) name and semantics of the return value and arguments;
> explicitly including details such as whether the full n bytes of each
> argument are required to be mapped into memory even if they compare
> unequal before n bytes).
>
> Discuss it on the libc-coord mailing list (probably include compiler
> mailing lists as well) to get agreement on semantics that are good for
> both libc implementations and for compilers to generate; it's best if this
> interface is acceptable to multiple libc implementations and suitable for
> multiple compilers to generate calls to (when available in libc).
>
> Implement in glibc, across all glibc ports and including all the ABI test
> baseline updates.  If the semantics are such that an alias to memcmp is a
> valid implementation, that probably means adding such an alias to every
> memcmp implementation in glibc (and verifying with build-many-glibcs.py
> that they all build and pass the ABI tests), as well as allowing for
> architectures to add their own separate implementation of the new function
> if they wish.  There should also be execution tests that the new function
> works correctly at runtime (with different alignment, arguments just
> before unmapped pages, etc., as with other string function tests).  If the
> new function is purely an ABI, not an API, it doesn't need user manual
> documentation, however (although there will at least need to be a comment
> giving the detailed semantics that were agreed on libc-coord).
>
>
Is there some documentation for how to effectively use build-many-glibcs.py

I've tried:

$> python3 src/glibc/scripts/build-many-glibcs.py /some/were checkout
gcc-vcs-11
$> python3 src/glibc/scripts/build-many-glibcs.py /some/were host-libraries
$> python3 src/glibc/scripts/build-many-glibcs.py /some/were compilers
$> python3 src/glibc/scripts/build-many-glibcs.py /some/were glibcs

With GLIBC master I'm seeing a ton of failures so I'm not sure how I'm
supposed to actually test my patches.

I've also tried with gcc-vcs-mainline although my guess is that it will
just be a less stable version that could cause unrelated failures.



> --
> Joseph S. Myers
> joseph@codesourcery.com
>

  reply	other threads:[~2021-09-27  1:36 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-13 23:05 [PATCH 1/5] x86_64: Add support for bcmp using sse2, sse4_1, avx2, and evex Noah Goldstein via Libc-alpha
2021-09-13 23:05 ` [PATCH 2/5] x86_64: Add sse2 optimized bcmp implementation in memcmp.S Noah Goldstein via Libc-alpha
2021-09-13 23:05 ` [PATCH 3/5] x86_64: Add sse4_1 optimized bcmp implementation in memcmp-sse4.S Noah Goldstein via Libc-alpha
2021-09-13 23:05 ` [PATCH 4/5] x86_64: Add avx2 optimized bcmp implementation in bcmp-avx2.S Noah Goldstein via Libc-alpha
2021-09-13 23:05 ` [PATCH 5/5] x86_64: Add evex optimized bcmp implementation in bcmp-evex.S Noah Goldstein via Libc-alpha
2021-09-14  1:18   ` Carlos O'Donell via Libc-alpha
2021-09-14  2:05     ` Noah Goldstein via Libc-alpha
2021-09-14  2:35       ` Carlos O'Donell via Libc-alpha
2021-09-14  2:55         ` DJ Delorie via Libc-alpha
2021-09-14  3:24           ` Noah Goldstein via Libc-alpha
2021-09-14  3:40         ` Noah Goldstein via Libc-alpha
2021-09-14  4:21           ` DJ Delorie via Libc-alpha
2021-09-14  5:29             ` Noah Goldstein via Libc-alpha
2021-09-14  5:42               ` DJ Delorie via Libc-alpha
2021-09-14  5:55                 ` Noah Goldstein via Libc-alpha
2021-09-13 23:22 ` [PATCH 1/5] x86_64: Add support for bcmp using sse2, sse4_1, avx2, and evex Noah Goldstein via Libc-alpha
2021-09-14  6:30 ` [PATCH v2 " Noah Goldstein via Libc-alpha
2021-09-14  6:30   ` [PATCH v2 2/5] x86_64: Add sse2 optimized bcmp implementation in memcmp.S Noah Goldstein via Libc-alpha
2021-09-14  6:30   ` [PATCH v2 3/5] x86_64: Add sse4_1 optimized bcmp implementation in memcmp-sse4.S Noah Goldstein via Libc-alpha
2021-09-14  6:30   ` [PATCH v2 4/5] x86_64: Add avx2 optimized bcmp implementation in bcmp-avx2.S Noah Goldstein via Libc-alpha
2021-09-14  6:30   ` [PATCH v2 5/5] x86_64: Add evex optimized bcmp implementation in bcmp-evex.S Noah Goldstein via Libc-alpha
2021-09-14 14:40   ` [PATCH v2 1/5] x86_64: Add support for bcmp using sse2, sse4_1, avx2, and evex H.J. Lu via Libc-alpha
2021-09-14 19:23     ` Noah Goldstein via Libc-alpha
2021-09-14 20:30     ` Florian Weimer via Libc-alpha
2021-09-15  0:00 ` [PATCH " Joseph Myers
2021-09-15 13:37   ` Zack Weinberg via Libc-alpha
2021-09-15 14:01     ` Re: [PATCH 1/5] x86_64: Add support for bcmp using sse2, sse 4_1, " Florian Weimer via Libc-alpha
2021-09-15 18:06       ` Noah Goldstein via Libc-alpha
2021-09-15 18:30         ` Joseph Myers
2021-09-27  1:35           ` Noah Goldstein via Libc-alpha [this message]
2021-09-27  7:29             ` Florian Weimer via Libc-alpha
2021-09-27 16:49               ` Noah Goldstein via Libc-alpha
2021-09-27 16:54                 ` Florian Weimer via Libc-alpha
2021-09-27 17:54                   ` Noah Goldstein via Libc-alpha
2021-09-27 17:56                     ` Florian Weimer via Libc-alpha
2021-09-27 18:05                       ` Noah Goldstein via Libc-alpha
2021-09-27 18:10                         ` Florian Weimer via Libc-alpha
2021-09-27 18:15                           ` Noah Goldstein via Libc-alpha
2021-09-27 18:22                             ` Florian Weimer via Libc-alpha
2021-09-27 18:34                               ` Noah Goldstein via Libc-alpha
2021-09-27 18:56                                 ` Florian Weimer via Libc-alpha
2021-09-27 19:20                                   ` Noah Goldstein via Libc-alpha
2021-09-27 19:34                                     ` Florian Weimer via Libc-alpha
2021-09-27 19:43                                       ` Noah Goldstein via Libc-alpha
2021-09-27 19:59                                         ` Florian Weimer via Libc-alpha
2021-09-27 20:22                                           ` Noah Goldstein via Libc-alpha
2021-09-27 20:24                                             ` Florian Weimer via Libc-alpha
2021-09-27 20:38                                               ` Noah Goldstein via Libc-alpha
2021-09-28  0:07                                                 ` Noah Goldstein via Libc-alpha
2021-09-27 17:42               ` Joseph Myers
2021-09-27 17:48                 ` Noah Goldstein via Libc-alpha

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

  List information: https://www.gnu.org/software/libc/involved.html

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

  git send-email \
    --in-reply-to='CAFUsyf+UazWdb-BHbW0BKZha_7B=_Ghfv8pVGHC+BKQocSpv9Q@mail.gmail.com' \
    --to=libc-alpha@sourceware.org \
    --cc=fweimer@redhat.com \
    --cc=goldstein.w.n@gmail.com \
    --cc=joseph@codesourcery.com \
    --cc=zack@owlfolio.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).