This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch,AVR]: Fix PR52488 (insane stack usage)
- From: Denis Chertykov <chertykov at gmail dot com>
- To: Georg-Johann Lay <avr at gjlay dot de>
- Cc: gcc-patches at gcc dot gnu dot org, Eric Weddington <eric dot weddington at atmel dot com>
- Date: Tue, 13 Mar 2012 11:06:05 +0400
- Subject: Re: [Patch,AVR]: Fix PR52488 (insane stack usage)
- References: <4F5E2E4F.9000408@gjlay.de>
2012/3/12 Georg-Johann Lay <avr@gjlay.de>
>
> ...and now to the right mailing list...
>
> This patch cuts down insane stack offsets for 8-bit SP targets to a value
> the
> involved insns can handle.
>
> Background is that newlib generates such insane offsets (2050 bytes of
> stack
> for a device with 128 bytes of RAM) because of extension PR51345, i.e. new
> multilib variants for 8-bit SP targets.
>
> The CFA notes still contain the original size as requested by the source
> so
> that -Wstack-usage= will still work as intended.
>
> The generated code will never be functional, of course, but there should
> never
> be an ICE.
>
> This patch is less aggressive than the patch proposed in the PR, i.e. it
> is
> silent and does not issue an error so that newlib can still be built. If
> the
> user wants additional sanity checking, he has to use -Wstack-usage= or
> similar
> options.
>
> Passed testsuite.
>
> Ok for trunk?
>
> Johann
>
> Â Â Â ÂPR target/52488
> Â Â Â Â* config/avr/avr.c (avr_prologue_setup_frame): Cut down stack
> Â Â Â Âoffset (size) to a value the insns can deal with.
> Â Â Â Â(expand_epilogue): Ditto.
>
Approved.
Denis.