#14 GCC generates unaligned FPU code

open
nobody
None
5
2012-09-21
2010-02-11
No

gcc (GCC) 4.2.4 (adtools build 20090118)

After some investigation, joerg helped uncover an FPU alignment issue
with the current SDK compiler.

We need to add the -mstrict-align option for the compiler because
the newer GCC series may generate code with the lfs instruction.
This instruction requires all data to be aligned at 4 bytes. Since
many of our structures may be packed with pack(2) you can run into
the lfs instruction and cause an alignment exception.

Alignment exceptions are only handled on the 440ep currently.

Forcing the alignment will also generate slightly faster code.

Workaround: Add the -mstrict-align keyword to your compile.

Unfortunately, any component not already compiled with -mstrict-align
could trigger the alignment exception so we need to recompile
everything eventually.

Discussion


Anonymous

Cancel  Add attachments





Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks