[U-Boot-Users] struct NS16550 {...} __attribute__ ((packed)) at ns16550.h
Wolfgang Denk
wd at denx.de
Mon Apr 25 10:20:03 CEST 2005
[Please do not send regular messages to the u-boot-users-admin address!]
In message <OFC533536B.66CF098A-ONC1256FEE.002A2AD5-C1256FEE.002A9FFB at philips.com> you wrote:
>
> Did you inspect the generated assembly statemens of __attribute__
> ((packed)) on the struct NS16650 when CFG_NS16550_REG_SIZE is 4? If you
No, I did not.
> did then you would have noticed gcc (atleast 3.4.3 and 3.4.0) generates
> byte access code for it. As I mailed to this mailinglist at the first of
If this is really true, then there is either bug in GCC or in the code.
If I code a 32 bit access the compiler must not use any other accesses.
If CFG_NS16550_REG_SIZE is 4, then all entries in "struct NS16550"
are of type "unsigned long". All of the compilers I'm working with
generate exactly the same code whether "__attribute__ ((packed))" is
used or not.
[BTW: at the moment only the U824 board uses CFG_NS16550_REG_SIZE=4,
and this is a PowerPC board.]
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"One day," said a dull voice from down below, "I'm going to be back
in form again and you're going to be very sorry you said that. For a
very long time. I might even go so far as to make even more Time just
for you to be sorry in." - Terry Pratchett, _Small Gods_
More information about the U-Boot
mailing list