From owner-freebsd-arch@FreeBSD.ORG Sat Feb 28 09:58:31 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 914CB106566C for ; Sat, 28 Feb 2009 09:58:31 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from vlakno.cz (77-93-215-190.static.masterinter.net [77.93.215.190]) by mx1.freebsd.org (Postfix) with ESMTP id 431398FC15 for ; Sat, 28 Feb 2009 09:58:31 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 68B3F9CB084; Sat, 28 Feb 2009 10:55:15 +0100 (CET) X-Virus-Scanned: amavisd-new at vlakno.cz Received: from vlakno.cz ([127.0.0.1]) by localhost (lev.vlakno.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SqB+PDxk3fbM; Sat, 28 Feb 2009 10:55:03 +0100 (CET) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 4EF619CB121; Sat, 28 Feb 2009 10:55:03 +0100 (CET) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.14.3/8.14.3/Submit) id n1S9t2Rt062614; Sat, 28 Feb 2009 10:55:02 +0100 (CET) (envelope-from rdivacky) Date: Sat, 28 Feb 2009 10:55:02 +0100 From: Roman Divacky To: Bruce Evans Message-ID: <20090228095502.GA62459@freebsd.org> References: <20090227131155.GE19161@hoeg.nl> <20090227131221.GA60215@freebsd.org> <49A80F4D.8000406@icyb.net.ua> <20090227132242.4ef6a633@kan.dnsalias.net> <20090228175724.D14305@delplex.bde.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090228175724.D14305@delplex.bde.org> User-Agent: Mutt/1.4.2.3i Cc: Ed Schouten , Arch , FreeBSD@freebsd.org, Andriy Gapon 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: Sat, 28 Feb 2009 09:58:31 -0000 On Sat, Feb 28, 2009 at 06:43:54PM +1100, Bruce Evans wrote: > On Fri, 27 Feb 2009, Alexander Kabaev wrote: > > >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 > > Why would Clang be that broken? Structs cannot overlap, so they can structs can overlap: struct foo { double x[100]; }; void T(struct foo *F, struct foo* G) { *F = *G; } when F equals to G