[Patch,AVR]: Fix PR52488 (insane stack usage)
Georg-Johann Lay
avr@gjlay.de
Mon Mar 12 17:00:00 GMT 2012
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr52488.diff
Type: text/x-patch
Size: 4545 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20120312/95e5a11f/attachment.bin>
More information about the Gcc
mailing list