]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
amd64: replace libkern's memset and memmove with assembly variants
authormjg <mjg@FreeBSD.org>
Mon, 7 May 2018 15:07:28 +0000 (15:07 +0000)
committermjg <mjg@FreeBSD.org>
Mon, 7 May 2018 15:07:28 +0000 (15:07 +0000)
commit326c556da078f4ae63eb83725698d7593a76a108
tree1e64ee135ba380a2b819700286c620f8b66e814d
parent5c9b27a2b9f4a38d30a38ca1080a1245a947643d
amd64: replace libkern's memset and memmove with assembly variants

memmove is repurposed bcopy (arguments swapped, return value added)
The libkern variant is a wrapper around bcopy, so this is a big
improvement.

memset is repurposed memcpy. The librkern variant is doing fishy stuff,
including branching on 0 and calling bzero.

Both functions are rather crude and subject to partial depessimization.

This is a soft prerequisite to adding variants utilizing the
'Enhanced REP MOVSB/STOSB' bit and let the kernel patch at runtime.
sys/amd64/amd64/support.S
sys/conf/files.amd64