From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by sourceware.org (Postfix) with ESMTPS id 5B3243858D37 for ; Wed, 1 Feb 2023 17:34:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5B3243858D37 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-pj1-x102e.google.com with SMTP id rm7-20020a17090b3ec700b0022c05558d22so2705453pjb.5 for ; Wed, 01 Feb 2023 09:34:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id:from :to:cc:subject:date:message-id:reply-to; bh=9lbAQUahYijql/wQXwFl/XZhnwGYOnOIDjChWlWnunc=; b=drbP9vPGkhVfR3x7LL6jtumb0fpLR+ZKrtyzNOvy4DOwjg3BRxdCKGWe6le/PScRON w7AumK2lKj+KgG7d1afP/djy4q9T+o1W3SD+gBGyIenbIuTazWb0iTWCOPswUYLTkovK V4V2Ck2HYL7q87XPvKTIYpuZtnXX65Oo/gYmcoLL4sGjEM/SjPAHTImh8mrRmaDaCBW/ uY9ujdWc+3lBu6fVzgiH6SR5wSPlwJH6m3X8oQPaAnOVjHqbmEqFhQPZ+Lq8cGF8QL1C I/fC439ZwtNxr575uYkMe+zX6ruST0rNcLAOrVhIJp6nXSZ3+UIJY+CU9bqOA/nmjJU1 Ja2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=9lbAQUahYijql/wQXwFl/XZhnwGYOnOIDjChWlWnunc=; b=4GFu36l1eRxPzilDE4KHhLoZcl9Vs8DetYf6RZCPRrP55Bsn6UflM4Gm6q4xo5b0/E c/aMkLjqhFYemIs79HeB/n6+61RkcJbaSyzpl4N1tmH8nnViDYHWsL7kxnU42OGtHnY6 Gqnruj34kZ9vv+eNWqeCaRnSYPd7AybMxZ0Z+7QuSn9dWE7iR9BC32uBr7pXdbcBIRcE aPYWDILvzevwMRYotp3e8felgLn7wTP+aPtjunUPp98GS9L3LLdu2KN04hXZ6KV7Jb9J 7uicrZsKsUodQ0Av4fxnPZisF3r+PeExubYi0ba0nfhlHj0TApwFRwQBSX4BMka4/3iF Mc9g== X-Gm-Message-State: AO0yUKV6djguRKCQNzFWrktnlD5QJsk+dfjs6su5ffHv6wKhG6GlNem9 ksRbfRI1CmrbVCN+QGP73uc+dX4grVQoo2q1 X-Google-Smtp-Source: AK7set8+YkoUL1kAw8hznAr6PJiuUkGm0E+yGxP+PkMJ8wT07ntXFynVCuQofDtVKIGdb98l8Xx5nQ== X-Received: by 2002:a17:902:cac9:b0:194:4503:947 with SMTP id y9-20020a170902cac900b0019445030947mr2944362pld.37.1675272851175; Wed, 01 Feb 2023 09:34:11 -0800 (PST) Received: from [192.168.50.50] (rrcs-173-197-98-118.west.biz.rr.com. [173.197.98.118]) by smtp.gmail.com with ESMTPSA id t7-20020a170902b20700b00192e1590349sm11941079plr.216.2023.02.01.09.34.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 01 Feb 2023 09:34:10 -0800 (PST) Message-ID: <49fb3200-6556-e711-72c1-f201d81c467c@linaro.org> Date: Wed, 1 Feb 2023 07:34:06 -1000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH v11 08/29] string: Improve generic strcmp To: Adhemerval Zanella , libc-alpha@sourceware.org, Noah Goldstein , Jeff Law , Xi Ruoyao References: <20230201170406.303978-1-adhemerval.zanella@linaro.org> <20230201170406.303978-9-adhemerval.zanella@linaro.org> Content-Language: en-US From: Richard Henderson In-Reply-To: <20230201170406.303978-9-adhemerval.zanella@linaro.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,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: On 2/1/23 07:03, Adhemerval Zanella wrote: > +static inline int > +final_cmp (const op_t w1, const op_t w2) > +{ > + /* It can not use index_first_zero_ne because it must not compare past the > + final '\0' is present (and final_cmp is called before has_zero check). > + */ "if present". And why is that? Surely find_zero_ne_all will produce a true bit for the '\0' as advertised. That will be either before or after the first ne, as advertised. Maybe there's some subtlety in index_first_zero_ne using find_zero_ne_low for little-endian, but I can't think of what it would be... r~