From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3089 invoked by alias); 19 Nov 2009 18:38:19 -0000 Received: (qmail 3078 invoked by uid 22791); 19 Nov 2009 18:38:18 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 19 Nov 2009 18:37:11 +0000 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id nAJIalDV017042 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 19 Nov 2009 13:36:48 -0500 Received: from zebedee.pink (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id nAJIai90008337; Thu, 19 Nov 2009 13:36:44 -0500 Message-ID: <4B05903B.5080708@redhat.com> Date: Thu, 19 Nov 2009 18:38:00 -0000 From: Andrew Haley User-Agent: Thunderbird 2.0.0.23 (X11/20090825) MIME-Version: 1.0 To: rostedt@goodmis.org CC: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , LKML , Andrew Morton , Heiko Carstens , feng.tang@intel.com, Fr??d??ric Weisbecker , Peter Zijlstra , jakub@redhat.com, gcc@gcc.gnu.org Subject: Re: BUG: GCC-4.4.x changes the function frame on some functions References: <20091119072040.GA23579@elte.hu> <4B058C76.9090609@redhat.com> <1258655585.22249.751.camel@gandalf.stny.rr.com> In-Reply-To: <1258655585.22249.751.camel@gandalf.stny.rr.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2009-11/txt/msg00514.txt.bz2 Steven Rostedt wrote: > On Thu, 2009-11-19 at 18:20 +0000, Andrew Haley wrote: > >> OK, I found it. There is a struct defined as >> >> struct entry { >> ... >> } __attribute__((__aligned__((1 << (4))))); >> >> and then in timer_stats_update_stats you have a local variable of type >> struct entry: >> >> void timer_stats_update_stats() >> { >> spinlock_t *lock; >> struct entry *entry, input; >> >> So, gcc has to 16-align the stack pointer to satisfy the alignment >> for struct entry. > > It has to align the entire stack? Why not just the variable within the > stack? How?. gcc has to know, at compile time, the offset from sp of each variable. So, it of course makes sure that offset is 16-aligned, but it also has to 16-align the stack pointer. Andrew.