This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Improve alloca alignment
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: Jeff Law <law at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Wilco Dijkstra <Wilco dot Dijkstra at arm dot com>, Rainer Orth <ro at cebitec dot uni-bielefeld dot de>, nd <nd at arm dot com>
- Date: Wed, 04 Oct 2017 16:53:44 +0200
- Subject: Re: [PATCH] Improve alloca alignment
- Authentication-results: sourceware.org; auth=none
- References: <DB6PR0801MB2053EFC180A8360BC943BEB883B90@DB6PR0801MB2053.eurprd08.prod.outlook.com> <3900952.9QGmdsGrcf@polaris> <a7ad8524-da61-a146-fa54-c97d487b703f@redhat.com>
> This seems like a SPARC target problem to me -- essentially it's
> claiming a higher STACK_BOUNDARY than it really has.
No, it is not, I can guarantee you that the stack pointer is always aligned to
64-bit boundaries on SPARC, otherwise all hell would break loose...
> Presumably there's a good reason for this and some kind of hack may be
> needed to deal with it in dynamically allocated space. But it does not
> seem like we should be forcing all targets to allocate unnecessary space
> to deal with this.
I agree but SPARC is presumably not the only affected platform, so I think
that it's wrong to sureptitiously change the interface with the ~50 back-ends
and hope that the maintainers will repair the damage; they won't and we'll
have introduced very nasty bugs for a few wasted bytes on the stack.
--
Eric Botcazou