On 5.4.2012 14:34, Jakub Jermar wrote: > On 5.4.2012 14:22, Jiri Svoboda wrote: >> Why? A packed structure means not just that the fields are packed >> together without padding for natural alignment. It also means that the >> address of the structure itself in memory need not be aligned to the >> size of its largest element. So, GCC will generate code to read/write >> any field byte-by-byte instead. Of course this works only for memory, >> not for registers! > > I wonder if the comment would still have its merrit when we consider all > the members are effectively volatile.
Moreover, all accesses to the structure must be done using the pio_read/write_n() functions so the proper access width is guaranteed. Jakub _______________________________________________ HelenOS-devel mailing list [email protected] http://lists.modry.cz/cgi-bin/listinfo/helenos-devel
