Making LLVM happy: memmove() in the kernel

Ed Schouten ed at 80386.nl
Fri Feb 27 05:11:57 PST 2009


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.

-- 
 Ed Schouten <ed at 80386.nl>
 WWW: http://80386.nl/

* http://wiki.freebsd.org/BuildingFreeBSDWithClang
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-arch/attachments/20090227/3f22dc5f/attachment.pgp


More information about the freebsd-arch mailing list