From owner-freebsd-arm@FreeBSD.ORG Sun Nov 12 18:08:35 2006 Return-Path: X-Original-To: arm@freebsd.org Delivered-To: freebsd-arm@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2AFFB16A403; Sun, 12 Nov 2006 18:08:35 +0000 (UTC) (envelope-from keramida@freebsd.org) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8CB8A43D5A; Sun, 12 Nov 2006 18:08:33 +0000 (GMT) (envelope-from keramida@freebsd.org) Received: from kobe.laptop (host155-42.pool8174.interbusiness.it [81.74.42.155] (may be forged)) (authenticated bits=128) by igloo.linux.gr (8.13.8/8.13.8/Debian-2) with ESMTP id kACI84Mt013458 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sun, 12 Nov 2006 20:08:08 +0200 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.13.8/8.13.8) with ESMTP id kACI7wXu006837; Sun, 12 Nov 2006 19:07:59 +0100 (CET) (envelope-from keramida@freebsd.org) Received: (from keramida@localhost) by kobe.laptop (8.13.8/8.13.8/Submit) id kACI7waS006836; Sun, 12 Nov 2006 19:07:58 +0100 (CET) (envelope-from keramida@freebsd.org) Date: Sun, 12 Nov 2006 19:07:58 +0100 From: Giorgos Keramidas To: Ruslan Ermilov Message-ID: <20061112180758.GD4237@kobe.laptop> References: <20061112140010.GA47660@rambler-co.ru> <20061112142710.GE91556@wombat.fafoe.narf.at> <20061112133929.9194773068@freebsd-current.sentex.ca> <20061112140010.GA47660@rambler-co.ru> <20061112144230.GC2331@kobe.laptop> <20061112145151.GC49703@rambler-co.ru> <20061112151150.GA2988@kobe.laptop> <20061112155723.GB50349@rambler-co.ru> <20061112165904.GP6501@plum.flirble.org> <20061112171436.GF50349@rambler-co.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20061112171436.GF50349@rambler-co.ru> X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (score=-2.463, required 5, autolearn=not spam, BAYES_00 -2.60, FORGED_RCVD_HELO 0.14, UNPARSEABLE_RELAY 0.00) X-Hellug-MailScanner-From: keramida@freebsd.org X-Spam-Status: No Cc: arm@freebsd.org, current@freebsd.org Subject: Re: [head tinderbox] failure on arm/arm X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Nov 2006 18:08:35 -0000 On 2006-11-12 20:14, Ruslan Ermilov wrote: >On Sun, Nov 12, 2006 at 04:59:04PM +0000, Nicholas Clark wrote: >>On Sun, Nov 12, 2006 at 06:57:23PM +0300, Ruslan Ermilov wrote: >>> So your sizeof() argument, well... I don't understand it and it >>> doesn't make things clearer at least to me. I still believe this >>> is bug in GCC that the alignment requirement is so high for a >>> "struct foo { char x; }" (there's no real reason for this!). >> >> It is no bug in GCC. ANSI C gives extreme flexibility for the compiler to >> align (or pad) structures. The assumptions in the code you presented are not >> portable. The problem tends to be that ARM is the only common platform that >> does structure alignment this way, so tends to trip up a lot of code that >> has worked just fine in many other places. >> >> There is a lot more detail in >> http://netwinder.osuosl.org/users/b/brianbr/public_html/alignment.html >> including how gcc's __packed__ extention can be used to tell gcc to align >> structures in different ways. > > Thanks! Item 2 at this URL has an answer to my question. Perfect! Now it's obvious why GCC prefers '4-byte accesses' on ARM. Nicholas, thank you so much :)