From owner-freebsd-current@FreeBSD.ORG Mon Nov 13 02:10:47 2006 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7077016A40F; Mon, 13 Nov 2006 02:10:47 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from kientzle.com (h-66-166-149-50.snvacaid.covad.net [66.166.149.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5CED543D67; Mon, 13 Nov 2006 02:10:46 +0000 (GMT) (envelope-from kientzle@freebsd.org) Received: from [10.0.0.221] (p54.kientzle.com [66.166.149.54]) by kientzle.com (8.12.9/8.12.9) with ESMTP id kAD2Ak24079878; Sun, 12 Nov 2006 18:10:46 -0800 (PST) (envelope-from kientzle@freebsd.org) Message-ID: <4557D425.40101@freebsd.org> Date: Sun, 12 Nov 2006 18:10:45 -0800 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.12) Gecko/20060422 X-Accept-Language: en-us, en MIME-Version: 1.0 References: <20061112180758.GD4237@kobe.laptop> <20061112132105.6bac38d6@kan.dnsalias.net> <20061112192810.GC1173@rambler-co.ru> <20061112.154733.-432839119.imp@bsdimp.com> In-Reply-To: <20061112.154733.-432839119.imp@bsdimp.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: arm@freebsd.org, current@freebsd.org, keramida@freebsd.org Subject: Re: [head tinderbox] failure on arm/arm X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Nov 2006 02:10:47 -0000 In message: <20061112192810.GC1173@rambler-co.ru> Ruslan Ermilov writes: : On the other hand, having GCC align "struct foo { char x[11]; }" : on a four-byte boundary (other than for backward compatibility) : doesn't make too much sense to me. It makes a lot of sense, actually, even on i386, which is why the standard allows the compiler a lot of leeway to pad and align such structure. For example, consider this structure assignment: struct foo a,b; a = b; The structure copy here is a LOT faster if the structures are always suitably aligned and padded. If the compiler pads your sample struct to 12 bytes and 4-aligns, the structure copy here can be done with 3 aligned 32-bit moves. Even on i386, aligned operations are a lot faster than unaligned ones. The code mentioned in the original post is simply broken; it does not comply with the ISO C Standard. Tim Kientzle