ping references http://gcc.gnu.org/ml/gcc-patches/2011-08/msg00216.html http://gcc.gnu.org/ml/gcc-patches/2011-07/msg00281.html http://gcc.gnu.org/ml/gcc-patches/2011-07/msg00149.html http://gcc.gnu.org/ml/gcc-patches/2011-06/msg01872.html http://gcc.gnu.org/ml/gcc-patches/2011-03/msg01226.html gcc/ChangeLog 2011-09-04 Thomas Klein * opts.c (common_handle_option): introduce new parameters "direct" and "indirect" * flag-types.h (enum stack_check_type): Likewise * explow.c (allocate_dynamic_stack_space): - suppress stack probing if parameter "direct", "indirect" or if a stack-limit is given - do additional read of limit value if parameter "indirect" and a stack-limit symbol is given - emit a call to a stack_failure function [as an alternative to a trap call] (function probe_stack_range): if allowed to override the range porbe emit generic_limit_check_stack * config/arm/arm.c (stack_check_work_registers): new function to find possible working registers [only used by "stack check"] (emit_push_regs): add push RTL instruction without keeping regnumber and frame memory in mind. (emit_pop_regs): add pop RTL instruction to revert the above push (emit_stack_check_insns): new function to write RTL instructions for stack check at prologue stage. (arm_expand_prologue): stack check integration for ARM and Thumb-2 (thumb1_output_function_prologue): stack check integration for Thumb-1 * config/arm/arm.md (cbranchsi4_insn): allow compare and branch using stack pointer register [at thumb mode] (arm_cmpsi_insn): allow comparing using stack pointer register [at arm] (probe_stack): do not emit code when parameters "direct" or "indirect" is given, emit move code way same as in gcc/explow.c [function emit_stack_probe] (probe_stack_done): dummy to make sure probe_stack insns are not optimized away (generic_limit_check_stack): if stack-limit and parameter "generic" is given use the limit the same way as in function allocate_dynamic_stack_space (stack_failure): failure call used in stack check functions emit_stack_check_insns, generic_limit_check_stack or allocate_dynamic_stack_space [similar to a trap but avoid conflict with builtin_trap]