From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa4.mentor.iphmx.com (esa4.mentor.iphmx.com [68.232.137.252]) by sourceware.org (Postfix) with ESMTPS id DC4443858420 for ; Fri, 17 Sep 2021 14:19:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DC4443858420 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com IronPort-SDR: 14pOXxp+sRWP7NCRDrJYGutm/B9BuBj42+VJp9C7Qo2u3ybZ+opu+MgDrfR+49lDEDMxBN6wpR k9wFS94llOLUl7TFcyh1QIPpZ5JykZLezFCG0RHr0SDXky7f9Y2HjpKO1b93klLXKjiR0ZEXLF 2CrGhVw+z6ejlkabdymPMEuL2qeN7KOv0WS6E1tXqhQ8HxerplRJGF5g+GIRp/KSIGbeQJ6s5t 9lV6zZWkrKUgXzicWr/QuMNYr2wGgkMHUPihpsu26i3wVK39amLdUqFQR7lsAMCNwOiaPrLEbs q/HdFiuhAjvm8FCErMbes68X X-IronPort-AV: E=Sophos;i="5.85,301,1624348800"; d="scan'208";a="66172481" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa4.mentor.iphmx.com with ESMTP; 17 Sep 2021 06:19:58 -0800 IronPort-SDR: SkIHLEduwSj03SsjxEHgXhKVAepqkFRtPXrQyZgbkcyUstkRKKV1mqdj0u83BkR5+huB0Kanlu uNqSsmucPwgQGgfK1EpEBoqg3dnz65jVw1/UvUtzyl9kqBOUQujCJH3gqcx+h4KZe9NVt3UK2M R+TiHdzXkMJYeds59KseCjQvmuc5pcT7fyRP+0wW1ieczBsXzIyRoytIOcY5CxiLwHJ5Sq2Qyf RuIgEPI2sy4Q5/0ZHKdc1b4P3VJoSd8ep2Usx7kxG1NLywsNO789vkc+NXHraK+8aYAHe/kGrs zmM= Date: Fri, 17 Sep 2021 14:19:53 +0000 From: Joseph Myers X-X-Sender: jsm28@digraph.polyomino.org.uk To: Richard Biener CC: GCC Development , GNU C Library , Subject: Re: [libc-coord] Add new ABI '__memcmpeq()' to libc In-Reply-To: Message-ID: References: User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-02.mgc.mentorg.com (139.181.222.2) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-Spam-Status: No, score=-3118.4 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=no 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, 17 Sep 2021 14:20:03 -0000 On Fri, 17 Sep 2021, Richard Biener via Gcc wrote: > when the libc version targeted does not provide __memcmpeq? Or would > glibc through magically communicate the availability of the new ABI > without actually declaring the function? > (I'm not sure whether a GCC build-time decision via configure is the > very best idea) 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. -- Joseph S. Myers joseph@codesourcery.com