Looks like it works!! I need to test a bit more, but first results are promising. The -mstrict-align switch is not available for me, but changing the sources is fine.
Albert --- Sergey A. Borshch <[email protected]> schrieb am Mi, 8.10.2008: Von: Sergey A. Borshch <[email protected]> Betreff: Re: [Mspgcc-users] unaligned access of packed structs - Patch from Peter Jansen An: "GCC for MSP430 - http://mspgcc.sf.net" <[email protected]> Datum: Mittwoch, 8. Oktober 2008, 2:29 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 ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Mspgcc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mspgcc-users __________________________________________________ Do You Yahoo!? Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen Massenmails. http://mail.yahoo.com
