------- Comment #2 from sebastian dot huber at embedded-brains dot de  
2010-09-10 15:43 -------
(In reply to comment #1)
> >1. index is constant or variable, and
> Yes that is correct.  
> >2. the 'bar' field type.
> The alignment of the access is different in those cases.

Sorry, the test case was not good.  If you expand foo [1] to foo [4] you still
have this behavior.

> >In any case byte accesses should be used.
> Why, word access is just as fast (if not faster) than a byte access on PPC.

Yes, but we have 'volatile struct type1 *varN;'.  For volatile fields we should
use accesses of the appropriate width.

The background is that a major hardware manufacturer provided structure
definitions like the above test case for register definitions.



Reply via email to