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 I like to patch the mspgcc in order to get all operations within packed structs to be mov.b. Actually with Peter's patch all mov operations are going to be mov.b. I am working with networking code, which does not allow for padding in packed structs and I am ok with the less compact result. I applied Peter's patch and it works great for const assignments and assignments of addresses from variables. However, it does not work for addresses of functions: void bar(void) { int i =3D 0x1234; // works i =(int)&bar; // broken } /tmp/ccpBu3HO.s: Assembler messages: /tmp/ccpBu3HO.s:82: Error: bad expression /tmp/ccpBu3HO.s:82: Error: missing ')' Can anyone please give me a starting point, which mspgcc functions I should be looking at to fix this? Since the function addresses are determined at linking time, the patch would need to leave the instructions for function addresses with 16bit mov, I guess. Thanks, Albert
