opnsense-src/sys/amd64
Mateusz Guzik af366d353b amd64: implement strlen in assembly
The C variant in libkern performs excessive branching to find the
non-zero byte instead of using the bsfq instruction. The same code
patched to use it is still slower than the routine implemented here
as the compiler keeps neglecting to perform certain optimizations
(like using leaq).

On top of that the routine can is a starting point for copyinstr
which operates on words instead of bytes.

Tested with glibc test suite.

Sample results (calls/s):

Haswell:
$(perl -e "print 'A' x 3"):
stock:	211198039
patched:338626619
asm:	465609618

$(perl -e "print 'A' x 100"):
stock:	 83151997
patched: 98285919
asm:	120719888

AMD EPYC 7R32:
$(perl -e "print 'A' x 3"):
stock:	282523617
asm:	491498172

$(perl -e "print 'A' x 100"):
stock:	114857172
asm:	112082057
2021-02-08 19:15:21 +00:00
..
acpica amd64: clean up empty lines in .c and .h files 2020-09-01 21:16:54 +00:00
amd64 amd64: implement strlen in assembly 2021-02-08 19:15:21 +00:00
cloudabi32 Get rid of sa->narg. It serves no purpose; use sa->callp->sy_narg instead. 2020-09-27 18:47:06 +00:00
cloudabi64 Get rid of sa->narg. It serves no purpose; use sa->callp->sy_narg instead. 2020-09-27 18:47:06 +00:00
conf amd64 GENERIC: compile in mlx5en(4) 2021-02-05 03:22:26 +02:00
ia32 Improve FPU Tag Word reconstruction on i386 to indicate register states. 2020-10-21 00:15:12 +00:00
include amd64: use compiler intrinsics for bsf* and bsr* 2021-02-01 04:53:23 +00:00
linux linux: map EBUSY returned by ptrace into ESRCH 2021-01-19 11:21:55 +00:00
linux32 Fix i386 linux module after r367395. 2020-12-05 14:53:24 +00:00
pci pci_cfgreg.c: Use io port config access for early boot time. 2019-04-09 18:07:17 +00:00
sgx Convert remaining cap_rights_init users to cap_rights_init_one 2021-01-12 13:16:10 +00:00
vmm bhyve/ioapic: improve the tracking of IRR bit 2021-02-02 09:47:00 +01:00
Makefile Bring the tags and links entries for amd64 up to date. 2015-10-27 22:59:24 +00:00