From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by sourceware.org (Postfix) with ESMTPS id 851B53858D39 for ; Tue, 21 Sep 2021 19:53:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 851B53858D39 Received: by mail-pl1-x62e.google.com with SMTP id v2so148145plp.8 for ; Tue, 21 Sep 2021 12:53:32 -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=NzC58q6RXT1KYAGJJGMiAXdOWwFU6ZQFwNsvo1U4cHY=; b=Z79kBnn2sPVlZ1dQQiaBoGt3nywJlHmgXv22+1iKCoE+yiGGtlGXhERvPWM6YKvgO/ Mwa4fw0SyUFPw2wmIBkHWWnzinxQhGbFluoNAo5EpGfTRDnWrWu0y6zh/dwV94kUi9wa EfoZqRtwIIHGa39ybXrMz7sxdB0AZmQM497VH7dwvhd3m7JARVbtKJc5XXoe6MyT73Wr UpEog5abiZC2Il88yKkE3pg5+HLQSWXEcdkvgemlvO4HA4NboJwaJSwpnXdZTDxkpu7x ap6w5UUP+IWFftEQSxS5rwwd+FotXkSAmdGXm1VFuH/ERFerGDO3OqhDH8cPFes50DJW TJMQ== X-Gm-Message-State: AOAM532Ap7x87NS7E/W7KgmpYcrDsgOAfxFfUM0t7ZkQykDzzbhdDZqq 9DpJ+am6GDGjCIDMIxmA2ddEeCTzPKRhbYtmaJc= X-Google-Smtp-Source: ABdhPJxeErxAdeyDT9vJ9lfCw5j/dnTI2WHf8V4B/NknNd7Smppb3DxrdWVqmA3COzVL0zDYuKCCzNawWZFlLZYwFxc= X-Received: by 2002:a17:902:7c94:b0:13b:8d10:cc4f with SMTP id y20-20020a1709027c9400b0013b8d10cc4fmr29180764pll.54.1632254011622; Tue, 21 Sep 2021 12:53:31 -0700 (PDT) MIME-Version: 1.0 References: <87lf3vb7m5.fsf@oldenburg.str.redhat.com> In-Reply-To: <87lf3vb7m5.fsf@oldenburg.str.redhat.com> From: Noah Goldstein Date: Tue, 21 Sep 2021 14:53:20 -0500 Message-ID: Subject: Re: [libc-coord] Add new ABI '__memcmpeq()' to libc To: Florian Weimer Cc: Joseph Myers , Richard Biener , GCC Development , GNU C Library X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=unavailable autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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: Tue, 21 Sep 2021 19:53:34 -0000 On Fri, Sep 17, 2021 at 9:27 AM Florian Weimer via Libc-alpha < libc-alpha@sourceware.org> wrote: > * Joseph Myers: > > > I was supposing a build-time decision (using > GCC_GLIBC_VERSION_GTE_IFELSE > > to know if the glibc version on the target definitely has this > function). > > But if we add a header declaration, you could check for __memcmpeq being > > declared (and so cover arbitrary C libraries, not just glibc, and avoid > > issues of needing to disable this logic for freestanding compilations, > > which would otherwise be an issue if a glibc-target toolchain is used > for > > a freestanding kernel compilation). The case of people calling > > __builtin_memcmp (or declaring memcmp themselves) without string.h > > included probably isn't one it's important to optimize. > > The header-less case looks relevant to C++ and other language front > ends, though. So a GCC_GLIBC_VERSION_GTE_IFELSE check could still make > sense for them. > > (Dropping libc-coord.) > > Thanks, > Florian > > What are we going with? Should I go forward with the proposal in GLIBC? If I should go forward with it should I include a def in string.h?