From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS17314 8.43.84.0/22 X-Spam-Status: No, score=-4.3 required=3.0 tests=AWL,BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (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 dcvr.yhbt.net (Postfix) with ESMTPS id 5D1871F8C6 for ; Wed, 15 Sep 2021 13:38:28 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 335FF385740E for ; Wed, 15 Sep 2021 13:38:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 335FF385740E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1631713107; bh=wvAmJZTXXeQE+4OHvzD53FxRo7SyO9JYyHudpRTIRtA=; h=In-Reply-To:References:Date:To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=dsYTivb2kZGFFGWDko+CWP0MwzfYlpFqiiK3xmnHcceoJxFwzFE0sWGEtbd4QHYyz YbHAI3Yya74C7g4eK8QUJC8kt7Q/JXml4NMmkDNg12vjFjD/oD6qhmBfNU4BhxdLOz t4Myg887KahNJf6nhxQzTEsKB+w8f/N68kbqZBTI= Received: from wnew2-smtp.messagingengine.com (wnew2-smtp.messagingengine.com [64.147.123.27]) by sourceware.org (Postfix) with ESMTPS id 966B63857802 for ; Wed, 15 Sep 2021 13:37:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 966B63857802 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.west.internal (Postfix) with ESMTP id 591F72B007E0 for ; Wed, 15 Sep 2021 09:37:45 -0400 (EDT) Received: from imap45 ([10.202.2.95]) by compute1.internal (MEProxy); Wed, 15 Sep 2021 09:37:45 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudehuddgieefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefofgggkfgjfhffhffvufgtsehttd ertderreejnecuhfhrohhmpedfkggrtghkucghvghinhgsvghrghdfuceoiigrtghkseho fihlfhholhhiohdrohhrgheqnecuggftrfgrthhtvghrnhepueetvdfgfeehvedvfeegfe ffkeeiudehtdeuveffkeffveduvddvveetheelueegnecuvehluhhsthgvrhfuihiivgep tdenucfrrghrrghmpehmrghilhhfrhhomhepiigrtghksehofihlfhholhhiohdrohhrgh X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 0C80624A0065; Wed, 15 Sep 2021 09:37:43 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-1291-gc66fc0a3a2-fm-20210913.001-gc66fc0a3 Mime-Version: 1.0 Message-Id: <02afac02-47a5-43a5-8437-79fdbbea62aa@www.fastmail.com> In-Reply-To: References: <20210913230506.546749-1-goldstein.w.n@gmail.com> Date: Wed, 15 Sep 2021 09:37:23 -0400 To: libc-alpha@sourceware.org Subject: =?UTF-8?Q?Re:_[PATCH_1/5]_x86=5F64:_Add_support_for_bcmp_using_sse2, _sse?= =?UTF-8?Q?4=5F1,_avx2,_and_evex?= Content-Type: text/plain 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: , From: Zack Weinberg via Libc-alpha Reply-To: Zack Weinberg Errors-To: libc-alpha-bounces+e=80x24.org@sourceware.org Sender: "Libc-alpha" On Tue, Sep 14, 2021, at 8:00 PM, Joseph Myers wrote: > bcmp is an obsolescent function that no modern programs should be using, > and it's not in the implementation namespace either so compilers shouldn't > translate memcmp calls to bcmp. I want to add that glibc has made bcmp an alias for memcmp for many years, which means that Linux- or Hurd-specific programs that are still using bcmp may have come to depend on its return value indicating ordering rather than just equality. I myself had been under the impression that they were *specified* exactly the same, until this thread prompted me to double-check the specifications. As such I don't think it's safe for *glibc* to accept patches that optimize bcmp separately from memcmp. 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. zw