From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23443 invoked by alias); 18 Dec 2008 17:42:53 -0000 Received: (qmail 23295 invoked by uid 48); 18 Dec 2008 17:41:22 -0000 Date: Thu, 18 Dec 2008 17:42:00 -0000 Subject: [Bug c/38571] New: GCC/THUMB generates unnecessary padding between functions X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "daniel dot sherwood at sepura dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2008-12/txt/msg01773.txt.bz2 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