Making LLVM happy: memmove() in the kernel
Sean C. Farley
scf at FreeBSD.org
Fri Feb 27 08:40:52 PST 2009
On Fri, 27 Feb 2009, Ed Schouten wrote:
> Hi all,
>
> The FreeBSD+LLVM folks* noticed Clang generates calls to memmove() by
> itself. I have yet to confirm this, but I assume this is done when
> performing copies of structs greater than a certain size. In our
> kernel, we don't have a memmove() function, but we do have a bcopy().
>
> Because memmove() must be a function in this case (not a simple
> macro), Roman and I agreed that adding a memmove() to libkern would be
> the best thing to do for now, simply by calling bcopy(). ARM already
> has a memmove() in support.S, so we don't need it there.
>
> So my question is: what is your folks opinion on this patch?
>
> http://80386.nl/pub/memmove.diff
>
> It would be lovely if we could integrate this patch (or a similar
> one), because this will allow us to build kernels with Clang out of
> the box.
Does bcopy() in the kernel allow for overlapping strings?
Sean
--
scf at FreeBSD.org
More information about the freebsd-arch
mailing list