6a909b9680
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.