From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x42c.google.com (mail-pf1-x42c.google.com [IPv6:2607:f8b0:4864:20::42c]) by sourceware.org (Postfix) with ESMTPS id 8C9893858416 for ; Fri, 22 Oct 2021 18:09:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8C9893858416 Received: by mail-pf1-x42c.google.com with SMTP id o133so4350319pfg.7 for ; Fri, 22 Oct 2021 11:09:49 -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=q3pccoOXjpjtFF1QbAiaByYPQEYJEcawP4t14L0rVyk=; b=HL5A4KgK4IFweMv0juQGUqcmHbSlzGKzNb+NCEivvWD6+cgZBw/YslYtdKgWmR0lS8 D7ZZf0u+BsdqzL6e4BAilCiHVWruymXTKojWfdGuuM2QW7HL2iIGInhZP2AuiPKCJymq 8jWB92At6tiY55Ev2b/Qf5IiInxvUbKT5pdQppfFGP29E3GE0cT+1KZDi9GHzbrncRUs WNk2X7CwcsfPwTacBQJV2IzsqFQC8a5jU6NHj+MXXsYNQfu0KB1IABUBiFXXAx0+Zuju wXTmjD9ZzKLtVXAa/SOaMsLIJ3HgfaDkowVz7jkfHwmoOcdZm7GQTN/1fkITWIskmudA /xDw== X-Gm-Message-State: AOAM533HxbGloUhyVUoeyT3p+3sGcsA9ZC8Cdu2WofkN/VmRzSKb/dfO KKXYTbAstt+2SkZ/Mq6ixnJMI6gsNuUaJFZliUsEsLE+1Qo= X-Google-Smtp-Source: ABdhPJyhiQlzx7Hsia/1l0j5fz04HOm+ViphHUqsbKJtO3yWXweCrE6YZBZzSaYt4xSYTg6I5jupSJhBxInt5kJj2rU= X-Received: by 2002:aa7:9735:0:b0:44c:619f:29fc with SMTP id k21-20020aa79735000000b0044c619f29fcmr1526286pfg.79.1634926188629; Fri, 22 Oct 2021 11:09:48 -0700 (PDT) MIME-Version: 1.0 References: <20210927203827.2852935-1-goldstein.w.n@gmail.com> <20211022054949.895120-1-goldstein.w.n@gmail.com> In-Reply-To: From: Noah Goldstein Date: Fri, 22 Oct 2021 13:09:37 -0500 Message-ID: Subject: Re: [PATCH v9 1/3] String: Add support for __memcmpeq() ABI on all targets To: "H.J. Lu" Cc: GNU C Library , "Carlos O'Donell" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, 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: Fri, 22 Oct 2021 18:09:51 -0000 On Fri, Oct 22, 2021 at 12:45 PM H.J. Lu wrote: > > On Fri, Oct 22, 2021 at 10:41 AM Noah Goldstein wrote: > > > > On Fri, Oct 22, 2021 at 12:19 PM Noah Goldstein wrote: > > > > > > On Fri, Oct 22, 2021 at 12:51 AM Noah Goldstein wrote: > > > > > > > > No bug. > > > > > > > > This commit adds support for __memcmpeq() as a new ABI for all > > > > targets. In this commit __memcmpeq() is implemented only as an alias > > > > to the corresponding targets memcmp() implementation. __memcmpeq() is > > > > added as a new symbol starting with GLIBC_2.35 and defined in string.h > > > > with comments explaining its behavior. Basic tests that it is callable > > > > and works where added in string/tester.c > > > > > > > > As discussed in the proposal "Add new ABI '__memcmpeq()' to libc" > > > > __memcmpeq() is essentially a reserved namespace for bcmp(). The means > > > > is shares the same specifications as memcmp() except the return value > > > > for non-equal byte sequences is any non-zero value. This is less > > > > strict than memcmp()'s return value specification and can be better > > > > optimized when a boolean return is all that is needed. > > > > > > > > __memcmpeq() is meant to only be called by compilers if they can prove > > > > that the return value of a memcmp() call is only used for its boolean > > > > value. > > > > > > > > All tests in string/tester.c passed. As well build succeeds on > > > > x86_64-linux-gnu target. > > > > --- > > > > Kept one weak alias in in: > > > > sysdeps/x86_64/memcmp.S > > > > > > > > This will be preempted by the strong_alias in: > > > > sysdeps/x86_64/multiarch/memcmp.c > > > > > > This issue is present on some other builds. Fixing. > > > > Should the check on --disable-multi-arch also include > > IS_IN (LIBC)? > > Why? It can be used in ld.so. Just looking at: '#if ! HAVE_MEMCMP_IFUNC' in memcmp-z900.S which requires both. > > -- > H.J.