patch: honor volatile bitfield types
Hans-Peter Nilsson
hans-peter.nilsson@axis.com
Thu Jun 24 02:06:00 GMT 2010
> Date: Wed, 23 Jun 2010 11:53:31 -0400
> From: Daniel Jacobowitz <dan@codesourcery.com>
> On Wed, Jun 23, 2010 at 11:34:04AM -0400, DJ Delorie wrote:
> > > Can we similarly promise or say something for accesses of the
> > > containing struct as a whole?
> > I hadn't considered those cases (when would you want to copy a
> > *peripheral* ?) Should be the same as before, I would think.
> Not the peripheral, just one register. e.g. you might read a control
> register into a struct of the same (32-bit) type, and then read
> multiple fields from the copied struct.
Exactly. One register with several fields, which you want or
must read together, or that you read, change some fields, then
write back, if your write-registers have built-in shadowing. It
is of course a prerequisite that you know the ABI-mapping for
bitfields. (Which as a sidenote happen to be identical for most
common targets with the same endianness, given that you fill
exactly 32 bits!)
brgds, H-P
More information about the Gcc
mailing list