From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.9]) by sourceware.org (Postfix) with ESMTPS id E29363858408 for ; Tue, 28 Sep 2021 08:15:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E29363858408 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=linux-m68k.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=nefkom.net Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4HJXPk0zRGz1qwxj; Tue, 28 Sep 2021 10:15:38 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4HJXPk0kCtz1qqkB; Tue, 28 Sep 2021 10:15:38 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id J-luUWjY_ufM; Tue, 28 Sep 2021 10:15:37 +0200 (CEST) X-Auth-Info: OHTleh7dd5GwOPI3QuemuIq5aXYZqjRlutt7L9wvx8DFlykNoljX51NN7qc20BlC Received: from igel.home (ppp-46-244-172-236.dynamic.mnet-online.de [46.244.172.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Tue, 28 Sep 2021 10:15:37 +0200 (CEST) Received: by igel.home (Postfix, from userid 1000) id ED9C62C08F2; Tue, 28 Sep 2021 10:15:36 +0200 (CEST) From: Andreas Schwab To: Noah Goldstein via Libc-alpha Subject: Re: [PATCH v3] String: Add support for __memcmpeq() ABI on all targets References: <20210927203827.2852935-1-goldstein.w.n@gmail.com> <20210928012407.557866-1-goldstein.w.n@gmail.com> X-Yow: It's NO USE.. I've gone to ``CLUB MED''!! Date: Tue, 28 Sep 2021 10:15:36 +0200 In-Reply-To: <20210928012407.557866-1-goldstein.w.n@gmail.com> (Noah Goldstein via Libc-alpha's message of "Mon, 27 Sep 2021 20:24:07 -0500") Message-ID: <87y27h9kuv.fsf@igel.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-10.2 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, 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: Tue, 28 Sep 2021 08:15:39 -0000 On Sep 27 2021, Noah Goldstein via Libc-alpha wrote: > diff --git a/string/tester.c b/string/tester.c > index 778160ae6e..7d8e1b7c1e 100644 > --- a/string/tester.c > +++ b/string/tester.c > @@ -1449,6 +1449,19 @@ test_bcmp (void) > check(bcmp("abc", "def", 0) == 0, 8); /* Zero count. */ > } > > +static void > +test_memcmpeq (void) > +{ > + it = "__memcmpeq"; > + check(__memcmpeq("a", "a", 1) == 0, 1); /* Identity. */ > + check(__memcmpeq("abc", "abc", 3) == 0, 2); /* Multicharacter. */ > + check(__memcmpeq("abcd", "abce", 4) != 0, 3); /* Honestly unequal. */ > + check(__memcmpeq("abce", "abcd", 4) != 0, 4); > + check(__memcmpeq("alph", "beta", 4) != 0, 5); > + check(__memcmpeq("abce", "abcd", 3) == 0, 6); /* Count limited. */ > + check(__memcmpeq("abc", "def", 0) == 0, 8); /* Zero count. */ Style: space before paren. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different."