From patchwork Wed Nov 3 19:06:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Noah Goldstein X-Patchwork-Id: 1550512 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=bNG4kVPY; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4Hkx934ltWz9sR4 for ; Thu, 4 Nov 2021 06:07:19 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 49EB2385841B for ; Wed, 3 Nov 2021 19:07:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 49EB2385841B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1635966437; bh=TG6ijxdHEga6IRkxxW+/qDt5Ql0tBCMCyEzzBVBHJQQ=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=bNG4kVPYLFsIPgY1g/QvmA+aDskuHkWhdHrbIEGyghrLl+Ma4I8zrbUvbnmwL/ypR KPwQbAvqU2MueiJzmKkBThXr+Gu/32zYocTQVyiqjLpao9r92jLG/KKVbx0u8vseVH pSpmzZgZyqFywmNHqFjUeyhxyyRyMOe+EuiNmTn4= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-io1-xd2a.google.com (mail-io1-xd2a.google.com [IPv6:2607:f8b0:4864:20::d2a]) by sourceware.org (Postfix) with ESMTPS id 62EBE3858D28 for ; Wed, 3 Nov 2021 19:07:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 62EBE3858D28 Received: by mail-io1-xd2a.google.com with SMTP id d70so3136234iof.7 for ; Wed, 03 Nov 2021 12:07:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=TG6ijxdHEga6IRkxxW+/qDt5Ql0tBCMCyEzzBVBHJQQ=; b=PFBGv2RVc3TPtqGvOXtAoh+er45uyEwoCtgnkLragjnRoQKcifYo27T1U1qIRMdi32 hZkoGa7nSgNJh+kXP58pHleOXtZSqTMgW6T+iIQO8FCA1o6BUD8Bqbtp7T5X+0ildmdB XxaO0B4JUX2IfL+weqLd+tfWjMyoxnv65vPqjq9vWVW+Wnb/n0hWdYjwBpUahxHcx4Iy aZmJA/SSgawrQm4twLkWtJO4GlqOU01TAZ91VC+V7IvLAOCQuhv5Hl+EqRkHqgFkDfaj LntK59SlFE4ZrwA8IydiDQoRUHNLVsNvSFwJ8wVyJcdvBzt9b+EBVox8yj6GVZ5+Auth 3kbg== X-Gm-Message-State: AOAM533yj5j+c3OZmNoYC4EdHT8H65Q7SoIBxbVHDEL2YYPpmsCfwM45 419iQEAtKXfa6wKlS65YaPnlOLYdgwg= X-Google-Smtp-Source: ABdhPJzvScrEIiu3Z5bEuPda7jb7B6RCESpgBahudAfL19ejlCSM/x5HYcLUGTGwkxNGUWnursQzHw== X-Received: by 2002:a02:7154:: with SMTP id n20mr243350jaf.77.1635966421642; Wed, 03 Nov 2021 12:07:01 -0700 (PDT) Received: from localhost.localdomain (node-17-161.flex.volo.net. [76.191.17.161]) by smtp.googlemail.com with ESMTPSA id a14sm807484ilm.60.2021.11.03.12.07.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Nov 2021 12:07:01 -0700 (PDT) To: libc-alpha@sourceware.org Subject: [PATCH v1] Benchtest: Fix MEMCMP definition for __memcmpeq Date: Wed, 3 Nov 2021 14:06:53 -0500 Message-Id: <20211103190653.3443558-1-goldstein.w.n@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Spam-Status: No, score=-12.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, 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-Patchwork-Original-From: Noah Goldstein via Libc-alpha From: Noah Goldstein Reply-To: Noah Goldstein Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org Sender: "Libc-alpha" MEMCMP is not being set to '__memcmpeq' when using bench-memcmpeq. This patch fixes that. --- benchtests/bench-memcmp.c | 2 + benchtests/bench-string.h | 86 +++++++++++++++++++++------------------ 2 files changed, 48 insertions(+), 40 deletions(-) diff --git a/benchtests/bench-memcmp.c b/benchtests/bench-memcmp.c index 2cf65525bb..3545c2dd1c 100644 --- a/benchtests/bench-memcmp.c +++ b/benchtests/bench-memcmp.c @@ -18,6 +18,8 @@ #define TEST_MAIN #ifdef TEST_MEMCMPEQ +# define HAS_FUNC_NAME 1 +# define MEMCMP __memcmpeq # define TEST_NAME "__memcmpeq" # define SIMPLE_MEMCMP simple_memcmpeq #elif defined WIDE diff --git a/benchtests/bench-string.h b/benchtests/bench-string.h index 12f27473ff..30e3ec193f 100644 --- a/benchtests/bench-string.h +++ b/benchtests/bench-string.h @@ -71,51 +71,57 @@ extern impl_t __start_impls[], __stop_impls[]; # define UCHAR unsigned char # define CHARBYTES 1 # define MAX_CHAR CHAR_MAX -# define MEMCHR memchr -# define MEMCMP memcmp -# define MEMCPY memcpy -# define MEMSET memset -# define STRCAT strcat -# define STRLEN strlen -# define STRCMP strcmp -# define STRCHR strchr -# define STRCPY strcpy -# define STRNLEN strnlen -# define STRCSPN strcspn -# define STRNCAT strncat -# define STRNCMP strncmp -# define STRNCPY strncpy -# define STRPBRK strpbrk -# define STRRCHR strrchr -# define STRSPN strspn -# define STPCPY stpcpy -# define STPNCPY stpncpy # else # include # define CHAR wchar_t # define UCHAR wchar_t # define CHARBYTES 4 -# define MAX_CHAR WCHAR_MAX -# define MEMCHR wmemchr -# define MEMCMP wmemcmp -# define MEMCPY wmemcpy -# define MEMSET wmemset -# define STRCAT wcscat -# define STRLEN wcslen -# define STRCMP wcscmp -# define STRCHR wcschr -# define STRCPY wcscpy -# define STRNLEN wcsnlen -# define STRCSPN wcscspn -# define STRNCAT wcsncat -# define STRNCMP wcsncmp -# define STRNCPY wcsncpy -# define STRPBRK wcspbrk -# define STRRCHR wcsrchr -# define STRSPN wcsspn -# define STPCPY wcpcpy -# define STPNCPY wcpncpy -# endif /* WIDE */ +# endif + +# ifndef HAS_FUNC_NAME +# ifndef WIDE +# define MEMCHR memchr +# define MEMCMP memcmp +# define MEMCPY memcpy +# define MEMSET memset +# define STRCAT strcat +# define STRLEN strlen +# define STRCMP strcmp +# define STRCHR strchr +# define STRCPY strcpy +# define STRNLEN strnlen +# define STRCSPN strcspn +# define STRNCAT strncat +# define STRNCMP strncmp +# define STRNCPY strncpy +# define STRPBRK strpbrk +# define STRRCHR strrchr +# define STRSPN strspn +# define STPCPY stpcpy +# define STPNCPY stpncpy +# else +# define MAX_CHAR WCHAR_MAX +# define MEMCHR wmemchr +# define MEMCMP wmemcmp +# define MEMCPY wmemcpy +# define MEMSET wmemset +# define STRCAT wcscat +# define STRLEN wcslen +# define STRCMP wcscmp +# define STRCHR wcschr +# define STRCPY wcscpy +# define STRNLEN wcsnlen +# define STRCSPN wcscspn +# define STRNCAT wcsncat +# define STRNCMP wcsncmp +# define STRNCPY wcsncpy +# define STRPBRK wcspbrk +# define STRRCHR wcsrchr +# define STRSPN wcsspn +# define STPCPY wcpcpy +# define STPNCPY wcpncpy +# endif /* WIDE */ +# endif /* HAS_FUNC_NAME */ # define TEST_FUNCTION test_main # ifndef TIMEOUT