From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x42c.google.com (mail-pf1-x42c.google.com [IPv6:2607:f8b0:4864:20::42c]) by sourceware.org (Postfix) with ESMTPS id 319AC3858D32 for ; Mon, 16 Jan 2023 21:04:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 319AC3858D32 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-pf1-x42c.google.com with SMTP id 200so15693944pfx.7 for ; Mon, 16 Jan 2023 13:04:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:references:cc:to:from :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=Uz/nm2dWF+e0VY9pWa/0J5y41hXmB1cdnMgxMehYCIQ=; b=pRcuP7q9uqKkOtG/Aj8alPxn5RDAZft5YNn1Sbg4JGRFYlclSuIVbbw0n/PMTNVZNL XijjUexKvvy9s6woCAxwK6o+EycerD5FKle+Ng2gnNXh1+eft9asgeuuKXV2Gxm2ZBW4 +TJPr3tJcaRWqxf2zKUdtNtclcVB3+6RuyCAjITOJIRQAfhTdS75upPLyvJXxnZv5ZsQ 30EM6v7fBfGVzm0ljhzY07nr6m24N9htcevuAhAuDKR18PBkuCQkU67fvAvMcnLpZXrw W3nIYTj1PkEsRLf1xcrFoOC1LkAmVO3gTjPg62Wgfi+EUjx9WndgUBtRGs9qkNP0k5nY 3hEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:references:cc:to:from :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Uz/nm2dWF+e0VY9pWa/0J5y41hXmB1cdnMgxMehYCIQ=; b=oyONQLRwIQj+CEzgrPZVzKK65JJbi1TOZ3HQeaALCJ6TRZPp8RE3EV9qjbF0r6b+Ot qDoPsSovLoQAl8tvYyJfI8fXFKniidstul4IpX3r6bEGa+PK3+5HrYkksEwPjzjhaudq UJ7TLuNIRoB48uMJXm1VKxIgElYkYoAtMEA6zogaeGMX5ZDMEHL3V00E6lr//8dN6SjD FVmA1V9Y9JieDrGca98ZzHgwETu3zfaqE4W3q615fHtof6stQRE6hyrg2jh4msKR1bSC THwAamPkhPTpz70Etp0GMWLsKNPv+5EUWKWoU5hy0pNpQ6Pr+yFzP6VpbXOXXCOmcR0v Z6Lw== X-Gm-Message-State: AFqh2koalJVuTHII9Hgk6+DpbBk2evr1QtbHgS8vcNoQusV7WuUerlR4 6Wt9ajidQq0mThW7WlGqAaOgB7H30A4uR88f X-Google-Smtp-Source: AMrXdXvu9kjNP9I7AIpBLjs8wDsI4IusemexixXnDD58s1V02GVDobtKHkFDcRRKlloBMcwMo9vvrw== X-Received: by 2002:a62:1556:0:b0:58b:c9db:c015 with SMTP id 83-20020a621556000000b0058bc9dbc015mr792145pfv.30.1673903094226; Mon, 16 Jan 2023 13:04:54 -0800 (PST) Received: from [192.168.5.146] (rrcs-173-198-77-218.west.biz.rr.com. [173.198.77.218]) by smtp.gmail.com with ESMTPSA id x11-20020aa79acb000000b0058b0992f2f9sm8380208pfp.101.2023.01.16.13.04.52 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 16 Jan 2023 13:04:53 -0800 (PST) Message-ID: <704b48a2-12b9-1f0b-7607-769e38411b79@linaro.org> Date: Mon, 16 Jan 2023 11:04:50 -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 v8 04/17] Add string vectorized find and detection functions Content-Language: en-US From: Richard Henderson To: libc-alpha@sourceware.org Cc: adhemerval.zanella@linaro.org, goldstein.w.n@gmail.com References: <20230113182733.1268668-1-richard.henderson@linaro.org> <20230113182733.1268668-5-richard.henderson@linaro.org> In-Reply-To: <20230113182733.1268668-5-richard.henderson@linaro.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.8 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 1/13/23 08:27, Richard Henderson wrote: > From: Adhemerval Zanella Netto > > This patch adds generic string find and detection meant to be used in > generic vectorized string implementation. The idea is to decompose the > basic string operation so each architecture can reimplement if it > provides any specialized hardware instruction. > > The 'string-fza.h' provides zero byte detection functions: > > - find_zero_low, find_zero_all, find_eq_low, find_eq_all, > find_zero_eq_low, find_zero_eq_all, find_zero_ne_low, > and find_zero_ne_all > > The 'string-fzb.h' provides boolean zero byte detection functions: > > - has_zero: determine if any byte within a word is zero. > - has_eq: determine byte equality between two words. > - has_zero_eq: determine if any byte within a word is zero along with > byte equality between two words. > > The 'string-fzi.h' provides positions for string-fza.h results: > > - index_first_zero: return index of first zero byte within a word. > - index_first_eq: return index of first byte different between two words. > > The 'string-fzc.h' provides a combined version of fza and fzi: > > - index_first_zero_eq: return index of first zero byte within a word or > first byte different between two words. > - index_first_zero_ne: return index of first zero byte within a word or > first byte equal between two words. > - index_last_zero: return index of last zero byte within a word. > - index_last_eq: return index of last byte different between two words. > > Co-authored-by: Richard Henderson > Message-Id:<20230111204558.2402155-5-adhemerval.zanella@linaro.org> > --- > sysdeps/generic/string-extbyte.h | 37 ++++++++++ > sysdeps/generic/string-fza.h | 116 +++++++++++++++++++++++++++++++ > sysdeps/generic/string-fzb.h | 49 +++++++++++++ > sysdeps/generic/string-fzc.h | 91 ++++++++++++++++++++++++ > sysdeps/generic/string-fzi.h | 71 +++++++++++++++++++ > 5 files changed, 364 insertions(+) > create mode 100644 sysdeps/generic/string-extbyte.h > create mode 100644 sysdeps/generic/string-fza.h > create mode 100644 sysdeps/generic/string-fzb.h > create mode 100644 sysdeps/generic/string-fzc.h > create mode 100644 sysdeps/generic/string-fzi.h This one would be more a Signed-off-by than Reviewed-by, I guess. ;-) r~