From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: Luis Machado <luis.machado@linaro.org>, libc-alpha@sourceware.org
Subject: Re: [PATCH v3 04/18] Add string vectorized find and detection functions
Date: Thu, 11 Jan 2018 18:25:00 -0000 [thread overview]
Message-ID: <cf0dc794-266d-5621-8d91-885e809b62bb@linaro.org> (raw)
In-Reply-To: <4786b1b4-bab3-e3a7-f02f-fe3b4b2668f9@linaro.org>
On 11/01/2018 11:44, Luis Machado wrote:
> Some quick typos i noticed while skimming through it.
>
> On 01/10/2018 10:47 AM, Adhemerval Zanella wrote:
>> +/* If compiler supports __builtin_ctz{l} without any external depedencies
>
> typo... dependencies
>
> More cases of this.
>
>> diff --git a/sysdeps/generic/string-extbyte.h b/sysdeps/generic/string-extbyte.h
>> new file mode 100644
>> index 0000000..69a78ce
>> --- /dev/null
>> +++ b/sysdeps/generic/string-extbyte.h
>> @@ -0,0 +1,35 @@
>> +/* Extract by from memory word. Generic C version.
>
> Extract byte?
>
>> diff --git a/sysdeps/generic/string-fzi.h b/sysdeps/generic/string-fzi.h
>> new file mode 100644
>> index 0000000..57101f2
>> --- /dev/null
>> +++ b/sysdeps/generic/string-fzi.h
>> @@ -0,0 +1,215 @@
>> +/* Zero byte detection; indexes. Generic C version.
>> +Â Â Copyright (C) 2018 Free Software Foundation, Inc.
>> +Â Â This file is part of the GNU C Library.
>> +
>> +Â Â The GNU C Library is free software; you can redistribute it and/or
>> +Â Â modify it under the terms of the GNU Lesser General Public
>> +Â Â License as published by the Free Software Foundation; either
>> +Â Â version 2.1 of the License, or (at your option) any later version.
>> +
>> +Â Â The GNU C Library is distributed in the hope that it will be useful,
>> +Â Â but WITHOUT ANY WARRANTY; without even the implied warranty of
>> +  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
>> +Â Â Lesser General Public License for more details.
>> +
>> +Â Â You should have received a copy of the GNU Lesser General Public
>> +Â Â License along with the GNU C Library; if not, see
>> +  <http://www.gnu.org/licenses/>. */
>> +
>> +#ifndef STRING_FZI_H
>> +#define STRING_FZI_H 1
>> +
>> +#include <limits.h>
>> +#include <endian.h>
>> +#include <string-fza.h>
>> +
>> +/* An improved bitscan routine, multiplying the De Bruijn sequence with a
>> +Â Â 0-1 mask separated by the least significant one bit of a scanned integer
>> +Â Â or bitboard [1].
>> +
>> +  [1] https://chessprogramming.wikispaces.com/Kim+Walisch */
>> +
>> +static inline unsigned
>> +index_access (const op_t i)
>> +{
>> +Â static const char index[] =
>> +Â {
>> +# if __WORDSIZE == 64
>> +    0, 47, 1, 56, 48, 27, 2, 60,
>> +   57, 49, 41, 37, 28, 16, 3, 61,
>> +Â Â Â 54, 58, 35, 52, 50, 42, 21, 44,
>> +   38, 32, 29, 23, 17, 11, 4, 62,
>> +Â Â Â 46, 55, 26, 59, 40, 36, 15, 53,
>> +Â Â Â 34, 51, 20, 43, 31, 22, 10, 45,
>> +   25, 39, 14, 33, 19, 30, 9, 24,
>> +   13, 18, 8, 12, 7, 6, 5, 63
>> +# else
>> +    0, 9, 1, 10, 13, 21, 2, 29,
>> +   11, 14, 16, 18, 22, 25, 3, 30,
>> +    8, 12, 20, 28, 15, 17, 24, 7,
>> +   19, 27, 23, 6, 26, 5, 4, 31
>> +# endif
>> +Â };
>> +Â return index[i];
>> +}
>> +
>> +/* For architecture which only provides __builtin_clz{l} (HAVE_BUILTIN_CLZ)
>
> For architectures?
Thanks, I fixed all locally.
next prev parent reply other threads:[~2018-01-11 18:25 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-10 12:48 [PATCH v3 00/18] Improve generic string routines Adhemerval Zanella
2018-01-10 12:48 ` [PATCH v3 04/18] Add string vectorized find and detection functions Adhemerval Zanella
2018-01-11 13:34 ` Joseph Myers
2018-01-11 18:25 ` Adhemerval Zanella
2018-01-11 13:44 ` Luis Machado
2018-01-11 18:25 ` Adhemerval Zanella [this message]
2018-01-11 16:47 ` Paul Eggert
2018-01-11 18:54 ` Adhemerval Zanella
2018-01-12 1:08 ` Paul Eggert
2018-01-12 17:08 ` Joseph Myers
2018-01-12 17:59 ` Adhemerval Zanella
2018-01-12 13:30 ` Adhemerval Zanella
2018-01-10 12:48 ` [PATCH v3 11/18] string: Improve generic strcmp Adhemerval Zanella
2018-01-10 12:48 ` [PATCH v3 18/18] sh: Add string-fzb.h Adhemerval Zanella
2018-01-10 12:48 ` [PATCH v3 15/18] alpha: Add string-fzb.h and string-fzi.h Adhemerval Zanella
2018-01-10 12:48 ` [PATCH v3 08/18] string: Improve generic strnlen Adhemerval Zanella
2018-01-10 12:48 ` [PATCH v3 17/18] powerpc: Add string-fza.h Adhemerval Zanella
2018-01-10 12:56 ` Tulio Magno Quites Machado Filho
2018-01-10 12:48 ` [PATCH v3 02/18] Parameterize OP_T_THRES from memcopy.h Adhemerval Zanella
2018-01-10 12:48 ` [PATCH v3 01/18] Parameterize op_t " Adhemerval Zanella
2018-01-11 13:28 ` Joseph Myers
2018-01-11 18:04 ` Adhemerval Zanella
2018-01-10 12:48 ` [PATCH v3 05/18] string: Improve generic strlen Adhemerval Zanella
2018-01-11 17:21 ` Paul Eggert
2018-01-12 18:00 ` Adhemerval Zanella
2018-01-10 12:48 ` [PATCH v3 03/18] Add string-maskoff.h generic header Adhemerval Zanella
2018-01-10 23:25 ` Paul Eggert
2018-01-11 10:54 ` Adhemerval Zanella
2018-01-11 13:29 ` Joseph Myers
2018-01-11 17:57 ` Adhemerval Zanella
2018-01-10 12:48 ` [PATCH v3 07/18] string: Improve generic memrchr Adhemerval Zanella
2018-01-10 12:48 ` [PATCH v3 12/18] string: Improve generic strcpy Adhemerval Zanella
2018-01-10 12:48 ` [PATCH v3 13/18] hppa: Add memcopy.h Adhemerval Zanella
2018-01-11 13:36 ` Joseph Myers
2018-01-12 18:01 ` Adhemerval Zanella
2018-01-12 18:18 ` Joseph Myers
2018-01-12 18:37 ` Adhemerval Zanella
2018-01-10 12:48 ` [PATCH v3 14/18] hppa: Add string-fzb.h and string-fzi.h Adhemerval Zanella
2018-01-10 12:48 ` [PATCH v3 09/18] string: Improve generic strchr Adhemerval Zanella
2018-01-10 12:48 ` [PATCH v3 16/18] arm: Add string-fza.h Adhemerval Zanella
2018-01-10 12:48 ` [PATCH v3 06/18] string: Improve generic memchr Adhemerval Zanella
2018-01-10 12:48 ` [PATCH v3 10/18] string: Improve generic strchrnul Adhemerval Zanella
2018-01-10 22:30 ` [PATCH v3 00/18] Improve generic string routines Ondřej Bílka
2018-01-11 10:54 ` Adhemerval Zanella
2018-01-11 13:50 ` Joseph Myers
2018-01-11 19:36 [PATCH v3 04/18] Add string vectorized find and detection functions Wilco Dijkstra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cf0dc794-266d-5621-8d91-885e809b62bb@linaro.org \
--to=adhemerval.zanella@linaro.org \
--cc=libc-alpha@sourceware.org \
--cc=luis.machado@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).