From patchwork Wed Feb 1 17:04:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 64108 Return-Path: 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 D909938983BA for ; Wed, 1 Feb 2023 17:08:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D909938983BA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1675271306; bh=BjdtcZv5xPKYYHAXCP0rQzjiHaC4gBNPxLaODhMfNdU=; 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=FsjdDw7aiQFNdp3jxH56p8DNJwF7HIxUQ+40q3yHhjgnn3YCqRPBTGJ0+K3gjN6os 1wsvfqtTT0S12+PJK5i6diLzV2GuvzsIPy2Rh4T2Z8XUe1iQOj9pYtAaq4AIF9TTc+ KvtnwRKr4mFiIoigenOAxo3CR4AlRuwaqcxkqh7A= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-ot1-x32c.google.com (mail-ot1-x32c.google.com [IPv6:2607:f8b0:4864:20::32c]) by sourceware.org (Postfix) with ESMTPS id 155EE385E82F for ; Wed, 1 Feb 2023 17:05:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 155EE385E82F Received: by mail-ot1-x32c.google.com with SMTP id k91-20020a9d19e4000000b0068bca1294aaso3478195otk.8 for ; Wed, 01 Feb 2023 09:05:15 -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=BjdtcZv5xPKYYHAXCP0rQzjiHaC4gBNPxLaODhMfNdU=; b=mAyEh18HzjwB0rUf6iRDGPnBJyGxkpoWiF2RIt72Veo237wIMfEPZZocA0YSEFdhm4 I5Tg4X+6E3Fr/kDRJRrjOV5kCmnhnpR0YSmLA6BnTT2qpZ9eO9e8Q0+cvg+TLCW+/1QZ 217q3o2u4FBsHyxWGYBh+RVi/36qpgkqE/sp9B/GUxY5uEUbzoR4pdYy+DO1HMN1Mxmm OU6aU2m1nS+RtHSrVYgwTTFgoRbiMMiJJE9GI50PGiMXX1vMTBdmIJrosOgw1BhQTwGK /ddrVNixWK91siy0DYZV76G8y3M1UJnoCOBuK3LZLMyJBWLxqU51XI7Qz1CmBh16FMZb GeXg== X-Gm-Message-State: AO0yUKXRCpuB1pzbxKNDhLIHf6qrtHnhk3XBKXz8yPZzkwQfylPTzAbZ QnlGXLbi66IQyLv8YAM5amEerLw4ecqGuILIaew= X-Google-Smtp-Source: AK7set/fdzc5Sj9ji9JZ71DQzEtIQNMtxOloGHIRG1B7wicmqCZExgNcjOQ6ksh5zGLnq9XbTV8eCQ== X-Received: by 2002:a05:6830:3360:b0:686:7992:9dfa with SMTP id l32-20020a056830336000b0068679929dfamr2101711ott.6.1675271113709; Wed, 01 Feb 2023 09:05:13 -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.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Feb 2023 09:05:12 -0800 (PST) To: libc-alpha@sourceware.org, Richard Henderson , Noah Goldstein , Jeff Law , Xi Ruoyao Subject: [PATCH v11 24/29] string: Hook up the default implementation on test-strcmp Date: Wed, 1 Feb 2023 14:04:01 -0300 Message-Id: <20230201170406.303978-25-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 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Adhemerval Zanella via Libc-alpha From: Adhemerval Zanella Reply-To: Adhemerval Zanella Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" --- string/test-strcmp.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) Reviewed-by: Richard Henderson diff --git a/string/test-strcmp.c b/string/test-strcmp.c index ceb0d29c74..fa3161688c 100644 --- a/string/test-strcmp.c +++ b/string/test-strcmp.c @@ -101,6 +101,28 @@ typedef int (*proto_t) (const CHAR *, const CHAR *); IMPL (STRCMP, 1) +/* Also check the default implementation. */ +#undef STRCMP +#undef libc_hidden_builtin_def +#define libc_hidden_builtin_def(a) +#undef libc_hidden_def +#define libc_hidden_def(a) +#undef weak_alias +#define weak_alias(a, b) +#undef attribute_hidden +#define attribute_hidden +#ifndef WIDE +# define STRCMP __strcmp_default +# include "string/strcmp.c" +# define STRCMP_DEFAULT STRCMP +#else +# define WCSCMP __wcscmp_default +# include "wcsmbs/wcscmp.c" +# define STRCMP_DEFAULT WCSCMP +#endif +IMPL (STRCMP_DEFAULT, 1) + + static int check_result (impl_t *impl, const CHAR *s1, const CHAR *s2,