Date: Fri, 27 Feb 2009 10:40:30 -0600 (CST) From: "Sean C. Farley" <scf@FreeBSD.org> To: Ed Schouten <ed@80386.nl> Cc: FreeBSD Arch <freebsd-arch@FreeBSD.org> Subject: Re: Making LLVM happy: memmove() in the kernel Message-ID: <alpine.BSF.2.00.0902271038510.1801@thor.farley.org> In-Reply-To: <20090227131155.GE19161@hoeg.nl> References: <20090227131155.GE19161@hoeg.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
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@FreeBSD.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.0902271038510.1801>