This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

OMAP3: encountered a blocking structure assignment, occurring only on OMAP3 processors

Parents
  • Note: This was originally posted on 1st August 2012 at http://forums.arm.com

    This will "probably work" because most memcpy implementations include alignment checks, and fall back to a slower copy if src and/or dst are unaligned. However you still end up with a structure with incorrect alignment in memory. If you try and use that later as a real structure then you may well hit other problems. The compiler could use LDRD/STRD to read or write the 64-bit fields, for example, and as these require 64-bit alignment, you would hit the same problem.

    A quick and dirty approximation of binary compatibility across memory systems - if you align base pointers for any structure on an 8-byte boundary you are unlikely to hit a problem on any commonly used architecture.
Reply
  • Note: This was originally posted on 1st August 2012 at http://forums.arm.com

    This will "probably work" because most memcpy implementations include alignment checks, and fall back to a slower copy if src and/or dst are unaligned. However you still end up with a structure with incorrect alignment in memory. If you try and use that later as a real structure then you may well hit other problems. The compiler could use LDRD/STRD to read or write the 64-bit fields, for example, and as these require 64-bit alignment, you would hit the same problem.

    A quick and dirty approximation of binary compatibility across memory systems - if you align base pointers for any structure on an 8-byte boundary you are unlikely to hit a problem on any commonly used architecture.
Children
No data