Re: Unaligned access to packed structs on ppc405

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>>>>> John Yates writes:

John> Do I read this correctly?  Are you truly saying that two structs
John> with identical layout will trigger different code sequences just
John> because one was declared packed?

	Yes.  Why is that strange?  attribute packed assigns the smallest
possible alignment so that the compiler composes the layout of the
structure or bitfield in the more compact form possible.  Even if the
layout produced is the same, the smaller alignment is carried around with
the fields and causes the compiler to use more conservative access
operations. 

David


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux