This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: AltiVec stack boundary
- From: Geoffrey Keating <geoffk at apple dot com>
- To: Daniel Jacobowitz <drow at false dot org>
- Cc: gcc at gcc dot gnu dot org
- Date: 28 Sep 2007 17:22:41 -0700
- Subject: Re: AltiVec stack boundary
- References: <20070807143936.GA1603@caradoc.them.org>
Daniel Jacobowitz <drow@false.org> writes:
> I'm sure this has come up before, but I don't understand how the
> -maltivec definition of STACK_BOUNDARY can be right. We tell the
> compiler that STACK_BOUNDARY == 128 if -maltivec, without telling it
> that other people may ignore that, because -maltivec is not supposed
> to be an ABI changing option but IIUC STACK_BOUNDARY is.
>
> Why isn't it 64 in the !TARGET_ALTIVEC case with
> PREFERRED_STACK_BOUNDARY == 128?
The case where this matters is a 32-bit ELF EABI target (the only case
on powerpc that allows 8-byte stack alignment) using -maltivec but not
-mabi=no-altivec. It's not clear to me that case works.
I don't think that in general you want to do this in an embedded
context, because of the extra code generated to align the stack; it'd
be much better to just declare that you're going to use the AltiVec
ABI, even if some parts of your embedded code won't be allowed to use
any AltiVec instructions.