From owner-freebsd-arch@FreeBSD.ORG Fri Feb 27 18:51:58 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 2F98F106567A for ; Fri, 27 Feb 2009 18:51:58 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.24]) by mx1.freebsd.org (Postfix) with ESMTP id F19E48FC32 for ; Fri, 27 Feb 2009 18:51:53 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: by qw-out-2122.google.com with SMTP id 3so1195615qwe.7 for ; Fri, 27 Feb 2009 10:51:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:in-reply-to:references:x-mailer:mime-version :content-type; bh=Du+8E+hXiAQ809nC6MhC7jWASA98R4MAsua/B5UXAYc=; b=o4Qk9suLmz0Aq4mjKOhez2ppMzAo3MCOrUTHtpl48FGxtNnN+BZaMDW35u8e0D+aUR eXEzdw+6uUH+bIqFc76Mpqng4FH/bla1orrfXfIIWmH20b11wBAWA7RwlTICpa7faG8Y PUEwlfaJUDH55HeuhV7OtG1XVVSdRGIW83/tk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type; b=t7ZTPyJl2heW12nNlWdKEvPgF1WyOEBt8ttZdv8SqWyWFNh/v6UpPqKadF3wjx03ni 3f8Dzg48zUZsMDE7kZVCEa3WiWnMgSD+lvR2E7NGfM+RfeA9rcmd7qbZA3iSsCP6Gkov WxjddJ50aLjeMN7fFl1W1ejFvE5U5SwG/f7Oc= Received: by 10.224.28.78 with SMTP id l14mr4532349qac.307.1235758972062; Fri, 27 Feb 2009 10:22:52 -0800 (PST) Received: from kan.dnsalias.net (c-98-217-224-113.hsd1.ma.comcast.net [98.217.224.113]) by mx.google.com with ESMTPS id 6sm120564qwk.37.2009.02.27.10.22.50 (version=SSLv3 cipher=RC4-MD5); Fri, 27 Feb 2009 10:22:50 -0800 (PST) Date: Fri, 27 Feb 2009 13:22:42 -0500 From: Alexander Kabaev To: Andriy Gapon Message-ID: <20090227132242.4ef6a633@kan.dnsalias.net> In-Reply-To: <49A80F4D.8000406@icyb.net.ua> References: <20090227131155.GE19161@hoeg.nl> <20090227131221.GA60215@freebsd.org> <49A80F4D.8000406@icyb.net.ua> X-Mailer: Claws Mail 3.5.0 (GTK+ 2.12.11; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/cg0fB=pr8bTeWCjOr/j3cSz"; protocol="application/pgp-signature"; micalg=PGP-SHA1 Cc: Ed Schouten , Roman Divacky , FreeBSD, Arch Subject: Re: 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 18:52:13 -0000 --Sig_/cg0fB=pr8bTeWCjOr/j3cSz Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Fri, 27 Feb 2009 18:05:33 +0200 Andriy Gapon wrote: > on 27/02/2009 15:12 Roman Divacky said the following: > > On Fri, Feb 27, 2009 at 02:11:55PM +0100, 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(). > >=20 > > also.. quoting from > > (http://gcc.gnu.org/onlinedocs/gcc-4.2.1/gcc/Standards.html):=20 > >=20 > > Most of the compiler support routines used by GCC are present in > > libgcc, but there are a few exceptions. GCC requires the > > freestanding environment provide memcpy, memmove, memset and memcmp. > >=20 > > we were just lucky to not run into this >=20 > Some people actually were not that lucky and had to use similar > workarounds. >=20 I think we should use this opportunity and make sure we have external symbols for all of the above mem* functions, not just memmove. Please :) --=20 Alexander Kabaev --Sig_/cg0fB=pr8bTeWCjOr/j3cSz Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iD8DBQFJqC9yQ6z1jMm+XZYRAiIXAJsH8W+cvnwb9Y+ZUo9NI3IbbWmy3ACfUwyS WHMH10V/OpAGTnP0Z453nuM= =se/P -----END PGP SIGNATURE----- --Sig_/cg0fB=pr8bTeWCjOr/j3cSz--