Message ID | 20230201170406.303978-26-adhemerval.zanella@linaro.org |
---|---|
State | Superseded |
Headers |
Return-Path: <libc-alpha-bounces+patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8743539502D8 for <patchwork@sourceware.org>; Wed, 1 Feb 2023 17:08:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8743539502D8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1675271291; bh=KHtcW8v9AgEJXBxhRQhzHR+sZS5ZSEoyLU3ZktxYi8c=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=jAXpCzsMhONRF4FiUofWTTgLMrFBJsjt7a7LLCPL/b1WEZNMcxMnEoKVc141R3fff lCuJ50ecqtS2GjszXJldBpiErcFZ3/36mNsGNYLm1vv+V3mGnZnG2qlCkH+lIUYK4l q8mU/CpVZ8bMGbYoh5W3AtXiNJ/FHu7pfmXAhTTc= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-ot1-x335.google.com (mail-ot1-x335.google.com [IPv6:2607:f8b0:4864:20::335]) by sourceware.org (Postfix) with ESMTPS id 9B3EC385B534 for <libc-alpha@sourceware.org>; Wed, 1 Feb 2023 17:05:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9B3EC385B534 Received: by mail-ot1-x335.google.com with SMTP id s41-20020a05683043a900b0068bd63d34d0so2481221otv.6 for <libc-alpha@sourceware.org>; Wed, 01 Feb 2023 09:05:17 -0800 (PST) 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=KHtcW8v9AgEJXBxhRQhzHR+sZS5ZSEoyLU3ZktxYi8c=; b=offhxJJjHlcnv1hXjwVwY8teiTt/duMjC9pJLZgP0OscB+R3tqtdCVPlj4mpuOU/Gv Mmrdh4XW4RnkgqsOgSTHRxLjKrT2zRQ0tBOOoTHLNBmR1LVx7P8o57VSqTdMU4TfBsIM aLK+1yX1g2s4NLBKeB1YbAh4bHS+f5FMM/iYDMAVeMu9jke5YpnZl/E48NIT4Ldeu4af vSDTHABMi2UF/Y+/XlQffT+cV5eHCnefQceReco+mwU6Qrvr+Sh7apePsrm1jyc73bfU Hmfxp6zbc3AF8w/xzOyZj651SWUyznMX0Y7Jo1C6hg1FbjfGGGd3Ijv7rWMZMMOD632q emFw== X-Gm-Message-State: AO0yUKWMNTCpSex4R7yqhFx27CANuN1vVUSofAhGnSqwKUQ9NyoICW2i X05Ys0yVzMVmQsumIZCobb5aCZKDNQZWvwjQ9aQ= X-Google-Smtp-Source: AK7set8Ombwubwxgie5PEtCHt6cI6ELKzDQgU6AZfDuqV1RUHHeFpitd4QDul7mLTquvyTO1ERdppA== X-Received: by 2002:a05:6830:1e57:b0:68b:b721:8f1c with SMTP id e23-20020a0568301e5700b0068bb7218f1cmr1688472otj.27.1675271116117; Wed, 01 Feb 2023 09:05:16 -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.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Feb 2023 09:05:15 -0800 (PST) To: libc-alpha@sourceware.org, Richard Henderson <richard.henderson@linaro.org>, Noah Goldstein <goldstein.w.n@gmail.com>, Jeff Law <jeffreyalaw@gmail.com>, Xi Ruoyao <xry111@xry111.site> Subject: [PATCH v11 25/29] string: Hook up the default implementation on test-strncmp Date: Wed, 1 Feb 2023 14:04:02 -0300 Message-Id: <20230201170406.303978-26-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 X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list <libc-alpha.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=subscribe> From: Adhemerval Zanella via Libc-alpha <libc-alpha@sourceware.org> Reply-To: Adhemerval Zanella <adhemerval.zanella@linaro.org> Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" <libc-alpha-bounces+patchwork=sourceware.org@sourceware.org> |
Series |
Improve generic string routines
|
|
Checks
Context | Check | Description |
---|---|---|
dj/TryBot-apply_patch | success | Patch applied to master at the time it was sent |
Commit Message
Adhemerval Zanella Netto
Feb. 1, 2023, 5:04 p.m. UTC
--- string/test-strncmp.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
Comments
On 2/1/23 07:04, Adhemerval Zanella wrote: > --- > string/test-strncmp.c | 16 ++++++++++++++++ > 1 file changed, 16 insertions(+) Reviewed-by: Richard Henderson <richard.henderson@linaro.org> r~ > > diff --git a/string/test-strncmp.c b/string/test-strncmp.c > index fb4c6420b8..35dc496eae 100644 > --- a/string/test-strncmp.c > +++ b/string/test-strncmp.c > @@ -90,6 +90,22 @@ typedef int (*proto_t) (const CHAR *, const CHAR *, size_t); > > IMPL (STRNCMP, 1) > > +/* Also check the default implementation. */ > +#undef STRNCMP > +#undef libc_hidden_builtin_def > +#define libc_hidden_builtin_def(a) > +#undef attribute_hidden > +#define attribute_hidden > +#ifndef WIDE > +# define STRNCMP __strncmp_default > +# include "string/strncmp.c" > +# define STRNCMP_DEFAULT STRNCMP > +#else > +# define WCSNCMP __wcsncmp_default > +# include "wcsmbs/wcsncmp.c" > +# define STRNCMP_DEFAULT WCSNCMP > +#endif > +IMPL (STRNCMP_DEFAULT, 1) > > static int > check_result (impl_t *impl, const CHAR *s1, const CHAR *s2, size_t n,
diff --git a/string/test-strncmp.c b/string/test-strncmp.c index fb4c6420b8..35dc496eae 100644 --- a/string/test-strncmp.c +++ b/string/test-strncmp.c @@ -90,6 +90,22 @@ typedef int (*proto_t) (const CHAR *, const CHAR *, size_t); IMPL (STRNCMP, 1) +/* Also check the default implementation. */ +#undef STRNCMP +#undef libc_hidden_builtin_def +#define libc_hidden_builtin_def(a) +#undef attribute_hidden +#define attribute_hidden +#ifndef WIDE +# define STRNCMP __strncmp_default +# include "string/strncmp.c" +# define STRNCMP_DEFAULT STRNCMP +#else +# define WCSNCMP __wcsncmp_default +# include "wcsmbs/wcsncmp.c" +# define STRNCMP_DEFAULT WCSNCMP +#endif +IMPL (STRNCMP_DEFAULT, 1) static int check_result (impl_t *impl, const CHAR *s1, const CHAR *s2, size_t n,