Date: Fri, 14 Jan 2011 13:52:29 +0100 From: Peter Blok <peter.blok@bsd4all.org> To: Ryan Stone <rysto32@gmail.com> Cc: freebsd-hackers@freebsd.org Subject: Re: What does the FreeBSD/i386 ABI say about stack alignment? Message-ID: <C956059D.389E8%peter.blok@bsd4all.org> In-Reply-To: <AANLkTim1KcKRXqrPoZDHOAKWtnVpUj6QBzJ-addyCvHe@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi Ryan, Well I think gcc should not generate movdqa if it cannot guarantee the area it is working on is aligned. If the stack is not aligned, it should generat= e =AD probably less efficient =AD code that works. What is this area, if it is not a local variable allocated somewhere? Is it some sort of stack probing? Is alloca used? Are variable length arrays used= ? Peter On 1/14/11 13:11 PM, "Ryan Stone" <rysto32@gmail.com> wrote: > On Fri, Jan 14, 2011 at 3:52 AM, Peter Blok <peter.blok@bsd4all.org> wrot= e: >> > Hi, >> > >> > I=B9m probably missing something but if you require a stack variable to = be >> > aligned why not use a type attribute like __attribute__ ((aligned (8))= ) >> > >> > Peter >=20 > In my case I had no stack variable that required alignment. gcc > issued some movdqa instructions in order to initialize a memory region > on the stack to all-zeros. >=20
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?C956059D.389E8%peter.blok>