opnsense-src/sys/amd64
Mateusz Guzik 088ac3ef4b amd64: handle small memset buffers with overlapping stores
Instead of jumping to locations which store the exact number of bytes,
use displacement to move the destination.

In particular the following clears an area between 8-16 (inclusive)
branch-free:

movq    %r10,(%rdi)
movq    %r10,-8(%rdi,%rcx)

For instance for rcx of 10 the second line is rdi + 10 - 8 = rdi + 2.
Writing 8 bytes starting at that offset overlaps with 6 bytes written
previously and writes 2 new, giving 10 in total.

Provides a nice win for smaller stores. Other ones are erratic depending
on the microarchitecture.

General idea taken from NetBSD (restricted use of the trick) and bionic
string functions (use for various ranges like in this patch).

Reviewed by:	kib (previous version)
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D17660
2018-11-16 00:44:22 +00:00
..
acpica Rename assym.s to assym.inc 2018-03-20 17:58:51 +00:00
amd64 amd64: handle small memset buffers with overlapping stores 2018-11-16 00:44:22 +00:00
cloudabi32 Use TO_PTR() to convert integers to pointers. 2017-11-26 14:45:56 +00:00
cloudabi64 Use TO_PTR() to convert integers to pointers. 2017-11-26 14:45:56 +00:00
conf Add ZFS to amd64 NOTES to catch future breakage of static linking 2018-11-13 23:08:46 +00:00
ia32 amd64: flush L1 data cache on syscall return with an error. 2018-10-20 23:17:24 +00:00
include Add a custom implementation of cpu_lock_delay() for x86. 2018-11-05 22:54:03 +00:00
linux Regenerated assorted syscall related files after: 2018-10-09 20:42:17 +00:00
linux32 Fix builds with COMPAT_LINUX32 in the kernel config. 2018-11-06 15:29:44 +00:00
pci Do not flush cache for PCIe config window. 2018-10-18 20:49:16 +00:00
sgx Rename assym.s to assym.inc 2018-03-20 17:58:51 +00:00
vmm Merge cases with upper block. 2018-10-31 01:27:44 +00:00
Makefile Bring the tags and links entries for amd64 up to date. 2015-10-27 22:59:24 +00:00