Arm Community
Site
Search
User
Site
Search
User
Support forums
Arm Development Studio forum
OMAP3: encountered a blocking structure assignment, occurring only on OMAP3 processors
Jump...
Cancel
Locked
Locked
Replies
6 replies
Subscribers
118 subscribers
Views
3918 views
Users
0 members are here
Options
Share
More actions
Cancel
Related
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
Wolfgang Hauser
over 12 years ago
Parents
Peter Harris
over 12 years ago
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.
Cancel
Vote up
0
Vote down
Cancel
Reply
Peter Harris
over 12 years ago
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.
Cancel
Vote up
0
Vote down
Cancel
Children
No data