Commit Graph

21235 Commits

Author SHA1 Message Date
Michael Eager 809201325a Check in support for Xilinx MicroBlaze processor.
From-SVN: r164756
2010-09-30 18:21:57 +00:00
Nathan Froyd ca01d012be * config/iq2000/t-iq2000 (TARGET_LIBGCC2_CFLAGS): Delete.
From-SVN: r164752
2010-09-30 15:11:28 +00:00
Joseph Myers 46625112d2 opt-functions.awk (static_var): Update comment.
* opt-functions.awk (static_var): Update comment.
	(var_ref): Return offsetof expression or -1, not variable address.
	* optc-gen.awk: Generate structure field initializers instead of
	static variables.  Expect -1 for missing variables instead of null
	pointer.  Add gcc_options parameters to generated functions.
	* opth-gen.awk: Generate structure fields for static variables.
	Add gcc_options parameters to generated functions.
	* common.opt (optimize, optimize_size): Add variables.
	* config/i386/i386-c.c (ix86_pragma_target_parse): Pass
	&global_options to cl_target_option_restore.
	* config/i386/i386.c (ix86_valid_target_attribute_p): Pass
	&global_options to cl_optimization_restore, cl_target_option_save
	and cl_target_option_restore.
	(ix86_set_current_function): Pass &global_options to
	cl_target_option_restore.
	* config/pdp11/pdp11.h (optimize): Remove.
	* config/rs6000/rs6000.h (optimize): Remove.
	* config/sh/sh.h (optimize): Remove.
	* config/xtensa/xtensa.h (optimize): Remove.
	* coretypes.h (struct gcc_options): Declare.
	* diagnostic.c (diagnostic_initialize): Initialize
	context->option_state.
	(diagnostic_report_diagnostic): Pass option_state to
	option_enabled hook.
	* diagnostic.h (diagnostic_context.option_enabled): Add void *
	parameter.
	(diagnostic_context.option_state): New field.
	* final.c (final_start_function, final, final_scan_insn): Rename
	optimize parameter to optimize_p.
	* flags.h (optimize, optimize_size): Remove.
	* function.c (invoke_set_current_function_hook): Pass
	&global_options to cl_optimization_restore.
	* gcc.c (driver_handle_option): Take gcc_options parameter.
	Assert that it is &global_options.
	(process_command): Pass &global_options to read_cmdline_option.
	* ipa-pure-const.c (suggest_attribute): Pass &global_options to
	option_enabled.
	* lto-opts.c (lto_reissue_options): Use option_flag_var.  Pass
	&global_options to set_option.
	* opts-common.c (handle_option, handle_generated_option,
	read_cmdline_option, set_option): Take explicit gcc_options
	parameters.  Use option_flag_var.
	(option_flag_var): New.
	* opts.c (common_handle_option, lang_handle_option,
	target_handle_option): Take gcc_options parameter.  Assert that it
	is &global_options.
	(read_cmdline_options): Pass &global_options to
	read_cmdline_option.
	(print_filtered_help): Use option_flag_var.  Pass &global_options
	to option_enabled.
	(common_handle_option): Use option_flag_var.
	(option_enabled): Take opts parameter.  Use option_flag_var.
	(get_option_state): Take gcc_options parameter.  Use
	option_flag_var.  Pass gcc_options parameter to option_enabled.
	(enable_warning_as_error): Pass &global_options to
	handle_generated_option.
	* opts.h (struct cl_option): Change flag_var to flag_var_offset.
	(cl_option_handler_func.handler): Take gcc_options parameter.
	(option_enabled, get_option_state, set_option, handle_option,
	handle_generated_option, read_cmdline_option): Take gcc_options
	parameters.
	* toplev.c (optimize, optimize_size): Remove.
	(print_switch_values): Pass &global_options to option_enabled.
	(option_affects_pch_p): Use option_flag_var.  Pass &global_options
	to get_option_state.
	(general_init): Initialize global_dc->option_state.
	* tree.c (build_optimization_node): Pass &global_options to
	cl_optimization_save.
	(build_target_option_node): Pass &global_options to
	cl_target_option_save.

c-family:
	* c-common.c (handle_optimize_attribute): Pass &global_options to
	cl_optimization_save and cl_optimization_restore.
	* c-opts.c (c_common_handle_option): Pass &global_options to
	handle_generated_option.
	* c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
	(handle_pragma_pop_options, handle_pragma_reset_options): Pass
	&global_options to cl_optimization_restore.

From-SVN: r164751
2010-09-30 14:53:12 +01:00
Steve Ellcey b14446e2ff ia64.c (ia64_builtin_decl): New.
2010-09-29  Steve Ellcey  <sje@cup.hp.com>

	* config/ia64/ia64.c (ia64_builtin_decl): New.
	(TARGET_BUILTIN_DECL): Define.
	(ia64_builtins): New.
	(ia64_init_builtins): Save decls in ia64_builtins.

From-SVN: r164734
2010-09-29 21:32:42 +00:00
Kai Tietz 0f23bc1660 mingw32.h (TARGET_64BIT): replaced by TARGET_64BIT_DEFAULT in #if check.
2010-09-29  Kai Tietz  <kai.tietz@onevision.com>

        * config/i386/mingw32.h (TARGET_64BIT): replaced by
        TARGET_64BIT_DEFAULT in #if check.

From-SVN: r164730
2010-09-29 20:55:44 +02:00
Mike Stump 48b3f0a0dc darwin.h (flag_mkernel): Remove.
* config/darwin.h (flag_mkernel): Remove.
	(flag_apple_kext): Likewise.

From-SVN: r164727
2010-09-29 17:29:35 +00:00
Joseph Myers 006097f4c5 Joseph Myers <joseph@codesourcery.com>
Jack Howarth <howarth@bromo.med.uc.edu>

	* config/darwin.opt (undefined): Add.

Co-Authored-By: Jack Howarth <howarth@bromo.med.uc.edu>

From-SVN: r164726
2010-09-29 17:28:19 +00:00
Joseph Myers f0036cca42 options.texi (Variable, Var, Init): Update documentation without reference to VarExists.
* doc/options.texi (Variable, Var, Init): Update documentation
	without reference to VarExists.
	(VarExists): Remove.
	* common.opt, config/i386/i386.opt, config/linux.opt,
	config/rs6000/rs6000.opt, config/sh/sh.opt, config/spu/spu.opt:
	Don't use VarExists.

c-family:
	* c.opt: Don't use VarExists.

fortran:
	* lang.opt: Don't use VarExists.

java:
	* lang.opt: Don't use VarExists.

From-SVN: r164724
2010-09-29 15:51:52 +01:00
Joseph Myers e3339d0f33 optc-gen.awk: Generate global_options initializer instead of individual variables.
gcc:
	* optc-gen.awk: Generate global_options initializer instead of
	individual variables.  Add x_ prefix to names of structure
	members.
	* opth-gen.awk: Generate gcc_options structure.  Add x_ prefix to
	names of structure members.
	* doc/tm.texi.in (HARD_FRAME_POINTER_IS_FRAME_POINTER,
	HARD_FRAME_POINTER_IS_ARG_POINTER): Document.
	* doc/tm.texi: Regenerate.
	* alias.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER
	* builtins.c: Use HARD_FRAME_POINTER_IS_ARG_POINTER.
	* c-parser.c (disable_extension_diagnostics,
	restore_extension_diagnostics): Update names of cpp_options
	members.
	* combine.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER
	* common.opt (fcompare-debug-second): Don't use Var.
	* config/alpha/alpha.h (target_flags): Remove.
	* config/arm/arm.h (HARD_FRAME_POINTER_IS_FRAME_POINTER,
	HARD_FRAME_POINTER_IS_ARG_POINTER): Define.
	* config/bfin/bfin.h (target_flags): Remove.
	* config/cris/cris.h (target_flags): Remove.
	* config/i386/i386-c.c (ix86_pragma_target_parse): Update names of
	cl_target_option members.
	* config/i386/i386.c (ix86_force_align_arg_pointer): Remove.
	(ix86_function_specific_print, ix86_valid_target_attribute_tree,
	ix86_can_inline_p): Update names of cl_target_option members.
	* config/i386/i386.h (ix86_isa_flags): Remove.
	* config/lm32/lm32.h (target_flags): Remove.
	* config/mcore/mcore.h (mcore_stack_increment): Remove.
	* config/mcore/mcore.md (addsi3): Remove extern declaration of
	flag_omit_frame_pointer.
	* config/mep/mep.h (target_flags): Remove.
	* config/mips/mips.h (HARD_FRAME_POINTER_IS_FRAME_POINTER,
	HARD_FRAME_POINTER_IS_ARG_POINTER): Define.
	* config/mmix/mmix.h (target_flags): Remove.
	* config/rs6000/rs6000.h (rs6000_xilinx_fpu, flag_pic,
	flag_expensive_optimizations): Remove.
	* config/s390/s390.h (flag_pic): Remove.
	* config/score/score-conv.h (target_flags): Remove.
	* config/sh/sh.h (sh_fixed_range_str): Remove.
	* config/spu/spu.h (target_flags, spu_fixed_range_string): Remove.
	* dbxout.c: Use HARD_FRAME_POINTER_IS_ARG_POINTER
	* df-scan.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER.
	* diagnostic.c (diagnostic_initialize): Update names of
	diagnostic_context members.
	* diagnostic.h (diagnostic_context): Rename inhibit_warnings and
	warn_system_headers.
	(diagnostic_report_warnings_p): Update for new names.
	* dwarf2out.c: Use HARD_FRAME_POINTER_IS_ARG_POINTER
	* emit-rtl.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER and
	HARD_FRAME_POINTER_IS_ARG_POINTER.
	* flags.h (flag_compare_debug): Declare.
	* ira.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER
	* opts.c (flag_compare_debug): Define.
	(common_handle_option): Update names of diagnostic_context
	members.  Handle -fcompare-debug-second.
	(fast_math_flags_struct_set_p): Update names of cl_optimization
	members.
	* reginfo.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER.
	* regrename.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER.
	* reload.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER.
	* reload1.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER.
	* resource.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER.
	* rtl.h (HARD_FRAME_POINTER_IS_FRAME_POINTER,
	HARD_FRAME_POINTER_IS_ARG_POINTER): Define and use.
	* sel-sched.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER
	* stmt.c: Use HARD_FRAME_POINTER_IS_ARG_POINTER.

gcc/c-family:
	* c-common.c (c_cpp_error): Update names of diagnostic_context
	members.
	* c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
	cl_optimization members.
	* c-opts.c (warning_as_error_callback, c_common_handle_option,
	sanitize_cpp_opts, finish_options): Update names of cpp_options
	members.

gcc/fortran:
	* cpp.c (cpp_define_builtins): Update names of gfc_option_t
	members.
	(gfc_cpp_post_options): Update names of cpp_options members.
	(cb_cpp_error): Update names of diagnostic_context members.
	* f95-lang.c (gfc_init_builtin_functions): Update names of
	gfc_option_t members.
	* gfortran.h (gfc_option_t): Rename warn_conversion and
	flag_openmp.
	* intrinsic.c (gfc_convert_type_warn): Update names of
	gfc_option_t members.
	* options.c (gfc_init_options, gfc_post_options, set_Wall,
	gfc_handle_option): Update names of gfc_option_t members.
	* parse.c (next_free, next_fixed): Update names of gfc_option_t
	members.
	* scanner.c (pedantic): Remove extern declaration.
	(skip_free_comments, skip_fixed_comments, include_line): Update
	names of gfc_option_t members.
	* trans-decl.c (gfc_generate_function_code): Update names of
	gfc_option_t members.

gcc/java:
	* java-tree.h (flag_filelist_file, flag_assert, flag_jni,
	flag_force_classes_archive_check, flag_redundant, flag_newer,
	flag_use_divide_subroutine, flag_use_atomic_builtins,
	flag_use_boehm_gc, flag_hash_synchronization,
	flag_check_references, flag_optimize_sci, flag_indirect_classes,
	flag_indirect_dispatch, flag_store_check,
	flag_reduced_reflection): Remove.
	* jcf-dump.c (flag_newer): Remove.
	* jcf.h (quiet_flag): Remove.
	* parse.h (quiet_flag): Remove.

libcpp:
	* include/cpplib.h (cpp_options): Rename warn_deprecated,
	warn_traditional, warn_long_long and pedantic.
	* directives.c (directive_diagnostics, _cpp_handle_directive):
	Update names of cpp_options members.
	* expr.c (cpp_classify_number, eval_token): Update names of
	cpp_options members.
	* init.c (cpp_create_reader, post_options): Update names of
	cpp_options members.
	* internal.h (CPP_PEDANTIC, CPP_WTRADITIONAL): Update names of
	cpp_options members.
	* macro.c (parse_params): Update names of cpp_options members.

From-SVN: r164723
2010-09-29 15:49:14 +01:00
Hariharan Sandanagobalane 66dfc61020 picochip.c (picochip_output_internal_label): This function can now be called for debug CFI labels...
* config/picochip/picochip.c (picochip_output_internal_label):
          This function can now be called for debug CFI labels, which can come in
          the middle of a vliw instruction. Postpone until end of vliw.

From-SVN: r164722
2010-09-29 14:36:53 +00:00
Richard Henderson fd93038859 Implement TARGET_BUILTIN_DECL for alpha.
From-SVN: r164707
2010-09-28 15:40:07 -07:00
DJ Delorie 146456c108 re PR target/45800 ([M32C] compile error on increment volatile long var)
PR target/45800
* config/m32c/m32c.c (m32c_subreg): Force adjustment of subregs of
volatile MEMs.

From-SVN: r164705
2010-09-28 18:01:54 -04:00
Richard Henderson f0a0390e69 Hookize TARGET_UNWIND_INFO et al.
From-SVN: r164701
2010-09-28 13:44:58 -07:00
Ian Lance Taylor 7647b12769 i386.c (ix86_supports_split_stack): Test HAVE_GAS_CFI_PERSONALITY_DIRECTIVE rather than dwarf2out_do_cfi_asm.
* config/i386/i386.c (ix86_supports_split_stack): Test
	HAVE_GAS_CFI_PERSONALITY_DIRECTIVE rather than
	dwarf2out_do_cfi_asm.

From-SVN: r164696
2010-09-28 18:24:54 +00:00
Rainer Orth 2770264a75 re PR target/44452 (gcc.target/i386/abi-2.c and gcc.target/i386/pr22076.c fail on 32-bit Solaris 10+/x86)
gcc/testsuite:
	PR target/44452
	* gcc.target/i386/pr22076.c: Add -mno-vect8-ret-in-mem on
	i?86-*-solaris2.[89], *-*-vxworks*.
	* gcc.target/i386/pr22152.c: Likewise.
	* gcc.target/i386/vect8-ret.c: New test.

	gcc:
	PR target/44452
	* config/i386/i386.opt (mvect8-ret-in-mem): Define.
	* config/i386/i386.c (ix86_target_string): Handle -mvect8-ret-in-mem.
	(ix86_solaris_return_in_memory): Remove.
	* config/i386/i386-protos.h (ix86_solaris_return_in_memory): Remove.
	* config/i386/sol2.h (SUBTARGET_RETURN_IN_MEMORY): Remove.
	(TARGET_SUBTARGET_DEFAULT): Redefine.
	* config/i386/sol2-10.h (TARGET_SUBTARGET_DEFAULT): Update comment.
	* config/i386/vx-common.h (SUBTARGET_RETURN_IN_MEMORY): Remove.
	(TARGET_SUBTARGET_DEFAULT): Redefine.
	* doc/invoke.texi (Option Summary, i386 and x86-64 Options): Add
	-mvect8-ret-in-mem.
	(i386 and x86-64 Options): Document -mvect8-ret-in-mem.

From-SVN: r164687
2010-09-28 16:24:11 +00:00
Alan Modra 2268453b5c re PR target/45807 (Lying eh_frame r2 save info causes crashes with static libgcc_eh and libstdc++)
PR target/45807
	* config/rs6000/aix.h (SETUP_FRAME_ADDRESSES): Delete.
	* config/rs6000/linux64.h (SETUP_FRAME_ADDRESSES): Delete.
	* config/rs6000/rs6000-protos.h (rs6000_aix_emit_builtin_unwind_init):
	Delete.
	* config/rs6000/rs6000.c (rs6000_aix_emit_builtin_unwind_init): Delete.
	(rs6000_emit_prologue): Don't just create frame save info for r2,
	actually save r2.

From-SVN: r164685
2010-09-29 00:55:03 +09:30
Richard Henderson 4d508d590e cygming.h (ASM_OUTPUT_DWARF_OFFSET): Output 8 bytes when 8 bytes are requested.
* config/i386/cygming.h (ASM_OUTPUT_DWARF_OFFSET): Output 8 bytes
when 8 bytes are requested.

From-SVN: r164684
2010-09-28 08:20:16 -07:00
Tristan Gingold 247df3b6d9 avr.c (expand_prologue): Set current_function_static_stack_size.
2010-09-28  Tristan Gingold  <gingold@adacore.com>

	* config/avr/avr.c (expand_prologue): Set
	current_function_static_stack_size.

From-SVN: r164678
2010-09-28 08:32:32 +00:00
Tristan Gingold d5ad88c0d2 alpha.md: Change the initial condition of the probing loop.
2010-09-28  Tristan Gingold  <gingold@adacore.com>

	* config/alpha/alpha.md: Change the initial condition of the
	probing loop.

From-SVN: r164677
2010-09-28 07:50:02 +00:00
Uros Bizjak 4150f926c6 sse.md (*avx_<umaxmin:code><mode>3): Split from *avx_<maxmin:code><mode>3.
* config/i386/sse.md (*avx_<umaxmin:code><mode>3):
	Split from *avx_<maxmin:code><mode>3.
	(*avx_<smaxmin:code><mode>3): Ditto.
	* config/i386/i386.md (maxmin): Remove code iterator.

From-SVN: r164676
2010-09-28 08:11:05 +02:00
Ian Lance Taylor b6110d6d19 i386.c (ix86_supports_split_stack): -fsplit-stack requires assembler support for CFI directives.
gcc/:
	* config/i386/i386.c (ix86_supports_split_stack): -fsplit-stack
	requires assembler support for CFI directives.
libgcc/:
	* configure.ac: Test whether assembler supports CFI directives.
	* config.host: Only add t-stack and i386/t-stack-i386 to
	tmake_file if libgcc_cv_cfi is "yes".
	* configure: Rebuild.

From-SVN: r164671
2010-09-28 00:07:12 +00:00
Ian Lance Taylor 7458026b01 common.opt (fsplit-stack): New option.
gcc/:
	* common.opt (fsplit-stack): New option.
	* opts.c (decode_options): Set flag_split_stack to final value.
	* target.def (supports_split_stack): New hook.
	* gcc.c (STACK_SPLIT_SPEC): Define.
	(LINK_COMMAND_SPEC): Use STACK_SPLIT_SPEC.
	* doc/invoke.texi (Option Summary): Mention -fsplit-stack.
	(Code Gen Options): Document -fsplit-stack.
	* doc/extend.texi (Function Attributes): Mention no_split_stack.
	(Function Attributes): Document no_split_stack.
	* doc/tm.texi.in (Stack Smashing Protection): Add @hook
	TARGET_SUPPORTS_SPLIT_STACK.
	* doc/tm.texi: Rebuild.
	* function.c (thread_prologue_and_epilogue_insns): If
	flag_split_stack, add split stack prologue.
	* explow.c (allocate_dynamic_stack_space): Support -fsplit-stack.
	* varasm.c (saw_no_split_stack): New static variable.
	(assemble_start_function): Set saw_no_split_stack if the function
	has the no_split_stack attribute.
	(file_end_indicate_split_stack): New function.
	* output.h (file_end_indicate_split_stack): Declare.
	* libgcc-std.ver (GCC_4.6.0): Add -fsplit-stack support variables
	and function.
	* doc/libgcc.texi (Miscellaneous routines): Document -fsplit-stack
	routines.
	* config/i386/i386.c (ix86_option_override_internal): Don't set
	expand_builtin_va_start to NULL if -fsplit-stack.
	(ix86_function_regparm): Reduce local regparm by 1 for 32-bit
	-fsplit-stack.
	(ix86_va_start): If -fsplit-stack, get overflow pointer	from
	scratch register set by prologue.
	(ix86_code_end): If -fsplit-stack, call
	file_end_indicate_split_stack.
	(ix86_supports_split_stack): New static function.
	(SPLIT_STACK_AVAILABLE): Define.
	(split_stack_prologue_scratch_regno): New static function.
	(split_stack_fn): New static variable.
	(ix86_expand_split_stack_prologue): New function.
	(ix86_live_on_entry): New static function.
	(ix86_legitimate_address_p): Handle UNSPEC_STACK_CHECK.
	(output_pic_addr_const): Likewise.
	(i386_asm_output_addr_const_extra): Likewise.
	(ix86_expand_call): Change return type to rtx.  Return the new
	call instruction.
	(TARGET_SUPPORTS_SPLIT_STACK): Define.
	(TARGET_EXTRA_LIVE_ON_ENTRY): Define.
	* config/i386/i386.md (UNSPEC_STACK_CHECK): Define.
	(split_stack_prologue, split_stack_return): New insns.
	(split_stack_space_check): New insn.
	* config/i386/i386.h (struct machine_function): Add
	split_stack_varargs_pointer field.
	* config/i386/linux.h (TARGET_CAN_SPLIT_STACK): Define.
	(TARGET_THREAD_SPLIT_STACK_OFFSET): Define.
	* config/i386/linux64.h (TARGET_CAN_SPLIT_STACK): Define.
	(TARGET_THREAD_SPLIT_STACK_OFFSET): Define.
	* config/i386/i386-protos.h (ix86_expand_split_stack_prologue):
	Declare.
	(ix86_expand_call): Update declaration.
gcc/c-family/:
	* c-common.c (c_common_attribute_table): Add no_split_stack.
	(handle_no_split_stack_attribute): New static function.
gcc/testsuite/:
	* lib/target-supports.exp (check_effective_target_split_stack):
	New procedure.
	* gcc.dg/split-1.c: New test.
	* gcc.dg/split-2.c: New test.
	* gcc.dg/split-3.c: New test.
	* gcc.dg/split-4.c: New test.
libgcc/:
	* generic-morestack.h: New file.
	* generic-morestack.c: New file.
	* generic-morestack-thread.c: New file.
	* config/i386/morestack.S: New file.
	* config/t-stack: New file.
	* config/i386/t-stack-i386: New file.
	* config.host (i[34567]86-*-linux* and friends): Add t-stack and
	i386/t-stack-i386 to tmake_file.

From-SVN: r164661
2010-09-27 19:48:20 +00:00
Olivier Hainque bda38d2ec1 vxworks.h (TARGET_OS_CPP_BUILTINS): Call VXWORKS_OS_CPP_BUILTINS.
* config/rs6000/vxworks.h (TARGET_OS_CPP_BUILTINS): Call
        VXWORKS_OS_CPP_BUILTINS.

From-SVN: r164646
2010-09-27 09:27:21 +00:00
Uros Bizjak 6300156042 i386.h (CLASS_MAX_NREGS): Also handle XCmode.
* config/i386/i386.h (CLASS_MAX_NREGS): Also handle XCmode.
	(UNITS_PER_WORD): Define only when IN_LIBGCC2 is undefined.
	(MOVE_MAX_PIECES): Redefine using UNITS_PER_WORD.
	(ASM_OUTPUT_AVX_PREFIX): Simplify pointer addition.

From-SVN: r164644
2010-09-27 08:25:55 +02:00
Uros Bizjak 4470a3a30e i386.md (pro_epilogue_adjust_stack_<mode>_add): Merge from pro_epilogue_adjust_stack_<mode>_{1,2}.
* config/i386/i386.md (pro_epilogue_adjust_stack_<mode>_add): Merge
	from pro_epilogue_adjust_stack_<mode>_{1,2}.
	(pro_epilogue_adjust_stack_<mode>_add): Rename from
	pro_epilogue_adjust_stack_<mode>_3.
	* config/i386/i386.c (pro_epilogue_adjust_stack): Update for
	renamed pro_epilogue_adjust_stack_{si,di}_add.
	(ix86_expand_prologue): Use indirect functions.  Update for renamed
	pro_epilogue_adjust_stack_{si,di}_sub.

From-SVN: r164635
2010-09-26 20:28:48 +02:00
Uros Bizjak d355d5ea50 i386.md (movmsk_df): New insn.
* config/i386/i386.md (movmsk_df): New insn.
	(signbitdf): Split out of signbit<mode>2.  Generate movmsk_df
	sequence for TARGET_SSE_MATH.

From-SVN: r164630
2010-09-26 12:34:57 +02:00
Richard Sandiford 7725086e26 mips.c (mips_builtin_decls): Declare.
gcc/
	* config/mips/mips.c (mips_builtin_decls): Declare.
	(mips_init_builtins): Store function declarations in
	mips_builtin_decls.
	(mips_builtin_decl): New function.
	(TARGET_BUILTIN_DECL): Define.

From-SVN: r164629
2010-09-26 07:26:20 +00:00
Kai Tietz 174425adcd cygwin.asm: Include auto-host.h.
* config/i386/cygwin.asm: Include auto-host.h.
	(cfi_startproc, cfi_endproc, cfi_adjust_cfa_offset,
	cfi_def_cfa_register, cfi_register, cfi_push, cfi_pop): New macros.
	(__chkstk, __alloca): Annotate for dwarf2 unwind info.  Drop
	alignment code from the 64-bit path.  Use gas local labels.
	* config/i386/i386.md (pro_epilogue_adjust_stack_<mode>_2): Macroize
	from _di_2.  Remove the useless constant integer argument.
	(pro_epilogue_adjust_stack_<mode>_3): New.
	(allocate_stack_worker_probe_<mode>): Macroize from
	allocate_stack_worker_{32,64}.  Use __chkstk_ms.  Update all users.
	* config/i386/i386.c (ix86_expand_prologue): Use __chkstk_ms;
	use gen_pro_epilogue_adjust_stack_*_3 and annotate it.
	(__chkstk_ms): New function.
	* config/i386/t-cygming (LIB1ASMFUNCS): Add _chkstk_ms.
	* gcc/config/i386/t-interix: Likewise.
	* configure.ac (HAVE_GAS_CFI_DIRECTIVE): Export for target.
	(HAVE_GAS_CFI_PERSONALITY_DIRECTIVE): Likewise.
	(HAVE_GAS_CFI_SECTIONS_DIRECTIVE): Likewise.
	* configure, config.in: Rebuild.

Co-Authored-By: Richard Henderson <rth@redhat.com>

From-SVN: r164628
2010-09-25 21:02:24 -07:00
Anatoly Sokolov c21136eebb avr.h (CLASS_LIKELY_SPILLED_P): Remove.
* config/avr/avr.h (CLASS_LIKELY_SPILLED_P): Remove.
	* config/avr/avr-protos.h (class_likely_spilled_p): Remove.
	* config/avr/avr.c (TARGET_CLASS_LIKELY_SPILLED_P): Define.
	(class_likely_spilled_p): Rename to...
	(avr_class_likely_spilled_p): ...this. Make static. Change argument
	type to reg_class_t.

From-SVN: r164618
2010-09-25 13:40:19 +04:00
Richard Henderson 5c255b57b2 ia64.c (ia64_dwarf_handle_frame_unspec): New.
* config/ia64/ia64.c (ia64_dwarf_handle_frame_unspec): New.
        (TARGET_DWARF_HANDLE_FRAME_UNSPEC): New.
        (do_spill): Use REG_CFA_OFFSET.
        (ia64_expand_prologue): Use REG_CFA_ADJUST_CFA and REG_CFA_REGISTER
        as appropriate.
        (ia64_expand_epilogue): Likewise.
        (process_set): Split into ...
        (process_cfa_adjust_cfa): this,
        (process_cfa_register): this,
        (process_cfa_offset): and this new function.
        (ia64_asm_unwind_emit): Use them.  Expect REG_CFA_* notes
        instead of REG_FRAME_RELATED_EXPR.

From-SVN: r164609
2010-09-24 14:20:51 -07:00
Olivier Hainque 42d87712de vx-common.h (DBX_REGISTER_NUMBER): Reinstate.
* config/i386/vx-common.h (DBX_REGISTER_NUMBER): Reinstate.

From-SVN: r164607
2010-09-24 20:32:48 +00:00
Jakub Jelinek 32990d5bc2 re PR middle-end/45234 (ICE in expand_call, at calls.c:2845 when passing aligned function argument from unaligned stack after alloca)
PR middle-end/45234
	* rtl.h (enum global_rtl_index): Add
	GR_VIRTUAL_PREFERRED_STACK_BOUNDARY.
	(LAST_VIRTUAL_POINTER_REGISTER): Define.
	(virtual_preferred_stack_boundary_rtx,
	VIRTUAL_PREFERRED_STACK_BOUNDARY_REGNUM): Define.
	(LAST_VIRTUAL_REGISTER): Increase by one.
	(REGNO_PTR_FRAME_P): Use LAST_VIRTUAL_POINTER_REGISTER
	instead of LAST_VIRTUAL_REGISTER.
	* function.c (instantiate_new_reg): Handle
	virtual_preferred_stack_boundary_rtx.
	* emit-rtl.c (init_virtual_regs): Handle
	VIRTUAL_PREFERRED_STACK_BOUNDARY_REGNUM.
	(init_emit_regs): Initialize virtual_preferred_stack_boundary_rtx.
	* explow.c (round_push): If crtl->preferred_stack_boundary
	is smaller than MAX_SUPPORTED_STACK_ALIGNMENT, use
	virtual_preferred_stack_boundary_rtx alignment instead of
	crtl->preferred_stack_boundary alignment.
	(allocate_dynamic_stack_space): Use CONST_INT_P and REG_P
	macros.  Never decrease crtl->preferred_stack_boundary,
	use crtl->preferred_stack_boundary or MAX_SUPPORTED_STACK_ALIGNMENT
	instead of PREFERRED_STACK_BOUNDARY.  Don't modify
	stack_pointer_delta in dynamic allocation, even when size
	is constant.
	(probe_stack_range, anti_adjust_stack_and_probe): Use CONST_INT_P
	macro.
	* print-rtl.c (print_rtx): Handle
	VIRTUAL_PREFERRED_STACK_BOUNDARY_REGNUM.
	* config/alpha/alpha.h (NONSTRICT_REG_OK_FP_BASE_P): Use
	LAST_VIRTUAL_POINTER_REGISTER instead of LAST_VIRTUAL_REGISTER.
	* config/frv/frv.c (frv_emit_movsi): Likewise.
	* config/arm/arm.c (thumb1_legitimate_address_p): Likewise.
	* config/rs6000/rs6000.c (virtual_stack_registers_memory_p):
	Likewise.

	* gcc.dg/torture/stackalign/alloca-6.c: New test.
	* gcc.target/i386/pr45234.c: New test.

	Revert:
	2010-09-17  H.J. Lu  <hongjiu.lu@intel.com>

	PR middle-end/45234
	* calls.c (expand_call): Make sure that all variable sized
	adjustments are multiple of preferred stack boundary after
	stack alignment.

From-SVN: r164593
2010-09-24 16:37:02 +02:00
Iain Sandoe 3d1b7f135d re PR bootstrap/45751 (Bootstrap failure: at stage 1 xgcc segfault)
PR bootstrap/45751
	* gcc/config/darwin-driver.c (darwin_default_min_version):
	Adjust size passed to memcpy in two places.


Co-Authored-By: Dominique d'Humieres <dominiq@lps.ens.fr>

From-SVN: r164592
2010-09-24 14:06:35 +00:00
Tristan Gingold 5501bdc1f5 re PR target/44242 (vms-crt0*.c should compile with gcc)
2010-09-09  Tristan Gingold  <gingold@adacore.com>

	PR target/44242
	* config/vms/vms-crt0-64.c: Removed.
	* config/vms/vms-crt0.c: Removed.
	* config/vms/vms-psxcrt0-64.c: Removed.
	* config/vms/vms-psxcrt0.c: Removed.
	* config/vms/vms-ucrt0.c: New file.
	* config/vms/t-vms64: Removed.
	* config/vms/t-vms (VMS_EXTRA_PARTS): Uncomment it.  Remove DECC.
	Use $(GCC_FOR_TARGET) to build pcrt0.o and vcrt0.o
	* config.gcc (alpha-dec-vms): Use t-vms.

From-SVN: r164587
2010-09-24 08:46:36 +00:00
Uros Bizjak 6fd71fde8b i386.md (ix86_code_end): Move the initialization of xops array near the consumer.
* config/i386/i386.md (ix86_code_end): Move the initialization of
	xops array near the consumer.  Use AX_REG and SP_REG instead of
	numerical constants.

From-SVN: r164583
2010-09-24 08:10:35 +02:00
Bernd Schmidt 5109c83f9a Remove accidentally added empty file.
From-SVN: r164569
2010-09-23 17:44:00 +00:00
Anatoly Sokolov ffda8a0d87 arm.h (OUTPUT_ADDR_CONST_EXTRA): Remove.
* config/arm/arm.h (OUTPUT_ADDR_CONST_EXTRA): Remove.
	* config/arm/arm-protos.h (arm_output_addr_const_extra): Remove.
	* config/arm/arm.c (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
	(arm_output_addr_const_extra): Make static.

From-SVN: r164568
2010-09-23 20:15:44 +04:00
Uros Bizjak 17eba94716 i386.md (UNSPECV_NOPS): Rename from UNSPEC_NOPS and define as unspec_volatile.
* config/i386/i386.md (UNSPECV_NOPS): Rename from UNSPEC_NOPS and
	define as unspec_volatile.
	("nops"): Define as unspec_volatile. Use fputs to write to
	asm_out_file directly.  Output NOPs on separate lines using while loop.
	* config/i386/i386.c (ix86_code_end): Use fputs to write to
	asm_out_file directly.  Output NOPs on separate lines using while loop.

testsuite/ChangeLog:

	* gcc.target/i386/pad-1.c: Remove -S from dg-options.
	* gcc.target/i386/pad-3.c: Ditto.
	* gcc.target/i386/pad-7.c: Ditto.
	* gcc.target/i386/pad-7.c: Ditto.
	* gcc.target/i386/pr36502.c: Ditto.
	* gcc.target/i386/zee.c: Ditto.
	* gcc.target/i386/20060821-1.c: Ditto.
	* gcc.target/i386/pad-2.c: Ditto.  Scan for NOPs on separate lines.
	* gcc.target/i386/pad-5a.c: Ditto.  Do not use scan-assembler-not.
	* gcc.target/i386/pad-5b.c: Ditto.
	* gcc.target/i386/pad-6a.c: Ditto.
	* gcc.target/i386/pad-6b.c: Ditto.
	* gcc.target/i386/pad-8.c: Ditto.
	* gcc.target/i386/pad-9.c: Ditto.
	* gcc.target/i386/pad-10.c: Ditto.
	* gcc.target/i386/pad-4.c: Ditto.  Require pic effective target.

From-SVN: r164564
2010-09-23 15:25:30 +02:00
Alan Modra 9f2e34e1eb rs6000.c (toc_relative_ok): Delete.
* config/rs6000/rs6000.c (toc_relative_ok): Delete.
	(rs6000_emit_move): Use SYMBOL_REF_LOCAL_P instead.

From-SVN: r164553
2010-09-23 20:20:48 +09:30
Bernd Schmidt 3c3bd4710f re PR rtl-optimization/44374 (Hoist same instructions in different branches)
PR rtl-optimization/44374
	* basic-block.h (enum bb_flags): Add BB_MODIFIED.
	* df-core.c (df_set_bb_dirty): Set it.
	* ifcvt.c (find_memory): Remove function.
	(dead_or_predicable): Use can_move_insns_across.
	* df.h (can_move_insns_across): Declare function.
	* cfgcleanup.c (block_was_dirty): New static variable.
	(try_crossjump_bb, try_forward_edges): Test BB_MODIFIED flag rather
	than df_get_bb_dirty.
	(try_head_merge_bb): New static function.
	(try_optimize_cfg): Call it.  Call df_analyze if block_was_dirty
	is set.
	* df-problems.c: Include "target.h"
	(df_simulate_find_uses): New static function.
	(MEMREF_NORMAL, MEMREF_VOLATILE): New macros.
	(find_memory, find_memory_store): New static functions.
	(can_move_insns_across): New function.
	* Makefile.in (df-problems.o): Update dependencies.

testsuite/
	PR rtl-optimization/44374
	* gcc.target/arm/headmerge-1.c: New test.
	* gcc.target/arm/headmerge-2.c: New test.
	* gcc.target/i386/headmerge-1.c: New test.
	* gcc.target/i386/headmerge-2.c: New test.

From-SVN: r164552
2010-09-23 10:04:33 +00:00
Eric Botcazou 40ea67af0a re PR java/44095 (massive java failures due to -findirect-dispatch breakage on sparc64-linux)
PR java/44095
	* config/sparc/linux.h (ASM_SPEC): Pass -K PIC if -findirect-dispatch
	is specified and the suffix of the file isn't ".c".
	* config/sparc/linux64.h (ASM_SPEC): Likewise.

From-SVN: r164534
2010-09-22 21:14:50 +00:00
Joseph Myers 60cf253a8b opts-common.c (prune_options): Make static.
* opts-common.c (prune_options): Make static.  Work with decoded
	options.
	(decode_cmdline_options_to_array): Call prune_options.  Don't
	resize option array here.
	* opts.h (prune_options): Remove prototype.
	* gcc.c (process_command): Take decoded options; don't call
	decode_cmdline_options_to_array here.  Use decoded options for
	argv[0].
	(main): Call decode_cmdline_options_to_array here instead of
	prune_options.  Update call to process_command.
	* config/darwin-driver.c: Include opts.h.
	(darwin_default_min_version): Work with decoded options.  Don't
	handle -b or -V here.
	* config/darwin.h (darwin_default_min_version): Update prototype.
	(GCC_DRIVER_HOST_INITIALIZATION): Update call to
	darwin_default_min_version.
	* config/i386/cygwin.h (mingw_scan): Update prototype.
	(GCC_DRIVER_HOST_INITIALIZATION): Update call to mingw_scan.
	* config/i386/cygwin1.c: Include opts.h.
	(mingw_scan): Work with decoded options.
	* config/i386/t-cygwin (cygwin1.o): Update dependencies.
	* config/t-darwin (darwin-driver.o): Update dependencies.

From-SVN: r164532
2010-09-22 21:19:39 +01:00
Hariharan Sandanagobalane be6388e18a picochip.md (movhicc): Use expand to check whether movhicc is available and split it after reload.
* config/picochip/picochip.md (movhicc): Use expand to check whether
        movhicc is available and split it after reload.

From-SVN: r164523
2010-09-22 14:07:11 +00:00
Eric Botcazou 77167b6f44 re PR target/35664 (unable to find a register to spill in class 'FP_REGS')
PR target/35664
	* config/sparc/constraints.md ('e'): Return NO_REGS if !TARGET_FPU.
	('f'): Likewise.

From-SVN: r164512
2010-09-22 08:31:14 +00:00
Tristan Gingold 50842acbc6 alpha.c (alpha_use_linkage): Initialize target field.
2010-09-22  Tristan Gingold  <gingold@adacore.com>

	* config/alpha/alpha.c (alpha_use_linkage): Initialize target field.

From-SVN: r164511
2010-09-22 08:21:14 +00:00
Uros Bizjak c69fa2d460 i386.h (MAX_STRINGOP_ALGS): Fix typo in the name.
* config/i386/i386.h (MAX_STRINGOP_ALGS): Fix typo in the name.
	* config/i386/i386.c (decide_alg): Update for rename.

From-SVN: r164509
2010-09-22 09:41:13 +02:00
Anatoly Sokolov 5e68c77aff rs6000.h (OUTPUT_ADDR_CONST_EXTRA): Remove macros.
* config/rs6000/rs6000.h (OUTPUT_ADDR_CONST_EXTRA): Remove macros.
	* config/rs6000/rs6000-protos.h (rs6000_output_addr_const_extra):
	Remove.
	* config/rs6000/rs6000.c (rs6000_output_addr_const_extra): Make
	static.
	(TTARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.

From-SVN: r164493
2010-09-21 23:03:25 +04:00
Kai Tietz 7df82166ce Remove strayed semicolon.
From-SVN: r164492
2010-09-21 21:03:11 +02:00
Kai Tietz f997b875dd re PR target/45694 ([MinGW64] fortran host associated variables+optimization==failure?)
2010-09-21  Kai Tietz  <kai.tietz@onevision.com>

        PR target/45694
        * config/i386/i386.c (ix86_expand_prologue): Save r10 in case that
        static chain-register is used for 64-bit.

From-SVN: r164489
2010-09-21 19:58:32 +02:00
Bernd Schmidt c9cdcaa590 iterators.md (qhs_extenddi_op): New mode_attr.
* config/arm/iterators.md (qhs_extenddi_op): New mode_attr.
	(qhs_extenddi_cstr): Likewise.
	* config/arm/arm.md (zero_extend<mode>di2, extend<mode>di2): Use
	them for the source operand.

From-SVN: r164477
2010-09-21 13:11:03 +00:00