1. 02 Aug, 2011 1 commit
    • re PR debug/49864 (ICE: in maybe_record_trace_start, at dwarf2cfi.c:2439) · 9a08d230
      PR target/49864
      	* reg-notes.def (REG_ARGS_SIZE): New.
      	* calls.c (emit_call_1): Emit REG_ARGS_SIZE for call_pop.
      	(expand_call): Add REG_ARGS_SIZE to emit_stack_restore.
      	* cfgcleanup.c (old_insns_match_p): Don't allow cross-jumping to
      	different stack levels.
      	* combine-stack-adj.c (adjust_frame_related_expr): Remove.
      	(maybe_move_args_size_note): New.
      	(combine_stack_adjustments_for_block): Use it.
      	* combine.c (distribute_notes): Place REG_ARGS_SIZE.
      	* dwarf2cfi.c (dw_cfi_row_struct): Remove args_size member.
      	(dw_trace_info): Add beg_true_args_size, end_true_args_size,
      	beg_delay_args_size, end_delay_args_size, eh_head, args_size_undefined.
      	(cur_cfa): New.
      	(queued_args_size): Remove.
      	(add_cfi_args_size): Assert size is non-negative.
      	(stack_adjust_offset, dwarf2out_args_size): Remove.
      	(dwarf2out_stack_adjust, dwarf2out_notice_stack_adjust): Remove.
      	(notice_args_size, notice_eh_throw): New.
      	(dwarf2out_frame_debug_def_cfa): Use cur_cfa.
      	(dwarf2out_frame_debug_adjust_cfa): Likewise.
      	(dwarf2out_frame_debug_cfa_offset): Likewise.
      	(dwarf2out_frame_debug_expr): Likewise.  Don't stack_adjust_offset.
      	(dwarf2out_frame_debug): Don't handle non-frame-related-p insns.
      	(change_cfi_row): Don't emit args_size.
      	(maybe_record_trace_start_abnormal): Split out from ...
      	(maybe_record_trace_start): Here.  Set args_size_undefined.
      	(create_trace_edges): Update to match.
      	(scan_trace): Handle REG_ARGS_SIZE.
      	(connect_traces): Connect args_size between EH insns.
      	* emit-rtl.c (try_split): Handle REG_ARGS_SIZE.
      	* explow.c (suppress_reg_args_size): New.
      	(adjust_stack_1): Split out from ...
      	(adjust_stack): ... here.
      	(anti_adjust_stack): Use it.
      	(allocate_dynamic_stack_space): Suppress REG_ARGS_SIZE.
      	* expr.c (mem_autoinc_base): New.
      	(fixup_args_size_notes): New.
      	(emit_single_push_insn_1): Rename from emit_single_push_insn.
      	(emit_single_push_insn): New.  Generate REG_ARGS_SIZE.
      	* recog.c (peep2_attempt): Handle REG_ARGS_SIZE.
      	* reload1.c (reload_as_needed): Likewise.
      	* rtl.h (fixup_args_size_notes): Declare.
      
      From-SVN: r177218
      Richard Henderson committed
  2. 06 Jul, 2011 1 commit
    • explow.c (trunc_int_for_mode): Use GET_MODE_PRECISION instead of… · 5511bc5a
      explow.c (trunc_int_for_mode): Use GET_MODE_PRECISION instead of GET_MODE_BITSIZE where appropriate.
      
      	* explow.c (trunc_int_for_mode): Use GET_MODE_PRECISION
      	instead of GET_MODE_BITSIZE where appropriate.
      	* rtlanal.c (subreg_lsb_1, subreg_get_info, nonzero_bits1,
      	num_sign_bit_copies1, canonicalize_condition, low_bitmask_len,
      	init_num_sign_bit_copies_in_rep): Likewise.
      	* cse.c (fold_rtx, cse_insn): Likewise.
      	* loop-doloop.c (doloop_modify, doloop_optimize): Likewise.
      	* simplify-rtx.c (simplify_unary_operation_1,
      	simplify_const_unary_operation, simplify_binary_operation_1,
      	simplify_const_binary_operation, simplify_ternary_operation,
      	simplify_const_relational_operation, simplify_subreg): Likewise.
      	* combine.c (try_combine, find_split_point, combine_simplify_rtx,
      	simplify_if_then_else, simplify_set, expand_compound_operation,
      	expand_field_assignment, make_extraction, if_then_else_cond,
      	make_compound_operation, force_to_mode, make_field_assignment,
      	reg_nonzero_bits_for_combine, reg_num_sign_bit_copies_for_combine,
      	extended_count, try_widen_shift_mode, simplify_shift_const_1,
      	simplify_comparison, record_promoted_value, simplify_compare_const,
      	record_dead_and_set_regs_1): Likewise.
      
      From-SVN: r175946
      Bernd Schmidt committed
  3. 01 Jul, 2011 1 commit
    • Use proper mode for stack save area. · 6bbec3e1
      2011-07-01  H.J. Lu  <hongjiu.lu@intel.com>
      
      	PR middle-end/48016
      	* explow.c (update_nonlocal_goto_save_area): Use proper mode
      	for stack save area.
      	* function.c (expand_function_start): Likewise.
      
      From-SVN: r175756
      H.J. Lu committed
  4. 14 Jun, 2011 1 commit
    • target-def.h (TARGET_HAVE_NAMED_SECTIONS): Move to common/common-target-def.h. · 677f3fa8
      	* target-def.h (TARGET_HAVE_NAMED_SECTIONS): Move to
      	common/common-target-def.h.
      	* target.def (default_target_flags, handle_option,
      	supports_split_stack, optimization_table, init_struct,
      	except_unwind_info, unwind_tables_default, have_named_sections):
      	Move to common/common-target.def.
      	* target.h (enum opt_levels, struct default_options): Move to
      	common/common-target.h.
      	* targhooks.c (default_except_unwind_info,
      	dwarf2_except_unwind_info, sjlj_except_unwind_info,
      	default_target_handle_option, empty_optimization_table): Move to
      	common/common-targhooks.c.
      	* targhooks.h (default_except_unwind_info,
      	dwarf2_except_unwind_info, sjlj_except_unwind_info,
      	default_target_handle_option, empty_optimization_table): Move to
      	common/common-targhooks.h.
      	* common/common-target-def.h: Include common/common-targhooks.h.
      	(TARGET_HAVE_NAMED_SECTIONS): Define if TARGET_ASM_NAMED_SECTION
      	defined.
      	* common/common-target.def (handle_option, option_init_struct,
      	option_optimization_table, default_target_flags,
      	except_unwind_info, supports_split_stack, unwind_tables_default,
      	have_named_sections): Move from target.def.
      	(HOOK_PREFIX): Undefine at end of file.
      	* common/common-target.h: Include input.h.
      	(enum opt_levels, struct default_options): Move from target.h.
      	* common/common-targhooks.c, common/common-targhooks.h: New.
      	* config.gcc (target_has_targetm_common): Default to yes.
      	(moxie*): Set target_has_targetm_common=no.
      	(hppa*-*-*): Don't set target_has_targetm_common=yes.
      	* doc/tm.texi: Regenerate.
      	* Makefile.in (COMMON_TARGET_H): Add $(INPUT_H).
      	(C_TARGET_DEF_H): Add common/common-targhooks.h.
      	(GCC_OBJS): Remove vec.o.
      	(OBJS): Remove hooks.o and vec.o.
      	(OBJS-libcommon-target): Add vec.o, hooks.o and
      	common/common-targhooks.o.
      	(c-family/c-common.o, c-family/c-cppbuiltin.o, lto-opts.o, tree.o,
      	tree-tailcall.o, opts.o, toplev.o, varasm.o, function.o, except.o,
      	expr.o, explow.o, dbxout.o, dwarf2out.o, cfgrtl.o, haifa-sched.o,
      	cfglayout.o, $(out_object_file), $(common_out_object_file)):
      	Update dependencies.
      	(common/common-targhooks.o): New.
      	* common/config/default-common.c: Include tm.h.  Add FIXME
      	comment.
      	* common/config/pa/pa-common.c: Include more headers.  Take
      	copyright dates from pa.c.
      	(pa_option_optimization_table, pa_handle_option,
      	TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_DEFAULT_TARGET_FLAGS,
      	TARGET_HANDLE_OPTION): Move from pa.c.
      	* common/config/alpha/alpha-common.c,
      	common/config/arm/arm-common.c, common/config/avr/avr-common.c,
      	common/config/bfin/bfin-common.c,
      	common/config/cris/cris-common.c,
      	common/config/fr30/fr30-common.c, common/config/frv/frv-common.c,
      	common/config/h8300/h8300-common.c,
      	common/config/i386/i386-common.c,
      	common/config/ia64/ia64-common.c,
      	common/config/iq2000/iq2000-common.c,
      	common/config/lm32/lm32-common.c,
      	common/config/m32c/m32c-common.c,
      	common/config/m32r/m32r-common.c,
      	common/config/m68k/m68k-common.c,
      	common/config/mcore/mcore-common.c,
      	common/config/mep/mep-common.c,
      	common/config/microblaze/microblaze-common.c,
      	common/config/mips/mips-common.c,
      	common/config/mmix/mmix-common.c,
      	common/config/mn10300/mn10300-common.c,
      	common/config/pdp11/pdp11-common.c,
      	common/config/picochip/picochip-common.c,
      	common/config/rs6000/rs6000-common.c,
      	common/config/rx/rx-common.c, common/config/s390/s390-common.c,
      	common/config/score/score-common.c, common/config/sh/sh-common.c,
      	common/config/sparc/sparc-common.c,
      	common/config/spu/spu-common.c, common/config/v850/v850-common.c,
      	common/config/vax/vax-common.c,
      	common/config/xstormy16/xstormy16-common.c,
      	common/config/xtensa/xtensa-common.c: New.
      	* config/alpha/alpha.c: Include common/common-target.h.
      	(alpha_option_optimization_table, alpha_handle_option,
      	TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION,
      	TARGET_OPTION_OPTIMIZATION_TABLE): Move to alpha-common.c.
      	* config/arm/arm-protos.h (arm_except_unwind_info): Declare.
      	* config/arm/arm.c (arm_option_optimization_table,
      	TARGET_DEFAULT_TARGET_FLAGS, TARGET_OPTION_OPTIMIZATION_TABLE,
      	TARGET_EXCEPT_UNWIND_INFO, arm_except_unwind_info): Move to
      	arm-common.c.
      	* config/avr/avr.c (avr_option_optimization_table,
      	TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_EXCEPT_UNWIND_INFO): Move
      	to avr-common.c.
      	* config/bfin/bfin.c (struct bfin_cpu): Move to bfin.h.
      	(bfin_cpus, bfin_handle_option, TARGET_HANDLE_OPTION,
      	TARGET_DEFAULT_TARGET_FLAGS): Move to bfin-common.c.
      	* config/bfin/bfin.h struct bfin_cpu): Move from bfin.c.
      	* config/cris/cris.c (cris_option_optimization_table,
      	TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION,
      	TARGET_OPTION_OPTIMIZATION_TABLE, cris_handle_option): Move to
      	cris-common.c.
      	* config/fr30/fr30.c (fr30_option_optimization_table,
      	TARGET_EXCEPT_UNWIND_INFO, TARGET_OPTION_OPTIMIZATION_TABLE): Move
      	to fr30-common.c.
      	* config/frv/frv.c (frv_option_optimization_table,
      	MASK_DEFAULT_ALLOC_CC, TARGET_DEFAULT_TARGET_FLAGS,
      	TARGET_OPTION_OPTIMIZATION_TABLE): Move to frv-common.c.
      	* config/h8300/h8300.c (h8300_option_optimization_table,
      	TARGET_DEFAULT_TARGET_FLAGS, TARGET_OPTION_OPTIMIZATION_TABLE,
      	TARGET_EXCEPT_UNWIND_INFO): Move to h8300-common.c.
      	* config/i386/i386-protos.h (ix86_handle_option): Declare.
      	* config/i386/i386.c: Include common/common-target.h.
      	(OPTION_MASK_ISA_MMX_SET, OPTION_MASK_ISA_3DNOW_SET,
      	OPTION_MASK_ISA_SSE_SET, OPTION_MASK_ISA_SSE2_SET,
      	OPTION_MASK_ISA_SSE3_SET, OPTION_MASK_ISA_SSSE3_SET,
      	OPTION_MASK_ISA_SSE4_1_SET, OPTION_MASK_ISA_SSE4_2_SET,
      	OPTION_MASK_ISA_AVX_SET, OPTION_MASK_ISA_FMA_SET,
      	OPTION_MASK_ISA_SSE4_SET, OPTION_MASK_ISA_SSE4A_SET,
      	OPTION_MASK_ISA_FMA4_SET, OPTION_MASK_ISA_XOP_SET,
      	OPTION_MASK_ISA_LWP_SET, OPTION_MASK_ISA_AES_SET,
      	OPTION_MASK_ISA_PCLMUL_SET, OPTION_MASK_ISA_ABM_SET,
      	OPTION_MASK_ISA_BMI_SET, OPTION_MASK_ISA_TBM_SET,
      	OPTION_MASK_ISA_POPCNT_SET, OPTION_MASK_ISA_CX16_SET,
      	OPTION_MASK_ISA_SAHF_SET, OPTION_MASK_ISA_MOVBE_SET,
      	OPTION_MASK_ISA_CRC32_SET, OPTION_MASK_ISA_FSGSBASE_SET,
      	OPTION_MASK_ISA_RDRND_SET, OPTION_MASK_ISA_F16C_SET,
      	OPTION_MASK_ISA_MMX_UNSET, OPTION_MASK_ISA_3DNOW_UNSET,
      	OPTION_MASK_ISA_3DNOW_A_UNSET, OPTION_MASK_ISA_SSE_UNSET,
      	OPTION_MASK_ISA_SSE2_UNSET, OPTION_MASK_ISA_SSE3_UNSET,
      	OPTION_MASK_ISA_SSSE3_UNSET, OPTION_MASK_ISA_SSE4_1_UNSET,
      	OPTION_MASK_ISA_SSE4_2_UNSET, OPTION_MASK_ISA_AVX_UNSET,
      	OPTION_MASK_ISA_FMA_UNSET, OPTION_MASK_ISA_SSE4_UNSET,
      	OPTION_MASK_ISA_SSE4A_UNSET, OPTION_MASK_ISA_FMA4_UNSET,
      	OPTION_MASK_ISA_XOP_UNSET, OPTION_MASK_ISA_LWP_UNSET,
      	OPTION_MASK_ISA_AES_UNSET, OPTION_MASK_ISA_PCLMUL_UNSET,
      	OPTION_MASK_ISA_ABM_UNSET, OPTION_MASK_ISA_BMI_UNSET,
      	OPTION_MASK_ISA_TBM_UNSET, OPTION_MASK_ISA_POPCNT_UNSET,
      	OPTION_MASK_ISA_CX16_UNSET, OPTION_MASK_ISA_SAHF_UNSET,
      	OPTION_MASK_ISA_MOVBE_UNSET, OPTION_MASK_ISA_CRC32_UNSET,
      	OPTION_MASK_ISA_FSGSBASE_UNSET, OPTION_MASK_ISA_RDRND_UNSET,
      	OPTION_MASK_ISA_F16C_UNSET, ix86_handle_option,
      	ix86_option_optimization_table, ix86_option_init_struct,
      	ix86_supports_split_stack, TARGET_DEFAULT_TARGET_FLAGS,
      	TARGET_HANDLE_OPTION, TARGET_OPTION_OPTIMIZATION_TABLE,
      	TARGET_OPTION_INIT_STRUCT, TARGET_SUPPORTS_SPLIT_STACK): Move to
      	i386-common.c.
      	* config/i386/t-i386 (i386.o): Update dependencies.
      	* config/ia64/ia64-protos.h (ia64_except_unwind_info): Declare.
      	* config/ia64/ia64.c (ia64_option_optimization_table,
      	TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_EXCEPT_UNWIND_INFO,
      	TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION,
      	ia64_handle_option): Move to ia64-common.c.
      	* config/iq2000/iq2000.c (iq2000_option_optimization_table,
      	TARGET_OPTION_OPTIMIZATION_TABLE): Move to iq2000-common.c.
      	* config/lm32/lm32.c (lm32_option_optimization_table,
      	TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_EXCEPT_UNWIND_INFO): Move
      	to lm32-common.c.
      	* config/m32c/m32c.c (TARGET_HAVE_NAMED_SECTIONS): Move to
      	m32c-common.c.
      	* config/m32r/m32r.c (m32r_option_optimization_table,
      	TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION,
      	TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_EXCEPT_UNWIND_INFO,
      	m32r_handle_option): Move to m32r-common.c.
      	(m32r_memory_move_cost): Remove comment referring to
      	TARGET_HANDLE_OPTION.
      	* config/m68k/m68k.c (TARGET_HANDLE_OPTION, m68k_handle_option):
      	Move to m68k-common.c.
      	* config/mcore/mcore.c (mcore_option_optimization_table,
      	TARGET_DEFAULT_TARGET_FLAGS, TARGET_OPTION_OPTIMIZATION_TABLE,
      	TARGET_EXCEPT_UNWIND_INFO): Move to mcore-common.c.
      	* config/mep/mep.c (mep_option_optimization_table,
      	mep_handle_option, TARGET_HANDLE_OPTION,
      	TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_DEFAULT_TARGET_FLAGS):
      	Move to mep-common.c.
      	* config/microblaze/microblaze.c
      	(microblaze_option_optimization_table,
      	TARGET_DEFAULT_TARGET_FLAGS, TARGET_OPTION_OPTIMIZATION_TABLE,
      	TARGET_EXCEPT_UNWIND_INFO): Move to microblaze-common.c.
      	* config/mips/mips.c (mips_handle_option,
      	mips_option_optimization_table, TARGET_OPTION_OPTIMIZATION_TABLE,
      	TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION): Move to
      	mips-common.c.
      	* config/mmix/mmix.c (mmix_option_optimization_table,
      	TARGET_DEFAULT_TARGET_FLAGS, TARGET_OPTION_OPTIMIZATION_TABLE):
      	Move to mmix-common.c.
      	* config/mn10300/mn10300.c (mn10300_option_optimization_table,
      	mn10300_handle_option, TARGET_EXCEPT_UNWIND_INFO,
      	TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION,
      	TARGET_OPTION_OPTIMIZATION_TABLE): Move to mn10300-common.c.
      	* config/pa/pa.c: Include common/common-target.h.
      	(pa_option_optimization_table, TARGET_OPTION_OPTIMIZATION_TABLE,
      	TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION,
      	pa_handle_option): Move to pa-common.c.
      	(pa_option_override): Use targetm_common.except_unwind_info.
      	(pa_asm_output_mi_thunk, pa_function_section): Use
      	targetm_common.have_named_sections.
      	* config/pdp11/pdp11.c (pdp11_option_optimization_table,
      	TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION,
      	TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_OPTION_INIT_STRUCT,
      	pdp11_handle_option, pdp11_option_init_struct): Move to
      	pdp11-common.c.
      	* config/picochip/picochip.c (picochip_option_optimization_table,
      	TARGET_HAVE_NAMED_SECTIONS, TARGET_OPTION_OPTIMIZATION_TABLE,
      	TARGET_EXCEPT_UNWIND_INFO): Move to picochip-common.c.
      	* config/rs6000/rs6000.c: Include common/common-target.h.
      	(rs6000_option_optimization_table, TARGET_HANDLE_OPTION,
      	TARGET_OPTION_INIT_STRUCT, TARGET_OPTION_OPTIMIZATION_TABLE,
      	TARGET_DEFAULT_TARGET_FLAGS, rs6000_option_init_struct,
      	rs6000_handle_option): Move to rs6000-common.c.
      	* config/rs6000/t-rs6000 (rs6000.o): Update dependencies.
      	* config/rx/rx.c (rx_handle_option, rx_option_optimization_table,
      	TARGET_HANDLE_OPTION, TARGET_OPTION_OPTIMIZATION_TABLE,
      	TARGET_EXCEPT_UNWIND_INFO): Move to rx-common.c.
      	* config/s390/s390.c (processor_flags_table,
      	s390_option_optimization_table, s390_option_init_struct,
      	s390_handle_option, TARGET_DEFAULT_TARGET_FLAGS,
      	TARGET_HANDLE_OPTION, TARGET_OPTION_OPTIMIZATION_TABLE,
      	TARGET_OPTION_INIT_STRUCT): Move to s390-common.c.
      	* config/s390/s390.h (processor_flags_table): Declare.
      	* config/score/score.c (score_option_optimization_table,
      	TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION,
      	TARGET_OPTION_OPTIMIZATION_TABLE, MASK_ALL_CPU_BITS,
      	score_handle_option): Move to score-common.c.
      	* config/sh/sh.c (sh_option_optimization_table,
      	TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_OPTION_INIT_STRUCT,
      	TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION,
      	sh_handle_option, sh_option_init_struct): Move to sh-common.c.
      	* config/sparc/sparc.c: Include common/common-target.h.
      	(sparc_option_optimization_table, TARGET_DEFAULT_TARGET_FLAGS,
      	TARGET_OPTION_OPTIMIZATION_TABLE): Move to sparc-common.c.
      	* config/spu/spu.c (TARGET_DEFAULT_TARGET_FLAGS,
      	TARGET_OPTION_INIT_STRUCT, TARGET_EXCEPT_UNWIND_INFO,
      	spu_option_init_struct): Move to spu-common.c.
      	* config/stormy16/stormy16.c (xstorym16_option_optimization_table,
      	TARGET_OPTION_OPTIMIZATION_TABLE): Move to xstormy16-common.c.
      	* config/v850/v850.c (small_memory_physical_max,
      	v850_handle_memory_optionn v850_handle_option,
      	v850_option_optimization_table, TARGET_DEFAULT_TARGET_FLAGS,
      	TARGET_HANDLE_OPTION, TARGET_OPTION_OPTIMIZATION_TABLE): Move to
      	v850-common.c.
      	* config/vax/vax.c (TARGET_DEFAULT_TARGET_FLAGS): Move to
      	vax-common.c.
      	* config/xtensa/xtensa.c (xtensa_option_optimization_table,
      	TARGET_DEFAULT_TARGET_FLAGS, TARGET_OPTION_OPTIMIZATION_TABLE):
      	Move to xtensa-common.c.
      	* cfglayout.c: Include common/common-target.h.
      	(fixup_reorder_chain): Use targetm_common.have_named_sections.
      	* cfgrtl.c: Include common/common-target.h.
      	(force_nonfallthru_and_redirect, commit_one_edge_insertion): Use
      	targetm_common.have_named_sections.
      	* dbxout.c: Include common/common-target.h.
      	(dbxout_function_end): Use targetm_common.have_named_sections.
      	* defaults.h (STACK_OLD_CHECK_PROTECT, STACK_CHECK_PROTECT): Use
      	targetm_common.except_unwind_info.
      	* dwarf2out.c: Include common/common-target.h.
      	(dwarf2out_do_frame, dwarf2out_do_cfi_asm,
      	dwarf2out_begin_prologue, dwarf2out_frame_init,
      	dwarf2out_frame_finish, dwarf2out_assembly_start): Use
      	targetm_common.except_unwind_info.
      	* except.c: Include common/common-target.h.
      	(init_eh, finish_eh_generation,
      	output_one_function_exception_table): Use
      	targetm_common.except_unwind_info.
      	(switch_to_exception_section): Use
      	targetm_common.have_named_sections.
      	* explow.c: Include common/common-target.h.
      	* expr.c: Include common/common-target.h.
      	(build_personality_function): Use
      	targetm_common.except_unwind_info.
      	* function.c: Include common/common-target.h.
      	(expand_function_end): Use targetm_common.except_unwind_info.
      	* haifa-sched.c: Include common/common-target.h.
      	(sched_create_recovery_edges): Use
      	targetm_common.have_named_sections.
      	* lto-opts.c: Include common/common-target.h instead of target.h.
      	(lto_reissue_options): Use targetm_common.handle_option.
      	* opts.c: Include common/common-target.h.
      	(target_handle_option): Use targetm_common.handle_option.
      	(init_options_struct): Update comment referring to
      	targetm.target_option.optimization.  Use
      	targetm_common.default_target_flags,
      	targetm_common.unwind_tables_default and
      	targetm_common.option_init_struct.
      	(default_options_optimization): Use
      	targetm_common.option_optimization_table.
      	(finish_options): Use targetm_common.except_unwind_info,
      	targetm_common.unwind_tables_default,
      	targetm_common.have_named_sections and
      	targetm_common.supports_split_stack.
      	* toplev.c: Include common/common-target.h.
      	(process_options): Use targetm_common.have_named_sections.
      	* tree-tailcall.c: Include common/common-target.h.
      	(suitable_for_tail_call_opt_p): Use
      	targetm_common.except_unwind_info.
      	* tree.c: Include common/common-target.h.
      	(build_common_builtin_nodes): Use
      	targetm_common.except_unwind_info.
      	* varasm.c: Include common/common-target.h.
      	(resolve_unique_section, hot_function_section,
      	default_function_section): Use targetm_common.have_named_sections.
      
      ada:
      	* gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
      	(ada/utils.o): Update dependencies.
      	* gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
      	../../../libcpp/libcpp.a.
      	* gcc-interface/utils.c: Include common/common-target.h.
      	(process_attributes): Use targetm_common.have_named_sections.
      
      c-family:
      	* c-common.c: Include common/common-target.h.
      	(handle_section_attribute): Use
      	targetm_common.have_named_sections.
      	* c-cppbuiltin.c: Include common/common-target.h.
      	(c_cpp_builtins): Use targetm_common.except_unwind_info.
      
      cp:
      	* Make-lang.in (cp/method.o): Update dependencies.
      	* method.c: Include common/common-target.h.
      	(use_thunk): Use targetm_common.have_named_sections.
      
      go:
      	* Make-lang.in (go/go-lang.o, go/go-backend.o): Update
      	dependencies.
      	* go-backend.c: Include common/common-target.h.
      	(go_write_export_data): Use targetm_common.have_named_sections.
      	* go-lang.c: Include common/common-target.h.
      	(go_langhook_init_options_struct): Use
      	targetm_common.supports_split_stack.
      
      po:
      	* exgettext: Handle common/ directory and subdirectories.
      
      From-SVN: r175064
      Joseph Myers committed
  5. 02 Jun, 2011 1 commit
    • function.h (struct stack_usage): Remove dynamic_alloc_count field. · bc6d3f91
      	* function.h (struct stack_usage): Remove dynamic_alloc_count field.
      	(current_function_dynamic_alloc_count): Delete.
      	* builtins.c (expand_builtin_setjmp_setup): Do not set calls_setjmp.
      	(expand_builtin_nonlocal_goto): Remove obsolete comment.
      	(expand_builtin_update_setjmp_buf): Remove dead code.
      	* cse.c (cse_find_path): Do not follow a single abnormal incoming edge.
      	* explow.c (allocate_dynamic_stack_space): Remove SETJMP_VIA_SAVE_AREA
      	support.
      	* function.c (instantiate_virtual_regs): Likewise.
      	* postreload-gcse.c (bb_has_well_behaved_predecessors): Return false
      	for a block with a single abnormal incoming edge.
      	* config/sparc/sparc.h (STACK_SAVEAREA_MODE): Define.
      	* config/sparc/sparc-protos.h (load_got_register): Declare.
      	* config/sparc/sparc.c (TARGET_BUILTIN_SETJMP_FRAME_VALUE): Define.
      	(load_got_register): Make global.
      	(sparc_frame_pointer_required): Add 'static'.
      	(sparc_can_eliminate): Likewise.  Call sparc_frame_pointer_required.
      	(sparc_builtin_setjmp_frame_value): New function.
      	* config/sparc/sparc.md (UNSPECV_SETJMP): Remove.
      	(save_stack_nonlocal): New expander.
      	(restore_stack_nonlocal): Likewise.
      	(nonlocal_goto): Remove modes, adjust predicates and reimplement.
      	(nonlocal_goto_internal): New insn.
      	(goto_handler_and_restore): Delete.
      	(builtin_setjmp_setup): Likewise.
      	(do_builtin_setjmp_setup): Likewise.
      	(setjmp): Likewise.
      	(builtin_setjmp_receiver): New expander.
      
      From-SVN: r174564
      Eric Botcazou committed
  6. 25 May, 2011 1 commit
    • common.opt (flag_stack_usage_info): New variable. · a11e0df4
      	* common.opt (flag_stack_usage_info): New variable.
      	(-Wstack-usage): New option.
      	* doc/invoke.texi (Warning options): Document -Wstack-usage.
      	* opts.c (common_handle_option) <OPT_Wstack_usage_>: New case.
      	<OPT_fstack_usage>: Likewise.
      	* toplev.c (output_stack_usage): Handle -Wstack-usage.
      	* calls.c (expand_call): Test flag_stack_usage_info variable instead
      	of flag_stack_usage.
      	(emit_library_call_value_1): Likewise.
      	* explow.c (allocate_dynamic_stack_space): Likewise.
      	* function.c (instantiate_virtual_regs ): Likewise.
      	(prepare_function_start): Likewise.
      	(rest_of_handle_thread_prologue_and_epilogue): Likewise.
      	* config/alpha/alpha.c (alpha_expand_prologue): Likewise.
      	* config/arm/arm.c (arm_expand_prologue): Likewise.
      	(thumb1_expand_prologue): Likewise.
      	* config/avr/avr.c (expand_prologue): Likewise.
      	* config/i386/i386.c (ix86_expand_prologue): Likewise.
      	* config/ia64/ia64.c (ia64_expand_prologue): Likewise.
      	* config/m68k/m68k.c (m68k_expand_prologue): Likewise.
      	* config/mips/mips.c (mips_expand_prologue): Likewise.
      	* config/pa/pa.c (hppa_expand_prologue): Likewise.
      	* config/rs6000/rs6000.c (rs6000_emit_prologue): Likewise.
      	* config/s390/s390.c (s390_emit_prologue): Likewise.
      	* config/sh/sh.c (sh_expand_prologue): Likewise.
      	* config/sparc/sparc.c (sparc_expand_prologue): Likewise.
      	* config/spu/spu.c (spu_expand_prologue): Likewise.
      
      From-SVN: r174182
      Eric Botcazou committed
  7. 04 May, 2011 2 commits
  8. 23 Mar, 2011 1 commit
    • optabs.h (emit_unop_insn, [...]): Change insn code parameter from "int" to "enum insn_code". · a5c7d693
      gcc/
      	* optabs.h (emit_unop_insn, maybe_emit_unop_insn): Change insn code
      	parameter from "int" to "enum insn_code".
      	(expand_operand_type): New enum.
      	(expand_operand): New structure.
      	(create_expand_operand): New function.
      	(create_fixed_operand, create_output_operand): Likewise
      	(create_input_operand, create_convert_operand_to): Likewise.
      	(create_convert_operand_from, create_address_operand): Likewise.
      	(create_integer_operand): Likewise.
      	(create_convert_operand_from_type, maybe_legitimize_operands): Declare.
      	(maybe_gen_insn, maybe_expand_insn, maybe_expand_jump_insn): Likewise.
      	(expand_insn, expand_jump_insn): Likewise.
      	* builtins.c (expand_builtin_prefetch): Use the new interfaces.
      	(expand_builtin_interclass_mathfn, expand_builtin_strlen): Likewise.
      	(expand_movstr, expand_builtin___clear_cache): Likewise.
      	(expand_builtin_lock_release): Likewise.
      	* explow.c (allocate_dynamic_stack_space): Likewise.
      	(probe_stack_range): Likewise.  Allow check_stack to FAIL,
      	and use the default handling in that case.
      	* expmed.c (check_predicate_volatile_ok): Delete.
      	(store_bit_field_1, extract_bit_field_1): Use the new interfaces.
      	(emit_cstore): Likewise.
      	* expr.c (emit_block_move_via_movmem): Likewise.
      	(set_storage_via_setmem, expand_assignment): Likewise.
      	(emit_storent_insn, try_casesi): Likewise.
      	(emit_single_push_insn): Likewise.  Allow the expansion to fail.
      	* optabs.c (expand_widen_pattern_expr, expand_ternary_op): Likewise.
      	(expand_vec_shift_expr, expand_binop_directly): Likewise.
      	(expand_twoval_unop, expand_twoval_binop): Likewise.
      	(expand_unop_direct, emit_indirect_jump): Likewise.
      	(emit_conditional_move, vector_compare_rtx): Likewise.
      	(expand_vec_cond_expr, expand_val_compare_and_swap_1): Likewise.
      	(expand_sync_operation, expand_sync_fetch_operation): Likewise.
      	(expand_sync_lock_test_and_set): Likewise.
      	(maybe_emit_unop_insn): Likewise.  Change icode to an insn_code.
      	(emit_unop_insn): Likewise.
      	(expand_copysign_absneg): Change icode to an insn_code.
      	(create_convert_operand_from_type): New function.
      	(maybe_legitimize_operand, maybe_legitimize_operands): Likewise.
      	(maybe_gen_insn, maybe_expand_insn, maybe_expand_jump_insn): Likewise.
      	(expand_insn, expand_jump_insn): Likewise.
      	* config/i386/i386.md (setmem<mode>): Use nonmemory_operand rather
      	than const_int_operand for operand 2.
      
      From-SVN: r171341
      Richard Sandiford committed
  9. 03 Mar, 2011 1 commit
    • explow.c (emit_stack_save): Remove 'after' parameter. · 9eac0f2a
              * explow.c (emit_stack_save): Remove 'after' parameter.
              (emit_stack_restore): Likewise.
              * expr.h: Update to match.
              * builtins.c, calls.c, stmt.c: Likewise.
              * config/alpha/alpha.md, config/avr/avr.md: Likewise.
              * config/mips/mips.md, config/pa/pa.md, config/vax/vax.md: Likewise.
              * function.c (expand_function_end): Insert the emit_stack_save
              sequence before parm_birth_insn instead of after.
      
      From-SVN: r170663
      Richard Henderson committed
  10. 18 Jan, 2011 1 commit
  11. 30 Nov, 2010 1 commit
    • hwint.c: New. · c59ffc41
      	* hwint.c:  New.  Extracted from toplev.c.
      	* hwint.h (clz_hwi, ctz_hwi, ffs_hwi, exact_log2, floor_log2):
      	Move from toplev.h.
      	* toplev.c (clz_hwi, ctz_hwi, ffs_hwi, exact_log2, floor_log2):
      	Move to hwint.c.
      	* toplev.h (clz_hwi, ctz_hwi, ffs_hwi, exact_log2, floor_log2):
      	Move to hwint.h.
      	* builtins.c, combine.c, config/i386/winnt.c, double-int.c,
      	explow.c, expmed.c, fold-const.c, ggc-page.c, ggc-zone.c, ifcvt.c,
      	ipa-struct-reorg.c, ira-color.c, matrix-reorg.c, omp-low.c,
      	real.c, recog.c, reload.c, rtlanal.c, simplify-rtx.c,
      	stor-layout.c, tree-dfa.c, tree-ssa-alias.c,
      	tree-ssa-loop-niter.c, tree-vect-data-refs.c,
      	tree-vect-loop-manip.c, tree-vect-loop.c, tree-vect-stmts.c,
      	tree-vrp.c: Don't include toplev.h.
      	* genattrtab.c, genconditions.c, genemit.c, genextract.c,
      	genoutput.c, genpeep.c, genpreds.c, genrecog.c: Don't include
      	toplev.h in generated output.
      	* Makefile.in (OBJS-common): Add hwint.o.
      	Dependencies for above files changed to remove toplev.h.
      	(hwint.o): New.
      	(insn-attrtab.o, insn-emit.o, insn-extract.o, insn-output.o,
      	insn-peep.o, insn-preds.o, insn-recog.o): Don't depend on
      	toplev.h.
      	* config/i386/t-cygming (winnt.o): Don't depend on toplev.h.
      	* config/i386/t-interix (winnt.o): Don't depend on toplev.h.
      
      fortran:
      	* trans-common.c: Don't include toplev.h.
      
      java:
      	* boehm.c: Don't include toplev.h.
      	* Make-lang.in (java/boehm.o): Don't depend on toplev.h.
      
      lto:
      	* lto-object.c: Don't include toplev.h.
      	* Make-lang.in (lto/lto-object.o): Don't depend on toplev.h.
      
      From-SVN: r167301
      Joseph Myers committed
  12. 06 Nov, 2010 1 commit
  13. 05 Nov, 2010 1 commit
  14. 09 Oct, 2010 1 commit
    • re PR rtl-optimization/33721 ([meta-bug] Gcc can't properly align stack variable) · 3a42502d
      	PR rtl-opt/33721
      	* explow.c (allocate_dynamic_stack_space): Add REQUIRED_ALIGN parm,
      	remove TARGET parm, convert KNOWN_ALIGN parm to SIZE_ALIGN.  Honor
      	required_align, tidy the code a bit.  Emit split_stack code in the
      	right place.  Mark the return value with the alignment properly.
      	* expr.h (allocate_dynamic_stack_space): Update decl.
      	* builtins.c (expand_builtin_apply): Update call to
      	allocate_dynamic_stack_space.
      	(expand_builtin_alloca): Likewise.  Remove TARGET parameter.
      	* calls.c (initialize_argument_information): Update call to
      	allocate_dynamic_stack_space.
      	(expand_call): Likewise.
      
      	* cfgexpand.c (get_decl_align_unit): Don't limit alignment.
      	Don't update_stack_alignment here.
      	(alloc_stack_frame_space): Make ALIGN unsigned.
      	(stack_var_cmp): Sort by alignment too.
      	(partition_stack_vars): Don't merge large and small alignment vars.
      	(expand_one_stack_var_at): Add BASE and BASE_ALIGN parameters.
      	Take care when BASE is not virtual_stack_vars_rtx.
      	(expand_stack_vars): Allocate dynamic stack space for large
      	alignment variables.
      	(expand_one_stack_var): Update all to expand_one_stack_var_at.
      	(defer_stack_allocation): True for large alignment vars.
      	(update_stack_alignment): Merge into ...
      	(expand_one_var): ... here.
      	(gimple_expand_cfg): Place code from expand_stack_vars.
      
      From-SVN: r165240
      Richard Henderson committed
  15. 27 Sep, 2010 1 commit
    • common.opt (fsplit-stack): New option. · 7458026b
      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
      Ian Lance Taylor committed
  16. 24 Sep, 2010 1 commit
    • re PR middle-end/45234 (ICE in expand_call, at calls.c:2845 when passing aligned… · 32990d5b
      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
      Jakub Jelinek committed
  17. 30 Aug, 2010 1 commit
    • Stack usage support · d3c12306
      	Stack usage support
      	* common.opt (-fstack-usage): New option.
      	* doc/invoke.texi (Debugging options): Document it.
      	* builtins.c (expand_builtin_apply): Pass TRUE as 4th argument to
      	allocate_dynamic_stack_space.
      	(expand_builtin_alloca): Add 4th bool parameter CANNOT_ACCUMULATE
      	and propagate it to allocate_dynamic_stack_space.
      	(expand_builtin) <BUILT_IN_ALLOCA>: Adjust for above change.
      	* calls.c (initialize_argument_information): Pass TRUE as 4th
      	argument to allocate_dynamic_stack_space.
      	(expand_call): Set current_function_has_unbounded_dynamic_stack_size
      	to 1 when pushing a variable-sized argument onto the stack.  Pass
      	TRUE as 4th argument to allocate_dynamic_stack_space.
      	Update current_function_pushed_stack_size.
      	(emit_library_call_value_1): Likewise.
      	* explow.c (allocate_dynamic_stack_space): Add 4th bool parameter
      	CANNOT_ACCUMULATE.  If flag_stack_usage, look into the size and
      	attempt to find an upper bound.  Remove redundant code for the
      	SETJMP_VIA_SAVE_AREA case.
      	* expr.h (allocate_dynamic_stack_space): Add 4th bool parameter.
      	* function.h (struct stack_usage): New structure.
      	(current_function_static_stack_size): New macro.
      	(current_function_dynamic_stack_size): Likewise.
      	(current_function_pushed_stack_size): Likewise.
      	(current_function_dynamic_alloc_count): Likewise.
      	(current_function_has_unbounded_dynamic_stack_size): Likewise.
      	(current_function_allocates_dynamic_stack_space): Likewise.
      	(struct function): Add new field 'su'.
      	* function.c (instantiate_virtual_regs): If SETJMP_VIA_SAVE_AREA,
      	add the value of the dynamic offset to the dynamic stack usage.
      	(gimplify_parameters): Set ALLOCA_FOR_VAR_P on call to BUILT_IN_ALLOCA
      	for variable-sized objects.
      	(prepare_function_start): Allocate cfun->su if flag_stack_usage.
      	(rest_of_handle_thread_prologue_and_epilogue): Call output_stack_usage.
      	* gimplify.c (gimplify_decl_expr): Set ALLOCA_FOR_VAR_P on call to
      	BUILT_IN_ALLOCA for variable-sized objects.
      	* output.h (output_stack_usage): Declare.
      	* toplev.c (stack_usage_file): New file pointer.
      	(output_stack_usage): New function.
      	(open_auxiliary_file): Likewise.
      	(lang_dependent_init): Open file if flag_stack_usage is set.
      	(finalize): Close file if stack_usage_file is not null.
      	* tree.h (ALLOCA_FOR_VAR_P): New macro.
      	* config/alpha/alpha.c (compute_frame_size): New function.
      	(alpha_expand_prologue): Use it.
      	(alpha_start_function): Likewise.
      	(alpha_expand_epilogue): Likewise.  Set stack usage info.
      	* config/i386/i386.c (ix86_expand_prologue): Likewise.
      	* config/ia64/ia64.c (ia64_expand_prologue): Likewise.
      	* config/mips/mips.c (mips_expand_prologue): Likewise.
      	* config/pa/pa.c (hppa_expand_prologue): Likewise.
      	* config/rs6000/rs6000.c (rs6000_emit_prologue): Likewise.
      	* config/sparc/sparc.c (sparc_expand_prologue): Likewise.
      testsuite/
      	* lib/gcc-dg.exp (cleanup-stack-usage): New procedure.
      	* lib/scanasm.exp (scan-stack-usage): Likewise.
      	(scan-stack-usage-not): Likewise.
      	* gcc.dg/stack-usage-1.c: New test.
      	* gcc.target/i386/stack-usage-realign.c: Likewise.
      
      From-SVN: r163660
      Eric Botcazou committed
  18. 05 Aug, 2010 1 commit
    • Replace exact_log2(x & -x) in favor of more direct computation. · bd95721f
      	* toplev.h (ctz_hwi, clz_hwi, ffs_hwi): New.
      	(floor_log2): Use clz_hwi.
      	(exact_log2): Use ctz_hwi.
      	* toplev.c (ctz_hwi, clz_hwi, ffs_hwi): New.
      	* builtins.c (fold_builtin_bitop): Use them.
      	* simplify-rtx.c (simplify_const_unary_operation): Likewise.
      	* combine.c (get_pos_from_mask): Use ctz_hwi.
      	* double-int.c (double_int_ctz): Likewise.
      	* explow.c (force_reg): Likewise.
      	* tree.h (SET_DECL_OFFSET_ALIGN): Use ffs_hwi.
      
      From-SVN: r162920
      Richard Henderson committed
  19. 08 Jul, 2010 1 commit
    • toplev.h: Do not include diagnostic-core.h. · 718f9c0f
      2010-07-08  Manuel López-Ibáñez  <manu@gcc.gnu.org>
      
      	* toplev.h: Do not include diagnostic-core.h.
      	Include diagnostic-core.h in every file that includes toplev.h.
      	* c-tree.h: Do not include toplev.h.
      	* pretty-print.h: Update comment.
      	* Makefile.in: Update dependencies.
      	* alias.c: Include diagnostic-core.h in every file that includes
      	toplev.h.
      	* attribs.c: Likewise.
      	* auto-inc-dec.c: Likewise.
      	* bb-reorder.c: Likewise.
      	* bt-load.c: Likewise.
      	* caller-save.c: Likewise.
      	* calls.c: Likewise.
      	* cfg.c: Likewise.
      	* cfganal.c: Likewise.
      	* cfgbuild.c: Likewise.
      	* cfgcleanup.c: Likewise.
      	* cfghooks.c: Likewise.
      	* cfgloop.c: Likewise.
      	* combine.c: Likewise.
      	* config/alpha/alpha.c: Likewise.
      	* config/arc/arc.c: Likewise.
      	* config/arm/arm.c: Likewise.
      	* config/arm/pe.c: Likewise.
      	* config/avr/avr.c: Likewise.
      	* config/bfin/bfin.c: Likewise.
      	* config/cris/cris.c: Likewise.
      	* config/crx/crx.c: Likewise.
      	* config/darwin-c.c: Likewise.
      	* config/darwin.c: Likewise.
      	* config/fr30/fr30.c: Likewise.
      	* config/frv/frv.c: Likewise.
      	* config/h8300/h8300.c: Likewise.
      	* config/host-darwin.c: Likewise.
      	* config/i386/i386.c: Likewise.
      	* config/i386/netware.c: Likewise.
      	* config/i386/nwld.c: Likewise.
      	* config/i386/winnt-cxx.c: Likewise.
      	* config/i386/winnt-stubs.c: Likewise.
      	* config/i386/winnt.c: Likewise.
      	* config/ia64/ia64-c.c: Likewise.
      	* config/ia64/ia64.c: Likewise.
      	* config/iq2000/iq2000.c: Likewise.
      	* config/lm32/lm32.c: Likewise.
      	* config/m32c/m32c-pragma.c: Likewise.
      	* config/m32c/m32c.c: Likewise.
      	* config/m32r/m32r.c: Likewise.
      	* config/m68hc11/m68hc11.c: Likewise.
      	* config/m68k/m68k.c: Likewise.
      	* config/mcore/mcore.c: Likewise.
      	* config/mep/mep-pragma.c: Likewise.
      	* config/mep/mep.c: Likewise.
      	* config/mmix/mmix.c: Likewise.
      	* config/mn10300/mn10300.c: Likewise.
      	* config/moxie/moxie.c: Likewise.
      	* config/pa/pa.c: Likewise.
      	* config/pdp11/pdp11.c: Likewise.
      	* config/picochip/picochip.c: Likewise.
      	* config/rs6000/rs6000-c.c: Likewise.
      	* config/rs6000/rs6000.c: Likewise.
      	* config/rx/rx.c: Likewise.
      	* config/s390/s390.c: Likewise.
      	* config/score/score.c: Likewise.
      	* config/score/score3.c: Likewise.
      	* config/score/score7.c: Likewise.
      	* config/sh/sh.c: Likewise.
      	* config/sh/symbian-base.c: Likewise.
      	* config/sh/symbian-c.c: Likewise.
      	* config/sh/symbian-cxx.c: Likewise.
      	* config/sol2-c.c: Likewise.
      	* config/sol2.c: Likewise.
      	* config/sparc/sparc.c: Likewise.
      	* config/spu/spu.c: Likewise.
      	* config/stormy16/stormy16.c: Likewise.
      	* config/v850/v850-c.c: Likewise.
      	* config/v850/v850.c: Likewise.
      	* config/vax/vax.c: Likewise.
      	* config/vxworks.c: Likewise.
      	* config/xtensa/xtensa.c: Likewise.
      	* convert.c: Likewise.
      	* cse.c: Likewise.
      	* cselib.c: Likewise.
      	* dbgcnt.c: Likewise.
      	* dbxout.c: Likewise.
      	* ddg.c: Likewise.
      	* dominance.c: Likewise.
      	* emit-rtl.c: Likewise.
      	* explow.c: Likewise.
      	* expmed.c: Likewise.
      	* fixed-value.c: Likewise.
      	* fold-const.c: Likewise.
      	* fwprop.c: Likewise.
      	* gcse.c: Likewise.
      	* ggc-common.c: Likewise.
      	* ggc-page.c: Likewise.
      	* ggc-zone.c: Likewise.
      	* gimple-low.c: Likewise.
      	* gimplify.c: Likewise.
      	* graph.c: Likewise.
      	* haifa-sched.c: Likewise.
      	* ifcvt.c: Likewise.
      	* implicit-zee.c: Likewise.
      	* integrate.c: Likewise.
      	* ira-build.c: Likewise.
      	* ira-color.c: Likewise.
      	* ira-conflicts.c: Likewise.
      	* ira-costs.c: Likewise.
      	* ira-lives.c: Likewise.
      	* ira.c: Likewise.
      	* lists.c: Likewise.
      	* loop-doloop.c: Likewise.
      	* loop-iv.c: Likewise.
      	* lto-opts.c: Likewise.
      	* lto-symtab.c: Likewise.
      	* main.c: Likewise.
      	* modulo-sched.c: Likewise.
      	* optabs.c: Likewise.
      	* params.c: Likewise.
      	* plugin.c: Likewise.
      	* postreload-gcse.c: Likewise.
      	* postreload.c: Likewise.
      	* predict.c: Likewise.
      	* profile.c: Likewise.
      	* real.c: Likewise.
      	* regcprop.c: Likewise.
      	* reginfo.c: Likewise.
      	* regmove.c: Likewise.
      	* reorg.c: Likewise.
      	* resource.c: Likewise.
      	* rtl.c: Likewise.
      	* rtlanal.c: Likewise.
      	* sched-deps.c: Likewise.
      	* sched-ebb.c: Likewise.
      	* sched-rgn.c: Likewise.
      	* sdbout.c: Likewise.
      	* sel-sched-dump.c: Likewise.
      	* sel-sched-ir.c: Likewise.
      	* simplify-rtx.c: Likewise.
      	* stmt.c: Likewise.
      	* stor-layout.c: Likewise.
      	* store-motion.c: Likewise.
      	* targhooks.c: Likewise.
      	* tree-cfg.c: Likewise.
      	* tree-cfgcleanup.c: Likewise.
      	* tree-dump.c: Likewise.
      	* tree-eh.c: Likewise.
      	* tree-inline.c: Likewise.
      	* tree-nomudflap.c: Likewise.
      	* tree-object-size.c: Likewise.
      	* tree-optimize.c: Likewise.
      	* tree-outof-ssa.c: Likewise.
      	* tree-phinodes.c: Likewise.
      	* tree-profile.c: Likewise.
      	* tree-ssa-ccp.c: Likewise.
      	* tree-ssa-coalesce.c: Likewise.
      	* tree-ssa-live.c: Likewise.
      	* tree-ssa-loop-niter.c: Likewise.
      	* tree-ssa-loop-prefetch.c: Likewise.
      	* tree-ssa-loop.c: Likewise.
      	* tree-ssa-structalias.c: Likewise.
      	* tree-ssa-uninit.c: Likewise.
      	* tree-ssa.c: Likewise.
      	* tree-vect-data-refs.c: Likewise.
      	* tree-vect-loop-manip.c: Likewise.
      	* tree-vect-loop.c: Likewise.
      	* tree-vect-patterns.c: Likewise.
      	* tree-vect-stmts.c: Likewise.
      	* tree-vrp.c: Likewise.
      	* varasm.c: Likewise.
      	* vec.c: Likewise.
      	* web.c: Likewise.
      	* xcoffout.c: Likewise.
      
      c-family/
      	* c-common.h: Include diagnostic-core.h. Error if already
      	included.
      	* c-semantics.c: Do not define GCC_DIAG_STYLE here.
      cp/
      	* cp-tree.h: Do not include toplev.h.
      	
      java/
      	* boehm.c: Include diagnostic-core.h in every file that includes
      	toplev.h.
      	* class.c: Likewise.
      	* constants.c: Likewise.
      	* decl.c: Likewise.
      	* except.c: Likewise.
      	* expr.c: Likewise.
      	* jcf-parse.c: Likewise.
      	* mangle.c: Likewise.
      	* mangle_name.c: Likewise.
      	* resource.c: Likewise.
      	* typeck.c: Likewise.
      	* verify-glue.c: Likewise.
      ada/
      	* gcc-interface/utils.c: Include diagnostic-core.h in every file
      	that includes toplev.h.
      lto/
      	* lto-coff.c: Include diagnostic-core.h in every file that
      	includes toplev.h.
      	* lto-elf.c: Likewise.
      	* lto-lang.c: Likewise.
      	* lto-macho.c: Likewise.
      
      From-SVN: r161943
      Manuel López-Ibáñez committed
  20. 02 Jul, 2010 1 commit
    • expr.h (emit_stack_probe): Declare. · 260c8ba3
      	* expr.h (emit_stack_probe): Declare.
      	* explow.c (emit_stack_probe): Make global.
      	(anti_adjust_stack_and_probe): Fix comments.
      	* config/sparc/linux.h (STACK_CHECK_STATIC_BUILTIN): Define to 1.
      	* config/sparc/linux64.h (STACK_CHECK_STATIC_BUILTIN): Likewise.
      	* config/sparc/sol2.h (STACK_CHECK_STATIC_BUILTIN): Likewise.
      	* config/sparc/sparc.c: Include except.h.
      	(sparc_emit_probe_stack_range): New function.
      	(output_probe_stack_range): Likewise.
      	(sparc_expand_prologue): Invoke sparc_emit_probe_stack_range if static
      	built-in stack checking is enabled.
      	* config/sparc/sparc-protos.h (output_probe_stack_range): Declare.
      	* config/sparc/sparc.md (UNSPECV_PROBE_STACK_RANGE): New constant.
      	(probe_stack_range): New insn.
      
      From-SVN: r161749
      Eric Botcazou committed
  21. 26 May, 2010 1 commit
  22. 13 Dec, 2009 1 commit
  23. 10 Nov, 2009 2 commits
    • re PR target/10127 (-fstack-check let's program crash) · c35af30f
      	PR target/10127
      	PR ada/20548
      	* expr.h (anti_adjust_stack_and_probe): Declare.
      	* explow.c (anti_adjust_stack_and_probe): Make global, add ADJUST_BACK
      	parameter and rewrite head comment.
      	(allocate_dynamic_stack_space): Adjust call to above function.
      	* function.c (expand_function_end): Handle STACK_CHECK_MOVING_SP.
      
      	* tree.h (dwarf2out_args_size): Delete.
      	* dwarf2out.c (dwarf2out_args_size): Make static and move around.
      	(dwarf2out_args_size_adjust): Delete prototype and move around.
      	(dwarf2out_frame_debug_expr): Do not record arg size adjustments for
      	ACCUMULATE_OUTGOING_ARGS targets.
      
      From-SVN: r154079
      Eric Botcazou committed
    • re PR middle-end/20548 (ACATS c52103x c52104x c52104y segfault) · 949fa04c
      	PR ada/20548
      	* explow.c (probe_stack_range): Fix typo.
      	* config/sparc/sparc.md (probe_stack): New expander.
      
      From-SVN: r154061
      Eric Botcazou committed
  24. 03 Nov, 2009 1 commit
    • re PR target/10127 (-fstack-check let's program crash) · d809253a
      	PR target/10127
      	PR ada/20548
      	* expr.h (STACK_CHECK_PROBE_INTERVAL): Delete.
      	(STACK_CHECK_PROBE_INTERVAL_EXP): New macro.
      	(STACK_CHECK_MOVING_SP): Likewise.
      	* system.h (STACK_CHECK_PROBE_INTERVAL): Poison it.
      	* doc/tm.texi (Stack Checking): Delete STACK_CHECK_PROBE_INTERVAL.
      	Document STACK_CHECK_PROBE_INTERVAL_EXP and STACK_CHECK_MOVING_SP.
      	* doc/md.texi (Standard Pattern Names): Tweak entry of CHECK_STACK.
      	Document PROBE_STACK.
      	* explow.c (anti_adjust_stack_and_probe): New function.
      	(allocate_dynamic_stack_space): Do not directly allocate space if
      	STACK_CHECK_MOVING_SP, instead invoke above function.
      	(emit_stack_probe): Handle probe_stack insn.
      	(PROBE_INTERVAL): New macro.
      	(STACK_GROW_OPTAB): Likewise.
      	(STACK_GROW_OFF): Likewise.
      	(probe_stack_range): Use Pmode and memory_address consistently.  Fix
      	loop condition in the small constant case.  Rewrite in the general
      	case to be immune to wraparounds.  Make sure the address of probes
      	is valid.  Try to use [base + disp] addressing mode if possible.
      	* ira.c (setup_eliminable_regset): Set frame_pointer_needed if stack
      	checking is enabled and STACK_CHECK_MOVING_SP.
      	* rtlanal.c (may_trap_p_1) <MEM>: If stack checking is enabled,
      	return 1 for volatile references to the stack pointer.
      	* tree.c (build_common_builtin_nodes): Do not set ECF_NOTHROW on
      	__builtin_alloca if stack checking is enabled.
      	* unwind-dw2.c (uw_identify_context): Take into account whether the
      	context is that of a signal frame or not.
      	* config/i386/linux.h (STACK_CHECK_MOVING_SP): Define to 1.
      	* config/i386/linux64.h (STACK_CHECK_MOVING_SP): Likewise.
      
      From-SVN: r153877
      Eric Botcazou committed
  25. 26 Oct, 2009 2 commits
    • tm.texi (TARGET_ADDR_SPACE_POINTER_MODE): Document. · d4ebfa65
      2009-10-26  Ben Elliston  <bje@au.ibm.com>
      	    Michael Meissner  <meissner@linux.vnet.ibm.com>
      	    Ulrich Weigand  <uweigand@de.ibm.com>
      
      	* doc/tm.texi (TARGET_ADDR_SPACE_POINTER_MODE): Document.
      	(TARGET_ADDR_SPACE_ADDRESS_MODE): Likewise.
      	(TARGET_ADDR_SPACE_VALID_POINTER_MODE): Likewise.
      
      	* target.h (struct target_def): Add pointer_mode, address_mode,
      	and valid_pointer_mode to addr_space substructure.
      	* target-def.h (TARGET_ADDR_SPACE_POINTER_MODE): Define.
      	(TARGET_ADDR_SPACE_ADDRESS_MODE): Likewise.
      	(TARGET_ADDR_SPACE_VALID_POINTER_MODE): Likewise.
      	(TARGET_ADDR_SPACE_HOOKS): Add them.
      	* targhooks.c (target_default_pointer_address_modes_p): New function.
      	* target.h (target_default_pointer_address_modes_p): Add prototype.
      	* targhooks.c (default_addr_space_pointer_mode): New function.
      	(default_addr_space_address_mode): Likewise.
      	(default_addr_space_valid_pointer_mode): Likewise.
      	* targhooks.h (default_addr_space_pointer_mode): Add prototype.
      	(default_addr_space_address_mode): Likewise.
      	(default_addr_space_valid_pointer_mode): Likewise.
      	* output.h (default_valid_pointer_mode): Move to ...
      	* targhooks.h (default_valid_pointer_mode): ... here.
      	* varasm.c (default_valid_pointer_mode): Move to ...
      	* targhooks.c (default_valid_pointer_mode): ... here.
      
      	* varasm.c (output_constant): Use targetm.addr_space.valid_pointer_mode
      	instead of targetm.valid_pointer_mode.
      
      	* fold-const.c (fit_double_type): Use int_or_pointer_precision.
      	* tree.c (integer_pow2p): Likewise.
      	(tree_log2): Likewise.
      	(tree_floor_log2): Likewise.
      	(signed_or_unsigned_type_for): Support pointer type of different size.
      	(int_or_pointer_precision): New function.
      	* tree.h (int_or_pointer_precision): Add prototype.
      	* stor-layout.c (layout_type): Set TYPE_PRECISION for offset types.
      	* varasm.c (initializer_constant_valid_p): Use TYPE_PRECISION of
      	incoming pointer type instead of POINTER_SIZE.
      
      	* tree.c (build_pointer_type): Use appropriate pointer mode
      	instead of ptr_mode.
      	(build_reference_type): Likewise.
      	* expr.c (store_expr): Likewise.
      	(expand_expr_addr_expr): Likewise.
      	* tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
      	* cfgexpand.c (expand_debug_expr): Likewise.
      	
      	* auto-inc-dec.c: Include "target.h".
      	(try_merge): Use appropriate address mode instead of Pmode.
      	(find_inc): Likewise.
      	* combine.c (find_split_point): Likewise.
      	* cselib.c (cselib_record_sets): Likewise.
      	* dse.c (replace_inc_dec): Likewise.
      	(canon_address): Likewise.
      	* var-tracking.c (replace_expr_with_values): Likewise.
      	(count_uses): Likewise.
      	(add_uses): Likewise.
      	(add_stores): Likewise.
      	* emit-rtl.c: Include "target.h".
      	(adjust_address_1): Use appropriate address mode instead of Pmode.
      	(offset_address): Likewise.
      	* explow.c (break_out_memory_refs): Likewise.
      	(memory_address_addr_space): Likewise.
      	(promote_mode): Likewise.
      	* expr.c (move_by_pieces): Likewise.
      	(emit_block_move_via_loop): Likewise.
      	(store_by_pieces): Likewise.
      	(store_by_pieces_1): Likewise.
      	(expand_assignment): Likewise.
      	(store_constructor): Likewise.
      	(expand_expr_addr_expr): Likewise.
      	(expand_expr_real_1): Likewise.
      	* cfgexpand.c (expand_debug_expr): Likewise.
      	* ifcvt.c (noce_try_cmove_arith): Likewise.
      	* regcprop.c (kill_autoinc_value): Likewise.
      	* regmove.c (try_auto_increment): Likewise.
      	* reload.c (find_reloads): Likewise.
      	(find_reloads_address): Likewise.
      	(find_reloads_address_1): Likewise.
      	* sched-deps.c: Include "target.h".
      	(sched_analyze_1): Use appropriate address mode instead of Pmode.
      	(sched_analyze_2): Likewise.
      	* sel-sched-dump.c: Include "target.h".
      	(debug_mem_addr_value): Use appropriate address mode instead of Pmode.
      	* stor-layout.c (layout_type): Likewise.
      	* tree-ssa-loop-ivopts.c (produce_memory_decl_rtl): Likewise.
      	(multiplier_allowed_in_address_p): Likewise.
      	(get_address_cost): Likewise.
      	* varasm.c (make_decl_rtl): Likewise.
      	
      	* expr.c (expand_assignment): Always convert offsets to appropriate
      	address mode.
      	(store_expr): Likewise.
      	(store_constructor): Likewise.
      	(expand_expr_real_1): Likewise.
      
      	* reload.h (form_sum): Add MODE argument.
      	* reload.c (form_sum): Add MODE argument, use it instead of Pmode.
      	Update recursive calls.
      	(subst_indexed_address): Update calls to form_sum.
      	
      	* tree-flow.h (addr_for_mem_ref): Add ADDRSPACE argument.
      	* tree-ssa-address.c: Include "target.h".
      	(templates): Replace by ...
      	(mem_addr_template_list): ... this new vector.
      	(TEMPL_IDX): Handle address space numbers.
      	(gen_addr_rtx): Add address mode argument, use it instead of Pmode.
      	(addr_for_mem_ref): Add ADDRSPACE argument.  Use per-address-space
      	instead of global cache.  Update call to gen_addr_rtx.
      	(valid_mem_ref_p): Update call to addr_for_mem_ref.
      	* expr.c (expand_expr_real_1): Update call to addr_for_mem_ref.
      	
      	* rtl.h (convert_memory_address_addr_space): Add prototype.
      	(convert_memory_address): Define as macro.
      	* explow.c (convert_memory_address): Rename to ...
      	(convert_memory_address_addr_space): ... this.  Add ADDRSPACE argument.
      	Use appropriate pointer and address modes instead of ptr_mode / Pmode.
      	Update recursive calls.
      	(memory_address_addr_space): Call convert_memory_address_addr_space.
      	* expmed.c (make_tree): Likewise.
      	* expr.c (expand_assignment): Likewise.
      	(expand_expr_addr_expr_1): Likewise.  Also, add ADDRSPACE argument.
      	(expand_expr_addr_expr): Likewise.  Also, update call.
      
      	* alias.c (find_base_value): Guard pointer size optimizations.
      	(find_base_term): Likewise.
      	* rtlanal.c (nonzero_bits1): Likewise.
      	(num_sign_bit_copies1): Likewise.
      	* simplify-rtx.c (simplify_unary_operation_1): Likewise.
      
      	* Makefile.in (tree-ssa-address.o): Add $(TARGET_H) dependency.
      	(emit-rtl.o): Likewise.
      	(auto-inc-dec.o): Likewise.
      	(sched-deps.o): Likewise.
      
      Co-Authored-By: Michael Meissner <meissner@linux.vnet.ibm.com>
      Co-Authored-By: Ulrich Weigand <uweigand@de.ibm.com>
      
      From-SVN: r153573
      Ben Elliston committed
    • extend.texi (Named Address Spaces): New section. · 09e881c9
      2009-10-26  Ben Elliston  <bje@au.ibm.com>
      	    Michael Meissner  <meissner@linux.vnet.ibm.com>
      	    Ulrich Weigand  <uweigand@de.ibm.com>
      
      	* doc/extend.texi (Named Address Spaces): New section.
      	* coretypes.h (addr_space_t): New type.
      	(ADDR_SPACE_GENERIC): New define.
      	(ADDR_SPACE_GENERIC_P): New macro.
      
      	* doc/tm.texi (Named Address Spaces): New section.
      	(TARGET_ADDR_SPACE_LEGITIMATE_ADDRESS_P): Document.
      	(TARGET_ADDR_SPACE_LEGITIMIZE_ADDRESS): Document.
      	(TARGET_ADDR_SPACE_SUBSET_P): Document.
      	(TARGET_ADDR_SPACE_CONVERT): Document.
      	* target.h (struct gcc_target): Add addr_space substructure.
      	* target-def.h (TARGET_ADDR_SPACE_LEGITIMATE_ADDRESS_P): Define.
      	(TARGET_ADDR_SPACE_LEGITIMIZE_ADDRESS): Likewise.
      	(TARGET_ADDR_SPACE_SUBSET_P): Likewise.
      	(TARGET_ADDR_SPACE_CONVERT): Likewise.
      	(TARGET_ADDR_SPACE_HOOKS): Likewise.
      	(TARGET_INITIALIZER): Initialize addr_space hooks.
      	* targhooks.c (default_addr_space_legitimate_address_p): New function.
      	(default_addr_space_legitimize_address): Likewise.
      	(default_addr_space_subset_p): Likewise.
      	(default_addr_space_convert): Likewise.
      	* targhooks.h (default_addr_space_legitimate_address_p): Add prototype.
      	(default_addr_space_legitimize_address): Likewise.
      	(default_addr_space_subset_p): Likewise.
      	(default_addr_space_convert): Likewise.
      
      	* doc/rtl.texi (MEM_ADDR_SPACE): Document.
      	* rtl.h (mem_attrs): Add ADDRSPACE memory attribute.
      	(MEM_ADDR_SPACE): New macro.
      	* emit-rtl.c (get_mem_attrs): Add ADDRSPACE argument and set
      	address space memory attribute.
      	(mem_attrs_htab_hash): Handle address space memory attribute.
      	(mem_attrs_htab_eq): Likewise.
      	(set_mem_attributes_minus_bitpos): Likewise.
      	(set_mem_alias_set): Likewise.
      	(set_mem_align): Likewise.
      	(set_mem_expr): Likewise.
      	(set_mem_offset): Likewise.
      	(set_mem_size): Likewise.
      	(adjust_address_1): Likewise.
      	(offset_address): Likewise.
      	(widen_memoy_address): Likewise.
      	(get_spill_slot_decl): Likewise.
      	(set_mem_attrs_for_spill): Likewise.
      	(set_mem_addr_space): New function.
      	* emit-rtl.h (set_mem_addr_space): Add prototype.
      	* print-rtl.c (print_rtx): Print address space memory attribute.
      	* expr.c (expand_assignment): Set address space memory attribute
      	of generated MEM RTXes as appropriate.
      	(expand_expr_real_1): Likewise.
      	* cfgexpand.c (expand_debug_expr): Likewise.
      	* tree-ssa-loop-ivopts.c (produce_memory_decl_rtl): Likewise.
      
      	* tree.h (struct tree_base): Add address_space bitfield.  Reduce
      	size of "spare" bitfield.
      	(TYPE_ADDR_SPACE): New macro.
      	(ENCODE_QUAL_ADDR_SPACE): Likewise.
      	(DECODE_QUAL_ADDR_SPACE): Likewise.
      	(CLEAR_QUAL_ADDR_SPACE): Likewise.
      	(KEEP_QUAL_ADDR_SPACE): Likewise.
      	(TYPE_QUALS): Encode type address space.
      	(TYPE_QUALS_NO_ADDR_SPACE): New macro.
      	* tree.c (set_type_quals): Set type address space.
      	(build_array_type): Inherit array address space from element type.
      	* print-tree.c (print_node_brief): Print type address space.
      	(print_node): Likewise.
      	* tree-pretty-print.c (dump_generic_node): Likewise.
      
      	* explow.c (memory_address): Rename to ...
      	(memory_address_addr_space): ... this.  Add ADDRSPACE argument.
      	Use address-space aware variants of memory address routines.
      	* recog.c (memory_address_p): Rename to ...
      	(memory_address_addr_space_p): ... this.  Add ADDSPACE argument.
      	Use address-space aware variants of memory address routines.
      	(offsettable_address_p): Rename to ...
      	(offsettable_address_addr_space_p): ... this.  Add ADDRSPACE argument.
      	Use address-space aware variants of memory address routines.
      	* reload.c (strict_memory_address_p): Rename to ...
      	(strict_memory_address_addr_space_p): ... this.  Add ADDSPACE argument.
      	Use address-space aware variants of memory address routines.
      	(maybe_memory_address_p): Rename to ...
      	(maybe_memory_address_addr_space_p): ... this.  Add ADDSPACE argument.
      	Use address-space aware variants of memory address routines.
      	* expr.h (memory_address_addr_space): Add prototype.
      	(memory_address): Define as macro.
      	* recog.h (memory_address_addr_space_p): Add prototype.
      	(memory_address_p): Define as macro.
      	(offsettable_address_addr_space_p): Add prototype.
      	(offsettable_address_p): Define as macro.
      	(strict_memory_address_addr_space_p): Add prototype.
      	(strict_memory_address_p): Define as macro.
      
      	* combine.c (find_split_point): Use address-space aware variants
      	of memory address routines.
      	* emit-rtl.c (operand_subword): Likewise.
      	(change_address_1): Likewise.
      	(adjust_address_1): Likewise.
      	(offset_address): Likewise.
      	* expr.c (emit_move_insn): Likewise.
      	(expand_assignment): Likewise.
      	(expand_expr_real_1): Likewise.
      	* recog.c (verify_changes): Likewise.
      	(general_operand): Likewise.
      	(offsettable_memref_p): Likewise.
      	(offsettable_nonstrict_memref_p): Likewise.
      	(constrain_operands): Likewise.
      	* reload.c (get_secondary_mem): Likewise.
      	(find_reloads_toplev): Likewise.
      	(find_reloads_address): Likewise.
      	(find_reloads_subreg_address): Likewise.
      	* reload1.c (reload): Likewise.
      	* rtlhooks.c (gen_lowpart_if_possible): Likewise.
      	* rtl.h (address_cost): Add ADDRSPACE argument.
      	* rtlanal.c (address_cost): Add ADDRSPACE argument.  Use address-space
      	aware variant of memory address routines.
      	* loop-invariant.c (create_new_invariant): Update address_cost call.
      	* tree-ssa-loop-ivopts.c (computation_cost): Likewise.
      	* fwprop.c (should_replace_address): Add ADDRSPACE argument.
      	Use address-space aware variant of memory address routines.
      	(propagate_rtx_1): Update call to should_replace_address.
      	* tree-flow.h (multiplier_allowed_in_address_p): Add ADDRSPACE
      	argument.
      	* tree-ssa-loop-ivopts.c (multiplier_allowed_in_address_p): Add
      	ADDRSPACE argument.  Use per-address-space instead of global cache.
      	Use address-space aware variant of memory address routines.
      	(get_address_cost): Likewise.
      	(get_computation_cost_at): Update calls.
      	* tree-ssa-address.c (valid_mem_ref_p): Add ADDRSPACE argument.
      	Use address-space aware variant of memory address routines.
      	(create_mem_ref_raw): Update call to valid_mem_ref_p.
      	(most_expensive_mult_to_index): Update call to
      	multiplier_allowed_in_address_p.
      
      	* dwarf2out.c (modified_type_die): Output DW_AT_address_class
      	attribute to indicate named address spaces.
      
      	* varasm.c (get_variable_section): DECLs in named address spaces
      	cannot be "common".
      
      	* reload.c (find_reloads_address): Do not use LEGITIMIZE_RELOAD_ADDRESS
      	for addresses in a non-generic address space.
      
      	* expr.c (emit_block_move_hints): Do not use libcalls for
      	memory in non-generic address spaces.
      	(clear_storage_hints): Likewise.
      	(expand_assignment): Likewise.
      
      	* fold-const.c (operand_equal_p): Expressions refering to different
      	address spaces are not equivalent.
      
      	* rtl.c (rtx_equal_p_cb): MEMs refering to different address
      	spaces are not equivalent.
      	(rtx_equal_p): Likewise.
      	* cse.c (exp_equiv_p): Likewise.
      	* jump.c (rtx_renumbered_equal_p): Likewise.
      	* reload.c (operands_match_p): Likewise.
      
      	* alias.c (nonoverlapping_memrefs_p): MEMs refering to different
      	address spaces may alias.
      	(true_dependence): Likewise.
      	(canon_true_dependence): Likewise.
      	(write_dependence_p): Likewise.
      
      	* dse.c (canon_address): Handle named address spaces.
      	* ifcvt.c (noce_try_cmove_arith): Likewise.
      
      	* tree.def (ADDR_SPACE_CONVERT_EXPR): New tree code.
      	* expr.c (expand_expr_real_2): Expand ADDR_SPACE_CONVERT_EXPR.
      	* convert.c (convert_to_pointer): Generate ADDR_SPACE_CONVERT_EXPR
      	to handle conversions between different address spaces.
      	* fold-const.c (fold_convert_loc): Likewise.
      	(fold_unary_loc): Handle ADDR_SPACE_CONVERT_EXPR.
      	* tree-pretty-print.c (dump_generic_node): Likewise.
      	* gimple-pretty-print.c (dump_unary_rhs): Likewise.
      	* tree-cfg.c (verify_gimple_assign_unary): Likewise.
      	* tree-inline.c (estimate_operator_cost): Likewise.
      	* tree-ssa.c (useless_type_conversion_p): Conversions between pointers
      	to different address spaces are not useless.
      
      Co-Authored-By: Michael Meissner <meissner@linux.vnet.ibm.com>
      Co-Authored-By: Ulrich Weigand <uweigand@de.ibm.com>
      
      From-SVN: r153572
      Ben Elliston committed
  26. 01 Sep, 2009 1 commit
    • tree.c (tree_expr_size): New function. · 71c00b5c
      2009-09-01  Richard Guenther  <rguenther@suse.de>
      
      	* tree.c (tree_expr_size): New function.
      	* tree.h (tree_expr_size): Declare.
      	* rtlanal.c (rtx_addr_can_trap_p_1): Adjust comment.
      	* builtins.c (fold_builtin_memory_op): Use tree_expr_size.
      	* langhooks.c (lhd_expr_size): Remove.
      	* langhooks.h (struct lang_hooks): Remove expr_size.
      	* explow.c (expr_size): Use tree_expr_size.
      	(int_expr_size): Likewise.
      	* langhooks-def.h (lhd_expr_size): Remove.
      	(LANG_HOOKS_EXPR_SIZE): Likewise.
      	(LANG_HOOKS_INITIALIZER): Adjust.
      
      	cp/
      	* cp-objcp-common.c (cp_expr_size): Use tree_expr_size.
      	* cp-objcp-common.h (LANG_HOOKS_EXPR_SIZE): Do not define.
      
      From-SVN: r151261
      Richard Guenther committed
  27. 12 Aug, 2009 1 commit
    • tm.texi (TARGET_PROMOTE_FUNCTION_MODE): Add documentation for for_return == 2. · 666e3ceb
      2009-08-12  Paolo Bonzini  <bonzini@gnu.org>
      
      	* doc/tm.texi (TARGET_PROMOTE_FUNCTION_MODE): Add documentation
      	for for_return == 2.
      	* function.c (assign_parm_setup_reg): Use for_return == 2, improve
      	comments.
      	* calls.c (expand_call): Fix typo.
      	* explow.c (promote_decl_mode): Use for_return == 2 for RESULT_DECL
      	and PARM_DECL.
      	* stmt.c (expand_value_return): Use promote_function_mode to copy out
      	of pseudo.
      	* targhooks.c (default_promote_function_mode): Handle for_return == 2.
      	* config/cris/cris.c (cris_promote_function_mode): Likewise.
      	* config/mmix/mmix.c (mmix_promote_function_mode): Likewise.
      	* config/pa/pa.c (pa_promote_function_mode): Likewise.
      
      From-SVN: r150700
      Paolo Bonzini committed
  28. 06 Aug, 2009 1 commit
  29. 03 Aug, 2009 1 commit
  30. 02 Aug, 2009 1 commit
  31. 01 Aug, 2009 1 commit
    • expr.c (store_constructor): Use promote_decl_mode. · cde0f3fd
      2009-04-17  Paolo Bonzini  <bonzini@gnu.org>
      
      	* expr.c (store_constructor): Use promote_decl_mode.  Remove
      	now write-only variable unsignedp.
      	(expand_expr_real_1): Use promote_decl_mode.
      	* expr.h (promote_function_mode, promote_decl_mode): New.
      	(promote_mode): Remove last argument.
      	* function.c (assign_temp): Drop last argument of promote_mode.
      	(assign_parm_find_data_types): Use promote_function_mode.
      	(assign_parm_setup_reg): Likewise.
      	(expand_function_end): Use promote_function_mode.
      	* calls.c (initialize_argument_information): Use promote_function_mode.
      	(precompute_arguments): Use promote_mode instead of checking if
      	only PROMOTE_FUNCTION_MODE is defined.
      	(expand_call): When making sibcall decisions, use promote_function_mode.
      	Below, remove an if for targetm.calls.promote_function_return and
      	and use promote_function_mode.
      	(emit_library_call_value_1): Use promote_function_mode, fix bug
      	where promote_mode was passed FOR_CALL == 0 for a return value in an
      	assertion.
      	* cfgexpand.c (expand_one_register_var): Use promote_decl_mode.
      	* explow.c (promote_function_mode, promote_decl_mode): New.
      	(promote_mode): Keep only the FOR_CALL == 0 case.
      	* combine.c (setup_incoming_promotion): Remove test of
      	promote_function_args.  Use promote_function_mode.
      	* stmt.c (expand_value_return): Use promote_decl_mode.
      	(expand_decl): Use promote_decl_mode.
      
      	* expr.c (store_constructor): Use promote_decl_mode.  Remove
      	now write-only variable unsignedp.
      	(expand_expr_real_1): Use promote_decl_mode.
      	* expr.h (promote_function_mode, promote_decl_mode): New.
      	(promote_mode): Remove last argument.
      	* function.c (assign_temp): Drop last argument of promote_mode.
      	(assign_parm_find_data_types): Use promote_function_mode.
      	(assign_parm_setup_reg): Likewise.
      	(expand_function_end): Use promote_function_mode.
      	* calls.c (initialize_argument_information): Use promote_function_mode.
      	(precompute_arguments): Use promote_mode instead of checking if
      	only PROMOTE_FUNCTION_MODE is defined.
      	(expand_call): When making sibcall decisions, use promote_function_mode.
      	Below, remove an if for targetm.calls.promote_function_return and
      	and use promote_function_mode.
      	(emit_library_call_value_1): Use promote_function_mode, fix bug
      	where promote_mode was passed FOR_CALL == 0 for a return value in an
      	assertion.
      	* cfgexpand.c (expand_one_register_var): Use promote_decl_mode.
      	* explow.c (promote_function_mode, promote_decl_mode): New.
      	(promote_mode): Keep only the FOR_CALL == 0 case.
      	* combine.c (setup_incoming_promotion): Remove test of
      	promote_function_args.  Use promote_function_mode.
      	* stmt.c (expand_value_return): Use promote_decl_mode.
      	(expand_decl): Use promote_decl_mode.
      
      	* explow.c (promote_function_mode): Just call the target hook.
      	* targhooks.c (default_promote_function_mode,
      	default_promote_function_mode_always_promote): New.
      	* targhooks.h (default_promote_function_mode,
      	default_promote_function_mode_always_promote): Declare.
      	* target.h (promote_function_args, promote_function_return): Remove.
      	(promote_function_mode): New.
      	* target-def.h (TARGET_PROMOTE_FUNCTION_ARGS,
      	TARGET_PROMOTE_FUNCTION_RETURN): Remove.
      	(TARGET_PROMOTE_FUNCTION_MODE): New.
      	(TARGET_CALLS): Adjust.
      	* system.h (TARGET_PROMOTE_FUNCTION_ARGS,
      	TARGET_PROMOTE_FUNCTION_RETURN, PROMOTE_FUNCTION_MODE): Poison.
      
      	* config/s390/s390.h (PROMOTE_FUNCTION_MODE): Move...
      	* config/s390/s390.c (s390_promote_function_mode): ... here,
      	with pointer handling.
      	(TARGET_PROMOTE_FUNCTION_MODE): Define.
      	(TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Remove.
      
      	* config/sparc/sparc.h (PROMOTE_FUNCTION_MODE): Move...
      	* config/sparc/sparc.c (sparc_promote_function_mode): ... here,
      	with pointer handling.
      	(TARGET_PROMOTE_FUNCTION_MODE): Define.
      	(TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Remove.
      	
      	* config/sh/sh-protos.h (sh_promote_function_mode): New.
      	* config/sh/sh.c (sh_promote_function_mode): New.
      	(TARGET_PROMOTE_FUNCTION_MODE): Define.
      	(TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Remove.
      
      	* config/cris/cris.h (PROMOTE_FUNCTION_MODE): Move...
      	* config/cris/cris.c (cris_promote_function_mode): ... here.
      	(TARGET_PROMOTE_FUNCTION_MODE): Define.
      	(TARGET_PROMOTE_FUNCTION_ARGS): Remove.
      
      	* config/mmix/mmix.h (PROMOTE_FUNCTION_MODE): Move...
      	* config/mmix/mmix.c (mmix_promote_function_mode): ... here.
      	(TARGET_PROMOTE_FUNCTION_MODE): Define.
      	(TARGET_PROMOTE_FUNCTION_ARGS): Remove.
      
      	* config/arm/arm.h (PROMOTE_FUNCTION_MODE): Move...
      	* config/arm/arm.c (arm_promote_function_mode): ... here, without complex
      	type handling.
      	(TARGET_PROMOTE_FUNCTION_MODE): Define.
      	(TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Remove.
      
      	* config/pa/pa.c (pa_promote_function_mode): New.
      	(TARGET_PROMOTE_FUNCTION_MODE): Define.
      	(TARGET_PROMOTE_FUNCTION_RETURN): Remove.
      
      	* config/alpha/alpha.c (TARGET_PROMOTE_FUNCTION_ARGS,
      	TARGET_PROMOTE_FUNCTION_RETURN): Remove.
      	(TARGET_PROMOTE_FUNCTION_MODE): Define equivalently.
      	* config/xtensa/xtensa.c: Likewise.
      	* config/stormy16/stormy16.c: Likewise.
      	* config/iq2000/iq2000.c: Likewise.
      	* config/rs6000/rs6000.c: Likewise.
      	* config/picochip/picochip.c: Likewise.
      	* config/arc/arc.c: Likewise.
      	* config/mcore/mcore.c: Likewise.
      	* config/score/score.c: Likewise.
      	* config/mips/mips.c: Likewise.
      	* config/bfin/bfin.c: Likewise.
      	* config/ia64/ia64.c: Likewise (disabled though).
      
      	* config/frv/frv.h: Remove pointless remark.
      
      	* doc/tm.texi (PROMOTE_FUNCTION_MODE,
      	TARGET_PROMOTE_FUNCTION_ARGS,
      	TARGET_PROMOTE_FUNCTION_RETURN): Consolidate into...
      	(TARGET_PROMOTE_FUNCTION_MODE): ... this.
      
      From-SVN: r150336
      Paolo Bonzini committed
  32. 22 Jun, 2009 1 commit
    • alias.c: Use REG_P... · 481683e1
      2009-06-22  Shujing Zhao  <pearly.zhao@oracle.com>
      
      	* alias.c: Use REG_P, MEM_P, CONST_INT_P, LABEL_P, CALL_P, NOTE_P and
      	JUMP_TABLE_DATA_P predicates where applicable.
      	* auto-inc-dec.c: Ditto.
      	* builtins.c: Ditto.
      	* caller-save.c: Ditto.
      	* calls.c: Ditto.
      	* cfgcleanup.c: Ditto.
      	* cfglayout.c: Ditto.
      	* cfgrtl.c: Ditto.
      	* combine.c: Ditto.
      	* combine-stack-adj.c: Ditto.
      	* cse.c: Ditto.
      	* cselib.c: Ditto.
      	* dbxout.c: Ditto.
      	* df-scan.c: Ditto.
      	* dse.c: Ditto.
      	* dwarf2asm.c: Ditto.
      	* dwarf2out.c: Ditto.
      	* emit-rtl.c: Ditto.
      	* except.c: Ditto.
      	* explow.c: Ditto.
      	* expmed.c: Ditto.
      	* expr.c: Ditto.
      	* final.c: Ditto.
      	* function.c: Ditto.
      	* fwprop.c: Ditto.
      	* gcse.c: Ditto.
      	* genpreds.c: Ditto.
      	* genrecog.c: Ditto.
      	* ifcvt.c: Ditto.
      	* ira-costs.c: Ditto.
      	* ira-lives.c: Ditto.
      	* jump.c: Ditto.
      	* loop-iv.c: Ditto.
      	* lower-subreg.c: Ditto.
      	* modulo-sched.c: Ditto.
      	* optabs.c: Ditto.
      	* postreload.c: Ditto.
      	* print-rtl.c: Ditto.
      	* recog.c: Ditto.
      	* reginfo.c: Ditto.
      	* regmove.c: Ditto.
      	* reload1.c: Ditto.
      	* reload.c: Ditto.
      	* reorg.c: Ditto.
      	* rtlanal.c: Ditto.
      	* rtl.c: Ditto.
      	* sched-vis.c: Ditto.
      	* sdbout.c: Ditto.
      	* sel-sched-ir.c: Ditto.
      	* simplify-rtx.c: Ditto.
      	* targhooks.c: Ditto.
      	* var-tracking.c: Ditto.
      	* vmsdbgout.c: Ditto.
      
      From-SVN: r148786
      Shujing Zhao committed
  33. 04 May, 2009 1 commit
    • tm.texi (LEGITIMIZE_ADDRESS): Revise documentation. · 506d7b68
      2009-05-04  Paolo Bonzini  <bonzini@gnu.org>
      
       	* doc/tm.texi (LEGITIMIZE_ADDRESS): Revise documentation.
      	* gcc/defaults.h (LEGITIMIZE_ADDRESS): Delete.
      	* gcc/explow.c (memory_address): Use target hook.
      	* gcc/targhooks.c (default_legitimize_address): New.
      	* gcc/targhooks.h (default_legitimize_address): New.
      	* gcc/target.h (legitimize_address): New.
      	* gcc/target-def.h (TARGET_LEGITIMIZE_ADDRESS): New.
      	(TARGET_INITIALIZER): Include it.
      	* gcc/system.h (LEGITIMIZE_ADDRESS): Poison.
      
      	* config/bfin/bfin-protos.h (legitimize_address): Remove.
      	* config/bfin/bfin.c (legitimize_address): Remove.
      	* config/bfin/bfin.h (LEGITIMIZE_ADDRESS): Remove.
      	* config/m68hc11/m68hc11-protos.h (m68hc11_legitimize_address): Remove.
      	* config/m68hc11/m68hc11.c (m68hc11_legitimize_address): Remove.
      	* config/m68hc11/m68hc11.h (LEGITIMIZE_ADDRESS): Remove.
      
      	* gcc/config/arm/arm.h (LEGITIMIZE_ADDRESS, ARM_LEGITIMIZE_ADDRESS,
      	THUMB_LEGITIMIZE_ADDRESS, THUMB2_LEGITIMIZE_ADDRESS): Delete.
      	* gcc/config/s390/s390.h (LEGITIMIZE_ADDRESS): Delete.
      	* gcc/config/m32c/m32c.h (LEGITIMIZE_ADDRESS): Delete.
      	* gcc/config/sparc/sparc.h (LEGITIMIZE_ADDRESS): Delete.
      	* gcc/config/m32r/m32r.h (LEGITIMIZE_ADDRESS): Delete.
      	* gcc/config/i386/i386.h (LEGITIMIZE_ADDRESS): Delete.
      	* gcc/config/sh/sh.h (LEGITIMIZE_ADDRESS): Delete.
      	* gcc/config/avr/avr.h (LEGITIMIZE_ADDRESS): Delete.
      	* gcc/config/m68hc11/m68hc11.h (LEGITIMIZE_ADDRESS): Delete.
      	* gcc/config/iq2000/iq2000.h (LEGITIMIZE_ADDRESS): Delete.
      	* gcc/config/mn10300/mn10300.h (LEGITIMIZE_ADDRESS): Delete.
      	* gcc/config/m68k/m68k.h (LEGITIMIZE_ADDRESS): Delete.
      	* gcc/config/score/score.h (LEGITIMIZE_ADDRESS): Delete.
      	* gcc/config/pa/pa.h (LEGITIMIZE_ADDRESS): Delete.
      	* gcc/config/mips/mips.h (LEGITIMIZE_ADDRESS): Delete.
      	* gcc/config/alpha/alpha.h (LEGITIMIZE_ADDRESS): Delete.
      	* gcc/config/frv/frv.h (LEGITIMIZE_ADDRESS): Delete.
      	* gcc/config/spu/spu.h (LEGITIMIZE_ADDRESS): Delete.
      	* gcc/config/xtensa/xtensa.h (LEGITIMIZE_ADDRESS): Delete.
      	* gcc/config/cris/cris.h (LEGITIMIZE_ADDRESS): Delete.
      	* gcc/config/rs6000/rs6000.h (LEGITIMIZE_ADDRESS): Delete.
      	* gcc/config/picochip/picochip.h (LEGITIMIZE_ADDRESS): Delete.
      
      	* gcc/config/s390/s390-protos.h (legitimize_address): Delete.
      	* gcc/config/m32c/m32c-protos.h (m32c_legitimize_address): Delete.
      	* gcc/config/sparc/sparc-protos.h (legitimize_address): Delete.
      	* gcc/config/i386/i386-protos.h (legitimize_address): Delete.
      	* gcc/config/avr/avr-protos.h (legitimize_address): Delete.
      	* gcc/config/mn10300/mn10300-protos.h (legitimize_address): Delete.
      	* gcc/config/score/score-protos.h (score_legitimize_address): Delete.
      	* gcc/config/arm/arm-protos.h (arm_legitimize_address,
      	(thumb_legitimize_address): Delete.
      	* gcc/config/pa/pa-protos.h (hppa_legitimize_address): Delete.
      	* gcc/config/mips/mips-protos.h (mips_legitimize_address): Delete.
      	* gcc/config/alpha/alpha-protos.h (alpha_legitimize_address): Delete.
      	* gcc/config/frv/frv-protos.h (frv_legitimize_address): Delete.
      	* gcc/config/spu/spu-protos.h (spu_legitimize_address): Delete.
      	* gcc/config/xtensa/xtensa-protos.h (xtensa_legitimize_address): Delete.
      	* gcc/config/rs6000/rs6000-protos.h (rs6000_legitimize_address): Delete.
      
      	* config/arm/arm.c (arm_legitimize_address): Maybe call Thumb version.
      	* config/m32c/m32c.c (m32c_legitimize_address): Standardize.
      	* config/m32r/m32r.c (m32r_legitimize_address): New.
      	* config/m68k/m68k.c (m68k_legitimize_address): New.
      	* config/score/score.c (score_legitimize_address): Standardize.
      	* config/score/score3.c (score3_legitimize_address): Standardize.
      	* config/score/score3.h (score3_legitimize_address): Adjust.
      	* config/score/score7.c (score7_legitimize_address): Standardize.
      	* config/score/score7.h (score7_legitimize_address): Adjust.
      	* config/sh/sh.c (sh_legitimize_address): New.
      	* config/iq2000/iq2000.c (iq2000_legitimize_address): New.
      
      	* gcc/config/s390/s390.c (legitimize_address): Rename to...
       	(s390_legitimize_address): ... this.
      	* gcc/config/sparc/sparc.c (legitimize_address): Rename to...
      	(sparc_legitimize_address): ... this.
      	* gcc/config/i386/i386.c (legitimize_address): Rename to...
      	(ix86_legitimize_address): ... this.
      	* gcc/config/avr/avr.c (legitimize_address): Rename to...
      	(avr_legitimize_address): ... this.
      	* gcc/config/mn10300/mn10300.c (legitimize_address): Rename to...
      	(mn10300_legitimize_address): ... this.
      	* config/alpha/alpha.c (alpha_legitimize_address): Wrap...
      	(alpha_legitimize_address_1): ... the old alpha_legitimize_address.
      	(alpha_expand_mov): Adjust call.
      
      	* config/frv/frv.c (frv_legitimize_address): Return x on failure.
      	* config/spu/spu.c (spu_legitimize_address): Likewise.
      	* config/xtensa/xtensa.c (xtensa_legitimize_address): Likewise.
      	* config/rs6000/rs6000.c (rs6000_legitimize_address): Likewise.
      
      From-SVN: r147098
      Paolo Bonzini committed
  34. 29 Mar, 2009 1 commit
    • c-common.c (c_expand_expr, c_staticp): Remove. · 2ec5deb5
      2009-03-28  Paolo Bonzini  <bonzini@gnu.org>
      
              * c-common.c (c_expand_expr, c_staticp): Remove.
              * c-common.def (COMPOUND_LITERAL_EXPR): Delete.
              * c-common.h (emit_local_var, c_staticp, COMPOUND_LITERAL_EXPR_DECL,
              COMPOUND_LITERAL_EXPR_DECL_EXPR): Remove.
              * c-gimplify.c (gimplify_compound_literal_expr,
              optimize_compound_literals_in_ctor): Remove.
              (c_gimplify_expr): Remove COMPOUND_LITERAL_EXPR handling.
              * c-objc-common.h (LANG_HOOKS_STATICP): Remove.
              * c-semantics.c (emit_local_var): Remove.
      
              * langhooks-def.h (lhd_expand_expr): Remove.
              * langhooks.c (lhd_expand_expr): Remove.
              * langhooks.h (LANG_HOOKS_DEF): Remove LANG_HOOKS_EXPAND_EXPR.
      
              * expr.c (expand_expr_real_1): Move COMPOUND_LITERAL_EXPR
              handling from c-semantics.c; don't call into langhook.
              (expand_expr_addr_expr_1): Check that we don't get non-GENERIC trees.
              * gimplify.c (gimplify_compound_literal_expr,
              optimize_compound_literals_in_ctor): Move from c-gimplify.c.
              (gimplify_init_constructor): Call optimize_compound_literals_in_ctor.
              (gimplify_modify_expr_rhs, gimplify_expr): Handle COMPOUND_LITERAL_EXPR
              as was done in c-gimplify.c.
              * tree.c (staticp): Move COMPOUND_LITERAL_EXPR handling from c_staticp.
              * tree.h (COMPOUND_LITERAL_EXPR_DECL, COMPOUND_LITERAL_EXPR_DECL_EXPR):
              Move from c-common.h.
              * tree.def (COMPOUND_LITERAL_EXPR): Move from c-common.def.
      
      	* tree.c (staticp): Do not call langhook.
      	* langhooks.c (lhd_staticp): Delete.
      	* langhooks-def.h (lhd_staticp): Delete prototype.
      	(LANG_HOOKS_STATICP): Delete.
      	(LANG_HOOKS_INITIALIZER): Delete LANG_HOOKS_STATICP.
      
              * doc/c-tree.texi (Expression nodes): Refer to DECL_EXPRs
              instead of DECL_STMTs.
      
      cp:
      2009-03-28  Paolo Bonzini  <bonzini@gnu.org>
      
      	* cp/cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
      	* cp/cp-objcp-common.c (cxx_staticp): Remove.
      	* cp/cp-tree.h (cxx_staticp): Remove.
      
      From-SVN: r145256
      Paolo Bonzini committed
  35. 20 Feb, 2009 1 commit
  36. 12 Sep, 2008 1 commit
  37. 16 Aug, 2008 1 commit
    • re PR middle-end/20548 (ACATS c52103x c52104x c52104y segfault) · b38f3813
      	PR ada/20548
      	* common.opt (-fstack-check): Do not declare the variable here.
      	(-fstack-check=): New option variant.
      	* doc/invoke.texi (Code Gen Options): Document it.
      	* expr.h (STACK_OLD_CHECK_PROTECT): New macro.
      	(STACK_CHECK_PROTECT): Bump to 3 pages if DWARF-2 EH is used.
      	(STACK_CHECK_STATIC_BUILTIN): New macro.
      	* doc/tm.texi (Stack Checking): Document STACK_CHECK_STATIC_BUILTIN.
      	* opts.c: Include expr.h.
      	(common_handle_option) <OPT_fold_stack_check_>: New case.
      	<OPT_fstack_check>: Likewise.
      	* calls.c (initialize_argument_information): Use TYPE_SIZE_UNIT
      	consistently in the test for variable-sized types.  Adjust for
      	new behaviour of flag_stack_check.
      	* explow.c: Include except.h.
      	(allocate_dynamic_stack_space): Do not take into account
      	STACK_CHECK_MAX_FRAME_SIZE for static builtin stack checking.
      	* function.c (gimplify_parameters): Use DECL_SIZE_UNIT in the test
      	for variable-sized parameters.  Treat all parameters whose size is
      	greater than STACK_CHECK_MAX_VAR_SIZE as variable-sized if generic
      	stack checking is enabled.
      	* gimplify.c (gimplify_decl_expr): Treat non-static objects whose
      	size is greater than STACK_CHECK_MAX_VAR_SIZE as variable-sized
      	if generic stack checking is enabled.
      	(expand_function_end): Adjust for new behaviour of flag_stack_check.
      	* reload1.c (reload): Likewise.
      	* stmt.c (expand_decl): Assert that all automatic variables have
      	fixed size at this point and remove dead code.
      	* flags.h (stack_check_type): New enumeration type.
      	(flag_stack_check): Declare.
      	* toplev.c (flag_stack_check): New global variable.
      	* Makefile.in (opts.o): Add dependency on EXPR_H.
      	(explow.o): Add dependency on except.h.
      ada/
      	* gcc-interface/decl.c (gnat_to_gnu_entity): Use DECL_SIZE_UNIT in the
      	setjmp test consistently.  Adjust for new behaviour of flag_stack_check.
      	* gcc-interface/utils2.c (build_call_alloc_dealloc): Remove redundant
      	test of flag_stack_check.  Adjust for new behaviour of flag_stack_check.
      
      From-SVN: r139159
      Eric Botcazou committed