2009-10-06 Ian Lance Taylor * varasm.c (saw_no_split_stack): New static variable. (assemble_start_function): Check for no_split_stack attribute and set saw_no_split_stack if we find it. (file_end_indicate_split_stack): New function. * output.h (file_end_indicate_split_stack): Declare. * config/i386/i386.c (ix86_file_end): Call file_end_indicate_split_stack. (ix86_expand_split_stack_prologue): Use small test if < SPLIT_STACK_AVAILABLE, not <=. * config/i386/i386.md (split_stack_check_small): Use GEU. (split_stack_check_large): Likewise. 2009-09-30 Ian Lance Taylor * config/i386/i386.c (ix86_expand_split_stack_prologue): Never save %ecx around the call to __morestack. 2009-09-29 Ian Lance Taylor * gcc.c (STACK_SPLIT_SPEC): Define. (LINK_COMMAND_SPEC): Use STACK_SPLIT_SPEC. * config/i386/i386.c (ix86_supports_split_stack): Remove test of flag_stack_protect. (ix86_expand_split_stack_prologue): Set call insn function usage to include register parameters. Emit return instruction after call to __morestack. * config/i386/i386.md (split_stack_check_small): Use unsigned comparison. (split_stack_check_large): Likewise. (split_stack_return): New insn. * config/i386/linux.h (TARGET_THREAD_SPLIT_STACK_OFFSET): Change value. * config/i386/linux64.h (TARGET_THREAD_SPLIT_STACK_OFFSET): Likewise. 2009-09-25 Ian Lance Taylor * testsuite/gcc.dg/split-1.c: New test. * testsuite/gcc.dg/split-2.c: New test. * testsuite/lib/target-supports.exp (check_effective_target_split_stack): New function. * config/i386/i386.c (ix86_supports_split_stack): New static function. (split_stack_fn): New static variable. (ix86_expand_split_stack_prologue): New function. (ix86_expand_call): Return the new call insn. (TARGET_SUPPORTS_SPLIT_STACK): Define. * config/i386/i386.md (UNSPEC_STACK_CHECK): Define constant. (split_stack_prologue): New expander. (split_stack_check_small): New expander. (split_stack_compare_small_32): New insn. (split_stack_compare_small_64): New insn. (split_stack_check_large): New expander. (split_stack_compare_large_32): New insn. (split_stack_compare_large_64): New insn. * config/i386/linux.h (TARGET_THREAD_SPLIT_STACK_OFFSET): Define. * config/i386/linux64.h (TARGET_THREAD_SPLIT_STACK_OFFSET): Define. * config/i386/i386-protos.h (ix86_expand_split_stack_prologue): Declare. (ix86_expand_call): Change return type in declaration. * common.opt (fsplit-stack): New option. * opts.c (decode_options): Set flag_split_stack. * target.h (struct gcc_target): Add supports_split_stack field. * target-def.h (TARGET_SUPPORTS_SPLIT_STACK): Define. (TARGET_INITIALIZER): Add TARGET_SUPPORTS_SPLIT_STACK. * function.c (thread_prologue_and_epilogue_insns): Support flag_split_stack. * cfgbuild.c (make_label_edge): Add insn parameter. Change all callers. * c-common.c (c_common_attribute_table): Add "no_split_stack". (handle_no_split_stack_attribute): New static function. Copyright (C) 2009 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved.