[PowerPC] Implement static stack checking
Eric Botcazou
ebotcazou@adacore.com
Thu Aug 19 00:05:00 GMT 2010
Hi,
this implements static stack checking in the PowerPC back-end, i.e. checking
of the static part of the stack frame in the prologue. This is modelled on
the Alpha back-end, but of course only activated by means of -fstack-check.
Tested on AIX, Linux 32-bit and 64-bit. OK for the mainline?
2010-08-18 Eric Botcazou <ebotcazou@adacore.com>
* config/rs6000/aix.h (STACK_CHECK_STATIC_BUILTIN): Define to 1.
* config/rs6000/linux.h (STACK_CHECK_STATIC_BUILTIN): Likewise.
* config/rs6000/linux64.h (STACK_CHECK_STATIC_BUILTIN): Likewise.
(STACK_CHECK_PROTECT): Define.
* config/rs6000/rs6000.c (rs6000_emit_probe_stack_range): New function.
(output_probe_stack_range): Likewise.
(rs6000_emit_prologue): Invoke rs6000_emit_probe_stack_range if static
builtin stack checking is enabled.
* config/rs6000/rs6000-protos.h (output_probe_stack_range): Declare.
* config/rs6000/rs6000.md (UNSPECV_PROBE_STACK_RANGE): New constant.
(probe_stack_range): New insn.
--
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: stack_check_ppc.diff
Type: text/x-diff
Size: 8050 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20100819/2a7502fe/attachment.bin>
More information about the Gcc-patches
mailing list