From 685e844a97ba0506dee575ba530b170edaa59fed Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Tue, 10 Jan 2023 18:00:57 -0300 Subject: string: Improve generic strchrnul New algorithm read the first aligned address and mask off the unwanted bytes (this strategy is similar to arch-specific implementations used on powerpc, sparc, and sh). The loop now read word-aligned address and check using the has_zero_eq function. Checked on x86_64-linux-gnu, i686-linux-gnu, powerpc64-linux-gnu, and powerpc-linux-gnu by removing the arch-specific assembly implementation and disabling multi-arch (it covers both LE and BE for 64 and 32 bits). Co-authored-by: Richard Henderson Reviewed-by: Noah Goldstein --- sysdeps/s390/strchrnul-c.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'sysdeps/s390') diff --git a/sysdeps/s390/strchrnul-c.c b/sysdeps/s390/strchrnul-c.c index e1248d1..ff6aa38 100644 --- a/sysdeps/s390/strchrnul-c.c +++ b/sysdeps/s390/strchrnul-c.c @@ -22,8 +22,6 @@ # if HAVE_STRCHRNUL_IFUNC # define STRCHRNUL STRCHRNUL_C # define __strchrnul STRCHRNUL -# undef weak_alias -# define weak_alias(name, alias) # endif # include -- cgit v1.1