Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HNRQW-0004iF-Kq for qemu-devel@nongnu.org; Sat, 03 Mar 2007 05:25:20 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HNRQU-0004i3-7i for qemu-devel@nongnu.org; Sat, 03 Mar 2007 05:25:19 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HNRQU-0004i0-14 for qemu-devel@nongnu.org; Sat, 03 Mar 2007 05:25:18 -0500 Received: from ns.suse.de ([195.135.220.2] helo=mx1.suse.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HNRQT-0006CZ-KD for qemu-devel@nongnu.org; Sat, 03 Mar 2007 05:25:17 -0500 Received: from Relay1.suse.de (mail2.suse.de [195.135.221.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.suse.de (Postfix) with ESMTP id 68551122D5 for ; Sat, 3 Mar 2007 11:25:14 +0100 (CET) From: Andreas Schwab Subject: Re: [Qemu-devel] [PATCH] pcnet32 driver change, please test References: <20070302200949.GD27636@networkno.de> <20070302231450.GA6741@miranda.arrow> <20070302.175333.1622572844.imp@bsdimp.com> <200703030101.56126.paul@codesourcery.com> Date: Sat, 03 Mar 2007 11:25:13 +0100 In-Reply-To: <200703030101.56126.paul@codesourcery.com> (Paul Brook's message of "Sat, 3 Mar 2007 01:01:55 +0000") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Paul Brook writes: >> : I find this curious... C99 (6.7.2.1) says "the allocation order of >> : bit-fields within a unit (high-order to low-order or low-order to >> : high-order) is implementation defined". I can't see any requirement >> : for this, so is it just convention that bitfields on big endian syst= ems >> : start from the most significant bit, and those on little endian syst= ems >> : start from the least significant bit? (My thinking is that endianne= ss >> : usually refers to byte ordering and not so much bit ordering.) >> >> This is a convention that goes back a very long ways. It was this way >> in the mid 1980's, and has remained true through today. I've >> personally observed this to be the case on many different MIPS >> compilers, ARM compilers and SPARC compilers over the years. > > I'm fairly sure I've seen targets that use other bitfield orderings, th= ough I=20 > can't remember offhand what they were. Bi-endian targets are examples of this. The bitfield ordering is normall= y independent of the selected byte order. For example, big-endian MIPS has little endian bit order. Andreas. --=20 Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux Products GmbH, Maxfeldstra=DFe 5, 90409 N=FCrnberg, Germany PGP key fingerprint =3D 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED= 5 "And now for something completely different."