This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC] Add middle end hook for stack red zone size
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Jiangning Liu <jiangning dot liu at arm dot com>
- Cc: "'Joern Rennecke'" <amylaar at spamcop dot net>, gcc at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org, vmakarov at redhat dot com, dje dot gcc at gmail dot com, Richard Henderson <rth at redhat dot com>, Ramana Radhakrishnan <Ramana dot Radhakrishnan at arm dot com>, "'Ramana Radhakrishnan'" <ramana dot radhakrishnan at linaro dot org>
- Date: Mon, 1 Aug 2011 12:30:47 +0200
- Subject: Re: [RFC] Add middle end hook for stack red zone size
- References: <4e255312.0a852b0a.528d.6933SMTPIN_ADDED@mx.google.com> <CACUk7=WsaUN+TUw7rb8-o1EukoaCMrAh8bFJM6832LtRmfkofg@mail.gmail.com> <001e01cc4b33$6d3818f0$47a84ad0$@liu@arm.com> <20110725223319.petrcv01csccs44s-nzlynne@webmail.spamcop.net> <000001cc4ffd$48680ac0$d9382040$@liu@arm.com> <20110801091151.GD27949@sunsite.ms.mff.cuni.cz> <000a01cc5033$cf0817b0$6d184710$@liu@arm.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Mon, Aug 01, 2011 at 06:14:27PM +0800, Jiangning Liu wrote:
> ARM. You are right, they were all fixed in back-ends in the past, but we
> should
> fix the bug in a general way to make GCC infrastructure stronger, rather
> than fixing the problem target-by-target and case-by-case! If you further
> look into the back-end fixes in x86 and PowerPC, you may find they looks
> quite similar in back-ends.
>
Red zone is only one difficulty, your patch is e.g. completely ignoring
existence of biased stack pointers (e.g. SPARC -m64 has them).
Some targets have stack growing in opposite direction, etc.
We have really a huge amount of very diverse ABIs and making the middle-end
grok what is an invalid stack access is difficult.
Jakub