What does the FreeBSD/i386 ABI say about stack alignment?
Peter Blok
peter.blok at bsd4all.org
Fri Jan 14 13:01:44 UTC 2011
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 generate
probably less efficient 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 at gmail.com> wrote:
> On Fri, Jan 14, 2011 at 3:52 AM, Peter Blok <peter.blok at bsd4all.org> wrote:
>> > Hi,
>> >
>> > I¹m probably missing something but if you require a stack variable to be
>> > aligned why not use a type attribute like __attribute__ ((aligned (8)))
>> >
>> > Peter
>
> 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.
>
More information about the freebsd-hackers
mailing list