Commit Graph

545 Commits

Author SHA1 Message Date
Joseph Myers 8d8da22788 MAINTAINERS (c4x port): Remove.
* MAINTAINERS (c4x port): Remove.

contrib:
	* paranoia.cc (main): Remove handling of c4x_single and
	c4x_extended formats.

gcc:
	* config/c4x: Remove directory.
	* config.gcc (crx-*, mt-*): Mark obsolete.
	(c4x-*, tic4x-*, c4x-*-rtems*, tic4x-*-rtems*, c4x-*, tic4x-*,
	h8300-*-rtemscoff*, ns32k-*-netbsdelf*, ns32k-*-netbsd*,
	sh-*-rtemscoff*): Remove cases.
	* defaults.h (C4X_FLOAT_FORMAT): Remove.
	* real.c (encode_c4x_single, decode_c4x_single,
	encode_c4x_extended, decode_c4x_extended, c4x_single_format,
	c4x_extended_format): Remove.
	* real.h (c4x_single_format, c4x_extended_format): Remove.
	* doc/extend.texi (interrupt, naked): Remove mention of attributes
	on C4x.
	(Pragmas): Remove comment about c4x pragmas.
	* doc/install.texi (c4x): Remove target-specific instructions.
	* doc/invoke.texi (TMS320C3x/C4x Options): Remove.
	* doc/md.texi (Machine Constraints): Remove C4x documentation.
	* doc/tm.texi (MEMBER_TYPE_FORCES_BLK, c_register_pragma): Do not
	refer to C4x source files as examples.
	(C4X_FLOAT_FORMAT): Remove documentation.

gcc/testsuite:
	* gcc.dg/builtin-inf-1.c, gcc.dg/compare6.c, gcc.dg/sibcall-3.c,
	gcc.dg/sibcall-4.c, gcc.dg/torture/builtin-attr-1.c: Don't handle
	c4x-*-* targets.

libgcc:
	* config.host (tic4x-*-*, c4x-*-rtems*, tic4x-*-rtems*, c4x-*,
	tic4x-*, h8300-*-rtemscoff*, ns32k-*-netbsdelf*, ns32k-*-netbsd*,
	sh-*-rtemscoff*): Remove cases.

From-SVN: r131835
2008-01-25 20:49:04 +00:00
DJ Delorie 79e168dac0 tm.texi (HARD_REGNO_NREGS): Note that this macro must not return zero.
* doc/tm.texi (HARD_REGNO_NREGS): Note that this macro must not
return zero.

From-SVN: r131703
2008-01-21 17:20:57 -05:00
John David Anglin 881466d851 re PR driver/33772 (collect2 doesn't strip .sl version)
PR driver/33772
	* collect2.c (SHLIB_SUFFIX): Define if not defined.
	(write_c_file_stat): Use SHLIB_SUFFIX.
	* som.h (SHLIB_SUFFIX): Define.
	* doc/tm.texi (SHLIB_SUFFIX): Document.

From-SVN: r131235
2007-12-31 15:02:59 +00:00
Rask Ingemann Lambertsen 9bdf23b292 * doc/tm.texi (TARGET_SECONDARY_RELOAD): Fix typos.
From-SVN: r131011
2007-12-17 18:38:09 +00:00
Ben Elliston 614e5a7d0d * doc/tm.texi (Exception Handling): Mention unwind-dw2-xtensa.c.
From-SVN: r130597
2007-12-04 14:14:14 +11:00
Paolo Bonzini 215b063c9d target.h (unspec_may_trap_p): New target hook.
2007-10-16  Paolo Bonzini  <bonzini@gnu.org>
	    Maxim Kuvyrkov  <maxim@codesourcery.com>

	* target.h (unspec_may_trap_p): New target hook.
	* target-def.h (TARGET_UNSPEC_MAY_TRAP_P): New macro.
	* targhooks.c (default_unspec_may_trap_p): Default implementation of
	the hook.
	* targhooks.h (default_unspec_may_trap_p): Declare it.
	* doc/tm.texi (TARGET_UNSPEC_MAY_TRAP_P): Document new hook.
	* rtlanal.c (may_trap_p_1): Use new hook.  Make global.
	* rtl.h (may_trap_p_1): Declare.
	
	* config/ia64/ia64.c (ia64_unspec_may_trap_p): New function to
	override default hook implementation.
	(TARGET_UNSPEC_MAY_TRAP_P): Override default implementation of the
	hook.
	
	* gcc.target/ia64/20040709-2.c: New test.

Co-Authored-By: Maxim Kuvyrkov <maxim@codesourcery.com>

From-SVN: r129378
2007-10-16 09:13:47 +00:00
Richard Sandiford 4923a23068 tm.texi (POINTERS_EXTEND_UNSIGNED): Document extensions to word_mode as well as Pmode.
gcc/
	* doc/tm.texi (POINTERS_EXTEND_UNSIGNED): Document extensions to
	word_mode as well as Pmode.

From-SVN: r128698
2007-09-23 19:11:50 +00:00
Bernd Schmidt 980d888247 tm.texi (IS_ASM_LOGICAL_LINE_SEPARATOR): Document new argument.
* doc/tm.texi (IS_ASM_LOGICAL_LINE_SEPARATOR): Document new argument.
	* final.c (IS_ASM_LOGICAL_LINE_SEPARATOR): Provide two-argument default
	definition.
	(asm_insn_count): Pass template as second argument to it.
	* config/avr/avr.h (IS_ASM_LOGICAL_LINE_SEPARATOR): Likewise.
	* config/pa/pa.h (IS_ASM_LOGICAL_LINE_SEPARATOR): Likewise.
	* config/stormy16/stormy16.h (IS_ASM_LOGICAL_LINE_SEPARATOR): Likewise.
	* config/cris/cris.h (IS_ASM_LOGICAL_LINE_SEPARATOR): Likewise.
	* config/sh/sh.c (IS_ASM_LOGICAL_LINE_SEPARATOR): Likewise.
	(sh_insn_length_adjustment): Pass template as second argument to it.
	* config/bfin/bfin.h (IS_ASM_LOGICAL_LINE_SEPARATOR): New macro.

From-SVN: r128599
2007-09-19 15:03:07 +00:00
Sandra Loosemore 56e449d39a tm.texi (LIBGCC2_UNWIND_ATTRIBUTE): Document.
2007-09-14  Sandra Loosemore  <sandra@codesourcery.com>
	    Nigel Stephens  <nigel@mips.com>

	gcc/
	* doc/tm.texi (LIBGCC2_UNWIND_ATTRIBUTE): Document.
	* unwind-generic.h (LIBGCC2_UNWIND_ATTRIBUTE): Define.
	(_Unwind_RaiseException): Add LIBGCC2_UNWIND_ATTRIBUTE to
	declaration.
	(_Unwind_ForcedUnwind): Likewise.
	(_Unwind_Resume): Likewise.
	(_Unwind_Resume_or_Rethrow): Likewise.
	(_Unwind_Backtrace): Likewise.
	(_Unwind_SjLj_RaiseException): Likewise.
	(_Unwind_SjLj_ForcedUnwind): Likewise.
	(_Unwind_SjLj_Resume): Likewise.
	(_Unwind_SjLj_Resume_or_Rethrow): Likewise.
	* unwind.inc (_Unwind_RaiseException): Add LIBGCC2_UNWIND_ATTRIBUTE
	to definition.
	(_Unwind_ForcedUnwind): Likewise.
	(_Unwind_Resume): Likewise.
	(_Unwind_Resume_or_Rethrow): Likewise.
	(_Unwind_Backtrace): Likewise.
	* unwind-compat.c (_Unwind_Backtrace): Likewise.
	(_Unwind_ForcedUnwind): Likewise.
	(_Unwind_RaiseException): Likewise.
	(_Unwind_Resume): Likewise.
	(_Unwind_Resume_or_Rethrow): Likewise.

	* config/mips/mips.h (LIBGCC2_UNWIND_ATTRIBUTE): Define to force
	nomips16 mode when IN_LIBGCC2 with hard float.

Co-Authored-By: Nigel Stephens <nigel@mips.com>

From-SVN: r128501
2007-09-14 14:35:12 -04:00
Trevor Smigiel 67186a97fe New target hook to calculate MII
Co-Authored-By: Revital Eres <eres@il.ibm.com>

From-SVN: r128343
2007-09-10 13:16:38 +00:00
Sandra Loosemore db2960f402 Add target hook invoked when cfun changes.
2007-09-05  Sandra Loosemore  <sandra@codesourcery.com>

	gcc/
	Add target hook invoked when cfun changes.

	* doc/tm.texi (TARGET_SET_CURRENT_FUNCTION): Document.
	* target.h (struct gcc_target): Add set_current_function.
	* target-def.h (TARGET_SET_CURRENT_FUNCTION): Define.
	(TARGET_INITIALIZER): Add initializer for set_current_function.
	* tree.h (push_struct_function): New.
	* tree-inline.h (push_cfun, pop_cfun): Move declarations to...
	* function.h: Here.
	(set_cfun): Declare.
	* tree-inline.c (cfun_stack, push_cfun, pop_cfun): Moved to...
	* function.c:  Here.
	(push_function_context_to): Use allocate_struct_function
	to create null context, not init_dummy_function_start.  Use set_cfun.
	(pop_function_context_from): Use set_cfun.
	(in_dummy_function): New.
	(invoke_set_current_function_hook): New.
	(set_cfun): New.
	(push_cfun, pop_cfun): Use set_cfun.
	(push_struct_function): New.
	(allocate_struct_function): Call invoke_set_current_function_hook
	before returning.
	(prepare_function_start): Don't set cfun here.  Remove unused
	argument; fix all callers.
	(init_dummy_function_start): Fiddle with in_dummy_function.  Call
	push_struct_function.
	(init_function_start): Set cfun here.
	(expand_dummy_function_end): Fiddle with in_dummy_function.  Pop cfun.
	* omp-low.c (create_omp_child_function): Use push_struct_function
	and pop_cfun to save/restore state.
	(expand_omp_parallel): Remove unused saved_cfun variable.
	* cgraphunit.c (ipa_passes): Use set_cfun.
	* gimple-low.c (record_vars_into): Use push_cfun/pop_cfun here.
	* dwarf2out.c (dwarf2out_abstract_function): Likewise.
	* matrix-reorg.c (transform_allocation_sites): Likewise.
	(matrix_reorg): Use set_cfun.
	* gimplify.c (gimplify_function_tree): Use push_cfun/pop_cfun here.
	* tree-optimize.c (tree_rest_of_compilation): Remove one redundant
	assignment to cfun; use set_cfun for the other.
	* tree-cfg.c (move_sese_region_to_fn): Use set_cfun.
	(dump_function_to_file): Use push_cfun/pop_cfun here.
	* c-decl.c (finish_function): Use set_cfun.

	gcc/ada/
	* trans.c (Compilation_unit_to_gnu): Use set_cfun.
	* utils.c (end_subprog_body): Likewise.

	gcc/cp/
	* decl.c (finish_function): Use set_cfun.
	* method.c (use_thunk): Likewise.

	gcc/fortran/
	* trans-decl.c (build_entry_thunks): Use set_cfun.
	(gfc_generate_function_code): Likewise.

	gcc/java/
	* decl.c (finish_method): Use set_cfun.

	gcc/treelang/
	* treetree.c (tree_code_create_function_wrapup):  Use set_cfun.

From-SVN: r128132
2007-09-05 10:24:54 -04:00
Sandra Loosemore cfa311506c re PR target/11787 (always call memcpy for block move in mips16)
2007-08-24  Sandra Loosemore  <sandra@codesourcery.com>
            Nigel Stephens <nigel@mips.com>

	PR target/11787

	gcc/

	* doc/tm.texi (SET_RATIO, SET_BY_PIECES_P): Document new macros.
	(STORE_BY_PIECES_P): No longer applies to __builtin_memset.
	* expr.c (SET_BY_PIECES_P): Define.
	(can_store_by_pieces, store_by_pieces): Add MEMSETP argument; use
	it to decide whether to use SET_BY_PIECES_P or STORE_BY_PIECES_P.
	(store_expr):  Pass MEMSETP argument to can_store_by_pieces and
	store_by_pieces.
	* expr.h (SET_RATIO): Define.
	(can_store_by_pieces, store_by_pieces):	Update prototypes.
	* builtins.c (expand_builtin_memcpy): Pass MEMSETP argument to
	can_store_by_pieces/store_by_pieces.
	(expand_builtin_memcpy_args): Likewise.
	(expand_builtin_strncpy): Likewise.
	(expand_builtin_memset_args): Likewise.  Also remove special case
	for optimize_size so that can_store_by_pieces/SET_BY_PIECES_P can
	decide what to do instead.
	* value-prof.c (tree_stringops_transform): Pass MEMSETP argument
	to can_store_by_pieces.

	* config/sh/sh.h (SET_BY_PIECES_P): Clone from STORE_BY_PIECES_P.
	* config/s390/s390.h (SET_BY_PIECES_P): Likewise.

	* config/mips/mips.opt (mmemcpy): Change from Var to Mask.
	* config/mips/mips.c (override_options): Make -Os default to -mmemcpy.
	* config/mips/mips.h (MIPS_CALL_RATIO): Define.
	(MOVE_RATIO, CLEAR_RATIO, SET_RATIO): Define.
	(STORE_BY_PIECES_P): Define.

Co-Authored-By: Nigel Stephens <nigel@mips.com>

From-SVN: r127790
2007-08-24 19:54:05 -04:00
Maxim Kuvyrkov 1c3d0d93e2 target.h (struct gcc_target.sched: dfa_pre_advance_cycle, [...]): New scheduler hooks.
* target.h (struct gcc_target.sched: dfa_pre_advance_cycle,
	dfa_post_advance_cycle): New scheduler hooks.
	* target-def.h (TARGET_SCHED_DFA_PRE_ADVANCE_CYCLE,
	TARGET_SCHED_DFA_POST_ADVANCE_CYCLE): New macros to initialize
	new hooks.
	(TARGET_SCHED): Use them.
	* doc/tm.texi (TARGET_SCHED_DFA_PRE_ADVANCE_CYCLE,
	TARGET_SCHED_DFA_POST_ADVANCE_CYCLE): Document new hooks.
	* haifa-sched.c (advance_one_cycle): Invoke new hooks.

	* genautomata.c (insn_has_dfa_reservation_p): New DFA interface
	function to facilitate debugging.
	(INSN_HAS_DFA_RESERVATION_P_FUNC_NAME): New macro.
	(output_insn_has_dfa_reservation_p): New static function to output
	insn_has_dfa_reservation_p ().
	(write_automata): Use it.
	* genattr.c (main): Output declaration for
	insn_has_dfa_reservation_p ().

From-SVN: r127707
2007-08-22 15:07:10 +00:00
Chao-ying Fu ab22c1fa94 c-common.h (enum rid): Add new enumeration values of RID_SAT, RID_FRACT, and RID_ACCUM.
* c-common.h (enum rid): Add new enumeration values of RID_SAT,
	RID_FRACT, and RID_ACCUM.  RID_SAT needs to be inserted before
	RID_ONEWAY, so that it can be checked in declspecs_add_type.
	(c_common_fixed_point_type_for_size): Declare.
	* c-parser.c (reswords): Add _Fract, _Accum, and _Sat.
	(c_token_starts_typename): Handle RID_FRACT, RID_ACCUM, and RID_SAT.
	(c_token_starts_declspecs): Likewise.
	(c_parser_declspecs): Likewise.
	(c_parser_attributes): Likewise.
	* c-tree.h (enum c_typespec_keyword): Add cts_fract and cts_accum.
	(c_declspecs): Add saturating_p.
	* c-decl.c (build_null_declspecs): Initialize saturating_p.
	(declspecs_add_type): Avoid using complex with _Fract, _Accum, or _Sat.
	Handle RID_SAT.
	Avoid using void, bool, char, int, float, double, _Decimal32,
	_Decimal64, _Decimal128, and complex with _Sat.
	Handle RID_FRACT and RID_ACCUM.
	Make sure _Sat is used with _Fract or _Accum.
	(finish_declspecs): Handle cts_fract and cts_accum.
	* c-common.c (fixed-value.h): New include.
	(constant_expression_warning): Handle FIXED_CST.
	(overflow_warning): Likewise.
	(warnings_for_convert_and_check): Likewise.
	(c_common_fixed_point_type_for_size): New.
	(c_common_type_for_mode): Handle fixed-point modes to
	return various saturating/non-saturating, signed/unsigned types.
	(c_common_signed_or_unsigned_type): Support fixed-point types.
	(shorten_compare): Check fixed-point zero.
	Handle FIXED_POINT_TYPE.
	(c_common_truthvalue_conversion): Handle FIXED_CST.
	Handle FIXED_POINT_TYPE.
	(c_common_nodes_and_builtins): Record builtin types for fixed-point
	types.
	(handle_mode_attribute): Handle fixed-point modes.  Need to check
	if the signness of base type and fixed-point modes are consistent.
	(handle_vector_size_attribute): Handle fixed-point modes.
	(same_scalar_type_ignoring_signedness): Handle FIXED_POINT_TYPE.
	(warn_for_div_by_zero): Check fixed-point zero.
	* c-typeck.c (c_common_type): Check FIXED_POINT_TYPE.  Build
	a common fixed-point type based on fbit, ibit, sign, and saturation.
	(build_unary_op): Allow FIXED_POINT_TYPE for CONVERT_EXPR,
	NEGATE_EXPR, TRUTH_NOT_EXPR, PREINCREMENT_EXPR, POSTINCREMENT_EXPR,
	PREDECREMENT_EXPR, and POSTDECREMENT_EXPR.
	(convert_for_assignment): Support FIXED_POINT_TYPE.
	(digest_init): Handle FIXED_POINT_TYPE.
	(build_binary_op): Support FIXED_POINT_TYPE in *_DIV_EXPR,
	TRUTH_ANDIF_EXPR, TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR,
	TRUTH_XOR_EXPR, RSHIFT_EXPR, LSHIFT_EXPR, EQ_EXPR, NE_EXPR, LE_EXPR,
	GE_EXPR, LT_EXPR, GT_EXPR.
	* target-def.h (TARGET_FIXED_POINT_SUPPORTED_P): New.
	(TARGET_INITIALIZER): Add TARGET_FIXED_POINT_SUPPORTED_P.
	* target.h (gcc_target): Add fixed_point_supported_p.
	* targhooks.c (default_scalar_mode_supported_p): Handle MODE_FRACT,
	MODE_UFRACT, MODE_ACCUM, and MODE_UACCUM.
	(default_fixed_point_supported_p): Define.
	* targhooks.h (default_fixed_point_supported_p): Declare.
	* doc/tm.texi (TARGET_FIXED_POINT_SUPPORTED_P): Add.
	* doc/install.texi (Configuration): Add --enable-fixed-point.
	* configure.ac (--enable-fixed-point): New to enable fixed-point
	arithmetic extension to C.  For mips targets, we enable it by default.
	* configure, config.in: Regenerate.

From-SVN: r127652
2007-08-20 22:26:47 +00:00
Sandra Loosemore 14670a74f8 tm.texi (CLZ_DEFINED_VALUE_AT_ZERO, [...]): Document change in interpretation of value from boolean to tri-state integer.
2007-08-09  Sandra Loosemore  <sandra@codesourcery.com>
	    Nigel Stephens  <nigel@mips.com>

	gcc/
	* doc/tm.texi (CLZ_DEFINED_VALUE_AT_ZERO, CTZ_DEFINED_VALUE_AT_ZERO):
	Document change in interpretation of value from boolean to
	tri-state integer.
	* optabs.c (expand_ffs, expand_ctz): New functions to compute
	ffs and ctz using clz.
	(expand_unop):  Call them.
	* config/rs6000/rs6000.h (CLZ_DEFINED_VALUE_AT_ZERO): Fix its
	result value.
	(CTZ_DEFINED_VALUE_AT_ZERO): Likewise.
	* config/mips/mips.h (CLZ_DEFINED_VALUE_AT_ZERO): Likewise, to
	enable the new ffs expansion on this target.

Co-Authored-By: Nigel Stephens <nigel@mips.com>

From-SVN: r127318
2007-08-09 10:08:54 -04:00
Chao-ying Fu 325217edf0 tree.def (FIXED_POINT_TYPE): New type.
* tree.def (FIXED_POINT_TYPE): New type.
	(FIXED_CST): New constant.
	(FIXED_CONVERT_EXPR): New expr.
	* doc/c-tree.texi (Types): Document FIXED_POINT_TYPE.
	(Expressions): Document FIXED_CST and FIXED_CONVERT_EXPR.
	* tree.h (struct tree_base): Add saturating_flag.
	Remove one bit of spare for saturating_flag.
	(NUMERICAL_TYPE_CHECK): Support FIXED_POINT_TYPE.
	(NON_SAT_FIXED_POINT_TYPE_P, SAT_FIXED_POINT_TYPE_P,
	FIXED_POINT_TYPE_P): Define.
	(TYPE_SATURATING): Define.
	(TREE_FIXED_CST_PTR, TREE_FIXED_CST): Define.
	(struct tree_fixed_cst): New.
	(TYPE_IBIT, TYPE_FBIT): Define.
	(tree_node): Add fixed_cst.
	(enum tree_index): Add new enumeration values of
	TI_SAT_SFRACT_TYPE, TI_SAT_FRACT_TYPE, TI_SAT_LFRACT_TYPE,
	TI_SAT_LLFRACT_TYPE, TI_SAT_USFRACT_TYPE, TI_SAT_UFRACT_TYPE,
	TI_SAT_ULFRACT_TYPE, TI_SAT_ULLFRACT_TYPE, TI_SFRACT_TYPE,
	TI_FRACT_TYPE, TI_LFRACT_TYPE, TI_LLFRACT_TYPE, TI_USFRACT_TYPE,
	TI_UFRACT_TYPE, TI_ULFRACT_TYPE, TI_ULLFRACT_TYPE,
	TI_SAT_SACCUM_TYPE, TI_SAT_ACCUM_TYPE, TI_SAT_LACCUM_TYPE,
	TI_SAT_LLACCUM_TYPE, TI_SAT_USACCUM_TYPE, TI_SAT_UACCUM_TYPE,
	TI_SAT_ULACCUM_TYPE, TI_SAT_ULLACCUM_TYPE, TI_SACCUM_TYPE,
	TI_ACCUM_TYPE, TI_LACCUM_TYPE, TI_LLACCUM_TYPE, TI_USACCUM_TYPE,
	TI_UACCUM_TYPE, TI_ULACCUM_TYPE, TI_ULLACCUM_TYPE,
	TI_QQ_TYPE, TI_HQ_TYPE,_TYPE, TI_SQ_TYPE, TI_DQ_TYPE, TI_TQ_TYPE,
	TI_UQQ_TYPE, TI_UHQ_TYPE, TI_USQ_TYPE, TI_UDQ_TYPE, TI_UTQ_TYPE,
	TI_SAT_QQ_TYPE, TI_SAT_HQ_TYPE, TI_SAT_SQ_TYPE, TI_SAT_DQ_TYPE,
	TI_SAT_TQ_TYPE, TI_SAT_UQQ_TYPE, TI_SAT_UHQ_TYPE, TI_SAT_USQ_TYPE,
	TI_SAT_UDQ_TYPE, TI_SAT_UTQ_TYPE, TI_HA_TYPE, TI_SA_TYPE, TI_DA_TYPE,
	TI_TA_TYPE, TI_UHA_TYPE, TI_USA_TYPE, TI_UDA_TYPE, TI_UTA_TYPE,
	TI_SAT_HA_TYPE, TI_SAT_SA_TYPE, TI_SAT_DA_TYPE, TI_SAT_TA_TYPE,
	TI_SAT_UHA_TYPE, TI_SAT_USA_TYPE, TI_SAT_UDA_TYPE, TI_SAT_UTA_TYPE.
	(sat_short_fract_type_node, sat_fract_type_node,
	sat_long_fract_type_node, sat_long_long_fract_type_node,
	sat_unsigned_short_fract_type_node, sat_unsigned_fract_type_node,
	sat_unsigned_long_fract_type_node,
	sat_unsigned_long_long_fract_type_node, short_fract_type_node,
	fract_type_node, long_fract_type_node, long_long_fract_type_node,
	unsigned_short_fract_type_node, unsigned_fract_type_node,
	unsigned_long_fract_type_node, unsigned_long_long_fract_type_node,
	sat_short_accum_type_node, sat_accum_type_node,
	sat_long_accum_type_node, sat_long_long_accum_type_node,
	sat_unsigned_short_accum_type_node, sat_unsigned_accum_type_node,
	sat_unsigned_long_accum_type_node,
	sat_unsigned_long_long_accum_type_node, short_accum_type_node,
	accum_type_node, long_accum_type_node, long_long_accum_type_node,
	unsigned_short_accum_type_node, unsigned_accum_type_node,
	unsigned_long_accum_type_node, unsigned_long_long_accum_type_node,
	qq_type_node, hq_type_node, sq_type_node, dq_type_node, tq_type_node,
	uqq_type_node, uhq_type_node, usq_type_node, udq_type_node,
	utq_type_node, sat_qq_type_node, sat_hq_type_node, sat_sq_type_node,
	sat_dq_type_node, sat_tq_type_node, sat_uqq_type_node,
	sat_uhq_type_node, sat_usq_type_node, sat_udq_type_node,
	sat_utq_type_node, ha_type_node, sa_type_node, da_type_node,
	ta_type_node, uha_type_node, usa_type_node, uda_type_node,
	uta_type_node, sat_ha_type_node, sat_sa_type_node, sat_da_type_node,
	sat_ta_type_node, sat_uha_type_node, sat_usa_type_node,
	sat_uda_type_node, sat_uta_type_node): New macro.
	(make_fract_type, make_accum_type): Declare.
	(make_signed_fract_type, make_unsigned_fract_type,
	make_sat_signed_fract_type, make_sat_unsigned_fract_type,
	make_signed_accum_type, make_unsigned_accum_type,
	make_sat_signed_accum_type, make_sat_unsigned_accum_type,
	make_or_reuse_signed_fract_type, make_or_reuse_unsigned_fract_type,
	make_or_reuse_sat_signed_fract_type,
	make_or_reuse_sat_unsigned_fract_type, make_or_reuse_signed_accum_type,
	make_or_reuse_unsigned_accum_type, make_or_reuse_sat_signed_accum_type,
	make_or_reuse_sat_unsigned_accum_type): New macro.
	(fixed_zerop): Declare.
	* defaults.h (SHORT_FRACT_TYPE_SIZE, FRACT_TYPE_SIZE,
	LONG_FRACT_TYPE_SIZE, LONG_LONG_FRACT_TYPE_SIZE,
	SHORT_ACCUM_TYPE_SIZE, ACCUM_TYPE_SIZE, LONG_ACCUM_TYPE_SIZE,
	LONG_LONG_ACCUM_TYPE_SIZE): Define.
	* treestruct.def: Add TS_FIXED_CST.
	* Makefile.in (c-pretty-print.o): Add dependence on fixed-value.h.
	(tree.o): Likewise.
	(tree-dump.o): Likewise.
	(print-tree.o): Likewise.
	(tree-pretty-print.o): Likewise.
	(fold-const.o): Likewise.
	* tree-complex.c (some_nonzerop): Handle FIXED_CST.
	* tree-gimple.c (is_gimple_formal_tmp_rhs): Handle FIXED_CST.
	(is_gimple_min_invariant): Handle FIXED_CST.
	* stor-layout.c (int_mode_for_mode): Handle MODE_FRACT, MODE_UFRACT,
	MODE_ACCUM, MODE_UACCUM, MODE_VECTOR_FRACT, MODE_VECTOR_UFRACT,
	MODE_VECTOR_ACCUM, MODE_VECTOR_UACCUM.
	(layout_type): Handle FIXED_POINT_TYPE.
	(make_fract_type, make_accum_type): New functions.
	* tree-browser.c (browse_tree): Handle FIXED_POINT_TYPE.
	* tree-dump.c (fixed-value.h): New include.
	(dump_fixed): New function.
	(dequeue_and_dump): Handle FIXED_POINT_TYPE and FIXED_CST.
	* tree-inline.c (remap_type_1): Handle FIXED_POINT_TYPE.
	(estimate_num_insns_1): Handle FIXED_CST and FIXED_CONVERT_EXPR.
	* tree-pretty-print.c (fixed-value.h): New include.
	(dump_generic_node): Handle FIXED_POINT_TYPE, FIXED_CST, and
	FIXED_CONVERT_EXPR.
	* tree-scalar-evolution.c (get_scalar_evolution): Handle FIXED_CST.
	* tree-ssa-loop-im.c (for_each_index): Handle FIXED_CST.
	* tree-ssa-pre.c (poolify_tree): Handle FIXED_CST.
	* tree-ssa-reassoc.c (break_up_subtract_bb): We can do reassociation
	for non-saturating fixed-point types.
	(reassociate_bb): Likewise.
	* emit-rtl.c (fixed-value.h): New include.
	(fconst0, fconst1): New array.
	(init_emit_once): Initialize fconst0 and fconst1 for fixed-point modes.
	* tree-vect-generic.c expand_vector_operation): Support
	MODE_VECTOR_FRACT, MODE_VECTOR_UFRACT, MODE_VECTOR_ACCUM, and
	MODE_VECTOR_UACCUM.
	(type_for_widest_vector_mode): Add one parameter for the 
	saturating flag.
	Check scalar FRACT, UFRACT, ACCUM, and UACCUM mode to select their
	vector mode.
	Pass the satp parameter to type_for_mode for fixed-point types.
	(expand_vector_operations_1): Pass the saturating flag to
	type_for_widest_vector_mode.
	Support MODE_VECTOR_FRACT, MODE_VECTOR_UFRACT, MODE_VECTOR_ACCUM,
	and MODE_VECTOR_UACCUM.
	* tree-vect-transform.c (vect_is_simple_cond): Support FIXED_CST.
	(vectorizable_condition): Likewise.
	* tree.c (fixed-value.h): New include.
	(tree_code_size): Support FIXED_CST.
	(build_fixed): New function.
	(build_one_cst): Support FIXED_POINT_TYPE for accum types.
	(fixed_zerop): New function.
	(tree_node_structure): Support FIXED_CST.
	(type_contains_placeholder_1): Support FIXED_POINT_TYPE.
	(build_type_attribute_qual_variant): Handle FIXED_POINT_TYPE.
	(type_hash_eq): Handle FIXED_POINT_TYPE.
	(simple_cst_equal): Support FIXED_CST.
	(iterative_hash_expr): Handle FIXED_CST.
	(get_unwidened): Make sure type is not FIXED_POINT_TYPE.
	(get_narrower): Likewise.
	(variably_modified_type_p): Handle FIXED_POINT_TYPE.
	(make_or_reuse_fract_type, make_or_reuse_accum_type): New functions.
	(build_common_tree_nodes_2): Use MAKE_FIXED_TYPE_NODE_FAMILY and
	MAKE_FIXED_MODE_NODE macros to initialize fixed-point type
	nodes.
	(build_vector_type_for_mode): Handle MODE_VECTOR_FRACT,
	MODE_VECTOR_UFRACT, MODE_VECTOR_ACCUM, MODE_VECTOR_UACCUM.
	(initializer_zerop): Support FIXED_CST.
	(walk_tree): Handle FIXED_CST and FIXED_POINT_TYPE.
	* dwarf2out.c (base_type_die): Use DW_ATE_signed_fixed or
	DW_ATE_unsigned_fixed to describe FIXED_POINT_TYPE.
	(is_base_type): Handle FIXED_POINT_TYPE.
	(add_type_attribute): Handle FIXED_POINT_TYPE.
	(gen_type_die_with_usage): Handle FIXED_POINT_TYPE.
	* print-tree.c (fixed-value.h): New include.
	(print_node_brief): Support FIXED_CST.
	(print_node): Support FIXED_POINT_TYPE and FIXED_CST.
	* c-pretty-print.c (fixed-value.h): New include.
	(pp_c_type_specifier): Handle FIXED_POINT_TYPE.  Need to pass
	TYPE_SATURATING to c_common_type_for_mode for fixed-point modes.
	(pp_c_direct_abstract_declarator): Handle FIXED_POINT_TYPE.
	Support fixed-point types for inner items in VECTOR_TYPE.
	(pp_c_direct_declarator): Likewise.
	(pp_c_declarator): Likewise.
	(pp_c_fixed_constant): New function.
	(pp_c_constant): Handle FIXED_CST.
	(pp_c_primary_expression): Likewise.
	(pp_c_expression): Likewise.
	* fold-const.c (fixed-value.h): New include.
	(negate_expr_p): Return true for FIXED_CST.
	(fold_negate_expr): Support FIXED_CST.
	(split_tree): Support FIXED_CST.
	(const_binop): Support FIXED_CST.
	(fold_convert_const_int_from_fixed): New function to convert from
	fixed to int.
	(fold_convert_const_real_from_fixed): New function to convert from
	fixed to real.
	(fold_convert_const_fixed_from_fixed): New function to convert from
	fixed to another fixed.
	(fold_convert_const_fixed_from_int): New function to convert from
	int to fixed.
	(fold_convert_const_fixed_from_real): New function to convert from
	real to fixed.
	(fold_convert_const): Support conversions from fixed to int, from
	fixed to real, from fixed to fixed, from int to fixed, and from real
	to fixed.
	(fold_convert): Support FIXED_CST and FIXED_POINT_TYPE.
	(operand_equal_p): Support FIXED_CST.
	(make_range): For fixed-point modes, we need to pass the
	saturating flag as the 2nd parameter.
	(tree_swap_operands_p): Handle FIXED_CST.
	(fold_plusminus_mult_expr): For fract modes, we cannot generate
	constant 1.
	(fold_unary): Support FIXED_CONVERT_EXPR.
	(fold_binary): Handle FIXED_CST.
	Make sure the type is not saturating, before associating operations.
	Ex: A + B + C, A * B * C, (A1 * C1) +/- (A2 * C2).
	(tree_expr_nonnegative_warnv_p): Handle FIXED_CST.
	(fold_negate_const): Support FIXED_CST.
	(fold_relational_const): Support FIXED_CST.
	* gimplify.c (omp_firstprivatize_type_sizes): Handle FIXED_POINT_TYPE.
	(gimplify_expr): Handle FIXED_CST.
	(gimplify_type_sizes): Handle FIXED_POINT_TYPE.
	* ipa-prop.c (ipa_callsite_compute_param): Support FIXED_CST.
	* ipa-type-escape.c (type_to_consider): Handle FIXED_POINT_TYPE.
	* doc/tm.texi (Type Layout): Document SHORT_FRACT_TYPE_SIZE,
	FRACT_TYPE_SIZE, LONG_FRACT_TYPE_SIZE, LONG_LONG_FRACT_TYPE_SIZE,
	SHORT_ACCUM_TYPE_SIZE, ACCUM_TYPE_SIZE, LONG_ACCUM_TYPE_SIZE,
	LONG_LONG_ACCUM_TYPE_SIZE.
	* dbxout.c (dbxout_type): Handle FIXED_POINT_TYPE.
	* c-aux-info.c (gen_type): Handle FIXED_POINT_TYPE.
	* tree-sra.c (is_sra_scalar_type): Support FIXED_POINT_TYPE.
	* expmed.c (extract_bit_field): Support MODE_FRACT, MODE_UFRACT,
	MODE_ACCUM, and MODE_UACCUM.
	* tree-vectorizer.c (vect_is_simple_reduction): Check for saturating
	fixed-point types to disable reduction.
	* explow.c (promote_mode): Support FIXED_POINT_TYPE.

From-SVN: r127306
2007-08-08 22:29:12 +00:00
Julian Brown 608063c3e9 alpha.c (alpha_mangle_fundamental_type): Rename to...
gcc/
	* config/alpha/alpha.c (alpha_mangle_fundamental_type): Rename to...
	(alpha_mangle_type): This.
	(TARGET_MANGLE_FUNDAMENTAL_TYPE): Don't define.
	(TARGET_MANGLE_TYPE): Define this instead.
	* config/arm/arm-protos.h (arm_mangle_type): Add prototype.
	* config/arm/arm.c (TARGET_MANGLE_TYPE): Define target hook.
	(arm_init_neon_builtins): Fix comment.
	(arm_mangle_map_entry): New.
	(arm_mangle_map): New.
	(arm_mangle_type): New.
	* config/i386/i386.c (ix86_mangle_fundamental_type): Rename to...
	(ix86_mangle_type): This. Use TYPE_MAIN_VARIANT and restrict
	mangled types to VOID_TYPE, BOOLEAN_TYPE, INTEGER_TYPE, REAL_TYPE.
	(TARGET_MANGLE_FUNDAMENTAL_TYPE): Don't define.
	(TARGET_MANGLE_TYPE): Define this instead.
	* config/ia64/ia64.c (ia64_mangle_fundamental_type): Rename to...
	(ia64_mangle_type): This. Use TYPE_MAIN_VARIANT  and restrict
	mangled types to VOID_TYPE, BOOLEAN_TYPE, INTEGER_TYPE, REAL_TYPE.
	(TARGET_MANGLE_FUNDAMENTAL_TYPE): Don't define.
	(TARGET_MANGLE_TYPE): Define this instead.
	* config/rs6000/rs6000.c (rs6000_mangle_fundamental_type): Rename
	to...
	(rs6000_mangle_type): This. Use TYPE_MAIN_VARIANT.
	(TARGET_MANGLE_FUNDAMENTAL_TYPE): Don't define.
	(TARGET_MANGLE_TYPE): Define this instead.
	* config/s390/s390.c (s390_mangle_fundamental_type): Rename to...
	(s390_mangle_type): This.
	(TARGET_MANGLE_FUNDAMENTAL_TYPE): Don't define.
	(TARGET_MANGLE_TYPE): Define this instead.
	* config/sparc/sparc.c (sparc_mangle_fundamental_type): Rename to...
	(sparc_mangle_type): This.
	(TARGET_MANGLE_FUNDAMENTAL_TYPE): Don't define.
	(TARGET_MANGLE_TYPE): Define this instead.
	* cp/mangle.c (write_type): Call mangle_type target hook on all
	types before mangling.  Use original type, not main variant, as
	argument.
	* target-def.h (TARGET_MANGLE_FUNDAMENTAL_TYPE): Rename hook to...
	(TARGET_MANGLE_TYPE): This.
	* target.h (gcc_target): Rename mangle_fundamental_type to
	mangle_type.
	* doc/tm.texi (TARGET_MANGLE_FUNDAMENTAL_TYPE): Rename section to...
	(TARGET_MANGLE_TYPE): This. Note slightly different semantics.


Co-Authored-By: Mark Shinwell <shinwell@codesourcery.com>

From-SVN: r126917
2007-07-25 15:43:04 +00:00
Sandra Loosemore 170ea7b948 revert: c-opts.c (c_common_handle_option): Make DOLLARS_IN_IDENTIFIERS apply to assembly language, too.
2007-07-08  Sandra Loosemore  <sandra@codesourcery.com>

	Revert this patch:
	2007-07-06  Sandra Loosemore  <sandra@codesourcery.com>

	* c-opts.c (c_common_handle_option): Make DOLLARS_IN_IDENTIFIERS
	apply to assembly language, too.
	* doc/tm.texi (DOLLARS_IN_IDENTIFIERS): Update.

From-SVN: r126458
2007-07-08 09:46:20 -04:00
Sandra Loosemore 984defeb6c c-opts.c (c_common_handle_option): Make DOLLARS_IN_IDENTIFIERS apply to assembly language, too.
2007-07-06  Sandra Loosemore  <sandra@codesourcery.com>

	gcc/
	* c-opts.c (c_common_handle_option): Make DOLLARS_IN_IDENTIFIERS
	apply to assembly language, too.
	* doc/tm.texi (DOLLARS_IN_IDENTIFIERS): Update.

From-SVN: r126427
2007-07-06 18:08:40 -04:00
Andreas Krebbel c7ff6e7a7a libgcc2.h (word_type): Type definition removed.
2007-07-06  Andreas Krebbel  <krebbel1@de.ibm.com>

	* libgcc2.h (word_type): Type definition removed.
	(cmp_return_type, shift_count_type): Type definitions added.
	(__lshrdi3, __ashldi3, __ashrdi3): word_type of second parameter
	replaced with shift_count_type.
	(__cmpdi2, __ucmpdi2): word_type of return type replaced with
	cmp_return_type.
	* libgcc2.c (__udivmoddi4, __moddi3): Type of local variable c
	changed from word_type to Wtype.
	(__lshrdi3, __ashldi3, __ashrdi3): word_type of second parameter
	replaced with shift_count_type.
	(__cmpdi2, __ucmpdi2): word_type of return type replaced with
	cmp_return_type.
	* c-common.c (handle_mode_attribute): Handling for libgcc_cmp_return and
	libgcc_shift_count attribute added.
	* target-def.h (TARGET_LIBGCC_CMP_RETURN_MODE,
	TARGET_LIBGCC_SHIFT_COUNT_MODE): New target hooks defined.
	(TARGET_INITIALIZER): New target hooks added.
	* targhooks.c (default_libgcc_cmp_return_mode,
	default_libgcc_shift_count_mode): Default implementations for the new
	target hooks added.
	* targhooks.h (default_libgcc_cmp_return_mode,
	default_libgcc_shift_count_mode): Function prototypes added.
	* target.h (struct gcc_target): Fields for the new target hooks added.
	* optabs.c (expand_binop): Use shift_count_mode when expanding shift
	as library call.
	(prepare_cmp_insn): Use cmp_return_mode when expanding comparison as
	library call.

	* doc/tm.texi (TARGET_LIBGCC_CMP_RETURN_MODE,
	TARGET_LIBGCC_SHIFT_COUNT_MODE): Documentation added.

	* config/s390/s390.c (s390_libgcc_cmp_return_mode,
	s390_libgcc_shift_count_mode): Functions added.
	(TARGET_LIBGCC_CMP_RETURN_MODE,	TARGET_LIBGCC_SHIFT_COUNT_MODE): Target
	hooks defined.

From-SVN: r126410
2007-07-06 10:47:31 +00:00
Nick Clifton 67e6ba46a4 target.h (struct gcc_target): Add target_help field.
* target.h (struct gcc_target): Add target_help field.
* target-def.h (TARGET_HELP): New.
  (TARGET_INITIALIZER): Use TARGET_HELP.
* opts.c (command_handle_option): Invoke target_help function, if defined, when the 
  user has specified --target-help on the command line.
* doc/invoke.texi: Mention that --target-help might print additional information.
* doc/tm.texi: Document TARGET_HELP hook.

* arm.c (TARGET_HELP): Override default definition.
  (arm_target_help): New - display a wrapped list of cores and architectures supported.

From-SVN: r126323
2007-07-04 15:05:26 +00:00
Ben Elliston 4408237565 tm.texi (Run-time Target): Capitalise "CPU".
* doc/tm.texi (Run-time Target): Capitalise "CPU".
	(Exception Handling): Likewise.

From-SVN: r126284
2007-07-04 08:28:28 +10:00
Uros Bizjak ac10986fad re PR tree-optimization/32383 (ICE with reciprocals and -ffast-math)
PR tree-optimization/32383
	* targhooks.c (default_builtin_reciprocal): Add new bool argument.
	* targhooks.h (default_builtin_reciprocal): Update prototype.
	* target.h (struct gcc_target): Update builtin_reciprocal.
	* doc/tm.texi (TARGET_BUILTIN_RECIPROCAL): Update description.
	* tree-ssa-math-opts (execute_cse_reciprocals): Skip statements
	where arg1 is not SSA_NAME.  Pass true to targetm.builtin_reciprocal
	when fndecl is in BUILT_IN_MD class.
	(execute_convert_to_rsqrt): Ditto.

	* config/i386/i386.c (ix86_builtin_reciprocal): Update for new bool
	argument.  Convert IX86_BUILTIN_SQRTPS code only when md_fn is true.
	Convert BUILT_IN_SQRTF code only  when md_fn is false.

testsuite/ChangeLog:

	PR tree-optimization/32383
	* testsuite/g++.dg/opt/pr32383.C: New test.

From-SVN: r125790
2007-06-18 10:30:47 +02:00
Uros Bizjak 6b889d891d re PR middle-end/31723 (Use reciprocal and reciprocal square root with -ffast-math)
PR middle-end/31723
    * hooks.c (hook_tree_tree_bool_null): New hook.
    * hooks.h (hook_tree_tree_bool_null): Add prototype.
    * tree-pass.h (pass_convert_to_rsqrt): Declare.
    * passes.c (init_optimization_passes): Add pass_convert_to_rsqrt.
    * tree-ssa-math-opts.c (execute_cse_reciprocals): Scan for a/func(b)
    and convert it to reciprocal a*rfunc(b).
    (execute_convert_to_rsqrt): New function.
    (gate_convert_to_rsqrt): New function.
    (pass_convert_to_rsqrt): New pass definition.
    * target.h (struct gcc_target): Add builtin_reciprocal.
    * target-def.h (TARGET_BUILTIN_RECIPROCAL): New define.
    (TARGET_INITIALIZER): Initialize builtin_reciprocal with
    TARGET_BUILTIN_RECIPROCAL.
    * doc/tm.texi (TARGET_BUILTIN_RECIPROCAL): Document.

    * config/i386/i386.h (TARGET_RECIP): New define.
    * config/i386/i386.md (divsf3): Expand by calling ix86_emit_swdivsf
    for TARGET_SSE_MATH and TARGET_RECIP when
    flag_unsafe_math_optimizations is set and not optimizing for size.
    (*rcpsf2_sse): New insn pattern.
    (*rsqrtsf2_sse): Ditto.
    (rsqrtsf2): New expander.  Expand by calling ix86_emit_swsqrtsf
    for TARGET_SSE_MATH and TARGET_RECIP when
    flag_unsafe_math_optimizations is set and not optimizing for size.
    (sqrt<mode>2): Expand SFmode operands by calling ix86_emit_swsqrtsf
    for TARGET_SSE_MATH and TARGET_RECIP when
    flag_unsafe_math_optimizations is set and not optimizing for size.
    * config/i386/sse.md (divv4sf): Expand by calling ix86_emit_swdivsf
    for TARGET_SSE_MATH and TARGET_RECIP when
    flag_unsafe_math_optimizations is set and not optimizing for size.
    (*sse_rsqrtv4sf2): Do not export.
    (sqrtv4sf2): Ditto.
    (sse_rsqrtv4sf2): New expander.  Expand by calling ix86_emit_swsqrtsf
    for TARGET_SSE_MATH and TARGET_RECIP when
    flag_unsafe_math_optimizations is set and not optimizing for size.
    (sqrtv4sf2): Ditto.
    * config/i386/i386.opt (mrecip): New option.
    * config/i386/i386-protos.h (ix86_emit_swdivsf): Declare.
    (ix86_emit_swsqrtsf): Ditto.
    * config/i386/i386.c (IX86_BUILTIN_RSQRTF): New constant.
    (ix86_init_mmx_sse_builtins): __builtin_ia32_rsqrtf: New
    builtin definition.
    (ix86_expand_builtin): Expand IX86_BUILTIN_RSQRTF using
    ix86_expand_unop1_builtin.
    (ix86_emit_swdivsf): New function.
    (ix86_emit_swsqrtsf): Ditto.
    (ix86_builtin_reciprocal): New function.
    (TARGET_BUILTIN_RECIPROCAL): Use it.
    (ix86_vectorize_builtin_conversion): Rename from
    ix86_builtin_conversion.
    (TARGET_VECTORIZE_BUILTIN_CONVERSION): Use renamed function.
    * doc/invoke.texi (Machine Dependent Options): Add -mrecip to
    "i386 and x86_64 Options" section.
    (Intel 386 and AMD x86_64 Options): Document -mrecip.

testsuite/ChangeLog:

    PR middle-end/31723
    * gcc.target/i386/recip-divf.c: New test.
    * gcc.target/i386/recip-sqrtf.c: Ditto.
    * gcc.target/i386/recip-vec-divf.c: Ditto.
    * gcc.target/i386/recip-vec-sqrtf.c: Ditto.
    * gcc.target/i386/sse-recip.c: Ditto.

From-SVN: r125756
2007-06-16 11:52:48 +02:00
Kazu Hirata 110abdbc68 i386.c, [...]: Fix comment typos.
* config/i386/i386.c, config/pa/pa.c, config/spu/spu.c,
	df-problems.c, df-scan.c, domwalk.c, ebitmap.c, ebitmap.h,
	fold-const.c, gcc.c, ipa-type-escape.c, omega.c, omega.h,
	tree-ssa-coalesce.c, tree-ssa-live.c, tree-ssa-structalias.c,
	tree-vrp.c: Fix comment typos.  Follow spelling conventions.
	* doc/tm.texi: Follow spelling conventions.

From-SVN: r125090
2007-05-26 13:00:47 +00:00
Danny Smith 5234b8f573 re PR target/27067 (Compile errors with multiple inheritance where the stdcall attribute is applied to virtual functions.)
ChangeLog
	
	PR target/27067
	* doc/tm.texi (TARGET_MANGLE_DECL_ASSEMBLER_NAME): Document.
	* targhooks.h (default_mangle_decl_assembler_name): Declare
	default hook.
	* targhooks.c (default_mangle_decl_assembler_name): Define
	default hook.
	* target-def.h (TARGET_MANGLE_DECL_ASSEMBLER_NAME) New. Set to
	default hook.
	* target.h (struct gcc_target): Add mangle_decl_assembler_name field.
	* langhooks.c (lhd_set_decl_assembler_name): Call
	targetm.mangle_decl_assembler_name for names with global scope.

	* config/i386/cygming.h (TARGET_MANGLE_DECL_ASSEMBLER_NAME) Override
	default.
	(ASM_OUTPUT_DEF_FROM_DECLS): Simplify to use DECL_ASSEMBLER_NAME.
	* config/i386/i386-protos.h (i386_pe_mangle_decl_assembler_name):
	Declare.
	* config/i386/winnt.c (i386_pe_maybe_mangle_decl_assembler_name):
	New. Factored out of i386_pe_encode_section_info.
	(gen_stdcall_or_fastcall_suffix): Get name identifier as argument.
	Move check for prior decoration of stdcall
	symbols to i386_pe_encode_section_info.
	(i386_pe_encode_section_info): Adjust call to
	gen_stdcall_or_fastcall_suffix.  Use
	i386_pe_maybe_mangle_decl_assembler_name, if needed.
	(i386_pe_mangle_decl_assembler_name): New. Wrap
	i386_pe_maybe_mangle_decl_assembler_name.


cp/ChangeLog

        * mangle.c (mangle_decl): Call targetm.mangle_decl_assembler_name.

From-SVN: r125020
2007-05-24 10:11:49 +00:00
Andreas Krebbel 4d8a8a0a22 defaults.h (IBM_FLOAT_FORMAT): Macro definition removed.
2007-05-21  Andreas Krebbel  <krebbel1@de.ibm.com>

	* defaults.h (IBM_FLOAT_FORMAT): Macro definition removed.
	* doc/tm.texi (IBM_FLOAT_FORMAT): Documentation entry removed.
	* real.c (encode_i370_single, decode_i370_single,
	encode_i370_double, decode_i370_double): Functions removed.
	(i370_single_format, i370_double_format): Initializations removed.
	(real_maxval, round_for_format, exact_real_truncate, significand_size):
	Consider the log2_b field to always be one.
	(ieee_single_format, mips_single_format, coldfire_single_format,
	ieee_double_format, mips_double_format,	coldfire_double_format,
	ieee_extended_motorola_format, ieee_extended_intel_96_format,
	ieee_extended_intel_128_format, ieee_extended_intel_96_round_53_format,
	ibm_extended_format, mips_extended_format, ieee_quad_format,
	mips_quad_format, vax_f_format, vax_d_format, vax_g_format,
	decimal_single_format, decimal_double_format, decimal_quad_format,
	c4x_single_format, c4x_extended_format, real_internal_format): Remove
	initialization of log2_b.
	* real.h (i370_single_format, i370_double_format): Declarations removed.
	* c-cppbuiltin.c (builtin_define_float_constants): Consider the log2_b
	field to always be one.

From-SVN: r124901
2007-05-21 12:53:08 +00:00
Dave Korn f71e957e40 tm.texi (FUNCTION_MODE): Update and extend documentation.
2007-04-02  Dave Korn  <dave.korn@artimi.com>

	* doc/tm.texi (FUNCTION_MODE):  Update and extend documentation.

From-SVN: r123419
2007-04-02 08:16:44 +00:00
Richard Henderson 121de39fc0 directives.c (lex_macro_node_from_str): New.
libcpp/
        * directives.c (lex_macro_node_from_str): New.
        (cpp_push_definition, cpp_pop_definition): New.
        * include/cpplib.h (cpp_push_definition, cpp_pop_definition): Declare.
gcc/
        * c-pragma.c (struct def_pragma_macro_value): New.
        (struct def_pragma_macro): New.
        (pushed_macro_table): New.
        (dpm_hash, dpm_eq): New.
        (handle_pragma_push_macro, handle_pragma_pop_macro): New.
        (init_pragma): Install them.
        * doc/tm.texi (HANDLE_PRAGMA_PUSH_POP_MACRO): New.

Co-Authored-By: Kai Tietz <kai.tietz@onevision.com>

From-SVN: r123370
2007-03-30 14:12:53 -07:00
Kai Tietz ac294f0bbc defaults.h (OUTGOING_REG_PARM_STACK_SPACE): Provide default.
* defaults.h (OUTGOING_REG_PARM_STACK_SPACE): Provide default.
        * calls.c (compute_argument_block_size, expand_call,
        emit_library_call_value_1): Don't ifdef OUTGOING_REG_PARM_STACK_SPACE.
        * expr.c (block_move_libcall_safe_for_call_parm): Likewise.
        * function.c (STACK_DYNAMIC_OFFSET): Likewise.
        * doc/tm.texi (OUTGOING_REG_PARM_STACK_SPACE): Update.
        * config/alpha/unicosmk.h, config/bfin/bfin.h, config/iq2000/iq2000.h,
        config/mips/mips.h, config/mn10300/mn10300.h, config/mt/mt.h,
        config/pa/pa.h, config/rs6000/rs6000.h, config/score/score.h,
        config/spu/spu.h, config/v850/v850.h (OUTGOING_REG_PARM_STACK_SPACE):
        Set to 1.

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

From-SVN: r123135
2007-03-22 14:33:45 -07:00
Andreas Krebbel 17f6dbbf4e tm.texi: Add brackets around the return type of TARGET_SECONDARY_RELOAD.
2007-03-19  Andreas Krebbel  <krebbel1@de.ibm.com>

	* doc/tm.texi: Add brackets around the return type of
	TARGET_SECONDARY_RELOAD.

From-SVN: r123062
2007-03-19 15:17:55 +00:00
Richard Henderson 9b580a0b53 re PR target/26090 (IA-64 creates DT_TEXTREL binaries)
PR target/26090
	* target.h (targetm.asm.out.reloc_rw_mask): New.
	* target-def.h (TARGET_ASM_RELOC_RW_MASK): New.
	(TARGET_ASM_OUT): Use it.
	* targhooks.c, targhooks.h (default_reloc_rw_mask): New.
	* varasm.c (categorize_decl_for_section): Remove shlib argument;
	use the new reloc_rw_mask target hook instead.
	(default_section_type_flags_1): Merge into...
	(default_section_type_flags): ... here.
	(decl_readonly_section_1): Merge into...
	(decl_readonly_section): ... here.
	(default_elf_select_section_1): Merge into...
	(default_elf_select_section): ... here.
	(default_unique_section_1): Merge into...
	(default_unique_section): ... here.
	(compute_reloc_for_rtx_1, compute_reloc_for_rtx): New.
	(default_select_rtx_section): Use it.
	(default_elf_select_rtx_section): Likewise.
	* output.h: Update to match.
	* doc/tm.texi (TARGET_ASM_RELOC_RW_MASK): New.
	* config/alpha/alpha.c (alpha_elf_reloc_rw_mask): New.
	(TARGET_ASM_RELOC_RW_MASK): New.
	* config/i386/i386.c (x86_64_elf_select_section): Adjust call
	to categorize_decl_for_section.
	(x86_64_elf_unique_section): Likewise.
	* config/ia64/hpux.h (TARGET_ASM_SELECT_SECTION,
	TARGET_ASM_UNIQUE_SECTION, TARGET_ASM_SELECT_RTX_SECTION): Remove.
	(TARGET_ASM_RELOC_RW_MASK): New.
	* config/ia64/ia64.c (ia64_rwreloc_select_section,
	ia64_rwreloc_unique_section, ia64_rwreloc_select_rtx_section): Remove.
	(ia64_hpux_reloc_rw_mask, ia64_reloc_rw_mask): New.
	(TARGET_RWRELOC): Remove.
	(ia64_section_type_flags): Adjust call to default_section_type_flags.
	* config/ia64/sysv4.h (TARGET_ASM_RELOC_RW_MASK): New.
	* config/rs6000/rs6000.c (rs6000_elf_section_type_flags): Remove.
	(rs6000_elf_select_section, rs6000_elf_unique_section): Remove.
	(rs6000_elf_reloc_rw_mask, rs6000_xcoff_reloc_rw_mask): New.
	(rs6000_xcoff_select_section): Use decl_readonly_section.
	(rs6000_xcoff_section_type_flags): Use default_section_type_flags.
	* config/rs6000/sysv4.h (TARGET_ASM_RELOC_RW_MASK): New.
	(TARGET_ASM_SELECT_SECTION, TARGET_ASM_UNIQUE_SECTION): Remove.
	(TARGET_SECTION_TYPE_FLAGS): Remove.
	* config/rs6000/xcoff.h (TARGET_ASM_RELOC_RW_MASK): New.

From-SVN: r122781
2007-03-09 16:53:09 -08:00
Mike Stump 1f1d513061 c-common.c (targetcm): Add.
* c-common.c (targetcm): Add.   
	* c-opts.c (c_common_handle_option): Handle language specific
	target options.
	* opts.c (handle_option): Verify language for target options, if
	any are given.
	* opth-gen.awk: Add CL_LANG_ALL.
	* target-def.h (TARGET_HANDLE_C_OPTION): Add.
	(TARGETCM_INITIALIZER): Add.
	* target.h (struct gcc_targetcm): Add.
	(targetcm): Add.
	* targhooks.c (default_handle_c_option): Add.
	* targhooks.h (default_handle_c_option): Add.
	* doc/tm.texi (TARGET_HANDLE_C_OPTION): Add.

	* config/darwin.opt (iframework): Add.
	* config/darwin.h (TARGET_HAS_TARGETCM): Add.
	* config/darwin-c.c (handle_c_option): Add.
	(TARGET_HANDLE_C_OPTION): Add.
	(targetcm): Add.
	* doc/invoke.texi (Darwin Options): Add -iframework.

From-SVN: r122590
2007-03-06 00:48:47 +00:00
Joseph Myers 37ea0b7e74 target.h (init_dwarf_reg_sizes_extra): New target hook.
* target.h (init_dwarf_reg_sizes_extra): New target hook.
	* target-def.h (TARGET_INIT_DWARF_REG_SIZES_EXTRA): New default.
	* doc/tm.texi (TARGET_INIT_DWARF_REG_SIZES_EXTRA): Document.
	* dwarf2out.c (expand_builtin_init_dwarf_reg_sizes): Call this
	hook.
	* config/rs6000/rs6000.c (TARGET_INIT_DWARF_REG_SIZES_EXTRA,
	rs6000_init_dwarf_reg_sizes_extra): New.
	* config/rs6000/linux-unwind.h (ppc_fallback_frame_state): Support
	SPE register high parts.

testsuite:
	* gcc.target/powerpc/spe-unwind-1.c, g++.dg/eh/simd-5.C: New
	tests.

From-SVN: r122468
2007-03-02 01:55:06 +00:00
DJ Delorie c4f46fdee9 * doc/tm.h (BIGGEST_ALIGNMENT): Clarify the purpose of this macro.
From-SVN: r122285
2007-02-23 20:28:22 -05:00
Tehila Meyzels f57d17f1fc tm.texi (TARGET_VECTORIZE_BUILTIN_CONVERSION): New target hook.
* doc/tm.texi (TARGET_VECTORIZE_BUILTIN_CONVERSION): New target hook.
        * targhooks.c (default_builtin_vectorized_conversion): New.
        * targhooks.h (default_builtin_vectorized_function): New declaration.
        * target.h (struct vectorize): Add builtin_conversion field.
        * tree-vectorizer.h (type_conversion_vec_info_type): New enum
        stmt_vec_info_type value.
        (vectorizable_conversion): New declaration.
        * tree-vect-analyze.c (vect_analyze_operations): Add
        vectorizable_conversion call.
        * target-def.h (TARGET_VECTORIZE_BUILTIN_CONVERSION): New.
        * tree-vect-transform.c (vectorizable_conversion): New function.
        (vect_transform_stmt): Add case for type_conversion_vec_info_type.
        * tree-vect-generic.c (expand_vector_operations_1): Consider correct
        mode.
        * config/rs6000/rs6000.c (rs6000_builtin_conversion): New.
        (TARGET_VECTORIZE_BUILTIN_CONVERSION): Defined.
        (rs6000_expand_builtin): Add handling a case of ALTIVEC_BUILTIN_VCFUX or
        ALTIVEC_BUILTIN_VCFSX.


Co-Authored-By: Dorit Nuzman <dorit@il.ibm.com>
Co-Authored-By: Ira Rosen <irar@il.ibm.com>

From-SVN: r121818
2007-02-11 11:46:07 +00:00
Richard Guenther b95becfc09 tree-vectorizer.h (vectorizable_function): Add argument type argument, change return type.
2007-02-05  Richard Guenther  <rguenther@suse.de>

	* tree-vectorizer.h (vectorizable_function): Add argument type
	argument, change return type.
	* tree-vect-patterns.c (vect_recog_pow_pattern): Adjust caller.
	* tree-vect-transform.c (vectorizable_function): Handle extra
	argument, return vectorized function decl.
	(build_vectorized_function_call): Remove.
	(vectorizable_call): Handle calls with result and argument types
	differing.  Handle loop vectorization factor correctly.
	* targhooks.c (default_builtin_vectorized_function): Adjust for
	extra argument.
	* targhooks.h (default_builtin_vectorized_function): Likewise.
	* target.h (builtin_vectorized_function): Add argument type
        argument.
	* config/i386/i386.c (ix86_builtin_vectorized_function): Handle
	extra argument, allow vectorizing of lrintf.
	* doc/tm.texi (TARGET_VECTORIZE_BUILTIN_VECTORIZED_FUNCTION): Adjust
	documentation of target hook.

	* gcc.target/i386/vectorize3.c: New testcase.

From-SVN: r121617
2007-02-05 21:38:53 +00:00
Richard Sandiford 5cd0f9153d tm.texi (DWARF_ALT_FRAME_RETURN_COLUMN): Do not require DWARF_FRAME_RETURN_COLUMN to be a general register.
gcc/
	* doc/tm.texi (DWARF_ALT_FRAME_RETURN_COLUMN): Do not require
	DWARF_FRAME_RETURN_COLUMN to be a general register.
	* dwarf2out.c (init_return_column_size): New function, split from...
	(expand_builtin_init_dwarf_reg_sizes): ...here.  Allow both
	DWARF_FRAME_RETURN_COLUMN and DWARF_ALT_FRAME_RETURN_COLUMN
	to be nongeneral registers.
	* config/m68k/m68k.h (DWARF_FRAME_REGNUM): Only map FP and
	integer registers.
	(DWARF_FRAME_REGISTERS, DWARF_FRAME_RETURN_COLUMN): Define.
	(DWARF_ALT_FRAME_RETURN_COLUMN): Define.

From-SVN: r121593
2007-02-05 10:38:46 +00:00
Maxim Kuvyrkov b198261f9c re PR middle-end/28071 (A file that can not be compiled in reasonable time/space)
* sched-int.h (ds_to_dk, dk_to_ds): Declare functions.
	
	(struct _dep): New type.
	(dep_t): New typedef.
	(DEP_PRO, DEP_CON, DEP_KIND): New access macros.
	(DEP_STATUS): New access macro.  The macro with the same name was
	renamed to DEP_LINK_STATUS.
	(dep_init): Declare function

	(struct _dep_link): New type.
	(dep_link_t): New typedef.
	(DEP_LINK_NODE, DEP_LINK_NEXT, DEP_LINK_PREV_NEXTP): New access macros.
	(DEP_LINK_DEP, DEP_LINK_PRO, DEP_LINK_CON, DEP_LINK_KIND): New macros.
	(DEP_LINK_STATUS): New macro.
	(debug_dep_links): New debug function.

	(struct _deps_list): New type.
	(deps_list_t): New typedef.
	(DEPS_LIST_FIRST): New access macro.
	(FOR_EACH_DEP_LINK): New cycle macro.
	(create_deps_list, free_deps_list, delete_deps_list): Declare
	functions.
	(deps_list_empty_p, debug_deps_list, add_back_dep_to_deps_list): Ditto.
	(find_link_by_pro_in_deps_list, find_link_by_con_in_deps_list): Ditto.
	(copy_deps_list_change_con): Ditto.

	(move_dep_link): Declare function.

	(struct _dep_node): New type.
	(dep_node_t): New typedef.
	(DEP_NODE_BACK, DEP_NODE_DEP, DEP_NODE_FORW): New access macros.

	(struct haifa_insn_data.back_deps): New field to hold backward
	dependencies of the insn.
	(struct haifa_insn_data.depend): Rename to forw_deps.  Change its type
	to deps_list_t.
	(struct haifa_insn_data.resolved_deps): Rename to resolved_back_deps.
	Change its type	to deps_list_t.
	(INSN_BACK_DEPS): New access macro to use instead of LOG_LINKS.
	(INSN_DEPEND): Rename to INSN_FORW_DEPS.
	(RESOLVED_DEPS): Rename to INSN_RESOLVED_BACK_DEPS.

	(INSN_COST): Move to haifa-sched.c.  Use insn_cost () instead.
	
	(DEP_STATUS): Rename to DEP_LINK_STATUS.  Fix typo in the comment.

	(add_forw_dep, delete_back_forw_dep, insn_cost): Update declaration and
	all callers.
	(dep_cost): Declare.
	
	* sched-deps.c (CHECK): New macro to (en/dis)able sanity checks.
	(ds_to_dk, dk_to_ds): New functions.
	
	(init_dep_1): New static function.
	(init_dep): New function.
	(copy_dep): New static function.
	
	(dep_link_consistent_p, attach_dep_link, add_to_deps_list): New static
	functions.
	(detach_dep_link): New static function.
	(move_dep_link): New function.
	
	(dep_links_consistent_p, dump_dep_links): New static functions.
	(debug_dep_links): New debugging function.
	
	(deps_obstack, dl_obstack, dn_obstack): New static variables.
	
	(alloc_deps_list, init_deps_list): New static functions.
	(create_deps_list): New function.
	(clear_deps_list): New static function.
	(free_deps_list, delete_deps_list, deps_list_empty_p): New functions.
	(deps_list_consistent_p, dump_deps_list): New static functions.
	(debug_deps_list): New function.
	(add_back_dep_to_deps_list, find_link_by_pro_in_deps_list): New
	functions.
	(find_link_by_con_in_deps_list, copy_deps_list_change_con): Ditto.

	(maybe_add_or_update_back_dep_1, add_or_update_back_dep_1): Update to
	use new scheduler dependencies lists.
	(add_back_dep, delete_all_dependences, fixup_sched_groups): Ditto.
	(sched_analyze): Ditto.  Initialize dependencies lists.
	(add_forw_dep, compute_forward_dependences): Update to use new
	scheduler dependencies lists.
	
	(init_dependency_caches): Init deps_obstack.
	(free_dependency_caches): Free deps_obstack.
	
	(adjust_add_sorted_back_dep, adjust_back_add_forw_dep): Update to use
	new scheduler dependencies lists.
	(delete_forw_dep, add_or_update_back_forw_dep): Ditto.
	(add_back_forw_dep, delete_back_forw_dep): Ditto.

	* sched-rgn.c (set_spec_fed, find_conditional_protection, is_pfree):
	Update to use new scheduler dependencies lists.
	(is_conditionally_protected, is_prisky, add_branch_dependences): Ditto.
	(debug_dependencies): Ditto.
	(schedule_region): Update comments.
	
	* sched-ebb.c (earliest_block_with_similiar_load): Update to use new
	scheduler dependencies lists.
	(schedule_ebb): Update comments.
	
	* rtl.def (DEPS_LIST): Remove.
	
	* lists.c (unused_deps_list): Remove.
	(free_list): Update assertions.
	
	(alloc_DEPS_LIST, free_DEPS_LIST_list, free_DEPS_LIST_node): Remove.
	(remove_free_DEPS_LIST_elem, copy_DEPS_LIST_list): Ditto.

	* rtl.h (free_DEPS_LIST_list, alloc_DEPS_LIST): Remove declarations.
	(remove_free_DEPS_LIST_elem, copy_DEPS_LIST_list): Ditto.
	
	* haifa-sched.c (comments): Update.
	(insn_cost1): Remove.  Inline the code into insn_cost ().
	(insn_cost): Update to use new scheduler dependencies lists.  Move
	processing of the dependency cost to dep_cost ().
	(dep_cost): New function.  Use it instead of insn_cost () when
	evaluating cost of the dependency.  Use compatible interface to
	interact with the target.
	(priority): Update to use new scheduler dependencies lists.
	(rank_for_schedule): Ditto.  Optimize heuristic that prefers the insn
	with greater number of insns that depend on the insn.
	(schedule_insn): Update to use new scheduler dependencies lists.  Add
	code to free backward dependencies lists.  Inline and optimize code
	from resolve_dep () - see PR28071.
	(ok_for_early_queue_removal): Update to use new scheduler dependencies
	lists.  Update call to targetm.sched.is_costly_dependence hook.
	
	(fix_inter_tick, try_ready, fix_tick_ready): Update to use new
	scheduler dependencies lists.
	
	(resolve_dep): Remove.  Move the logic to schedule_insn ().
	(init_h_i_d): Initialize dependencies lists.
	
	(process_insn_depend_be_in_spec): Rename to
	process_insn_forw_deps_be_in_spec.  Update to use new scheduler
	dependencies lists.
	(add_to_speculative_block, create_check_block_twin, fix_recovery_deps):
	Update to use new scheduler dependencies lists.
	(clear_priorities, calc_priorities, add_jump_dependencies): Ditto.
	
	* ddg.c (create_ddg_dependence, create_ddg_dep_no_link): Update to use
	new scheduler dependencies lists.
	(build_intra_loop_deps): Ditto.
	
	* target.h (struct _dep): Declare to use in
	gcc_target.sched.is_costly_dependence.
	(struct gcc_target.sched.adjust_cost): Fix typo.
	(struct gcc_target.sched.is_costly_dependence): Change signature to use
	single dep_t parameter instead of an equivalent triad.
	(struct gcc_target.sched.adjust_cost_2): Remove.

	* target-def.h (TARGET_SCHED_ADJUST_COST_2): Remove.

	* reg-notes.def (DEP_TRUE, DEP_OUTPUT, DEP_ANTI): Update comments.

	* doc/tm.texi (TARGET_SCHED_IS_COSTLY_DEPENDENCE): Update
	documentation.
	(TARGET_SCHED_ADJUST_COST_2): Remove documentation.

	* doc/rtl.texi (LOG_LINKS): Remove part about instruction scheduler.
	(REG_DEP_TRUE): Document.
	
	* config/ia64/ia64.c (ia64_adjust_cost_2): Rename to ia64_adjust_cost.
	Change signature to correspond to the targetm.sched.adjust_cost hook.  
	Update use in TARGET_SCHED_ADJUST_COST_2.
	(TARGET_SCHED_ADJUST_COST_2): Rename to TARGET_SCHED_ADJUST_COST.
	(ia64_dependencies_evaluation_hook, ia64_dfa_new_cycle): Update to use
	new scheduler dependencies lists.
	(ia64_gen_check): Ditto.

	* config/mips/mips.c (vr4130_swap_insns_p): Update to use new scheduler
	dependencies lists.
	
	* config/rs6000/rs6000.c (rs6000_is_costly_dependence): Change
	signature to correspond to the targetm.sched.is_costly_dependence hook.
	(is_costly_group): Update to use new scheduler dependencies lists.

	* config/spu/spu.c (spu_sched_adjust_cost): Use insn_cost () function
	instead of INSN_COST () macro.

From-SVN: r121494
2007-02-02 09:11:11 +00:00
Ralf Wildenhues ab873839aa c-tree.texi (Expression trees): Improve markup.
2007-01-31  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	* doc/c-tree.texi (Expression trees): Improve markup.
	* doc/tm.texi (Register Classes, Addressing Modes)
	(Floating Point): Fix spacing after abbreviations.  Fix some
	typos.

From-SVN: r121457
2007-01-31 21:36:17 -08:00
Steve Ellcey 812b587e9d target.h (globalize_decl_name): New.
* target.h (globalize_decl_name): New.
	* target-def.h (TARGET_ASM_GLOBALIZE_DECL_NAME): New.
	* output.h (default_globalize_decl_name): New.
	* varasm.c (asm_output_bss): Use globalize_decl_name instead of
	globalize_label.
        (globalize_decl): Ditto.
	(default_globalize_decl_name): New.
	* config/ia64/ia64.c (ia64_globalize_decl_name): New.
	(ia64_handle_version_id_attribute): New.
	(TARGET_ASM_GLOBALIZE_DECL_NAME): New.
	(ia64_asm_output_external): Use globalize_decl_name instead
	of globalize_label.
	* doc/extend.texi (version_id): New pragma.
	* doc/tm.texi (ARGET_ASM_GLOBALIZE_DECL_NAME): New target hook.

From-SVN: r121128
2007-01-24 19:40:12 +00:00
Richard Guenther 006339cde4 tm.texi (TARGET_HAS_SINCOS): Document new target macro.
2007-01-19  Richard Guenther  <rguenther@suse.de>

	* doc/tm.texi (TARGET_HAS_SINCOS): Document new target macro.
	* defaults.h (TARGET_HAS_SINCOS): Default to off.
	* config/linux.h (TARGET_HAS_SINCOS): Set to on if we have glibc.
	* config/alpha/linux.h (TARGET_HAS_SINCOS): Likewise.
	* config/sparc/linux.h (TARGET_HAS_SINCOS): Likewise.
	* config/sparc/linux64.h (TARGET_HAS_SINCOS): Likewise.
	* config/rs6000/linux.h (TARGET_HAS_SINCOS): Likewise.
	* config/rs6000/linux64.h (TARGET_HAS_SINCOS): Likewise.

From-SVN: r120952
2007-01-19 11:06:56 +00:00
Kazu Hirata 576c9028f0 200x-xx-xx Kazu Hirata <kazu@codesourcery.com> Richard Sandiford <richard@codesourcery.com>
gcc/
200x-xx-xx  Kazu Hirata  <kazu@codesourcery.com>
	    Richard Sandiford  <richard@codesourcery.com>

	* doc/tm.texi (TARGET_FUNCTION_VALUE): Expand documentation of
	parallels.
	* calls.c (expand_call): If the return value is a PARALLEL,
	extract its first member.
	* config/m68k/linux.h (FUNCTION_EXTRA_EPILOGUE): Remove.
	* config/m68k/m68k.c (m68k_output_function_epilogue): Don't
	use FUNCTION_EXTRA_EPILOGUE.
	(m68k_function_value): Return a PARALLEL if the return value
	is of a pointer type.
	* config/m68k/netbsd-elf.h (current_function_returns_pointer)
	(FUNCTION_EXTRA_EPILOGUE): Remove.
	* config/m68k/m68k.md (D0_REG): New constant.

Co-Authored-By: Richard Sandiford <richard@codesourcery.com>

From-SVN: r120929
2007-01-18 19:54:44 +00:00
Carlos O'Donell fe037b8a3d tm.texi: Update documentation to reflect reality of exec and start file search behaviours.
gcc/

2007-01-09  Carlos O'Donell  <carlos@codesourcery.com>

	* doc/tm.texi: Update documentation to reflect reality of exec
	and start file search behaviours. Update copyright year.
	* doc/invoke.texi: Explain how GCC_EXEC_PREFIX is used to find
	header file directories.

From-SVN: r120622
2007-01-09 21:08:19 +00:00
Geoffrey Keating 157600d084 Index: ChangeLog
2007-01-08  Geoffrey Keating  <geoffk@apple.com>

	* target.h (struct gcc_target): New field library_rtti_comdat.
	* target-def.h (TARGET_CXX_LIBRARY_RTTI_COMDAT): New.
	(TARGET_CXX): Add TARGET_CXX_LIBRARY_RTTI_COMDAT.
	* doc/tm.texi (C++ ABI): Document TARGET_CXX_LIBRARY_RTTI_COMDAT.
	* config/darwin.h (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.

Index: testsuite/ChangeLog
2007-01-08  Geoffrey Keating  <geoffk@apple.com>

	* g++.dg/rtti/darwin-builtin-linkage.C: New.

Index: cp/ChangeLog
2007-01-08  Geoffrey Keating  <geoffk@apple.com>

	* rtti.c: Include target.h.
	(emit_support_tinfos): If ! targetm.cxx.library_rtti_comdat (),
	don't emit typeinfo for fundamental types as weak.
	* Make-lang.in (cp/rtti.o): Update and correct dependencies.

From-SVN: r120611
2007-01-09 07:48:38 +00:00
Joseph Myers f1f4e530a5 rtlanal.c (struct subreg_info, [...]): New.
* rtlanal.c (struct subreg_info, subreg_get_info, subreg_nregs):
	New.
	(subreg_regno_offset, subreg_offset_representable_p): Change to
	wrappers about subreg_get_info.
	(refers_to_regno_p, reg_overlap_mentioned_p): Use subreg_nregs.
	* rtl.h (subreg_nregs): Declare.
	* doc/tm.texi (HARD_REGNO_NREGS_HAS_PADDING): Update to refer to
	subreg_get_info.
	* caller-save.c (mark_set_regs, add_stored_regs): Use
	subreg_nregs.
	* df-scan.c (df_ref_record): Use subreg_nregs.
	* flow.c (mark_set_1): Use subreg_nregs.
	* postreload.c (move2add_note_store): Use subreg_nregs.
	* reload.c (decompose, refers_to_regno_for_reload_p,
	reg_overlap_mentioned_for_reload_p): Use subreg_nregs.
	* resource.c (update_live_status, mark_referenced_resources,
	mark_set_resources): Use subreg_nregs.

From-SVN: r120076
2006-12-20 16:25:00 +00:00
Geoffrey Keating 606e938d0f tm.texi (Alignment Output): Document that ASM_OUTPUT_SKIP actually takes an unsigned HOST_WIDE_INT for its...
* doc/tm.texi (Alignment Output): Document that ASM_OUTPUT_SKIP
	actually takes an unsigned HOST_WIDE_INT for its second parameter.

From-SVN: r119806
2006-12-12 23:53:37 +00:00
Nick Clifton e0d9d0ddb6 common.opt (record-gcc-switches): New command line switch.
* common.opt (record-gcc-switches): New command line switch.
* target.h (print_switch_type): New enum.
  (print_switch_fn_type): New typedef for a function pointer.
  (struct gcc_target): Add record_gcc_switches and record_gcc_switches_section fields.
* target-def.h (TARGET_ASM_RECORD_GCC_SWITCHES): Provide a default definition.
  (TARGET_ASM_RECORD_GCC_SWITCHES_SECTION): Provide a default definition.
* toplev.c (print_single_switch): Simplify by providing a pointer to function that will format and output the switch appropriately.
  (print_switch_values): Likewise.
  (print_to_asm_out_file): New function.
  (print_to_stderr): New function.
  (init_asm_output): If flag_record_gcc_switches is set then if the target supports recording the switches then emit them into the assembler output file, otherwise tell the user that the switch is not supported.
* varasm.c (eld_record_gcc_switches): New function.  Example handler for the record_gcc_switches target hook.
* doc/tm.texi (TARGET_ASM_RECORD_GCC_SWITCHES): Document the new target hook.
  (TARGET_ASM_RECORD_GCC_SWITCHES_SECTION): Likewise.
* doc/invoke.texi (-frecord-gcc-switches): Document.

From-SVN: r119615
2006-12-07 10:54:13 +00:00
Joseph Myers 8521c41417 re PR target/24036 ([e500] ICE in subreg_offset_representable_p, at rtlanal.c:3143)
2006-12-01  Joseph Myers  <joseph@codesourcery.com>
            David Edelsohn  <edelsohn@gnu.org>

	PR target/24036
	* doc/tm.texi (HARD_REGNO_NREGS_HAS_PADDING,
	HARD_REGNO_NREGS_WITH_PADDING): Document new target macros.
	* defaults.h (HARD_REGNO_NREGS_HAS_PADDING,
	HARD_REGNO_NREGS_WITH_PADDING): Define.
	* config/i386/i386.h (HARD_REGNO_NREGS_HAS_PADDING,
	HARD_REGNO_NREGS_WITH_PADDING): Define.
	* rtlanal.c (subreg_regno_offset, subreg_offset_representable_p):
	Use new macros to detect modes with holes; do not look at integer
	units.
	(subreg_offset_representable_p): Check for and disallow cases
	where the modes use different numbers of bits from registers.
	* config/rs6000/rs6000.c (rs6000_emit_move): Handle TFmode
	constant for soft-float.
	(rs6000_hard_regno_nregs): Use UNITS_PER_FP_WORD for e500 GPRs
	containing doubles.
	(rs6000_split_multireg_move): Use DFmode reg_mode for TFmode moves
	in E500 double case.
	* config/rs6000/rs6000.md (movtf): Allow soft-float.
	(movtf_softfloat): New.

Co-Authored-By: David Edelsohn <edelsohn@gnu.org>

From-SVN: r119395
2006-12-01 02:25:22 +00:00
Carlos O'Donell 11d90e2dd0 tm.texi (MAX_OFILE_ALIGNMENT): Document default.
gcc/

2006-11-30  Carlos O'Donell  <carlos@codesourcery.com>

	* doc/tm.texi (MAX_OFILE_ALIGNMENT): Document default.
	* config/elfos.h [!MAX_OFILE_ALIGNMENT] (MAX_OFILE_ALIGNMENT): 
	Default is the largest alignment supported for 32-bit ELF and 
	representable on a 32-bit host.

From-SVN: r119374
2006-11-30 19:25:08 +00:00