From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965000AbVINEyI (ORCPT ); Wed, 14 Sep 2005 00:54:08 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932632AbVINEyI (ORCPT ); Wed, 14 Sep 2005 00:54:08 -0400 Received: from mx2.suse.de ([195.135.220.15]:63159 "EHLO mx2.suse.de") by vger.kernel.org with ESMTP id S932624AbVINEyG (ORCPT ); Wed, 14 Sep 2005 00:54:06 -0400 Date: Wed, 14 Sep 2005 06:54:05 +0200 From: Andi Kleen To: Linus Torvalds Cc: "Markus F.X.J. Oberhumer" , linux-kernel@vger.kernel.org, Andi Kleen , jh@suse.cz Subject: Re: [PATCH] i386: fix stack alignment for signal handlers Message-ID: <20050914045405.GA11338@wotan.suse.de> References: <43273CB3.7090200@oberhumer.com> <4327611D.7@oberhumer.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org > Andi - you know the gcc people, is there some documented rules somewhere? > How does gcc itself try to align the stack when it generates the calls? The x86-64 ABI says >> The end of the input argument area shall be aligned on a 16 byte boundary. In other words, the value (%rsp - 8) is always a multiple of 16 when control is transferred to the function entry point. The stack pointer, %rsp, always points to the end of the latest allocated stack frame. 7 << I presume acts i386 (it's likely undocumented because the ABI documents predate this), but Jan surely can confirm? It makes sense because when long double is passed on the stack you really want them to be aligned there. This would mean Markus' patch is correct for x86-64 and likely for i386 too. -Andi