Go to file
Noah Goldstein 104c7b1967 x86: Add EVEX optimized memchr family not safe for RTM
No bug.

This commit adds a new implementation for EVEX memchr that is not safe
for RTM because it uses vzeroupper. The benefit is that by using
ymm0-ymm15 it can use vpcmpeq and vpternlogd in the 4x loop which is
faster than the RTM safe version which cannot use vpcmpeq because
there is no EVEX encoding for the instruction. All parts of the
implementation aside from the 4x loop are the same for the two
versions and the optimization is only relevant for large sizes.

Tigerlake:
size  , algn  , Pos   , Cur T , New T , Win     , Dif
512   , 6     , 192   , 9.2   , 9.04  , no-RTM  , 0.16
512   , 7     , 224   , 9.19  , 8.98  , no-RTM  , 0.21
2048  , 0     , 256   , 10.74 , 10.54 , no-RTM  , 0.2
2048  , 0     , 512   , 14.81 , 14.87 , RTM     , 0.06
2048  , 0     , 1024  , 22.97 , 22.57 , no-RTM  , 0.4
2048  , 0     , 2048  , 37.49 , 34.51 , no-RTM  , 2.98   <--

Icelake:
size  , algn  , Pos   , Cur T , New T , Win     , Dif
512   , 6     , 192   , 7.6   , 7.3   , no-RTM  , 0.3
512   , 7     , 224   , 7.63  , 7.27  , no-RTM  , 0.36
2048  , 0     , 256   , 8.48  , 8.38  , no-RTM  , 0.1
2048  , 0     , 512   , 11.57 , 11.42 , no-RTM  , 0.15
2048  , 0     , 1024  , 17.92 , 17.38 , no-RTM  , 0.54
2048  , 0     , 2048  , 30.37 , 27.34 , no-RTM  , 3.03   <--

test-memchr, test-wmemchr, and test-rawmemchr are all passing.

Signed-off-by: Noah Goldstein <goldstein.w.n@gmail.com>
Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
2021-05-08 16:26:30 -04:00
argp
assert
benchtests Bench: Expand bench-memchr.c 2021-05-03 10:18:11 -07:00
bits
catgets
ChangeLog.old
conform
crypt
csu elf: Introduce __tls_init_tp for second-phase TCB initialization 2021-04-21 19:49:51 +02:00
ctype
debug
dirent
dlfcn dlfcn: dlerror needs to call free from the base namespace [BZ #24773] 2021-04-21 19:49:51 +02:00
elf nptl: Consolidate async cancel enable/disable implementation in libc 2021-05-05 17:19:32 +02:00
gmon
gnulib
grp
gshadow
hesiod
htl fork.h: replace with register-atfork.h 2021-03-29 21:41:09 +02:00
hurd hurd: Export _hurd_libc_proc_init 2021-04-12 00:23:36 +02:00
iconv Run $(objpfx)iconvconfig with $(run-program-prefix) [BZ #27477] 2021-05-07 04:38:44 -07:00
iconvdata
include linux: implement ttyname as a wrapper around ttyname_r. 2021-05-07 13:56:02 -03:00
inet Annotate additional APIs with GCC attribute access. 2021-05-06 11:01:05 -06:00
intl
io Annotate additional APIs with GCC attribute access. 2021-05-06 11:01:05 -06:00
libio Annotate additional APIs with GCC attribute access. 2021-05-06 11:01:05 -06:00
locale locale: Align _nl_C_LC_CTYPE_class and _nl_C_LC_CTYPE_class32 2021-05-03 16:10:18 +02:00
localedata Update sv_SE to treate 'W' as a distinct character (Bug 25036) 2021-04-06 12:34:02 -04:00
login
mach
malloc malloc: Make tunable callback functions static 2021-05-07 11:11:46 -07:00
manual nptl: Consolidate async cancel enable/disable implementation in libc 2021-05-05 17:19:32 +02:00
math Improve the accuracy of tgamma (BZ #26983) 2021-04-07 13:23:39 +02:00
mathvec
misc misc: use _fitoa_word to implement __fd_to_filename. 2021-05-07 13:54:36 -03:00
nis
nptl nptl: Move pthread_barrierattr_setpshared into libc 2021-05-06 15:56:37 +02:00
nptl_db nptl: Move __pthread_keys global variable into libc 2021-04-21 19:49:50 +02:00
nscd
nss Annotate additional APIs with GCC attribute access. 2021-05-06 11:01:05 -06:00
po
posix linux: Use sched_getaffinity for __get_nprocs (BZ #27645) 2021-05-07 13:54:09 -03:00
pwd Annotate additional APIs with GCC attribute access. 2021-05-06 11:01:05 -06:00
resolv
resource
rt nptl: Consolidate async cancel enable/disable implementation in libc 2021-05-05 17:19:32 +02:00
scripts Use Linux 5.12 and GCC 11 branch in build-many-glibcs.py. 2021-04-27 15:19:08 +00:00
setjmp nptl: Move __pthread_unwind_next into libc 2021-04-21 19:49:50 +02:00
shadow
signal nptl: Remove __libc_allocate_rtsig, __libc_current_sigrtmax, and __libc_current_sigrtmin 2021-03-26 13:37:18 -03:00
socket socket: Add CFLAGS-accept.c and CFLAGS-connect.c 2021-04-01 14:45:49 -03:00
soft-fp
stdio-common Annotate additional APIs with GCC attribute access. 2021-05-06 11:01:05 -06:00
stdlib Annotate additional APIs with GCC attribute access. 2021-05-06 11:01:05 -06:00
string Reindent string/test-memmove.c 2021-04-19 17:46:05 -07:00
sunrpc linux: Normalize and return timeout on select (BZ #27651) 2021-04-12 18:38:37 -03:00
support libsupport: Add support_select_normalizes_timeout 2021-04-12 18:38:37 -03:00
sysdeps x86: Add EVEX optimized memchr family not safe for RTM 2021-05-08 16:26:30 -04:00
sysvipc
termios
time time: Add 64 bit tests for getdate / getdate_r 2021-04-15 11:32:40 -03:00
timezone
wcsmbs
wctype
.gitattributes
.gitignore
abi-tags
aclocal.m4
config.h.in Add pthread-in-libc, libpthread-routines-var, librt-routines-var 2021-05-03 08:13:32 +02:00
config.make.in Add pthread-in-libc, libpthread-routines-var, librt-routines-var 2021-05-03 08:13:32 +02:00
configure Add pthread-in-libc, libpthread-routines-var, librt-routines-var 2021-05-03 08:13:32 +02:00
configure.ac Add pthread-in-libc, libpthread-routines-var, librt-routines-var 2021-05-03 08:13:32 +02:00
COPYING
COPYING.LIB
extra-lib.mk
gen-locales.mk
INSTALL
libc-abis
libof-iterator.mk
LICENSES
MAINTAINERS
Makeconfig Add pthread-in-libc, libpthread-routines-var, librt-routines-var 2021-05-03 08:13:32 +02:00
Makefile
Makefile.help
Makefile.in
Makerules
NEWS linux: Add execveat system call wrapper 2021-05-03 16:46:06 -03:00
o-iterator.mk
README
Rules
shlib-versions
test-skeleton.c
version.h

This directory contains the sources of the GNU C Library.
See the file "version.h" for what release version you have.

The GNU C Library is the standard system C library for all GNU systems,
and is an important part of what makes up a GNU system.  It provides the
system API for all programs written in C and C-compatible languages such
as C++ and Objective C; the runtime facilities of other programming
languages use the C library to access the underlying operating system.

In GNU/Linux systems, the C library works with the Linux kernel to
implement the operating system behavior seen by user applications.
In GNU/Hurd systems, it works with a microkernel and Hurd servers.

The GNU C Library implements much of the POSIX.1 functionality in the
GNU/Hurd system, using configurations i[4567]86-*-gnu.

When working with Linux kernels, this version of the GNU C Library
requires Linux kernel version 3.2 or later.

Also note that the shared version of the libgcc_s library must be
installed for the pthread library to work correctly.

The GNU C Library supports these configurations for using Linux kernels:

	aarch64*-*-linux-gnu
	alpha*-*-linux-gnu
	arc*-*-linux-gnu
	arm-*-linux-gnueabi
	csky-*-linux-gnuabiv2
	hppa-*-linux-gnu
	i[4567]86-*-linux-gnu
	x86_64-*-linux-gnu	Can build either x86_64 or x32
	ia64-*-linux-gnu
	m68k-*-linux-gnu
	microblaze*-*-linux-gnu
	mips-*-linux-gnu
	mips64-*-linux-gnu
	powerpc-*-linux-gnu	Hardware or software floating point, BE only.
	powerpc64*-*-linux-gnu	Big-endian and little-endian.
	s390-*-linux-gnu
	s390x-*-linux-gnu
	riscv32-*-linux-gnu
	riscv64-*-linux-gnu
	sh[34]-*-linux-gnu
	sparc*-*-linux-gnu
	sparc64*-*-linux-gnu

If you are interested in doing a port, please contact the glibc
maintainers; see https://www.gnu.org/software/libc/ for more
information.

See the file INSTALL to find out how to configure, build, and install
the GNU C Library.  You might also consider reading the WWW pages for
the C library at https://www.gnu.org/software/libc/.

The GNU C Library is (almost) completely documented by the Texinfo manual
found in the `manual/' subdirectory.  The manual is still being updated
and contains some known errors and omissions; we regret that we do not
have the resources to work on the manual as much as we would like.  For
corrections to the manual, please file a bug in the `manual' component,
following the bug-reporting instructions below.  Please be sure to check
the manual in the current development sources to see if your problem has
already been corrected.

Please see https://www.gnu.org/software/libc/bugs.html for bug reporting
information.  We are now using the Bugzilla system to track all bug reports.
This web page gives detailed information on how to report bugs properly.

The GNU C Library is free software.  See the file COPYING.LIB for copying
conditions, and LICENSES for notices about a few contributions that require
these additional notices to be distributed.  License copyright years may be
listed using range notation, e.g., 1996-2015, indicating that every year in
the range, inclusive, is a copyrightable year that would otherwise be listed
individually.