WHen generating code, the compiler adds unnecessary '.align 2' assembeler
directives (where '.align 2' means align on a four byte boundary).  This
results in extra padding being added between functions.

This occurs even when -fno-align-functions & -fno-align-labels are specified.

Richard Earnshaw [richard.earns...@arm.com] has confirmed that this is an issue
and requested that I raise it in bugzilla.

In the attached example (test.c), it can be seen in the generated assembly file
(test-align-thumb.s) that various .align 2 statements appear.

Command line was:

arm-none-eabi-gcc test.c -Os -S -mthumb -fno-align-functions -fno-align-labels
-o test-align-thumb.s


-- 
           Summary: GCC/THUMB generates unnecessary padding between
                    functions
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: daniel dot sherwood at sepura dot com
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-mingw32
GCC target triplet: arm-none-eabi


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38571

Reply via email to