string: Improve generic strchr
commit506f7dbbabbad1f2d9f745636937b20c2670c29b
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Tue, 10 Jan 2023 21:00:56 +0000 (10 18:00 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Mon, 6 Feb 2023 19:19:35 +0000 (6 16:19 -0300)
treee1b89230f62fd75dac9a48d47fc4d1d2600b0d14
parent685e844a97ba0506dee575ba530b170edaa59fed
string: Improve generic strchr

New algorithm now calls strchrnul.

Checked on x86_64-linux-gnu, i686-linux-gnu, powerpc-linux-gnu,
and powerpc64-linux-gnu by removing the arch-specific assembly
implementation and disabling multi-arch (it covers both LE and BE
for 64 and 32 bits).

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com>
string/strchr.c [copied from sysdeps/s390/strchr-c.c with 63% similarity]
sysdeps/s390/strchr-c.c