public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/38571]  New: GCC/THUMB generates unnecessary padding between functions
@ 2008-12-18 17:42 daniel dot sherwood at sepura dot com
  2008-12-18 17:43 ` [Bug c/38571] " daniel dot sherwood at sepura dot com
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: daniel dot sherwood at sepura dot com @ 2008-12-18 17:42 UTC (permalink / raw)
  To: gcc-bugs

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.Earnshaw@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


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2009-04-30 10:06 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-18 17:42 [Bug c/38571] New: GCC/THUMB generates unnecessary padding between functions daniel dot sherwood at sepura dot com
2008-12-18 17:43 ` [Bug c/38571] " daniel dot sherwood at sepura dot com
2008-12-18 17:43 ` daniel dot sherwood at sepura dot com
2008-12-18 17:43 ` daniel dot sherwood at sepura dot com
2008-12-18 17:43 ` daniel dot sherwood at sepura dot com
2008-12-18 17:44 ` daniel dot sherwood at sepura dot com
2009-04-22 23:09 ` [Bug target/38571] [arm] -mthumb " ramana at gcc dot gnu dot org
2009-04-23  0:46 ` pinskia at gcc dot gnu dot org
2009-04-24 16:01 ` ramana at gcc dot gnu dot org
2009-04-30 10:05 ` ramana at gcc dot gnu dot org
2009-04-30 10:05 ` ramana at gcc dot gnu dot org
2009-04-30 10:06 ` ramana at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).