freebsd-nq/lib/libc/amd64
Alexander Motin f22068d91b amd64: Stop using REP MOVSB for backward memmove()s.
Enhanced REP MOVSB feature of CPUs starting from Ivy Bridge makes
REP MOVSB the fastest way to copy memory in most of cases. However
Intel Optimization Reference Manual says: "setting the DF to force
REP MOVSB to copy bytes from high towards low addresses will expe-
rience significant performance degradation". Measurements on Intel
Cascade Lake and Alder Lake, same as on AMD Zen3 show that it can
drop throughput to as low as 2.5-3.5GB/s, comparing to ~10-30GB/s
of REP MOVSQ or hand-rolled loop, used for non-ERMS CPUs.

This patch keeps ERMS use for forward ordered memory copies, but
removes it for backward overlapped moves where it does not work.

This is just a cosmetic sync with kernel, since libc does not use
ERMS at this time.

Reviewed by:    mjg
MFC after:	2 weeks
2022-06-16 14:51:50 -04:00
..
gen libc: Remove _get_tp() and _set_tp(). 2021-12-09 13:23:26 -08:00
stdlib
string amd64: Stop using REP MOVSB for backward memmove()s. 2022-06-16 14:51:50 -04:00
sys libc/<arch>/sys/cerror.S: fix typo 2021-04-04 01:00:57 +03:00
_fpmath.h
arith.h
gd_qnan.h
Makefile.inc
static_tls.h Fix initial exec TLS mode for dynamically loaded shared objects. 2019-03-29 17:52:57 +00:00
Symbol.map libc: Remove _get_tp() and _set_tp(). 2021-12-09 13:23:26 -08:00
SYS.h