From owner-freebsd-arch@FreeBSD.ORG Fri Feb 27 13:11:56 2009 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F0144106564A for ; Fri, 27 Feb 2009 13:11:56 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id 8FD1A8FC22 for ; Fri, 27 Feb 2009 13:11:56 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 5860D1CE29; Fri, 27 Feb 2009 14:11:55 +0100 (CET) Date: Fri, 27 Feb 2009 14:11:55 +0100 From: Ed Schouten To: FreeBSD Arch Message-ID: <20090227131155.GE19161@hoeg.nl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="2mUf73N0HmzM2Naa" Content-Disposition: inline User-Agent: Mutt/1.5.19 (2009-01-05) Subject: Making LLVM happy: memmove() in the kernel X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Feb 2009 13:11:57 -0000 --2mUf73N0HmzM2Naa Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. --=20 Ed Schouten WWW: http://80386.nl/ * http://wiki.freebsd.org/BuildingFreeBSDWithClang --2mUf73N0HmzM2Naa Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkmn5psACgkQ52SDGA2eCwVRLACdFdrXwy3q6mToUszQW6/mixoA /UgAn1tHChVlTcNiGke141s0CnNzMS5z =FjIf -----END PGP SIGNATURE----- --2mUf73N0HmzM2Naa--