glibc/sysdeps
H.J. Lu 402bf06952 x86: Optimize SSE2 memchr overflow calculation
SSE2 memchr computes "edx + ecx - 16" where ecx is less than 16.  Use
"edx - (16 - ecx)", instead of satured math, to avoid possible addition
overflow.  This replaces

	add	%ecx, %edx
	sbb	%eax, %eax
	or	%eax, %edx
	sub	$16, %edx

with

	neg	%ecx
	add	$16, %ecx
	sub	%ecx, %edx

It is the same for x86_64, except for rcx/rdx, instead of ecx/edx.

	* sysdeps/i386/i686/multiarch/memchr-sse2.S (MEMCHR): Use
	"edx + ecx - 16" to avoid possible addition overflow.
	* sysdeps/x86_64/memchr.S (memchr): Likewise.
2017-05-19 10:48:45 -07:00
..
aarch64 Move shared pthread definitions to common headers 2017-05-09 17:49:17 -03:00
alpha Move shared pthread definitions to common headers 2017-05-09 17:49:17 -03:00
arm Condition some sys/ucontext.h contents on __USE_MISC (bug 21457). 2017-05-11 14:15:26 +00:00
generic Convert e_exp2l.c into a template 2017-05-17 14:44:08 -03:00
gnu Add TCP_FASTOPEN_CONNECT from Linux 4.11 to netinet/tcp.h. 2017-05-01 16:18:31 +00:00
hppa Remove wrong definitions from pthread header refactor 2017-05-11 10:46:03 -03:00
i386 x86: Optimize SSE2 memchr overflow calculation 2017-05-19 10:48:45 -07:00
ia64 Suppress internal declarations for most of the testsuite. 2017-05-11 19:27:59 -04:00
ieee754 Also create and use ldbl-compat-choose.h. 2017-05-19 11:30:26 +00:00
init_array Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
m68k Suppress internal declarations for most of the testsuite. 2017-05-11 19:27:59 -04:00
mach [BZ 21340] add support for POSIX_SPAWN_SETSID 2017-04-25 08:51:12 -03:00
microblaze Move shared pthread definitions to common headers 2017-05-09 17:49:17 -03:00
mips Condition some sys/ucontext.h contents on __USE_MISC (bug 21457). 2017-05-11 14:15:26 +00:00
nacl Assume that accept4 is always available and works 2017-04-19 07:44:48 +02:00
nios2 Move shared pthread definitions to common headers 2017-05-09 17:49:17 -03:00
nptl fork: Remove bogus parent PID assertions [BZ #21386] 2017-05-12 16:04:16 +02:00
posix posix: Fix and simplify default p{read,write}v implementation 2017-05-15 16:33:45 -03:00
powerpc powerpc: Improve memcmp performance for POWER8 2017-05-18 11:21:20 +05:30
pthread Refer to <signal.h> instead of <pthread.h> in <bits/sigthread.h> 2017-02-28 10:34:15 +01:00
s390 Move shared pthread definitions to common headers 2017-05-09 17:49:17 -03:00
sh Move shared pthread definitions to common headers 2017-05-09 17:49:17 -03:00
sparc Remove useless SPARC signbit aliases. 2017-05-12 16:37:12 +00:00
tile Move shared pthread definitions to common headers 2017-05-09 17:49:17 -03:00
unix Fix makefile rules for vmsplice, splice, and open_by_handle_at 2017-05-19 09:37:00 -03:00
wordsize-32 Build divdi3 only for architecture that required it 2017-04-06 15:14:34 -03:00
wordsize-64 Add missing header files throughout the testsuite. 2017-02-16 17:33:18 -05:00
x86 Move shared pthread definitions to common headers 2017-05-09 17:49:17 -03:00
x86_64 x86: Optimize SSE2 memchr overflow calculation 2017-05-19 10:48:45 -07:00