From patchwork Wed Oct 27 02:43:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Noah Goldstein X-Patchwork-Id: 1546717 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=JD16z2sb; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HfCgW63f3z9sS8 for ; Wed, 27 Oct 2021 13:43:51 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 54E4F3857C67 for ; Wed, 27 Oct 2021 02:43:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 54E4F3857C67 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1635302629; bh=h0Gpw+fxCtyrcEa7Z4XBHuj6U7XVo3KUEK79ct4HSvE=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=JD16z2sbvtZd4KfEahfj4VVgEYqGq24mZnBhB8eH9GQBtGoRLHZyJd11vbVErYCLL UepXVr47OSH33AA88y+Tfzb8lo1Ri0zrCw23QP8h+DN//GQeEwjEdqNkSGc/hywiX8 n+1ivpOlfvB3Rxmehj2G8vcBsn0mkcjRkBe8pFow= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-il1-x129.google.com (mail-il1-x129.google.com [IPv6:2607:f8b0:4864:20::129]) by sourceware.org (Postfix) with ESMTPS id 139F23858423 for ; Wed, 27 Oct 2021 02:43:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 139F23858423 Received: by mail-il1-x129.google.com with SMTP id j3so1395594ilr.6 for ; Tue, 26 Oct 2021 19:43:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=h0Gpw+fxCtyrcEa7Z4XBHuj6U7XVo3KUEK79ct4HSvE=; b=RzXlLhdR2xTJfZqtrVGvqdN8edTVqInmxHKaDywrCEgq1k74Blb7EX9zWZI9/d06ai E5fv+e1ym6nh7LmIzPFML/NvoONuxbbTjmnlbvWn8iA4WEUFAZgdT39vzYvGilrZwqlj sF10LSf86FKx1DIDBeAPzkT0KYhyfNeLggQPO3J5s6IW2TnqacbSySJXv46QE5Ejt5Vo GG5pd93gZZNg4YCwXwu8krHEwB01w1iIR3t4gMAKYLftPCl/Cp0uHlF/y1uPB92aGiVC DDIVHDv1SOS//zaNT4QNtuaVSVCBqtqXH9n4deRT8da5VpkuAbAVKKwR1WeJfiTYEP30 ktxQ== X-Gm-Message-State: AOAM533/f6LvhWbR6KMiiRQKST0MCdfWKR/EuGobWEUnLkPPCG3uKy4G OmWH8O+uSZYlp3DvP4lDsb6v4Hf6vUs= X-Google-Smtp-Source: ABdhPJzfyqtgHKG4qTaE3c3naLJQAsyAfxOf2qCZbqR7h1dEaJRt1+zLL1OXrnRBMgiSPlVkLZaIrw== X-Received: by 2002:a05:6e02:190f:: with SMTP id w15mr5273834ilu.121.1635302609438; Tue, 26 Oct 2021 19:43:29 -0700 (PDT) Received: from localhost.localdomain (mobile-130-126-255-38.near.illinois.edu. [130.126.255.38]) by smtp.googlemail.com with ESMTPSA id l6sm12215373ilt.31.2021.10.26.19.43.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Oct 2021 19:43:29 -0700 (PDT) To: libc-alpha@sourceware.org Subject: [PATCH v1 1/6] String: Add __memcmpeq as build target Date: Tue, 26 Oct 2021 21:43:18 -0500 Message-Id: <20211027024323.1199441-1-goldstein.w.n@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Spam-Status: No, score=-12.0 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-Patchwork-Original-From: Noah Goldstein via Libc-alpha From: Noah Goldstein Reply-To: Noah Goldstein Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org Sender: "Libc-alpha" 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. Reviewed-by: H.J. Lu --- 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. */