Rick Altherr wrote:
> I'm also not entirely sure that a structure must always be aligned.  
> I'm aware that some architectures will trap if an unaligned access is 
> encountered, but the OS should catch the trap and handle the unaligned 
> access correctly.
No. AFAIK, C requires pointers to be aligned, and for good reasons - 
there are plattforms where unaligned accesses are simply not possible, 
and many OS's on those platforms *do not* emulate such accesses but 
simply terminate the offending process.

This may sound strange for people who are used to X86 programming only, 
but portable code should avoid such constructs and not rely on the OS to 
emulate misaligned accesses.

cu
Michael

_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to