freebsd-dev/sys/conf
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
..
config.mk Add SCTP_SUPPORT handling to config.mk. 2020-06-25 15:25:00 +00:00
dtb.build.mk Switch to the new device-tree vendor tree 2021-01-15 20:08:39 +01:00
dtb.mk Allow kernel config to specify DTS/DTSO to build, and out-of-tree support 2019-03-26 02:45:23 +00:00
files amd64: implement strlen in assembly 2021-02-08 19:15:21 +00:00
files.amd64 ndis(4): remove as previous announced 2021-01-25 21:45:03 +00:00
files.arm amd64: implement strlen in assembly 2021-02-08 19:15:21 +00:00
files.arm64 amd64: implement strlen in assembly 2021-02-08 19:15:21 +00:00
files.i386 amd64: implement strlen in assembly 2021-02-08 19:15:21 +00:00
files.mips amd64: implement strlen in assembly 2021-02-08 19:15:21 +00:00
files.powerpc amd64: implement strlen in assembly 2021-02-08 19:15:21 +00:00
files.riscv amd64: implement strlen in assembly 2021-02-08 19:15:21 +00:00
files.x86 ndis(4): remove as previous announced 2021-01-25 21:45:03 +00:00
kern.mk Stop defaulting to DWRAF2 in kernel compilation 2020-12-31 15:56:18 -05:00
kern.opts.mk WITH_OFED build option: fix 2021-02-02 18:44:52 +02:00
kern.post.mk Use a template assembly file to generate the embedded MFS. 2020-10-20 16:48:45 +00:00
kern.pre.mk Perform kernel linker ifunc test only for builds 2020-12-27 12:46:51 -05:00
kmod_syms_prefix.awk
kmod_syms.awk
kmod.mk conf/kern.mk: save some work by using realpath instead of cd ; pwd 2021-01-27 12:41:33 +00:00
kmod.opts.mk Add a kmod.opts.mk. 2019-11-21 18:14:26 +00:00
ldscript.amd64 Unobfuscate "KERNLOAD" parameter on amd64. This change lines-up amd64 with the 2020-11-25 23:19:01 +00:00
ldscript.arm Eliminate the generated ldscript for arm and arm64, and strip $a/$d marker 2019-12-29 18:17:12 +00:00
ldscript.arm64 More the arm64 early page tables and stack to .bss 2020-12-23 13:10:23 +00:00
ldscript.i386 Expose the kernel's build-ID through sysctl 2019-06-04 13:07:10 +00:00
ldscript.kmod.amd64 Move PLTs to the beginning of amd64 kernel modules. 2020-09-16 13:51:47 +00:00
ldscript.kmod.i386 Formalize the use of linker scripts for kernel modules. 2019-10-16 22:19:56 +00:00
ldscript.mips Expose the kernel's build-ID through sysctl 2019-06-04 13:07:10 +00:00
ldscript.mips.cfe Expose the kernel's build-ID through sysctl 2019-06-04 13:07:10 +00:00
ldscript.mips.mips64 Expose the kernel's build-ID through sysctl 2019-06-04 13:07:10 +00:00
ldscript.mips.octeon1 Fix linking OCTEON1 kernel with LLD 2020-03-22 22:18:00 +00:00
ldscript.powerpc [PowerPC] kernel ifunc support for powerpc*, fix ppc64 relocation oddities. 2020-05-07 19:32:49 +00:00
ldscript.powerpc64 [PowerPC] Fix build-id note on powerpc64 kernel 2020-06-01 19:40:59 +00:00
ldscript.powerpc64le [PowerPC64LE] Set up powerpc.powerpc64le architecture 2020-09-22 23:49:30 +00:00
ldscript.powerpcspe [PowerPC] kernel ifunc support for powerpc*, fix ppc64 relocation oddities. 2020-05-07 19:32:49 +00:00
ldscript.riscv Set the LMA of the riscv kernel to the OpenSBI jump target by default 2020-02-04 00:06:16 +00:00
Makefile.amd64 Don't try ctfconvert on file without debug info. 2020-04-28 16:09:25 +00:00
Makefile.arm Switch to the new device-tree vendor tree 2021-01-15 20:08:39 +01:00
Makefile.arm64 Switch to the new device-tree vendor tree 2021-01-15 20:08:39 +01:00
Makefile.i386 Retire CLANG_NO_IAS34 2018-11-01 23:11:47 +00:00
Makefile.mips mips: Add the device-tree path to the include paths 2021-01-16 11:33:37 +01:00
Makefile.powerpc Remove tests for obsolete compilers in the build system 2020-05-12 15:22:40 +00:00
Makefile.riscv riscv: Add the device-tree path to the include path 2021-01-16 11:31:17 +01:00
newvers.sh newvers: tweak uname to be more useful 2021-01-28 17:44:56 -07:00
NOTES KTLS: Enable KERN_TLS in GENERIC on amd64 2021-01-18 13:29:10 -05:00
options hid: Replace USBHID_ENABLED kernel config option with loader tunable 2021-01-14 23:04:47 +03:00
options.amd64 Remove ndis(4) remnants from kernel configs 2021-01-26 00:04:13 +00:00
options.arm Remove unused options. 2020-11-29 17:42:32 +00:00
options.arm64 ARM64: Port FreeBSD to Nvidia Jetson TX1 and Nano. 2020-12-28 14:12:41 +01:00
options.i386 Remove ndis(4) remnants from kernel configs 2021-01-26 00:04:13 +00:00
options.mips Remove remaning definition of GFB_<foo> options. 2020-12-05 19:44:00 +00:00
options.powerpc Remove remaning definition of GFB_<foo> options. 2020-12-05 19:44:00 +00:00
options.riscv
std.nodebug Split out the NODEBUG options to a common file 2021-01-14 16:57:53 +00:00
sysent.mk Rebuild sysent when capabilities.conf is updated. 2020-07-07 16:35:52 +00:00
systags.sh Fix kernel-tags target. 2020-01-23 13:56:12 +00:00
WITHOUT_SOURCELESS
WITHOUT_SOURCELESS_HOST
WITHOUT_SOURCELESS_UCODE retire cx,ctau drivers 2020-03-20 16:50:19 +00:00