From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ot1-x32d.google.com (mail-ot1-x32d.google.com [IPv6:2607:f8b0:4864:20::32d]) by sourceware.org (Postfix) with ESMTPS id 64B9D384A04C for ; Wed, 1 Feb 2023 17:05:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 64B9D384A04C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-ot1-x32d.google.com with SMTP id e12-20020a0568301e4c00b0068bc93e7e34so3545443otj.4 for ; Wed, 01 Feb 2023 09:05:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=mCE/YFqXL4Z7i4zGFW/a0I/C1EeOtkop6T1+5F6jnvE=; b=I6EKCGqTQNlchybjyqOn8MhgveZgI2A6WIpnnzSAvEXwcZzY83rjsRe8uTRueK7PLP VBEJlYqFv3tTGOHhktkh+qty7Ov5iW1RHmgyRcdnAPxfB5P0BtgXYGn/kh2PEXGSzoA8 mxhhXTmw7z8BJ21N+CsxjJctBvDHD0RY2RHbjKrIzRaoO78xkUIsiF31IjExuDUv/tYe d68hq0zgnJb8BK1LWNbo1AjCIwzy16t25huKr7SyVnNcwrIxh+A4e0QU9s8Jz+6iSdGp SomMH54jjEJymfxK7CO3YFE4fNDJLiKU7fNRsJ3e2ceh9b7c2nZ4vdtFtoCfurS4QzWA Yjvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mCE/YFqXL4Z7i4zGFW/a0I/C1EeOtkop6T1+5F6jnvE=; b=WoMzeCHriR+/xrOsylZELqlhYXdNssZLbECKcZBJoDbhVfBpi1yH4hNYUoHsl4q7pq PyL6lb6nVfFepubfh8hTTAzPbNO6UamA88dJ1pZHwL0982SWp3EWWSUCGw0qsw5pnMVp 47UuXo1cfYZdAS7IYPPC6kRZUSHM6Oshe4LlO/razwm0o/TilmExn3hVS5MlGNs5DWEt qabDPicBaMLuhAbZsPBLdmcZjf9oGmyB5PQzqAwiUhPfu1UWnItLmzjH7w7ZiL64q6KP ms4PiNeQELQlJ2NDLMMamD5c/2yl01YNEM7M2qjQM+tZt/jmUQzzf32BcULsfyyDogqv 2Ftg== X-Gm-Message-State: AO0yUKUs2SsMywf7eMqGZ+Cte4zPkF37M9snMZB2briK/JzUjxSQFJGY wP8QGDUoS39dnCFUf+N7e4QyycufHGUAEtIu3r4= X-Google-Smtp-Source: AK7set+WxXtp/k3L0giFKOmwtsmMPhWyRZnCjWJE/6BsBnUtbhrReu/YsFmpy/3bWEfWctDi7h2w4A== X-Received: by 2002:a05:6830:3090:b0:68d:3fc8:7c09 with SMTP id g16-20020a056830309000b0068d3fc87c09mr937501ots.4.1675271106056; Wed, 01 Feb 2023 09:05:06 -0800 (PST) Received: from mandiga.. ([2804:1b3:a7c2:1887:d2ed:98c2:d2cc:bf06]) by smtp.gmail.com with ESMTPSA id b17-20020a056830311100b006863ccbf067sm8077090ots.74.2023.02.01.09.05.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Feb 2023 09:05:05 -0800 (PST) From: Adhemerval Zanella To: libc-alpha@sourceware.org, Richard Henderson , Noah Goldstein , Jeff Law , Xi Ruoyao Subject: [PATCH v11 21/29] string: Hook up the default implementation on test-strlen Date: Wed, 1 Feb 2023 14:03:58 -0300 Message-Id: <20230201170406.303978-22-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230201170406.303978-1-adhemerval.zanella@linaro.org> References: <20230201170406.303978-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Also remove the simple_STRLEN and builtin_strlen, which are not used anywhere. --- string/test-strlen.c | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/string/test-strlen.c b/string/test-strlen.c index 81adf23737..0f98576f40 100644 --- a/string/test-strlen.c +++ b/string/test-strlen.c @@ -37,27 +37,24 @@ typedef size_t (*proto_t) (const CHAR *); -/* Naive implementation to verify results. */ -size_t -simple_STRLEN (const CHAR *s) -{ - const CHAR *p; - - for (p = s; *p; ++p); - return p - s; -} +IMPL (STRLEN, 1) +/* Also check the generic implementation. */ +#undef STRLEN +#undef weak_alias +#define weak_alias(a, b) +#undef libc_hidden_builtin_def +#define libc_hidden_builtin_def(a) #ifndef WIDE -size_t -builtin_strlen (const CHAR *p) -{ - return __builtin_strlen (p); -} -IMPL (builtin_strlen, 0) +# define STRLEN __strlen_default +# include "string/strlen.c" +IMPL (__strlen_default, 1) +#else +# define WCSLEN __wcslen_default +# include "wcsmbs/wcslen.c" +IMPL (__wcslen_default, 1) #endif -IMPL (STRLEN, 1) - static void do_one_test (impl_t *impl, const CHAR *s, size_t exp_len) -- 2.34.1