From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) by sourceware.org (Postfix) with ESMTPS id 8A2DC3858402 for ; Wed, 27 Oct 2021 18:47:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8A2DC3858402 Received: by mail-pl1-x62c.google.com with SMTP id v20so2620334plo.7 for ; Wed, 27 Oct 2021 11:47:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=rbbEjgdYeCvWUUbdSuV7YUUBDNkRfyZD3zSgRnoxtU0=; b=VjkvfP4lwVYzfBakKqKMDwixLd7ObyiaeKCX5vYVhuLI/gihGadQ3qAS9d2rwqs76i 45b6Bkd8uq5CuMiy6J02V07iU2HckhAh3EABwFTOjwZSagIuQJuqvu4ONspvcXInscVI iVPHywTHxJAvwmcvjVWaX8SBHeAyKQaHzMCxPKtczdD3TYAd3+XS482uCE1ymMpFVS7m 8/j03M5wrWNudpPOgIRabvb0OpOTZNWUYNSwF7163BPVFKsaBKazhgK4lh8SDACh5GhA rC1a5n2JSHtXjVPrzuS2spGQ89HxJ2bwyeFXZDj3CrB9QQN5Y+zbqpvBolgIon1uC4hZ cYJA== X-Gm-Message-State: AOAM533WFZ4cSSfPTwRRWNsWjfBXH3kCqQiPIk3qYonSUyeVYukm7miS bqcSyXSH1Zz7dP8R9xfoAtfq9WkTLf1+LIqWLEQ= X-Google-Smtp-Source: ABdhPJzCo1bb/UPy/Rb8r2uj0zSHwF4qB4QU3+OryeOyOg+jN022N7Ts0m1CSZj2yKeyx1H7yOkqKx0eJ28NiX4D8uI= X-Received: by 2002:a17:902:f545:b0:141:7652:8f05 with SMTP id h5-20020a170902f54500b0014176528f05mr2301162plf.0.1635360429695; Wed, 27 Oct 2021 11:47:09 -0700 (PDT) MIME-Version: 1.0 References: <20211027024323.1199441-1-goldstein.w.n@gmail.com> In-Reply-To: From: Noah Goldstein Date: Wed, 27 Oct 2021 13:46:59 -0500 Message-ID: Subject: Re: [PATCH v1 1/6] String: Add __memcmpeq as build target To: "H.J. Lu" Cc: GNU C Library , "Carlos O'Donell" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Oct 2021 18:47:13 -0000 On Wed, Oct 27, 2021 at 7:43 AM H.J. Lu wrote: > > On Tue, Oct 26, 2021 at 7:43 PM Noah Goldstein wrote: > > > > No bug. This commit just adds __memcmpeq as a build target so that > > implementations for __memcmpeq that are not just aliases to memcmp can > > be supported. > > --- > > string/Makefile | 2 +- > > string/memcmpeq.c | 24 ++++++++++++++++++++++++ > > 2 files changed, 25 insertions(+), 1 deletion(-) > > create mode 100644 string/memcmpeq.c > > > > diff --git a/string/Makefile b/string/Makefile > > index 40d6fac133..2199dd30b7 100644 > > --- a/string/Makefile > > +++ b/string/Makefile > > @@ -34,7 +34,7 @@ routines := strcat strchr strcmp strcoll strcpy strcspn \ > > strerror _strerror strlen strnlen \ > > strncat strncmp strncpy \ > > strrchr strpbrk strsignal strspn strstr strtok \ > > - strtok_r strxfrm memchr memcmp memmove memset \ > > + strtok_r strxfrm memchr memcmp memcmpeq memmove memset \ > > mempcpy bcopy bzero ffs ffsll stpcpy stpncpy \ > > strcasecmp strncase strcasecmp_l strncase_l \ > > memccpy memcpy wordcopy strsep strcasestr \ > > diff --git a/string/memcmpeq.c b/string/memcmpeq.c > > new file mode 100644 > > index 0000000000..08726325a8 > > --- /dev/null > > +++ b/string/memcmpeq.c > > @@ -0,0 +1,24 @@ > > +/* Copyright (C) 1991-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 > > + . */ > > + > > +/* This file is intentionally left empty. It exists so that both > > + architectures which implement __memcmpeq seperately from memcmp and > > + architectures which implement __memcmpeq by having it alias memcmp will > > + build. > > + > > + The alias for __memcmpeq to memcmp for the C implementation is in > > + memcmp.c. */ > > -- > > 2.25.1 > > > > LGTM. > > Reviewed-by: H.J. Lu > > Thanks. > > H.J. Thanks. Pushed the patchset.