Justus Winter, le Fri 28 Mar 2014 16:22:14 +0100, a écrit :
> Steal all string functions previously implemented in kern/strings.c
> from the libc. Those are most likely more optimized than our simple
> implementations.
Well, we used to do that in the past, actually, and ended up into
various kind
Samuel Thibault, le Fri 28 Mar 2014 16:33:39 +0100, a écrit :
> see a disassemble of memcpy, it ends up being a rep movsb
> %ds:(%esi),%es:(%edi), which is just exactly what we need to tell the
> processor).
Oops, sorry, wrong example, that one is coming from libc. Anyway,
relying on the host libc
Steal all string functions previously implemented in kern/strings.c
from the libc. Those are most likely more optimized than our simple
implementations.
* Makefile.am (clib_routines): Add memset, strcmp, strncmp, strcpy,
strncpy, and strlen.
* Makefrag.am (libkernel_a_SOURCES): Drop kern/strings.
You need to take care for the cases that might be (now or in the future)
using ifunc.