Re: Unaligned access to packed structs on ppc405

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

 





Matthew Jones wrote:

From: Yaro Pollak

Greetings,
I am cross-compiling on GCC 3.4.1 for the PowerPC 405,
which can handle unaligned accesses in hardware.
Whenever I am accessing members of a packed bit-struct by
pointer, the  compiler produces byte accesses, instead of
4-byte acceses. I've tried to use |-mstrict-align but to
no avail. Am I doing something wrong?

Are you sure it is the compiler? Are you looking at the generated
assembler, or inferring this from a logic analyser? If its the
second case, it could be the uP rather than gcc.

I'm sorry I failed to mention that as well, but I am in fact looking at the generated assembler, vs. the assembler generated when I am accessing the members of the struct directly (not through a pointer).

Yaro

[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