glibc/sysdeps
Noah Goldstein 08cbcd4dbc x86: Remove unnecessary overflow check from wcsnlen-sse4_1.S
No bug. The way wcsnlen will check if near the end of maxlen
is the following macro:

	mov	%r11, %rsi;	\
	subq	%rax, %rsi;	\
	andq	$-64, %rax;	\
	testq	$-64, %rsi;	\
	je	L(strnlen_ret)

Which words independently of s + maxlen overflowing. So the
second overflow check is unnecissary for correctness and
just extra overhead in the common no overflow case.

test-strlen.c, test-wcslen.c, test-strnlen.c and test-wcsnlen.c are
all passing

Signed-off-by: Noah Goldstein <goldstein.w.n@gmail.com>
Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
2021-06-24 19:14:19 -04:00
..
aarch64
alpha
arc
arm
csky
generic posix: Consolidate fork implementation 2021-06-24 10:02:06 -03:00
gnu
hppa
htl Consolidate pthread_atfork 2021-06-24 10:04:41 -03:00
hurd
i386
ia64
ieee754
m68k
mach posix: Consolidate fork implementation 2021-06-24 10:02:06 -03:00
microblaze
mips
nios2
nptl Consolidate pthread_atfork 2021-06-24 10:04:41 -03:00
posix
powerpc
pthread Consolidate pthread_atfork 2021-06-24 10:04:41 -03:00
riscv
s390
sh
sparc
unix posix: Consolidate fork implementation 2021-06-24 10:02:06 -03:00
wordsize-32
wordsize-64
x86
x86_64 x86: Remove unnecessary overflow check from wcsnlen-sse4_1.S 2021-06-24 19:14:19 -04:00