Sergey A. Borshch wrote:
[email protected] wrote:
Hi!
About two years ago there was a thread about unaligned access. I like to
wrap-up on the patch sent by Peter Jansen.
http://article.gmane.org/gmane.comp.hardware.texas-instruments.msp430.gcc.user/5615
Hi, I got the same problem. After spending 3 days to find the solution I
found this patch yesterday. One more day I spent unsuccessfully trying
to understand how gcc code generaion works.
But seems that I found solution: do not apply this patch, just change line
#define STRICT_ALIGNMENT TARGET_STRICT_ALIGN
in gcc/config/msp430/msp430.h to
#define STRICT_ALIGNMENT 1
Addition: you can check this without rebuilding compiler, just add
-msrtict-align to compiler command line. I think this switch must be
removed and its behavior turned on always as compiler produces wrong
code without it.
Sergey