From: Josh Huber <huberj@wpi•edu>
To: jlquinn@us•ibm.com, linuxppc-dev@lists•linuxppc.org
Subject: Re: Help with cross-endian bitfields?
Date: Fri, 5 May 2000 16:45:19 -0400 [thread overview]
Message-ID: <20000505164519.A1643@mclinux.com> (raw)
In-Reply-To: <391329A0.763DED8@embeddededge.com>; from dan@netx4.com on Fri, May 05, 2000 at 04:05:52PM -0400
On Fri, May 05, 2000 at 04:05:52PM -0400, Dan Malek wrote:
> IMHO, bit fields are not normally a good thing to be using if this is
> describing a real device register. The compiler is able to read/write
> in ways that may not be proper for hardware access. For device registers
> and when this is a data structure in memory, the cross-platform method
> of using macros for reading writing 16- and 32-bit values and then 'C'
> operators for testing/setting bits has worked pretty well in the past.....
Yeah, I just looked in the PowerPC ABI for bitfield storage, and the
relevant text said:
* Bit-fields are allocated from right to left (least to most significant) on
Little-Endian implementations and from left to right (most to least
significant) on Big-Endian implementations.
Josh
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
next prev parent reply other threads:[~2000-05-05 20:45 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-05-05 19:27 Help with cross-endian bitfields? jlquinn
2000-05-05 20:05 ` Dan Malek
2000-05-05 20:45 ` Josh Huber [this message]
2000-05-05 20:49 ` Daniel Jacobowitz
-- strict thread matches above, loose matches on Subject: below --
2000-05-05 20:47 jlquinn
[not found] <200005060514.AAA05188@lists.linuxppc.org>
2000-05-08 7:03 ` james woodyatt
2000-05-08 9:50 ` Geert Uytterhoeven
2000-05-08 10:13 D.J. Barrow
2000-05-08 14:19 ` Geert Uytterhoeven
2000-05-08 14:38 jlquinn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20000505164519.A1643@mclinux.com \
--to=huberj@wpi$(echo .)edu \
--cc=jlquinn@us$(echo .)ibm.com \
--cc=linuxppc-dev@lists$(echo .)linuxppc.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox