Commit Graph

659 Commits

Author SHA1 Message Date
Richard Sandiford 08d0963a0e configure.ac (mips*-*-*linux*, [...]): Use mt-mips-gnu.
* configure.ac (mips*-*-*linux*, mips*-*-gnu*): Use mt-mips-gnu.
	* configure: Regenerate.

config/
	* mt-mips16-compat: New file, taken from mt-mips-elfoabi.
	* mt-mips-elfoabi: Include mt-mips16-compat.
	* mt-mips-gnu: New file.

gcc/
	* config.gcc (mips*-*-linux*, mips64*-*-linux*): Add
	mips/t-libgcc-mips16 to tmake_file.
	* config/mips/mips-protos.h (mips_call_type): New enum.
	(mips_pic_base_register, mips_got_load): Declare.
	(mips_restore_gp): Take an rtx argument.
	(mips_use_pic_fn_addr_reg_p): Declare.
	(mips_expand_call): Replace the sibcall_p argument with
	a mips_call_type argument.  Add a lazy_p parameter.
	(mips_split_call): Declare.
	* config/mips/mips.h (MIPS16_PIC_TEMP_REGNUM): New macro.
	(MIPS16_PIC_TEMP): Likewise.
	(reg_class): Delete M16_NA_REGS.
	(REG_CLASS_NAMES, REG_CLASS_CONTENTS): Update accordingly.
	(SYMBOL_FLAG_BIND_NOW, SYMBOL_REF_BIND_NOW_P): New macros.
	(mips_split_hi_p): Declare.
	* config/mips/mips.c (mips_split_hi_p): New array.
	(mips_regno_to_class): Change M16_NA_REGS entries to M16_REGS.
	(mips_got_symbol_type_p): New function.
	(mips_global_symbol_p): Check SYMBOL_REF_EXTERNAL_P.
	(mips16_stub_function_p): New function.
	(mips16_local_function_p): Likewise.
	(mips_use_pic_fn_addr_reg_p): Likewise.
	(mips_cannot_force_const_mem): Return false for HIGHs.
	Extend CONST_INT and symbolic handling to MIPS16, using
	mips_symbol_insns to check that the base symbol type is a
	legitimate constant.  Reject GOT-based constants if
	TARGET_MIPS16_PCREL_LOADS.
	(mips_const_insns): Check targetm.cannot_force_const_mem when
	decomposing a symbolic base and a large offset.
	(mips_emit_call_insn): Add ORIG_ADDR and ADDR parameters.
	When calling a function that needs $25 from MIPS16 code,
	move the target address into $25 separately and add a USE
	to the call insn.
	(mips16_gp_pseudo_reg): Insert the initializer immediately
	before the first real insn.
	(mips_pic_base_register, mips_got_load): New functions.
	(mips_split_symbol): Generalize the name of the LO_SUM_OUT
	parameter to LOW_OUT.  Say that it can be any valid SET_SRC
	when splitting a load-address operation.  Split SYMBOL_GOT_DISP
	constants and highs of SYMBOL_GOT_PAGE_OFST constants.
	(mips_call_tls_get_addr): Update the call to mips_expand_call,
	also passing NULL_RTX rather than const0_rtx as the aux argument.
	(mips_rewrite_small_data_p): Check mips_lo_relocs and mips_split_p
	instead of TARGET_EXPLICIT_RELOCS.
	(mips_ok_for_lazy_binding_p): Check SYMBOL_REF_BIND_NOW_P.
	(mips_load_call_address): Replace the sibcall_p argument with
	a mips_call_type argument.  Use mips_got_load.
	(mips16_local_alias): New structure.
	(mips16_local_aliases): New variable.
	(mips16_local_aliases_hash): New function.
	(mips16_local_aliases_eq): Likewise.
	(mips16_local_alias): Likewise.
	(mips16_stub_function): Likewise.
	(mips16_build_function_stub): Create a local alias for the target
	function.  Handle TARGET_ABICALLS.  For PIC abicalls, emit a
	.cpload directive and an R_MIPS_NONE relocation for the target
	function, then load the alias rather than the function itself.
	Wrap the non-PIC abicalls version in ".option pic0/.option pic2".
	(mips16_copy_fpr_return_value): Use mips16_stub_function and
	mips_expand_call.  Set SYMBOL_REF_BIND_NOW on the symbol.
	(mips16_build_call_stub): Replace the FN parameter with an
	FN_PTR parameter.  Force the address into a register if it
	isn't a call_insn_operand; don't rely on the caller to do this.
	If a call to a locally-defined and locally-binding MIPS16
	function must be made indirectly, redirect the call to the
	function's local alias.  Use mips16_stub_function_p,
	mips16_stub_function, mips_expand_call and use_reg.
	Set SYMBOL_FLAG_BIND_NOW on __mips_call_* symbols.
	Use explicit %hi and %lo accesses where possible.
	Use MIPS_CALL to generate the correct code form of a
	jal instruction.  Add clobbers of $18 instead of uses.
	Update the call to mips_emit_call_insn.
	(mips_expand_call): Replace the SIBCALL_P argument with a
	mips_call_type argument and handle the new MIPS_CALL_EPILOGUE value.
	Take a LAZY_P parameter.  Call mips16_build_call_stub first,
	allowing it to modify the call address.  Update the calls to
	mips_load_call_address and mips_emit_call_insn.
	(mips_split_call): New function.
	(mips_init_relocs): Clear mips_split_hi_p.  Only use %gp_rel if
	!TARGET_MIPS16.  Split SYMBOL_GOT_DISP, and the high parts of
	SYMBOL_GOT_PAGE_OFST, for MIPS16 code.
	(mips_global_pointer): Check mips16_cfun_returns_in_fpr_p.
	(mips_extra_live_on_entry): Include MIPS16_PIC_TEMP_REGNUM
	if TARGET_MIPS16.
	(mips_cprestore_slot): New function.
	(mips_restore_gp): Take a TEMP parameter.  Handle TARGET_MIPS16
	and use mips_cprestore_slot.
	(mips_output_function_prologue): Handle TARGET_MIPS16 for
	LOADGP_OLDABI.
	(mips_emit_loadgp): Move into MIPS16_PIC_TEMP for MIPS16,
	then use a copygp_mips16 instruction to set up $28.
	(mips_expand_prologue): Initialize the cprestore slot for MIPS16 too.
	(mips16_lay_out_constants): Call split_all_insns_noflow.
	(mips_reorg_process_insns): Explicitly set all_noreorder_p to
	false if TARGET_MIPS16.
	(mips_reorg): Don't call vr4130_align_insns if TARGET_MIPS16.
	(mips_output_mi_thunk): Use mips_got_symbol_type_p.  Use the
	mips_dangerous_for_la25_p approach for MIPS16 PIC calls too.
	(mips_set_mips16_mode): Always set MASK_EXPLICIT_RELOCS for
	MIPS16 code.  Allow MIPS16 o32 PIC.
	(mips_override_options): Allow MIPS16 o32 PIC.
	* config/mips/mips.md: Lower CONST_GP_P moves into register moves
	after reload if TARGET_USE_GOT.
	(UNSPEC_COPYGP): New constant.
	(length): Use a default length of 8 for MIPS16 GOT loads.
	(*got_disp<mode>): Check mips_split_p instead of TARGET_XGOT.
	(*got_page<mode>): Check mips_split_hi_p.
	(*got_disp<mode>, *got_page<mode>): Use mips_got_load.
	(unspec_got<mode>, unspec_call<mode>): New expanders.
	(load_got<mode>, load_call<mode>): Remove the length attributes.
	Use a got attribute instead of a type attribute.
	(copygp_mips16): New insn.
	(restore_gp): Add a scratch clobber and pass it to mips_restore_gp.
	(load_call<mode>): Use a "d" constraint instead of an "r" constraint.
	(sibcall, sibcall_value, call, call_value): Update the calls
	to mips_expand_call.
	(call_internal, call_value_internal): Use mips_split_call.
	(call_value_multiple_internal): Likewise.
	(call_split): Move after call_internal (the insn it is split from).
	(call_internal_direct, call_value_internal_direct): Turn into
	define_insn_and_splits.  Split if TARGET_SPLIT_CALLS.
	(call_direct_split, call_value_direct_split): New patterns.
	* config/mips/constraints.md (c): Handle TARGET_MIPS16 first
	and use M16_REGS instead of M16_NA_REGS.
	* config/mips/predicates.md (const_call_insn_operand): Replace
	the TARGET_ABSOLUTE_ABICALLS-based check with a more general
	mips_use_pic_fn_addr_reg_p check.
	(move_operand): Reject HIGHs if mips_split_hi_p.
	* config/mips/mips16.S: Assembly as empty if the ABI is not suitable.
	(__mips16_floatunsisf): Inline __mips16_floatsisf.
	(CALL_STUB_NO_RET, CALL_STUB_REG): Copy the target register to $25.
	* config/mips/libgcc-mips16.ver: New file.
	* config/mips/t-libgcc-mips16 (SHLIB_MAPFILES): Add
	$(srcdir)/config/mips/libgcc-mips16.ver.

gcc/testsuite/
	* lib/target-supports.exp (check_profiling_available): Return false
	for -p and -pg on MIPS16 targets.

From-SVN: r138912
2008-08-09 19:08:15 +00:00
Richard Sandiford 579725054c mips.h (MASK_RETURN_ADDR): Expand commentary.
gcc/
	* config/mips/mips.h (MASK_RETURN_ADDR): Expand commentary.
	* config/mips/linux-unwind.h (mips_fallback_frame_state): Add 2
	rather than 4 to PC.

From-SVN: r138910
2008-08-09 18:19:32 +00:00
Richard Sandiford e538e028ec mips.h (STATIC_CHAIN_REGNUM): Remap to $15.
gcc/
	* config/mips/mips.h (STATIC_CHAIN_REGNUM): Remap to $15.
	(FUNCTION_PROFILER): Save the static chain pointer into $2
	beforehand and restore it aftewards.
	(TRAMPOLINE_TEMPLATE): Adjust accordingly.  Load the target
	address directly into $25 and call the function through $25;
	do not clobber $3.  Pad the DImode version to cover the space
	left by the deleted $25 <- $3 move.
	(TRAMPOLINE_SIZE): Adjust the size of the SImode version after
	the removal of the $25 <- $3 move.
	(INITIALIZE_TRAMPOLINE): Update offsets accordingly.
	* config/mips/sdemtk.h (FUNCTION_PROFILER): As for mips.h.

From-SVN: r138909
2008-08-09 18:11:19 +00:00
Richard Sandiford b2b6160771 mips.h (FUNCTION_NAME_ALREADY_DECLARED): Delete.
gcc/
2008-08-09  Richard Sandiford  <rdsandiford@googlemail.com>
	    Daniel Jacobowitz  <dan@codesourcery.com>

	* config/mips/mips.h (FUNCTION_NAME_ALREADY_DECLARED): Delete.
	* config/mips/linux.h (ASM_DECLARE_FUNCTION_NAME): Delete.
	(ASM_DECLARE_FUNCTION_SIZE, FUNCTION_NAME_ALREADY_DECLARED): Delete.
	* config/mips/mips.c (mips_start_function_definition): New function.
	(mips_end_function_definition): Likewise.
	(mips_output_function_prologue): Use mips_start_function_definition.
	(mips_output_function_epilogue): Use mips_end_function_definition.
	(build_mips16_function_stub): Use mips_start_function_definition
	and mips_end_function_definition.
	(build_mips16_call_stub): Likewise.

Co-Authored-By: Daniel Jacobowitz <dan@codesourcery.com>

From-SVN: r138908
2008-08-09 18:10:18 +00:00
Adam Nemet f2d6ca5081 config.gcc (mipsisa64*-*-linux*): New configuration.
* config.gcc (mipsisa64*-*-linux*): New configuration.  Set ISA
	to MIPS64r2 for mipsisa64r2*.
	* config/mips/mips.h (GENERATE_MIPS16E): Update comment.
	(ISA_MIPS64R2): New macro.
	(TARGET_CPU_CPP_BUILTINS, MULTILIB_ISA_DEFAULT): Handle it.
	(ISA_HAS_64BIT_REGS, ISA_HAS_MUL3, ISA_HAS_FP_CONDMOVE,
	ISA_HAS_8CC, ISA_HAS_FP4, ISA_HAS_PAIRED_SINGLE,
	ISA_HAS_MADD_MSUB, ISA_HAS_NMADD4_NMSUB4, ISA_HAS_CLZ_CLO,
	ISA_HAS_ROR, ISA_HAS_PREFETCH, ISA_HAS_PREFETCHX, ISA_HAS_SEB_SEH,
	ISA_HAS_EXT_INS, ISA_HAS_MXHC1, ISA_HAS_HILO_INTERLOCKS,
	ISA_HAS_SYNCI, MIN_FPRS_PER_FMT): Return true for ISA_MIPS64R2.
	(MIPS_ISA_LEVEL_SPEC, ASM_SPEC, LINK_SPEC): Handle -mips64r2.
	(TARGET_LOONGSON_2E, TARGET_LOONGSON_2F, TARGET_LOONGSON_2EF):
	Move up to keep list alphabetically sorted.
	(TUNE_20KC, TUNE_24K, TUNE_74K, TUNE_LOONGSON_2EF): Likewise.
	* config/mips/mips.c (mips_cpu_info_table): Add default MIPS64r2
	processor.
	* doc/invoke.texi (MIPS Options): Add -mips64r2.
	(-march=@var{arch}): Add mips64r2.

testsuite/

	* gcc.target/mips/ext-1.c: New test.

From-SVN: r138448
2008-08-01 01:18:16 +00:00
Richard Sandiford 2feaae2036 md.texi: Document the MIPS "v" constraint.
gcc/
	* doc/md.texi: Document the MIPS "v" constraint.
	* config/mips/mips.h (reg_class): Revert last change.
	(REG_CLASS_NAMES): Likewise.
	(REG_CLASS_CONTENTS): Likewise.
	* config/mips/mips.c (mips_regno_to_class): Likewise.
	* config/mips/constraints.md (v): Likewise, but add documentation.
	Add a comment to say that this constraint should not be used in
	gcc code.

From-SVN: r137734
2008-07-12 07:57:42 +00:00
Richard Sandiford 256f27f13c re PR target/35802 (MIPS64: Unable to find a register to spill in class &#8216;V1_REG&#8217;)
gcc/
	PR target/35802
	* config/mips/mips.h (reg_class): Remove V1_REG.
	(REG_CLASS_NAMES, REG_CLASS_CONTENTS): Update accordingly.
	* config/mips/mips.c (mips_regno_to_class): Map $3 to M16_NA_REGS
	instead of V1_REGS.
	(mips_get_tp): New function.
	(mips_legitimize_tls_address): Use it.
	* config/mips/constraints.md (v): Delete.
	* config/mips/mips.md (TLS_GET_TP_REGNUM): New constant.
	(tls_get_tp_<mode>): Allow any GPR destination and clobber $3.
	After reload, split into a move and ...
	(*tls_get_tp_<mode>_split): ...this new instruction.

gcc/testsuite/
	PR target/35802
	* gcc.target/mips/pr35802.c: New test.

From-SVN: r137670
2008-07-09 20:03:40 +00:00
Richard Sandiford 60730adec0 mips.h (TARGET_CPU_CPP_BUILTINS): Check mips_base_mips16 instead of TARGET_MIPS16.
gcc/
	* config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Check
	mips_base_mips16 instead of TARGET_MIPS16.
	(mips_base_mips16): Declare.
	* config/mips/mips.c (mips_base_mips16): Make global.
	(was_mips16_p): Remove GTY marker.
	(was_mips16_pch_p): New variable.
	(mips_set_mips16_mode): Check both was_mips16_p and was_mips16_pch_p.
	(mips_override_options): Force to non-MIPS16 mode initially.
	Do not complain about MIPS16 PIC incompatibilities here.
	Only allow -mgpopt if -mexplicit-relocs is in force for
	non-MIPS16 code.

gcc/testsuite/
	* gcc.target/mips/gcc-have-sync-compare-and-swap-1.c: Expect the
	macros to be defined for MIPS16 too.
	* gcc.target/mips/gcc-have-sync-compare-and-swap-2.c: Likewise.
	* gcc.target/mips/gcc-have-sync-compare-and-swap-3.c: New test.
	* gcc.target/mips/gcc-have-sync-compare-and-swap-4.c: Likewise.

From-SVN: r137539
2008-07-06 20:38:37 +00:00
Maxim Kuvyrkov b51469a5d8 mips.h (ISA_HAS_CONDMOVE): Slice ISA_HAS_FP_CONDMOVE from it.
* config/mips/mips.h (ISA_HAS_CONDMOVE): Slice ISA_HAS_FP_CONDMOVE
	from it.
	(ISA_HAS_FP_CONDMOVE): New macro.
	(ISA_HAS_FP_MADD4_MSUB4, ISA_HAS_FP_MADD3_MSUB3): New macros.
	(ISA_HAS_NMADD_NMSUB): Rename to ISA_HAS_NMADD4_NMSUB4.
	(ISA_HAS_NMADD3_NMSUB3): New macro.
	* config/mips/mips.c (mips_rtx_costs): Update.
	* config/mips/mips.md (MOVECC): Don't use FP conditional moves when
	compiling for ST Loongson 2E/2F.
	(madd<mode>): Rename to madd4<mode>.  Update.
	(madd3<mode>): New pattern.
	(msub<mode>): Rename to msub4<mode>.  Update.
	(msub3<mode>): New pattern.
	(nmadd<mode>): Rename to nmadd4<mode>.  Update.
	(nmadd3<mode>): New pattern.
	(nmadd<mode>_fastmath): Rename to nmadd4<mode>_fastmath.  Update.
	(nmadd3<mode>_fastmath): New pattern.
	(nmsub<mode>): Rename to nmsub4<mode>.  Update.
	(nmsub3<mode>): New pattern.
	(nmsub<mode>_fastmath): Rename to nmsub4<mode>_fastmath.  Update.
	(nmsub3<mode>_fastmath): New pattern.
	(mov<SCALARF:mode>_on_<MOVECC:mode>, mov<mode>cc): Update.

From-SVN: r136887
2008-06-18 07:39:45 +00:00
Maxim Kuvyrkov 58684fa02e loongson2ef.md: New file.
* config/mips/loongson2ef.md: New file.
	* config/mips/mips.md (UNSPEC_LOONGSON_ALU1_TURN_ENABLED_INSN)
	(UNSPEC_LOONGSON_ALU2_TURN_ENABLED_INSN)
	(UNSPEC_LOONGSON_FALU1_TURN_ENABLED_INSN)
	(UNSPEC_LOONGSON_FALU2_TURN_ENABLED_INSN): New constants.
	(define_attr "cpu"): Rename loongson2e and loongson2f to loongson_2e
	and loongson_2f.
	(loongson2ef.md): New include.
	* config/mips/loongson.md (vec_pack_ssat_<mode>, vec_pack_usat_<mode>)
	(add<mode>3, paddd, ssadd<mode>3, usadd<mode>3)
	(loongson_and_not_<mode>, loongson_average_<mode>, loongson_eq_<mode>)
	(loongson_gt_<mode>, loongson_extract_halfword)
	(loongson_insert_halfword_0, loongson_insert_halfword_2)
	(loongson_insert_halfword_3, loongson_mult_add, smax<mode>3)
	(umax<mode>3, smin<mode>3, umin<mode>3, loongson_move_byte_mask)
	(umul<mode>3_highpart, smul<mode>3_highpart, loongson_smul_lowpart)
	(loongson_umul_word, loongson_pasubub, reduc_uplus_<mode>)
	(loongson_psadbh, loongson_pshufh, loongson_psll<mode>)
	(loongson_psra<mode>, loongson_psrl<mode>, sub<mode>3, psubd)
	(sssub<mode>3, ussub<mode>3, vec_interleave_high<mode>)
	(vec_interleave_low<mode>): Define type attribute.
	* config/mips/mips.c (mips_ls2): New static variable.
	(mips_issue_rate): Update to handle tuning for Loongson 2E/2F.
	(mips_ls2_init_dfa_post_cycle_insn, mips_init_dfa_post_cycle_insn)
	(sched_ls2_dfa_post_advance_cycle, mips_dfa_post_advance_cycle):
	Implement target scheduling hooks.
	(mips_multipass_dfa_lookahead): Update to handle tuning for
	Loongson 2E/2F.
	(mips_sched_init): Initialize data for Loongson scheduling.
	(mips_ls2_variable_issue): New static function.
	(mips_variable_issue): Update to handle tuning for Loongson 2E/2F.
	Add sanity check.
	(TARGET_SCHED_INIT_DFA_POST_CYCLE_INSN)
	(TARGET_SCHED_DFA_POST_ADVANCE_CYCLE): Override target hooks.
	* config/mips/mips.h (TUNE_LOONGSON_2EF): New macros.
	(ISA_HAS_XFER_DELAY, ISA_HAS_FCMP_DELAY, ISA_HAS_HILO_INTERLOCKS):
	Handle ST Loongson 2E/2F cores.
	(CPU_UNITS_QUERY): Define macro to enable querying of DFA units.

From-SVN: r136805
2008-06-15 10:03:07 +00:00
Mark Shinwell 93581857e5 mips-modes.def: Add V8QI, V4HI and V2SI modes.
2008-06-15  Mark Shinwell  <shinwell@codesourcery.com>
	    Nathan Sidwell  <nathan@codesourcery.com>
	    Maxim Kuvyrkov  <maxim@codesourcery.com>
	    Richard Sandiford  <rdsandiford@googlemail.com>
	
	* config/mips/mips-modes.def: Add V8QI, V4HI and V2SI modes.
	* config/mips/mips-protos.h (mips_expand_vector_init): New.
	* config/mips/mips-ftypes.def: Add function types for Loongson-2E/2F
	builtins.
	* config/mips/mips.c (mips_split_doubleword_move): Handle new modes.
	(mips_hard_regno_mode_ok_p): Allow 64-bit vector modes for Loongson.
	(mips_vector_mode_supported_p): Add V2SImode, V4HImode and
	V8QImode cases.
	(LOONGSON_BUILTIN, LOONGSON_BUILTIN_ALIAS): New.
	(CODE_FOR_loongson_packsswh, CODE_FOR_loongson_packsshb,
	(CODE_FOR_loongson_packushb, CODE_FOR_loongson_paddw,
	(CODE_FOR_loongson_paddh, CODE_FOR_loongson_paddb,
	(CODE_FOR_loongson_paddsh, CODE_FOR_loongson_paddsb)
	(CODE_FOR_loongson_paddush, CODE_FOR_loongson_paddusb)
	(CODE_FOR_loongson_pmaxsh, CODE_FOR_loongson_pmaxub)
	(CODE_FOR_loongson_pminsh, CODE_FOR_loongson_pminub)
	(CODE_FOR_loongson_pmulhuh, CODE_FOR_loongson_pmulhh)
	(CODE_FOR_loongson_biadd, CODE_FOR_loongson_psubw)
	(CODE_FOR_loongson_psubh, CODE_FOR_loongson_psubb)
	(CODE_FOR_loongson_psubsh, CODE_FOR_loongson_psubsb)
	(CODE_FOR_loongson_psubush, CODE_FOR_loongson_psubusb)
	(CODE_FOR_loongson_punpckhbh, CODE_FOR_loongson_punpckhhw)
	(CODE_FOR_loongson_punpckhwd, CODE_FOR_loongson_punpcklbh)
	(CODE_FOR_loongson_punpcklhw, CODE_FOR_loongson_punpcklwd): New.
	(mips_builtins): Add Loongson builtins.
	(mips_loongson_2ef_bdesc): New.
	(mips_bdesc_arrays): Add mips_loongson_2ef_bdesc.
	(mips_builtin_vector_type): Handle unsigned versions of vector modes.
	(MIPS_ATYPE_UQI, MIPS_ATYPE_UDI, MIPS_ATYPE_V2SI, MIPS_ATYPE_UV2SI)
	(MIPS_ATYPE_V4HI, MIPS_ATYPE_UV4HI, MIPS_ATYPE_V8QI, MIPS_ATYPE_UV8QI):
	New.
	(mips_expand_vector_init): New.
	* config/mips/mips.h (HAVE_LOONGSON_VECTOR_MODES): New.
	(TARGET_CPU_CPP_BUILTINS): Define __mips_loongson_vector_rev
	if appropriate.
	* config/mips/mips.md: Add unspec numbers for Loongson
	builtins.  Include loongson.md.
	(MOVE64): Include Loongson vector modes.
	(SPLITF): Include Loongson vector modes.
	(HALFMODE): Handle Loongson vector modes.
	* config/mips/loongson.md: New.
	* config/mips/loongson.h: New.
	* config.gcc: Add loongson.h header for mips*-*-* targets.
	* doc/extend.texi (MIPS Loongson Built-in Functions): New.

2008-06-15  Mark Shinwell  <shinwell@codesourcery.com>

	* lib/target-supports.exp (check_effective_target_mips_loongson): New.
	* gcc.target/mips/loongson-simd.c: New.

Co-Authored-By: Maxim Kuvyrkov <maxim@codesourcery.com>
Co-Authored-By: Nathan Sidwell <nathan@codesourcery.com>
Co-Authored-By: Richard Sandiford <rdsandiford@googlemail.com>

From-SVN: r136800
2008-06-15 06:29:06 +00:00
Sandip Matte d0ae31b09e invoke.texi: Document -march=xlr.
gcc/
2008-06-05  Sandip Matte  <sandip@rmicorp.com>

	* doc/invoke.texi: Document -march=xlr.
	* config/mips/xlr.md: New file.
	* config/mips/mips.md: Include it.
	(cpu): Add "xlr".
	* config/mips/mips.h (PROCESSOR_XLR): New processor_type.
	* config/mips/mips.c (mips_cpu_info_table): Add an XLR entry.
	(mips_rtx_cost_data): Likewise.

From-SVN: r136438
2008-06-06 14:24:57 +00:00
Mark Shinwell 33db2060b0 mips.c (mips_cpu_info_table): Add loongson2e and loongson2f entries.
2008-05-28  Mark Shinwell  <shinwell@codesourcery.com>

	* config/mips/mips.c (mips_cpu_info_table): Add loongson2e
	and loongson2f entries.
	(mips_rtx_cost_data): Add entries for Loongson-2E/2F.
	* config/mips/mips.h (processor_type): Add Loongson-2E
	and Loongson-2F entries.
	(TARGET_LOONGSON_2E, TARGET_LOONGSON_2F, TARGET_LOONGSON_2EF): New.
	(MIPS_ISA_LEVEL_SPEC): Handle Loongson-2E/2F.
	* config/mips/mips.md (define_attr cpu): Add loongson2e and loongson2f.
	* doc/invoke.texi (MIPS Options): Document loongson2e
	and loongson2f processor names.

From-SVN: r136071
2008-05-28 10:33:39 +00:00
H.J. Lu 9d3a9de1ee defaults.h (UNITS_PER_SIMD_WORD): Add scalar mode as argument.
2008-05-22  H.J. Lu  <hongjiu.lu@intel.com>

	* defaults.h (UNITS_PER_SIMD_WORD): Add scalar mode as argument.
	* doc/tm.texi (UNITS_PER_SIMD_WORD): Likewise.

	* tree-vect-analyze.c (vect_compute_data_ref_alignment): Replace
	UNITS_PER_SIMD_WORD with GET_MODE_SIZE (TYPE_MODE (vectype)).
	(vect_update_misalignment_for_peel): Likewise.
	(vector_alignment_reachable_p): Likewise.
	* tree-vect-transform.c (vectorizable_load): Likewise.
	* tree-vectorizer.c (vect_supportable_dr_alignment): Likewise.

	* tree-vectorizer.c (get_vectype_for_scalar_type): Pass mode of
	scalar_type to UNITS_PER_SIMD_WORD.

	* config/arm/arm.h (UNITS_PER_SIMD_WORD): Updated.
	* config/i386/i386.h (UNITS_PER_SIMD_WORD): Likewise.
	* config/mips/mips.h (UNITS_PER_SIMD_WORD): Likewise.
	* config/rs6000/rs6000.h (UNITS_PER_SIMD_WORD): Likewise.
	* config/sparc/sparc.h (UNITS_PER_SIMD_WORD): Likewise.

From-SVN: r135759
2008-05-22 05:43:16 -07:00
David Daney 06d1961718 mips.md (UNSPEC_SYNC_NEW_OP_12, [...]): New define_constants.
2008-05-20  David Daney  <ddaney@avtrex.com>

	* config/mips/mips.md (UNSPEC_SYNC_NEW_OP_12,
	UNSPEC_SYNC_OLD_OP_12,
	UNSPEC_SYNC_EXCHANGE_12): New define_constants.
	(UNSPEC_SYNC_EXCHANGE, UNSPEC_MEMORY_BARRIER,
	UNSPEC_SET_GOT_VERSION,
	UNSPEC_UPDATE_GOT_VERSION): Renumber.
	(optab, insn): Add 'plus' and 'minus' to define_code_attr.
	(atomic_hiqi_op): New define_code_iterator.
	(sync_compare_and_swap<mode>): Call
	mips_expand_atomic_qihi instead of
	mips_expand_compare_and_swap_12.
	(compare_and_swap_12): Use MIPS_COMPARE_AND_SWAP_12 instead of
	MIPS_COMPARE_AND_SWAP_12_0.  Pass argument to
	MIPS_COMPARE_AND_SWAP_12.
	(sync_<optab><mode>, sync_old_<optab><mode>,
	sync_new_<optab><mode>, sync_nand<mode>, sync_old_nand<mode>,
	sync_new_nand<mode>): New define_expands for HI and QI mode
	operands.
	(sync_<optab>_12, sync_old_<optab>_12, sync_new_<optab>_12,
	sync_nand_12, sync_old_nand_12, sync_new_nand_12): New insns.
	(sync_lock_test_and_set<mode>): New define_expand for HI and QI
	modes.
	(test_and_set_12): New insn.
	(sync_old_add<mode>, sync_new_add<mode>, sync_old_<optab><mode>,
	sync_new_<optab><mode>, sync_old_nand<mode>,
	sync_new_nand<mode>, sync_lock_test_and_set<mode>):  Add early
	clobber to operand 0 for SI and DI mode insns.
	* config/mips/mips-protos.h (mips_gen_fn_6, mips_gen_fn_5,
	mips_gen_fn_4): New typedefs.
	(mips_gen_fn_ptrs): Define new union type.
	(mips_expand_compare_and_swap_12): Remove declaration.
	(mips_expand_atomic_qihi): Declare function.
	* config/mips/mips.c (mips_expand_compare_and_swap_12): Rename to...
	(mips_expand_atomic_qihi): ... this.  Use new generator function
	parameter.
	* config/mips/mips.h (MIPS_COMPARE_AND_SWAP_12): Add OPS parameter.
	(MIPS_COMPARE_AND_SWAP_12_0): Delete macro.
	(MIPS_COMPARE_AND_SWAP_12_ZERO_OP,
	MIPS_COMPARE_AND_SWAP_12_NONZERO_OP,
	MIPS_SYNC_OP_12, MIPS_SYNC_OP_12_NOT_NOP,
	MIPS_SYNC_OP_12_NOT_NOT, MIPS_SYNC_OLD_OP_12,
	MIPS_SYNC_OLD_OP_12_NOT_NOP, MIPS_SYNC_OLD_OP_12_NOT_NOP_REG,
	MIPS_SYNC_OLD_OP_12_NOT_NOT, MIPS_SYNC_OLD_OP_12_NOT_NOT_REG,
	MIPS_SYNC_NEW_OP_12, MIPS_SYNC_NEW_OP_12_NOT_NOP,
	MIPS_SYNC_NEW_OP_12_NOT_NOT, MIPS_SYNC_EXCHANGE_12,
	MIPS_SYNC_EXCHANGE_12_ZERO_OP,
	MIPS_SYNC_EXCHANGE_12_NONZERO_OP): New macros.

From-SVN: r135684
2008-05-20 23:13:13 +00:00
David Daney 977502ff84 target-supports.exp (check_effective_target_sync_int_long): Add mips*-*-*.
2008-05-08  David Daney  <ddaney@avtrex.com>

	* lib/target-supports.exp (check_effective_target_sync_int_long): Add
	mips*-*-*.
	(check_effective_target_sync_char_short): Same.


2008-05-08  David Daney  <ddaney@avtrex.com>
	    Richard Sandiford  <rsandifo@nildram.co.uk>
	
	* config/mips/mips.md (mips_expand_compare_and_swap_12): Handle
	special case of constant zero operands.
	* config/mips/mips.c (mips_expand_compare_and_swap_12): Zero extend
	old and	new values.  Special case constant zero values.
	* config/mips/mips.h (MIPS_COMPARE_AND_SWAP): Skip 'sync' if compare
	fails.
	(MIPS_COMPARE_AND_SWAP_12): Handle constant zero operands.
	(MIPS_COMPARE_AND_SWAP_12_0): New macro.


Co-Authored-By: Richard Sandiford <rsandifo@nildram.co.uk>

From-SVN: r135088
2008-05-08 17:04:12 +00:00
Kai Tietz 81464b2cd8 2008-05-07 Kai Tietz <kai,tietz@onevision.com>
* calls.c (compute_argument_block_size): Add argument tree fndecl.
	(OUTGOING_REG_PARM_STACK_SPACE): Add function type argument.
	(emit_library_call_value_1): Add new variable fndecl initialized by
	NULL_TREE. It should be the decl type of orgfun, but this information
	seems not to be available here, so it uses the default calling abi.
	* config/arm/arm.c (arm_return_in_memory): Add fntype argumen.
	* config/arm/arm.h (RETURN_IN_MEMORY): Replace RETURN_IN_MEMORY
	by TARGET_RETURN_IN_MEMORY.
	* config/i386/i386-interix.h: Likewise.
	* config/i386/i386.h: Likewise.
	* config/i386/i386elf.h: Likewise.
	* config/i386/ptx4-i.h: Likewise.
	* config/i386/sol2-10.h: Likewise.
	* config/i386/sysv4.h: Likewise.
	* config/i386/vx-common.h: Likewise.
	* config/cris/cris.h: Removed #if 0 clause.
	* config/arm/arm-protos.h (arm_return_in_memory): Add fntype
	argument.
	* config/i386/i386-protos.h (ix86_return_in_memory): Add fntype
	argument.
	(ix86_sol10_return_in_memory): Likewise.
	(ix86_i386elf_return_in_memory): New.
	(ix86_i386interix_return_in_memory): New.
	* config/mt/mt-protos.h (mt_return_in_memory): New.
	* config/mt/mt.c: Likewise.
	* config/mt/mt.h (OUTGOING_REG_PARM_STACK_SPACE): Add FNTYPE argument.
	(RETURN_IN_MEMORY):  Replace by TARGET_RETURN_IN_MEMORY.
	* config/bfin/bfin.h: Likewise.
	* config/bfin/bfin-protos.h (bfin_return_in_memory): Add fntype
	argument.
	* config/bfin/bfin.c: Likewise.
	* config/pa/pa.h (OUTGOING_REG_PARM_STACK_SPACE): Add FNTYPE argument.
	* config/alpha/unicosmk.h: Likewise.
	* config/i386/cygming.h: Likewise.
	* config/iq2000/iq2000.h: Likewise.
	* config/mips/mips.h: Likewise.
	* config/mn10300/mn10300.h: Likewise.
	* config/rs6000/rs6000.h: Likewise.
	* config/score/score.h: Likewise.
	* config/spu/spu.h: Likewise.
	* config/v850/v850.h: Likewise.
	* defaults.h: Likewise.
	* doc/tm.texi (OUTGOING_REG_PARM_STACK_SPACE): Adjust documentation.
	* expr.c (emit_block_move): Adjust use of OUTGOING_REG_PARM_STACK_SPACE.
	* function.c (STACK_DYNAMIC_OFFSET): Adjust use of
	OUTGOING_REG_PARM_STACK_SPACE.
	* targhooks.c (default_return_in_memory): Remove RETURN_IN_MEMORY.

From-SVN: r135069
2008-05-08 09:10:49 +02:00
Richard Sandiford 49bce30a21 mips.md (UNSPEC_COMPARE_AND_SWAP_12): New unspec_volitile.
gcc/
2008-04-23  David Daney  <ddaney@avtrex.com>

	* config/mips/mips.md (UNSPEC_COMPARE_AND_SWAP_12): New
	unspec_volitile.
	(UNSPEC_SYNC_OLD_OP, UNSPEC_SYNC_NEW_OP, UNSPEC_SYNC_EXCHANGE,
	UNSPEC_MEMORY_BARRIER, UNSPEC_SET_GOT_VERSION,
	UNSPEC_UPDATE_GOT_VERSION): Renumber.
	(sync_compare_and_swap<mode>): New expand for QI and HI modes.
	(compare_and_swap_12): New insn.
	* config/mips/mips-protos.h (mips_expand_compare_and_swap_12): Declare.
	* config/mips/mips.c (mips_force_binary): New function.
	(mips_emit_int_order_test, mips_expand_synci_loop): Use it.
	(mips_expand_compare_and_swap_12): New function.
	* config/mips/mips.h (MIPS_COMPARE_AND_SWAP_12): New macro.

gcc/testsuite/
	* gcc.target/mips/gcc-have-sync-compare-and-swap-1.c: Expect
	__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 and
	__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 to be defined.
	* gcc.target/mips/gcc-have-sync-compare-and-swap-2.c: Likewise.

From-SVN: r134695
2008-04-26 07:40:04 +00:00
Jan Hubicka 38173d38cc function.h (incomming_args): Break out of struct function.
* function.h (incomming_args): Break out of struct function.
	(function_subsections): Break out of struct function.
	(rtl_data): Add args, subsections fields. Break out outgoing_args_size,
	return_rtx and hard_reg_initial_vals from struct function.
	Kill inl_max_label_num.
	(current_function_pops_args, current_function_args_info,
	current_function_args_size, current_function_args_size,
	current_function_pretend_args_size,
	current_function_outgoing_args_size,
	current_function_internal_arg_pointer, current_function_return_rtx):
	Kill compatibility accestor macros.
	* builtins.c (expand_builtin_apply_args_1): Update.
	(expand_builtin_next_arg): Update.
	* df-scan.c (df_get_call_refs): Update.
	* dbxout.c (dbxout_function_end): Update.
	* dwarf2out.c (dwarf2out_switch_text_section): Update.
	(output_line_info): Update.
	(secname_for_decl): Update.
	(dwarf2out_var_location): Update.
	* function.c (free_after_compilation): Update.
	(assign_parm_find_stack_rtl): Update.
	(assign_parms): Update.
	(expand_dummy_function_end): Update.
	(expand_function_end): Update.
	* calls.c (mem_overlaps_already_clobbered_arg_p): Update.
	(expand_call): Update.
	(emit_library_call_value_1): Update.
	(store_one_arg): Update.
	* varasm.c (initialize_cold_section_name): Update.
	(unlikely_text_section): Update.
	(unlikely_text_section_p): Update.
	(assemble_start_function): Update.
	(assemble_end_function): Update.
	(default_section_type_flags): Update.
	(switch_to_section): Update.
	* integrate.c (set_decl_abstract_flags): Update.
	(get_hard_reg_initial_val): Update.
	(has_hard_reg_initial_val): Update.
	(allocate_initial_values): Update.
	* resource.c (init_resource_info): Update.
	* config/alpha/alpha.c (NUM_ARGS): Update.
	(direct_return): Update.
	(alpha_va_start): Update.
	(alpha_sa_size): Update.
	(alpha_initial_elimination_offset): Update.
	(alpha_expand_prologue): Update.
	(alpha_start_function): Update.
	(alpha_expand_epilogue): Update.
	(unicosmk_initial_elimination_offset):
	* config/alpha/alpha.md (call expander): Update.
	* config/s390/s390.c (s390_register_info): Update.
	(s390_register_info): Update.
	(s390_frame_info): Update.
	(s390_initial_elimination_offset): Update.
	(s390_build_builtin_va_list): Update.
	(s390_va_start): Update.
	* config/spu/spu.c (direct_return): Update.
	(spu_expand_prologue): Update.
	(spu_initial_elimination_offset): Update.
	(spu_build_builtin_va_list): Update.
	(spu_va_start): Update.
	* config/sparc/sparc.c (sparc_init_modes): Update.
	(sparc_compute_frame_size): Update.
	(function_value): Update.
	* config/m32r/m32r.c (m32r_compute_frame_size): Update.
	* config/i386/i386.md (return expander): Update.
	* config/i386/i386.c (ix86_va_start): Update.
	(ix86_can_use_return_insn_p): Update.
	(ix86_compute_frame_layout): Update.
	(ix86_expand_epilogue): Update.
	* config/sh/sh.c (output_stack_adjust): Update.
	(calc_live_regs): Update.
	(sh_expand_prologue): Update.
	(sh_builtin_saveregs): Update.
	(sh_va_start): Update.
	(initial_elimination_offset): Update.
	(sh_allocate_initial_value): Update.
	(sh_function_ok_for_sibcall): Update.
	(sh_get_pr_initial_val): Update.
	* config/sh/sh.md (return expander): Update.
	* config/avr/avr.c (frame_pointer_required_p): UPdate.
	* config/crx/crx.c (crx_compute_frame): UPdate.
	(crx_initial_elimination_offset): UPdate.
	* config/xtensa/xtensa.c (compute_frame_size): Update
	(xtensa_builtin_saveregs): Update.
	(xtensa_va_start): Update.
	(order_regs_for_local_alloc): Update.
	* config/stormy16/stormy16.c (xstormy16_compute_stack_layout): Update.
	(xstormy16_expand_builtin_va_start): Update.
	* config/fr30/fr30.c (fr30_compute_frame_size): Update.
	* config/m68hc11/m68hc11.md (return expanders): Update.
	* config/m68hc11/m68hc11.c (expand_prologue): Update.
	(expand_epilogue): Update.
	* config/cris/cris.c (cris_initial_frame_pointer_offset): Update.
	(cris_simple_epilogue): Update.
	(cris_expand_prologue): Update.
	(cris_expand_epilogue): Update.
	* config/iq2000/iq2000.c (iq2000_va_start): Update.
	(compute_frame_size): Update.
	* config/mt/mt.c (mt_compute_frame_size): Update.
	* config/mn10300/mn10300.c (expand_prologue): Update.
	(expand_epilogue): Update.
	(initial_offset): Update.
	(mn10300_builtin_saveregs):
	* config/mn10300/mn10300.md (return expander): Update.
	* config/ia64/ia64.c (ia64_compute_frame_size): Update.
	(ia64_initial_elimination_offset): Update.
	(ia64_initial_elimination_offset): Update.
	(ia64_expand_prologue): Update.
	* config/m68k/m68k.md (return expander): Update.
	* config/rs6000/rs6000.c (rs6000_va_start): Update.
	(rs6000_stack_info): Update.
	* config/mcore/mcore.c (layout_mcore_frame): Update.
	(mcore_expand_prolog): Update.
	* config/arc/arc.c (arc_compute_frame_size): Update.
	* config/score/score3.c (score3_compute_frame_size): Update.
	* config/score/score7.c (score7_compute_frame_size): Update.
	* config/arm/arm.c (use_return_insn): Update.
	(thumb_find_work_register): Update.
	(arm_compute_save_reg_mask): Update.
	(arm_output_function_prologue): Update.
	(arm_output_epilogue): Update.
	(arm_size_return_regs): Update.
	(arm_get_frame_offsets): Update.
	(arm_expand_prologue): Update.
	(thumb_exit): Update.
	(thumb_unexpanded_epilogue): Update.
	(thumb1_output_function_prologue): Update.
	* config/pa/pa.md (return expander): Update.
	* config/pa/pa.c (compute_frame_size): Update.
	(hppa_builtin_saveregs): Update.
	* config/mips/mips.c (mips_va_start): Update.
	(mips16_build_function_stub): Update.
	(mips_compute_frame_info): Update.
	(mips_restore_gp): Update.
	(mips_output_function_prologue): Update.
	(mips_expand_prologue): Update.
	* config/v850/v850.c (compute_frame_size): Update.
	(expand_prologue): * config/mmix/mmix.c (along): update.
	(mmix_initial_elimination_offset): update.
	(mmix_reorg): update.
	(mmix_use_simple_return): update.
	(mmix_expand_prologue): update.
	(mmix_expand_epilogue): Update.
	* config/bfin/bfin.c (bfin_initial_elimination_offset): Update.
	(emit_link_insn): Update.

From-SVN: r134087
2008-04-08 08:59:34 +00:00
David Daney 2a1ed4fcfd re PR target/34409 (MIPS: Non-optimal DWARF frame data)
PR target/34409
	* config/mips/iris.h (MIPS_DEBUGGING_INFO): Define.
	* config/mips/openbsd.h (MIPS_DEBUGGING_INFO): Same.
	* config/mips/sde.h (MIPS_DEBUGGING_INFO): Remove undef.
	* config/mips/vxworks.h (MIPS_DEBUGGING_INFO): Same.
	* config/mips/mips.h (MIPS_DEBUGGING_INFO): Remove define.

From-SVN: r132725
2008-02-27 18:04:49 +00:00
Richard Sandiford dbc90b6565 re PR target/34981 (Lazily-bound function called twice)
gcc/
	PR target/34981
	* config/mips/mips-protos.h (mips_expand_call): Return an rtx.
	* config/mips/mips.h (FIRST_PSEUDO_REGISTER): Rename FAKE_CALL_REGNO
	to GOT_VERSION_REGNUM.
	(CALL_REALLY_USED_REGISTERS): Set the GOT_VERSION_REGNUM entry to 0.
	(EPILOGUE_USES): Include GOT_VERSION_REGNUM if TARGET_USE_GOT.
	* config/mips/mips.c (mips_emit_call_insn): New function.
	(mips_call_tls_get_addr): Call mips_expand_call directly.
	(mips16_copy_fpr_return_value): Use mips_emit_call_insn rather than
	emit_call_insn.
	(mips16_build_call_stub): Likewise.  Return the call insn or null.
	(mips_expand_call): Update the call to mips16_build_call_stub
	accordingly and a remove redundant condition.  Assert that MIPS16
	stubs do not use lazy binding.  Use mips_emit_call_insn and return
	the call insn.
	(mips_extra_live_on_entry): Include GOT_VERSION_REGNUM if
	TARGET_USE_GOT.
	(mips_hard_regno_mode_ok_p): Allow SImode for GOT_VERSION_REGNUM.
	(mips_avoid_hazard): Remove hazard_set handling.
	* config/mips/mips.md (UNSPEC_EH_RECEIVER): Rename to...
	(UNSPEC_RESTORE_GP): ...this.
	(UNSPEC_SET_GOT_VERSION, UNSPEC_UPDATE_GOT_VERSION): New constants.
	(FAKE_CALL_REGNO): Rename to...
	(GOT_VERSION_REGNUM): ...this.
	(type): Add "ghost" value.  Add an associated insn reservation.
	(hazard_set): Remove.
	(exception_receiver): Rename to...
	(restore_gp): ...this and update the unspec identifier accordingly.
	(exception_receiver, nonlocal_got_receiver): New expanders.
	(load_call<mode>): Use GOT_VERSION_REGNUM.  Don't set
	FAKE_CALL_REGNO.  Remove hazard_set attribute.
	(set_got_version, update_got_version): New patterns.

gcc/testsuite/
	PR target/34981
	* gcc.target/mips/lazy-binding-1.c: New test.
	* gcc.target/mips/mips.exp (setup_mips_tests): Set
	mips_forced_no_abicalls and mips_forced_no_shared.
	(dg-mips-options): Avoid using -mabicalls with an implicit -mabi=eabi.
	Avoid using small data with -mabicalls.  Don't make -G0 force
	-mn-abicalls.  Skip -mabicalls and -mshared tests if the multilib
	forces the opposite option.

From-SVN: r131860
2008-01-26 10:22:14 +00:00
Jakub Jelinek d7bd8aebf6 re PR middle-end/20983 (varargs functions force va_list variable to stack unnecessarily)
PR middle-end/20983
	* tree-ssa-ccp.c (optimize_stdarg_builtin): New function.
	(execute_fold_all_builtins): Call it for BUILT_IN_VA_START,
	BUILT_IN_VA_COPY and BUILT_IN_VA_END.

	* target.h (struct ggc_target): Add expand_builtin_va_start
	hook.
	* target-def.h (TARGET_EXPAND_BUILTIN_VA_START): Define.
	(TARGET_INITIALIZER): Add it.
	* builtins.c (expand_builtin_va_start): Use
	targetm.expand_builtin_va_start hook instead of
	EXPAND_BUILTIN_VA_START macro.
	* alpha/alpha.c (alpha_va_start): Made static.
	(override_options): Clear targetm.expand_builtin_va_start if
	TARGET_UNICOSMK.
	(TARGET_EXPAND_BUILTIN_VA_START): Define.
	* alpha/unicosmk.h (EXPAND_BUILTIN_VA_START): Remove.
	* alpha/alpha.h (EXPAND_BUILTIN_VA_START): Remove.
	* alpha/alpha-protos.h (alpha_va_start): Remove prototype.
	* xtensa/xtensa.h (EXPAND_BUILTIN_VA_START): Remove.
	* xtensa/xtensa.c (TARGET_EXPAND_BUILTIN_VA_START): Define.
	(xtensa_va_start): Made static.
	* xtensa/xtensa-protos.h (xtensa_va_start): Remove prototype.
	* pa/pa-protos.h (hppa_va_start): Remove prototype.
	* pa/pa.h (EXPAND_BUILTIN_VA_START): Remove.
	* pa/pa.c (hppa_va_start): Made static, add prototype.
	(TARGET_EXPAND_BUILTIN_VA_START): Define.
	* frv/frv.c (frv_expand_builtin_va_start): Made static, add prototype.
	(TARGET_EXPAND_BUILTIN_VA_START): Define.
	* frv/frv-protos.h (frv_expand_builtin_va_start): Remove prototype.
	* frv/frv.h (EXPAND_BUILTIN_VA_START): Remove.
	* i386/i386.c (override_options): Clear
	targetm.expand_builtin_va_start if -m32 or 64-bit MS ABI.
	(ix86_va_start): Made static.
	(TARGET_EXPAND_BUILTIN_VA_START): Define.
	* i386/i386.h (EXPAND_BUILTIN_VA_START): Remove.
	* i386/i386-protos.h (ix86_va_start, ix86_va_arg): Remove prototypes.
	* iq2000/iq2000-protos.h (iq2000_va_start): Remove prototype.
	* iq2000/iq2000.h (EXPAND_BUILTIN_VA_START): Remove.
	* iq2000/iq2000.c (iq2000_va_start): Made static, add prototype.
	(TARGET_EXPAND_BUILTIN_VA_START): Define.
	* rs6000/rs6000-protos.h (rs6000_va_start): Remove prototype.
	* rs6000/rs6000.c (rs6000_va_start): Made static, add prototype.
	(TARGET_EXPAND_BUILTIN_VA_START): Define.
	(rs6000_override_options): Clear targetm.expand_builtin_va_start if
	DEFAULT_ABI != ABI_V4.
	* rs6000/rs6000.h (EXPAND_BUILTIN_VA_START): Remove.
	* spu/spu.c (spu_va_start): Made static, add prototype.
	(TARGET_EXPAND_BUILTIN_VA_START): Define.
	* spu/spu.h (EXPAND_BUILTIN_VA_START): Remove.
	* spu/spu-protos.h spu_va_start): Remove prototype.
	* stormy16/stormy16.h (EXPAND_BUILTIN_VA_START): Remove.
	* stormy16/stormy16-protos.h (xstormy16_expand_builtin_va_start):
	Remove prototype.
	* stormy16/stormy16.c (xstormy16_expand_builtin_va_start): Made
	static.
	(TARGET_EXPAND_BUILTIN_VA_START): Define.
	* s390/s390-protos.h (s390_va_start): Remove prototype.
	* s390/s390.c (s390_va_start): Made static.
	(TARGET_EXPAND_BUILTIN_VA_START): Define.
	* s390/s390.h (EXPAND_BUILTIN_VA_START): Remove.
	* mn10300/mn10300.h (EXPAND_BUILTIN_VA_START): Remove.
	* mn10300/mn10300-protos.h (mn10300_va_start): Remove prototype.
	* mn10300/mn10300.c (mn10300_va_start): Made static, add prototype.
	(TARGET_EXPAND_BUILTIN_VA_START): Define.
	* arc/arc.c (arc_va_start): Made static, add prototype.
	(TARGET_EXPAND_BUILTIN_VA_START): Define.
	* arc/arc.h (EXPAND_BUILTIN_VA_START): Remove.
	* arc/arc-protos.h (arc_va_start): Remove prototype.
	* mt/mt-protos.h (mt_va_start): Remove prototype.
	* sparc/sparc.c (sparc_va_start): Made static, add prototype.
	(TARGET_EXPAND_BUILTIN_VA_START): Define.
	* sparc/sparc-protos.h (sparc_va_start): Remove prototype.
	* sparc/sparc.h (EXPAND_BUILTIN_VA_START): Remove.
	* sh/sh.c (sh_va_start): Made static, add prototype.
	(TARGET_EXPAND_BUILTIN_VA_START): Define.
	* sh/sh-protos.h (sh_va_start): Remove prototype.
	* sh/sh.h (EXPAND_BUILTIN_VA_START): Remove.
	* mips/mips-protos.h (mips_va_start): Remove prototype.
	* mips/mips.h (EXPAND_BUILTIN_VA_START): Remove.
	* mips/mips.c (mips_va_start): Made static.
	(TARGET_EXPAND_BUILTIN_VA_START): Define.

From-SVN: r130650
2007-12-06 14:25:37 +01:00
Richard Sandiford a1c6b246b5 mips.h (MOVE_MAX): Use UNITS_PER_WORD and describe MIPS-specific implementation details.
gcc/
	* config/mips/mips.h (MOVE_MAX): Use UNITS_PER_WORD and describe
	MIPS-specific implementation details.
	(MIPS_MAX_MOVE_BYTES_PER_LOOP_ITER): New macro.
	(MIPS_MAX_MOVE_BYTES_STRAIGHT): Likewise.
	(MOVE_RATIO): Define to MIPS_MAX_MOVE_BYTES_STRAIGHT / UNITS_PER_WORD
	for targets with movmemsi.
	(MOVE_BY_PIECES_P): Define.
	* config/mips/mips.c (MAX_MOVE_REGS, MAX_MOVE_BYTES): Delete.
	(mips_block_move_loop): Add a bytes_per_iter argument.
	(mips_expand_block_move): Use MIPS_MAX_MOVE_BYTES_STRAIGHT.
	Update call to mips_block_move_loop.

From-SVN: r129605
2007-10-24 17:46:39 +00:00
Richard Sandiford 65239d2068 mips-protos.h (mips_regno_mode_ok_for_base_p): Give the STRICT_P argument type "bool" rather than "int".
gcc/
	* config/mips/mips-protos.h (mips_regno_mode_ok_for_base_p): Give
	the STRICT_P argument type "bool" rather than "int".
	(mips_legitimate_address_p): Likewise.
	(fp_register_operand, lo_operand): Delete.
	(mips_subword): Give the HIGH_P argument type "bool" rather than "int".
	(mips_emit_scc): Rename to...
	(mips_expand_scc): ...this.
	(gen_conditional_branch): Rename to...
	(mips_expand_conditional_branch): ...this.
	(gen_conditional_move): Rename to...
	(mips_expand_conditional_move): ...this.
	(mips_gen_conditional_trap): Rename to...
	(mips_expand_conditional_trap): ...this and take an rtx code instead
	of an operands array.
	(mips_expand_call): Give the SIBCALL_P argument type "bool"
	rather than "int".
	(mips_emit_fcc_reload): Rename to...
	(mips_expand_fcc_reload): ...this.
	(init_cumulative_args): Rename to...
	(mips_init_cumulative_args): ...this and remove the libname argument.
	(function_arg_advance): Rename to...
	(mips_function_arg_advance): ...this.
	(function_arg): Rename to...
	(mips_function_arg): ...this and use "rtx" instead of
	"struct rtx_def *".
	(function_arg_boundary): Rename to...
	(mips_function_arg_boundary): ...this.
	(mips_expand_unaligned_load): Rename to...
	(mips_expand_ext_as_unaligned_load): ...this and give the WIDTH
	and BITPOS arguments type "HOST_WIDE_INT".
	(mips_expand_unaligned_store): Rename to...
	(mips_expand_ins_as_unaligned_store): ...this and give the WIDTH
	and BITPOS arguments type "HOST_WIDE_INT".
	(override_options): Rename to...
	(mips_override_options): ...this.
	(print_operand): Rename to...
	(mips_print_operand): ...this.
	(print_operand_address): Rename to...
	(mips_print_operand_address): ...this.
	(mips_output_ascii): Remove the PREFIX argument.
	(mips_expand_epilogue): Give the SIBCALL_P argument type "bool"
	rather than "int".
	(mips_can_use_return_insn): Return a "bool" rather than an "int".
	(mips_function_value): Remove the FUNC argument.  Use "rtx" instead
	of "struct rtx_def *".
	(mips_secondary_reload_class): Give the IN_P argument type "bool"
	rather than "int".
	(build_mips16_call_stub): Delete.
	(mips_store_data_bypass_p): Return a "bool" rather than an "int".
	(mips_use_ins_ext_p): Give the second and third arguments type
	"HOST_WIDE_INT" rather than "rtx".
	* config/mips/mips.h: Update after the above changes.  Tweak comments
	and formatting.
	(SECONDARY_INPUT_RELOAD_CLASS): Pass a boolean IN_P argument.
	(SECONDARY_OUTPUT_RELOAD_CLASS): Likewise.
	(mips_print_operand_punct, mips_hard_regno_mode_ok): Change the
	element type from "char" to "bool".
	(mips_section_threshold, sym_lineno, set_noat, mips_branch_likely)
	(mips_cpu_info_table): Delete.
	* config/mips/mips.md: Update after the above changes.  Tweak some
	formatting.
	* config/mips/mips-ps-3d.md: Likewise.
	* config/mips/mips.c: Tweak comments and formatting.
	Use NULL-like macros rather than 0 in various places.
	(mips_section_threshold): Rename to...
	(mips_small_data_threshold): ...this and give it an unsigned type.
	(num_source_filenames): Remove explicit initialization.
	(sdb_label_count): Likewise.
	(sym_lineno): Delete.
	(set_noat): Make static.
	(mips_branch_likely): Likewise, and give it type "bool".
	(mips_isa_info): Rename to...
	(mips_isa_option_info): ...this.
	(mips_flag_delayed_branch): Rename to...
	(mips_base_delayed_branch): ...this.
	(mips_split_addresses): Delete.
	(mips_print_operand_punct, mips_hard_regno_mode_ok): Change the
	element type from "char" to "bool".
	(mips_regno_to_class): Add an explicit array size.
	(mips16_flipper): Change from type "int" to type "bool".
	(mips_comp_type_attributes): Remove redundant FUNCTION_TYPE check.
	(mips_tls_operand_p): Rename to...
	(mips_tls_symbol_p): ...this.
	(mips_global_symbol_p): Remove redundant "const".
	(mips_offset_within_alignment_p): Simplify.
	(mips_regno_mode_ok_for_base_p): Change the name of the last argument
	to STRICT_P and give it type bool.
	(mips_valid_base_register_p): Likewise.
	(mips_classify_address): Likewise.
	(mips_legitimate_address_p): Likewise.
	(mips16_unextended_reference_p): Take the offset as an
	"unsigned HOST_WIDE_INT" rather than an "rtx".  Simplify.
	(mips_const_insns): Use IN_RANGE.
	(mips_force_temporary): Remove an unnecessary copy_rtx.
	(mips16_gp_pseudo_reg): Simplify.
	(mips_split_symbol): Remove an unnecessary copy_rtx.
	(mips_legitimize_tls_address): Only create registers if we need them.
	(mips_legitimize_address): Use mips_split_plus.
	(mips_move_integer): Swap DEST and TEMP arguments.  Rename local
	variable COST to NUM_OPS.
	(mips_legitimize_move): Use gen_lowpart.
	(mips_rewrite_small_data): Rename the OP parameter to PATTERN.
	(m16_check_op): Use IN_RANGE.
	(mips_subword): Give the HIGH_P argument type "bool" rather than "int".
	(mips_split_doubleword_move): Pass booleans to mips_subword.
	(mips_output_move): Store the mode in a local variable.
	Explicitly assert that this function does not deal with
	MFLO and MFHI.  Use SMALL_OPERAND_UNSIGNED.  Make order of
	cases more consistent.
	(mips_relational_operand_ok_p): Rename to...
	(mips_int_order_operand_ok_p): ...this.
	(mips_canonicalize_comparison): Rename to...
	(mips_canonicalize_int_order_test): ...this.
	(mips_emit_int_relational): Rename to...
	(mips_emit_int_order_test): ...this.  Store the mode in a local
	variable.
	(mips_reverse_fp_cond_p): Rename to...
	(mips_reversed_fp_cond): ...this.
	(mips_emit_compare): Make the order of the statements more consistent.
	(mips_emit_scc): Rename to...
	(mips_expand_scc): ...this.
	(gen_conditional_branch): Rename to...
	(mips_expand_conditional_branch): ...this.
	(gen_conditional_move): Rename to...
	(mips_expand_conditional_move): ...this.  Build the condition
	separately from the main pattern.
	(mips_gen_conditional_trap): Rename to...
	(mips_expand_conditional_trap): ...this and take an rtx code instead
	of an operands array.  Simplify.
	(init_cumulative_args): Rename to...
	(mips_init_cumulative_args): ...this.  Use memset rather than a
	copy from a zeroed static.  Use prototype_p and stdarg_p.
	(mips_arg_info): Rename to...
	(mips_get_arg_info): ...this and put the INFO argument first.
	(function_arg): Rename to...
	(mips_function_arg): ...this and use "rtx" instead of
	"struct rtx_def *".  Only split structures into chunks if 
	TARGET_HARD_FLOAT, rather than checking !TARGET_SOFT_FLOAT on
	a chunk-by-chunk basis.  Use SCALAR_FLOAT_TYPE_P instead of a
	comparison with REAL_TYPE.  Rename local variable REG to REGNO
	and make it unsigned.
	(function_arg_advance): Rename to...
	(mips_function_arg_advance): ...this.
	(function_arg_boundary): Rename to...
	(mips_function_arg_boundary): ...this.
	(mips_pad_arg_upward): Use SCALAR_INT_MODE_P instead of a comparison
	with MODE_INT.
	(mips_fpr_return_fields): Use SCALAR_FLOAT_TYPE_P instead of a
	comparison with REAL_TYPE.
	(mips_function_value): Remove the FUNC argument.  Rename local
	variable UNSIGNEDP to UNSIGNED_P.
	(mips_return_in_memory): Use IN_RANGE.
	(mips_setup_incoming_varargs): Pass a boolean rather than an int
	to FUNCTION_ARG_ADVANCE.
	(mips_gimplify_va_arg_expr): Rename local variable INDIRECT
	to INDIRECT_P.  Remove a redundant mips_abi check.  Only calculate
	SIZE and RSIZE if needed.
	(mips16_stub): Rename FPRET to FP_RET_P and give it type "bool"
	rather than "int".
	(build_mips16_function_stub): Rename to...
	(mips16_build_function_stub): ...this.
	(build_mips16_call_stub): Rename to...
	(mips16_build_call_stub): ...this.  Make static, and return a
	"bool" rather than an "int".  Rename the ARG_SIZE argument to
	ARGS_SIZE.  Rename the local variable FPRET to FP_RET_P and give
	it type "bool".  Use "jr" rather than "j".  Use XNEW.  Simplify.
	(mips_load_call_address): Give the SIBCALL_P argument type "bool"
	rather than "int".
	(mips_expand_call): Likewise.  Assert that MIPS16 calls via stubs
	are not sibling ones.
	(mips_emit_fcc_reload): Rename to...
	(mips_expand_fcc_reload): ...this.
	(mips_get_unaligned_mem): Give the WIDTH and BITPOS arguments type
	"HOST_WIDE_INT".
	(mips_expand_unaligned_load): Rename to...
	(mips_expand_ext_as_unaligned_load): ...this and give the WIDTH
	and BITPOS arguments type "HOST_WIDE_INT".  Remove redundant
	SUBREG_BYTE check.
	(mips_expand_unaligned_store): Rename to...
	(mips_expand_ins_as_unaligned_store): ...this and give the WIDTH
	and BITPOS arguments type "HOST_WIDE_INT".
	(mips_use_ins_ext_p): Rename second and third arguments to WIDTH
	and BITPOS and give them type "HOST_WIDE_INT" rather than "rtx".
	Use IN_RANGE.
	(mips_init_split_addresses): Replace with...
	(mips_split_addresses_p): ...this new function.
	(mips_init_relocs): Check mips_split_addresses_p () rather than
	mips_split_addresses.  Always initialize mips_split_p with booleans.
	(print_operand_reloc): Rename to...
	(mips_print_operand_reloc): ...this.  Use a gcc_assert rather than
	a fatal_error.
	(print_operand): Rename to...
	(mips_print_operand): ...this.
	(print_operand_address): Rename to...
	(mips_print_operand_address): ...this.  Use GP_REG_FIRST.
	(mips_in_small_data_p): Simplify.
	(mips_output_ascii): Remove the PREFIX argument and "register"
	keywords.  Use the STRING parameter directly and cast to
	"unsigned char".
	(mips16e_collect_argument_save_p): Use IN_RANGE.
	(mips_function_has_gp_insn): Simplify.
	(mips_set_return_address): Use BITSET_P.
	(mips_restore_gp): Use a separate statement to pick the base
	register.
	(mips_output_function_prologue): Use a local FRAME variable.
	(mips_save_reg): Pass booleans to mips_subword.
	(mips_expand_prologue): Use a local FRAME variable.  Use
	cprestore_size to detect when .cprestore is needed.
	(mips_restore_reg): Use GP_REG_FIRST.
	(mips_expand_epilogue): Give the SIBCALL_P argument type "bool"
	rather than "int".  Use local FRAME and REGNO variables.
	(mips_can_use_return_insn): Return a "bool" rather than an "int".
	(mips_secondary_reload_class): Give the IN_P argument type "bool"
	rather than "int".
	(mips_linked_madd_p): Rename arguments to OUT_INSN and IN_INSN.
	(mips_store_data_bypass_p): Return a "bool" rather than an "int".
	(vr4130_swap_insns_p): Rename local variables to DEP1_P and DEP2_P.
	(mips_74k_agen_init): Assume INSN satisfies USEFUL_INSN_P.
	(mips_variable_issue): Do nothing unless INSN satisfies USEFUL_INSN_P.
	(builtin_description): Rename to...
	(mips_builtin_description): ...this.
	(mips_bdesc): Rename to...
	(mips_ps_bdesc): ...this.
	(sb1_bdesc): Rename to...
	(mips_sb1_bdesc): ...this.
	(dsp_bdesc): Rename to...
	(mips_dsp_bdesc): ...this.
	(dsp_32only_bdesc): Rename to...
	(mips_dsp_32only_bdesc): ...this.
	(bdesc_map): Rename to...
	(mips_bdesc_map): ...this.
	(bdesc_arrays): Rename to...
	(mips_bdesc_arrays): ...this.
	(mips_prepare_builtin_arg): Rename OP to OPNO and ARGNUM to ARGNO.
	Tweak error message.
	(mips_expand_builtin_direct): Rename HAS_TARGET to HAS_TARGET_P.
	Rename local variables I and J to OPNO and ARGNO respectively.
	Assert that the number of arguments is no more than the number of
	input operands.
	(mips_expand_builtin_compare): Use an array of arguments rather
	than an array of operands.  Assert that the number of operands is
	as expected.
	(add_constant): Rename to...
	(mips16_add_constant): ...this.  Use XNEW.
	(dump_constants_1): Rename to...
	(mips16_emit_constants_1): ...this.  Use ALL_SCALAR_FIXED_POINT_MODE_P.
	(dump_constants): Rename to...
	(mips16_emit_constants): ...this.
	(mips_sim_wait_reg, mips_sim_record_set): Use END_REGNO.
	(mips_set_mips16_mode): Don't call mips_init_split_addresses.
	Assign mips16_p to was_mips16_p.
	(mips_parse_cpu): Tweak warning message.
	(override_options): Rename to...
	(mips_override_options): ...this.  Move the mips_cost initialization
	out of the "shared with GAS" block.  Quote option names in error
	messages.
	(mips_conditional_register_usage): Make local variable REGNO unsigned.
	(mips_order_regs_for_local_alloc): Remove register keyword.

From-SVN: r129532
2007-10-21 11:19:40 +00:00
Richard Sandiford f457938f7f mips.h (ISA_HAS_LDC1_SDC1): New macro.
gcc/
	* config/mips/mips.h (ISA_HAS_LDC1_SDC1): New macro.
	* config/mips/mips.c (mips_split_64bit_move_p): Use ISA_HAS_LDC1_SDC1
	instead of checking mips_isa.

From-SVN: r129523
2007-10-21 09:09:50 +00:00
Richard Sandiford e5a2b69d3c invoke.texi (-mpaired-single): Don't say that the option requires 64-bit code.
gcc/
	* doc/invoke.texi (-mpaired-single): Don't say that the option
	requires 64-bit code.
	* config/mips/mips-protos.h (mips_modes_tieable_p): Declare.
	* config/mips/mips.h (ISA_HAS_PAIRED_SINGLE): New macro.
	(ISA_HAS_NMADD_NMSUB): Add a mode argument.  Return true for
	V2SF if ISA_MIPS32R2.
	(MODES_TIEABLE_P): Use mips_modes_tieable_p.
	* config/mips/mips.c (mips_rtx_costs): Pass a mode argument
	to ISA_HAS_NMADD_NMSUB.
	(mips_split_doubleword_move): Handle V2SF.
	(mips_modes_tieable_p): New function.
	(override_options): Report a warning rather than an error when
	-mpaired-single is used on ISAs that don't support it; use
	ISA_HAS_PAIRED_SINGLE to check that case.
	* config/mips/mips.md (MOVE64): New mode iterator.  Replace DI
	and DF move splitters with a single MOVE64 splitter, thereby adding
	a V2SF splitter too.
	(SPLITF): Add TARGET_DOUBLE_FLOAT conditions to DI and DF.
	Add a TARGET_FLOAT64 condition to TF.  Add V2SF to the iterator.
	(HALFMODE): Add V2SF.
	(*nmadd<mode>, *nmadd<mode>_fastmath, *nmsub<mode>)
	(*nmsub<mode>_fastmath): Add a mode argument to ISA_HAS_NMADD_NMSUB.
	(movv2sf_hardfloat_64bit): Tweak ordering of conditions.
	(movv2sf_hardfloat_32bit): New pattern.
	(load_low<mode>, load_high<mode>, store_word<mode>): Remove
	TARGET_DOUBLE_FLOAT conditions.

gcc/testsuite/
	* gcc.dg/vect/vect.exp: Extend -mpaired-single handling to all
	MIPS targets.
	* g++.dg/vect/vect.exp: Likewise.
	* lib/fortran-torture.exp: Likewise.
	* gcc.target/mips/mips-ps-1.c: Use mpaired_single rather than
	mipsisa64*-*-* as the target selector.  Remove -mips64,
	-mhard-float and -mgp64 from the options list.
	* gcc.target/mips/mips-ps-2.c: Likewise.
	* gcc.target/mips/mips-ps-3.c: Likewise.
	* gcc.target/mips/mips-ps-4.c: Likewise.
	* gcc.target/mips/mips-ps-6.c: Likewise.
	* gcc.target/mips/mips-ps-5.c: Remove -mhard-float from the
	options list.
	* gcc.target/mips/sb1-1.c: Likewise.
	* gcc.target/mips/mips-ps-type.c: Likewise.
	* gcc.target/mips/mips-ps-7.c: New test.
	* gcc.target/mips/mips-ps-type-2.c: Likewise.
	* gcc.target/mips/fpr-moves-6.c: Remove XFAIL.
	* gcc.target/mips/mips.exp (setup_mips_tests): Set mips_fp and
	mips_gp instead of mips_fp64 and mips_gp64.  Treat -mgp32 -mfp64
	as forcing an ABI and an architecture.
	(is_gp32_flag, is_gp64_flag): Fold into...
	(dg-mips-options): ...here.  Make -mpaired-single imply -mfp64,
	then -mfp64 imply -mhard-float.  Apply register rules after the
	loop.  Handle -march=mipsN like -mipsN.

From-SVN: r129522
2007-10-21 09:07:13 +00:00
Richard Sandiford 16dc5c284f mips-protos.h (compute_frame_size): Delete.
gcc/
	* config/mips/mips-protos.h (compute_frame_size): Delete.
	* config/mips/mips.h: Update comments.
	* config/mips/mips.c (mips_frame_info): Remove initialized.
	(compute_frame_size): Rename to...
	(mips_compute_frame_info): ...this and make static.  Remove the
	SIZE argument and return no value.  Remove the setting of initialized.
	Update rest of file accordingly.
	(mips_set_return_address): Don't call compute_frame_size.
	(mips_can_use_return_insn): Don't check df_regs_ever_live_p (31).
	Don't call compute_frame_size.

From-SVN: r129460
2007-10-18 19:45:55 +00:00
Richard Sandiford 29c4d304fd mips-protos.h (mips_frame_pointer_required): Declare.
gcc/
	* config/mips/mips-protos.h (mips_frame_pointer_required): Declare.
	* config/mips/mips.h (FRAME_POINTER_REQUIRED): Use
	mips_hard_frame_pointer_required.
	(CAN_ELIMINATE): Rely on FRAME_POINTER_REQUIRED to check for
	large MIPS16 frames.
	* config/mips/mips.c (mips_frame_pointer_required): New function.

gcc/testsuite/
	* gcc.target/mips/save-restore-3.c: Don't clobber $17.

From-SVN: r129459
2007-10-18 19:37:51 +00:00
Richard Sandiford 37017f4dd6 mips.h (STARTING_FRAME_OFFSET): Remove rtl profiling code.
gcc/
	* config/mips/mips.h (STARTING_FRAME_OFFSET): Remove rtl
	profiling code.
	* config/mips/mips.c (mips_frame_info): Give num_gp and num_fp type
	"unsigned int" rather than "int" and put them with the other
	register-related fields.  Put expanded comments above fields
	rather than to their right.
	(mips16e_mask_registers): Replace the GP_REG_SIZE_PTR argument
	with a NUM_REGS_PTR argument.
	(mips16e_save_restore_pattern_p): Update accordingly.
	(compute_frame_size): Clarify frame diagram.  Rewrite.

From-SVN: r129456
2007-10-18 19:26:20 +00:00
Richard Sandiford 0704526605 mips.h (set_volatile): Delete.
gcc/
	* config/mips/mips.h (set_volatile): Delete.
	* config/mips/mips.c (set_volatile): Delete.
	(mips_print_operand_punctuation): New function, split out from
	print_operand.  Remove '%{', '%}', '%~', '%&' and '%!'.
	Use the same character ordering in the code and the comments.
	Use a recursive call to handle '*'.  Abort on unknown characters.
	(mips_init_print_operand_punct): New function, split out from
	override_options.
	(mips_print_int_branch_condition): New function, split out from
	print_operand.  Use GET_RTX_NAME.  Use output_operand_lossage
	to report unexpected codes.
	(mips_print_float_branch_condition): New function, split out from
	print_operand.  Use output_operand_lossage to report unexpected codes.
	(print_operand): Rework to use a case statement.  Use the
	same letter ordering in the code and the comments.  Use
	output_operand_lossage to report unexpected codes and
	reverse_condition to handle inverted branch conditions.
	(override_options): Use mips_init_print_operand_punct.

From-SVN: r129453
2007-10-18 17:34:31 +00:00
Richard Sandiford ab77a036ff mips.h: Move variable declarations to end of file and enclose them all in #ifndef...
gcc/
	* config/mips/mips.h: Move variable declarations to end of file and
	enclose them all in #ifndef USED_FOR_TARGET.
	* config/mips/mips.c: Reorder functions into more logical groups,
	and so that callees appear before callers.  Put the targetm
	initializer at the end of the file.  Remove forward static
	declarations where possible.
	(mips_init_builtins): Add "static" to definition.
	(mips_expand_builtin, mips_mode_rep_extended): Likewise.

From-SVN: r129452
2007-10-18 17:27:19 +00:00
Nigel Stephens adb417d78c mips.h (LOCAL_ALIGNMENT): Define.
gcc/
2007-10-15  Nigel Stephens  <nigel@mips.com>

	* config/mips/mips.h (LOCAL_ALIGNMENT): Define.

From-SVN: r129368
2007-10-15 20:01:26 +00:00
David Daney 966b774d3e mips.md (sync_compare_and_swap<mode>): Handle compare against constant zero.
* config/mips/mips.md (sync_compare_and_swap<mode>): Handle compare
	against constant zero.
	* config/mips/mips.h (MIPS_COMPARE_AND_SWAP):  Handle constant zero
	operand.

From-SVN: r128963
2007-10-02 20:15:34 +00:00
Richard Sandiford 0da4c1ea84 mips.h (PTF_AVOID_BRANCHLIKELY): New macro.
gcc/
	* config/mips/mips.h (PTF_AVOID_BRANCHLIKELY): New macro.
	(mips_cpu_info): Add tune_flags.
	(GENERATE_BRANCHLIKELY): Remove TARGET_SR71K check.
	* config/mips/mips.c (mips_cpu_info_table): Add tune_flags fields.
	Remove end marker.
	(override_options): Remove deprecation code.  Use branch-likely
	instructions for optimize_size or if the tuning flags do not
	suggest otherwise.  Tweak warning.
	(mips_matching_cpu_name_p, mips_parse_cpu): Use ARRAY_SIZE.

From-SVN: r128848
2007-09-27 20:17:17 +00:00
David Daney 01fdb4cf5d re PR target/33479 (SyncTest Intermittent failing on MIPS)
2007-09-26  David Daney  <ddaney@avtrex.com>

	PR target/33479
	* config/mips/mips.md (sync_compare_and_swap<mode>, sync_old_add<mode>,
	sync_new_add<mode>, sync_old_<optab><mode>, sync_new_<optab><mode>,
	sync_old_nand<mode>, sync_new_nand<mode>,
	sync_lock_test_and_set<mode>): Fix '&' constraint modifiers.
	Update length attributes.
	(sync_add<mode>, sync_sub<mode>, sync_old_sub<mode>,
	sync_new_sub<mode>, sync_<optab><mode>, sync_nand<mode>): Update
	length attributes.
	* config/mips/mips.h (MIPS_COMPARE_AND_SWAP, MIPS_SYNC_OP,
	MIPS_SYNC_OLD_OP, MIPS_SYNC_NEW_OP, MIPS_SYNC_NAND,
	MIPS_SYNC_OLD_NAND, MIPS_SYNC_NEW_NAND, MIPS_SYNC_EXCHANGE): Add
	post-loop sync.

From-SVN: r128821
2007-09-26 16:45:39 +00:00
Richard Sandiford e9276c3012 opth-gen.awk (target_flags_explicit): Declare.
gcc/
	* opth-gen.awk (target_flags_explicit): Declare.
	* toplev.h (target_flags_explicit): Delete declaration.
	* toplev.c (target_flags): Likewise.
	* config/mips/mips.h (mips_llsc_setting, mips_llsc): Delete.
	(GENERATE_SYNC, GENERATE_LL_SC): Redefine using target_explicit_flags.
	Never return true for TARGET_MIPS16.
	* config/mips/mips.c (mips_llsc): Delete.
	(mips_handle_option): Remove -mllsc handling.
	(mips_strip_unspec_address): Tweak comment.
	* config/mips/mips.opt (mllsc): Use a target mask.

gcc/testsuite/
	* gcc.target/mips/gcc-have-sync-compare-and-swap-1.c: Don't expect
	any of the macros to be defined for __mips16.
	* gcc.target/mips/gcc-have-sync-compare-and-swap-2.c: Likewise.

From-SVN: r128699
2007-09-23 19:18:27 +00:00
Richard Sandiford 254d164615 mips.h (ISA_HAS_DSP, [...]): New macros.
gcc/
	* config/mips/mips.h (ISA_HAS_DSP, ISA_HAS_DSPR2): New macros.
	* config/mips/mips.c (mips_set_mips16_mode): Don't clear the DSP
	flags for MIPS16.
	(override_options): Check TARGET_HARD_FLOAT_ABI instead of
	TARGET_HARD_FLOAT when testing whether -mpaired-single is
	supported.
	(mips_conditional_register_usage): Check ISA_HAS_DSP instead of
	TARGET_DSP.
	* config/mips/constraints.md (ka): Check ISA_HAS_DSPR2 instead of
	TARGET_DSPR2.
	* config/mips/mips.md (ANYF): Require TARGET_HARD_FLOAT for V2SF.
	(mulv2sf3, movv2sf, movv2sf_hardfloat_64bit): Require
	TARGET_HARD_FLOAT.
	(<u>mulsidi3_32bit_internal, <u>msubsidi4, <u>maddsidi4): Check
	ISA_HAS_DSPR2 instead of TARGET_HAS_DSPR2.
	* config/mips/mips-dsp.md: Use ISA_HAS_DSP instead of TARGET_HAS_DSP
	throughout.
	* config/mips/mips-dspr2.md: Likewise ISA_HAS_DSPR2 and
	TARGET_HAS_DSPR2.
	* config/mips/mips-fixed.md: Use ISA_HAS_DSP and ISA_HAS_DSPR2
	instead of TARGET_HAS_DSP and TARGET_HAS_DSPR2.
	* config/mips/mips-ps-3d.md: Add TARGET_HARD_FLOAT to V2SF patterns.

gcc/testsuite/
	* lib/target-supports.exp (check_effective_target_nomips16): New
	procedure.
	* lib/fortran-torture.exp: Check nomips16 as well as mpaired_single
	for mipsisa64*-*-*.
	* gcc.dg/vect/vect.exp: Likewise.
	* g++.dg/vect/vect.exp: Likewise.
	* gcc.target/mips/mips.exp (setup_mips_tests): Don't set mips_mips16.
	(dg-mips-options): Don't skip -march* and -mips* tests for -mips16.
	* gcc.target/mips/branch-cost-1.c (foo): Add NOMIPS16.
	* gcc.target/mips/branch-cost-2.c (foo): Likewise.
	* gcc.target/mips/clear-cache-1.c (f): Likewise.
	* gcc.target/mips/dpaq_sa_l_w.c (f1, f2, f3): Likewise.
	* gcc.target/mips/dpsq_sa_l_w.c (f1, f2, f3): Likewise.
	* gcc.target/mips/fix-vr4130-1.c (foo): Likewise.
	* gcc.target/mips/fix-vr4130-2.c (foo): Likewise.
	* gcc.target/mips/fix-vr4130-3.c (foo): Likewise.
	* gcc.target/mips/fix-vr4130-4.c (foo): Likewise.
	* gcc.target/mips/fixed-scalar-type.c (test1, test2, test3, test4)
	(test5, test6, test7, test8, test9, test10, test11, test12, test13)
	(test14, test15, test16, test17, test18): Likewise.
	* gcc.target/mips/fixed-vector-type.c (test1, test2, test3, test4)
	(test5, test6, test7, test8, test9, test10, test11, test12, test13)
	(test14, test15, test16, test17, test18, test19, test20, test21)
	(test22): Likewise.
	* gcc.target/mips/madd-1.c (f1, f2, f3): Likewise.
	* gcc.target/mips/madd-2.c (f1, f2, f3): Likewise.
	* gcc.target/mips/madd-4.c (f1, f2, f3): Likewise.
	* gcc.target/mips/maddu-1.c (f1, f2, f3): Likewise.
	* gcc.target/mips/maddu-2.c (f1, f2, f3): Likewise.
	* gcc.target/mips/maddu-4.c (f1, f2, f3): Likewise.
	* gcc.target/mips/mips-3d-1.c (main): Likewise.
	* gcc.target/mips/mips-3d-2.c (main, test0, test1, test2, test3)
	(test4, test5, test6, test7, test8, test9, test10, test11, test12)
	(test13, test14, test15, test16, test17, test18, test19, test20)
	(test21, test22, test23, test24, test25, test26, test27, test28)
	(test29, test30, test31): Likewise.
	* gcc.target/mips/mips-3d-3.c (main, test0, test1, test2, test3)
	(test4, test5, test6, test7, test8, test9, test10, test11, test12)
	(test13, test14, test15, test16, test17, test18, test19, test20)
	(test21, test22, test23, test24, test25, test26, test27, test28)
	(test29, test30, test31, test32, test33, test34, test35, test36)
	(test37, test38, test39, test40, test41, test42, test43, test44)
	(test45, test46, test47, test48, test49, test50, test51, test52)
	(test53, test54, test55, test56, test57, test58, test59, test60)
	(test61, test62, test63): Likewise.
	* gcc.target/mips/mips-3d-4.c (main, test0, test1, test2, test3)
	(test4, test5, test6, test7, test8, test9, test10, test11, test12)
	(test13, test14, test15, test16, test17, test18, test19, test20)
	(test21, test22, test23, test24, test25, test26, test27, test28)
	(test29, test30, test31): Likewise.
	* gcc.target/mips/mips-3d-5.c (main, test0, test1, test2, test3)
	(test4, test5, test6, test7, test8, test9, test10, test11, test12)
	(test13, test14, test15, test16, test17, test18, test19, test20)
	(test21, test22, test23, test24, test25, test26, test27, test28)
	(test29, test30, test31): Likewise.
	* gcc.target/mips/mips-3d-6.c (main, test0, test1, test2, test3)
	(test4, test5, test6, test7, test8, test9, test10, test11, test12)
	(test13, test14, test15): Likewise.
	* gcc.target/mips/mips-3d-7.c (main, test0, test1, test2, test3)
	(test4, test5, test6, test7, test8, test9, test10, test11, test12)
	(test13, test14, test15): Likewise.
	* gcc.target/mips/mips-3d-8.c (main, test0, test1, test2, test3)
	(test4, test5, test6, test7, test8, test9, test10, test11, test12)
	(test13, test14, test15, test16, test17, test18, test19, test20)
	(test21, test22, test23, test24, test25, test26, test27, test28)
	(test29, test30, test31): Likewise.
	* gcc.target/mips/mips-3d-9.c (matrix_multiply2, matrix_multiply3)
	(matrix_multiply4: Likewise.
	* gcc.target/mips/mips-ps-1.c (main): Likewise.
	* gcc.target/mips/mips-ps-2.c (main): Likewise.
	* gcc.target/mips/mips-ps-3.c (main): Likewise.
	* gcc.target/mips/mips-ps-4.c (main, test0, test1, test2, test3)
	(test4, test5, test6, test7, test8, test9, test10, test11, test12)
	(test13, test14, test15, test16, test17, test18, test19, test20)
	(test21, test22, test23, test24, test25, test26, test27, test28)
	(test29, test30, test31): Likewise.
	* gcc.target/mips/mips-ps-5.c (main, test0, test1, test2, test3)
	(test4, test5, test6, test7, test8, test9, test10, test11, test12)
	(test13, test14, test15, test16, test17, test18, test19, test20)
	(test21, test22, test23, test24, test25, test26, test27, test28)
	(test29, test30, test31): Likewise.
	* gcc.target/mips/mips-ps-5.c (main): Likewise.
	* gcc.target/mips/mips-ps-6.c (main): Likewise.
	* gcc.target/mips/mips-ps-type.c (init, move, load, store, add, sub)
	(neg, mul, madd, msub, nmadd, nmsub, cond_move1, cond_move2): Likewise.
	* gcc.target/mips/mips32-dsp-type.c (add_v2hi,add_v4qi, sub_v2hi)
	(sub_v4qi): Likewise.
	* gcc.target/mips/mips32-dsp.c (test_MIPS_DSP, add_v2q15, add_v4i8)
	(sub_v2q15, sub_v4i8, test_MIPS_DSP): Likewise.
	* gcc.target/mips/movcc-1.c (sub1, sub2): Likewise.
	* gcc.target/mips/movcc-2.c (sub4, sub5): Likewise.
	* gcc.target/mips/movcc-3.c (sub3, sub6, sub7, sub8, sub9, suba)
	(subb, subc): Likewise.
	* gcc.target/mips/msub-1.c (f1, f2): Likewise.
	* gcc.target/mips/msub-2.c (f1, f2): Likewise.
	* gcc.target/mips/msub-4.c (f1, f2): Likewise.
	* gcc.target/mips/msubu-1.c (f1, f2): Likewise.
	* gcc.target/mips/msubu-2.c (f1, f2): Likewise.
	* gcc.target/mips/msubu-4.c (f1, f2): Likewise.
	* gcc.target/mips/nmadd-1.c (sub1, sub2, sub3, sub4): Likewise.
	* gcc.target/mips/nmadd-2.c (sub1, sub2, sub3, sub4): Likewise.
	* gcc.target/mips/rsqrt-1.c (foo, bar): Likewise.
	* gcc.target/mips/rsqrt-2.c (foo, bar): Likewise.
	* gcc.target/mips/sb1-1.c (divide, recip, squareroot, rsqrt): Likewise.
	* gcc.target/mips/vr-mult-1.c (f1, f2): Likewise.
	* gcc.target/mips/vr-mult-2.c (f1, f2): Likewise.

From-SVN: r128683
2007-09-23 09:24:21 +00:00
Richard Sandiford 0dc3178264 mips.h (POINTERS_EXTEND_UNSIGNED): Define.
gcc/
	* config/mips/mips.h (POINTERS_EXTEND_UNSIGNED): Define.

From-SVN: r128524
2007-09-16 09:23:31 +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
Richard Sandiford d9dced1370 configure.ac (mips*-sde-elf*): New stanza.
* configure.ac (mips*-sde-elf*): New stanza.  Add target-libiberty
	to $skipdirs and only disable gprof for newlib.  Use the normal
	mips*-elf* handling in other respects.
	* configure: Regnerate.

gcc/
2007-xx-xx  Nigel Stephens  <nigel@mips.com>
	    David Ung  <davidu@mips.com>
	    Thiemo Seufer  <ths@mips.com>
	    Richard Sandiford  <richard@codesourcery.com>

	* config.gcc (mips*-sde-elf*): Add support for the SDE C libraries.
	* configure.ac: Add a mipssde threading type.
	* configure: Regenerate.
	* config/mips/sdemtk.h: New file.
	* config/mips/t-sdemtk: Likewise.
	* config/mips/sdemtk.opt: Likewise.
	* gthr-mipssde.h: Likewise.
	* config/mips/sde.h (FUNCTION_PROFILER): Move to config/mips/sdemtk.h.
	* config/mips/mips.h (MIPS_SAVE_REG_FOR_PROFILING_P): New macro.
	(MIPS_ICACHE_SYNC): New macro, split from ...
	* config/mips/mips.md (clear_cache): ...here.
	* config/mips/mips.c (mips_save_reg_p): Check
	MIPS_SAVE_REG_FOR_PROFILING_P on profiled functions.
	(build_mips16_function_stub): Use targetm.strip_name_encoding.
	(build_mips16_call_stub): Likewise.

libstdc++-v3/
2007-xx-xx  Thiemo Seufer  <ths@mips.com>

	* crossconfig.m4 (mips*-sde-elf*): New stanza.
	* configure: Regenerate.

From-SVN: r128495
2007-09-14 14:50:26 +00:00
Sandra Loosemore f29adf5b7b mips.h (ASM_OUTPUT_REG_PUSH): Replace {d}subu with {d}addiu and a negative immediate such that it works with...
2007-09-13  Sandra Loosemore  <sandra@codesourcery.com>
	    David Ung  <davidu@mips.com>

	gcc/
	* config/mips/mips.h (ASM_OUTPUT_REG_PUSH): Replace {d}subu with
	{d}addiu and a negative	immediate such that it works with MIPS16
	instructions.

Co-Authored-By: David Ung <davidu@mips.com>

From-SVN: r128468
2007-09-13 10:54:12 -04:00
Richard Sandiford 9a6dfb4739 mips.h (SYMBOL_FLAG_MIPS16_FUNC): Delete.
gcc/
2007-09-13  Richard Sandiford  <richard@codesourcery.com>
	    Sandra Loosemore <sandra@codesourcery.com>

	* config/mips/mips.h (SYMBOL_FLAG_MIPS16_FUNC): Delete.
	(SYMBOL_REF_MIPS16_FUNC_P): Delete.
	* config/mips/mips.c (mips_attribute_table): Turn mips16 and
	nomips16 into decl attributes.
	(TARGET_INSERT_ATTRIBUTES): Override.
	(TARGET_MERGE_DECL_ATTRIBUTES): Likewise.
	(TARGET_FUNCTION_ATTRIBUTE_INLINABLE_P): Always return true.
	(mips_mips16_type_p, mips_nomips16_type_p): Delete in favor of...
	(mips_mips16_decl_p, mips_nomips16_decl_p): ...these new functions.
	(mips_comp_type_attributes): Remove mips16 and nomips16 handling.
	(mips_use_mips16_mode_p): Reimplement as a function that takes
	a decl and considers only decl attributes.  If the decl is nested
	function, use its parent attributes.
	(mips_function_ok_for_sibcall): Use mips_use_mips16_mode_p
	instead of SYMBOL_REF_MIPS16_FUNC_P.
	(mips_set_mips16_mode): Move call to sorry here from old
	mips_use_mips16_mode_p.
	(mflip_mips16_entry): New structure.
	(mflip_mips16_htab): New variable.
	(mflip_mips16_htab_hash, mflip_mips16_htab_eq): New functions.
	(mflip_mips16_use_mips16_p, mips_insert_attributes): Likewise.
	(mips_merge_decl_attributes): New function.
	(mips_set_current_function): Reinstate call to mips_set_mips16_mode.
	Use mips_use_mips16_mode_p.
	(mips_output_mi_thunk): Use mips_use_mips16_mode_p instead of
	SYMBOL_REF_MIPS16_FUNC_P.
	(mips_encode_section_info): Don't set SYMBOL_FLAG_MIPS16_FUNC.

gcc/testsuite/
	* gcc.dg/gcc-have-sync-compare-and-swap.c: Skip for -mflip-mips16.
	* gcc.target/mips/mips16-attributes-2.c: New test.
	* gcc.target/mips/mips16-attributes-3.c: Likewise.
	* gcc.target/mips/args-3.c: Skip for -mflip-mips16.  Do not use the
	hard-float asm when __mips16 is defined.
	* gcc.target/mips/atomic-memory-1.c (main): Add a nomips16 attribute.
	* gcc.target/mips/atomic-memory-2.c (main): Likewise.
	* gcc.target/mips/fpcmp-1.c (f1, f2): Likewise.
	* gcc.target/mips/fpcmp-2.c (f1, f2): Likewise.
	* gcc.target/mips/neg-abs-1.c (f1, f2, d1, f2): Likewise.
	* gcc.target/mips/pr26765.c (foo): Likewise.
	* gcc.target/mips/gcc-have-sync-compare-and-swap-1.c: Run for all
	targets, use dg-mips-options instead of dg-options, and use -mgp32
	to force 32-bit mode.
	* gcc.target/mips/gcc-have-sync-compare-and-swap-2.c: Likewise -mgp64
	and 64-bit mode.
	* gcc.target/mips/mips.exp (is_gp32_flag): Return true for -mips32*.

Co-Authored-By: Sandra Loosemore <sandra@codesourcery.com>

From-SVN: r128460
2007-09-13 12:44:10 +00:00
David Daney 66471b4708 invoke.texi: Document new MIPS -mllsc and -mno-llsc options.
* doc/invoke.texi: Document new MIPS -mllsc and -mno-llsc options.
	* doc/install.texi: Document new --with-llsc and --without-llsc
	options.
	* config.gcc: Handle --with-llsc and --without-llsc configure options.
	* config/mips/mips.md (sync, memory_barrier): Wrap sync instrunction
	in %| and %- operand codes.  Depend on GENERATE_SYNC instead of
	ISA_HAS_SYNC.
	(sync_compare_and_swap<mode>, sync_add<mode>, sync_sub<mode>,
	sync_old_add<mode>, sync_old_sub<mode>, sync_new_add<mode>,
	sync_new_sub<mode>, sync_<optab><mode>, sync_old_<optab><mode>,
	sync_new_<optab><mode>, sync_nand<mode>, sync_old_nand<mode>,
	sync_new_nand<mode>, sync_lock_test_and_set<mode>): Depend on
	GENERATE_LL_SC instead of ISA_HAS_LL_SC.
	* config/mips/mips.opt (mllsc): New option.
	* config/mips/mips.c (mips_llsc): Define variable.
	(mips_handle_option): Handle mllsc option.
	(override_options): Set mips_print_operand_punct for '|' and '-'.
	(print_operand): Add new %| and %- operand codes.
	* config/mips/mips.h (mips_llsc_setting): New enum type.
	(mips_llsc): Declare.
	(OPTION_DEFAULT_SPECS): Add llsc handling.
	(GENERATE_SYNC): New macro.
	(GENERATE_LL_SC): New macro.
	(MIPS_COMPARE_AND_SWAP, MIPS_SYNC_OP, MIPS_SYNC_OLD_OP,
	MIPS_SYNC_NEW_OP, MIPS_SYNC_NAND, MIPS_SYNC_OLD_NAND,
	MIPS_SYNC_NEW_NAND, MIPS_SYNC_EXCHANGE): Wrap instructions
	in %| and %- operand codes.

From-SVN: r128392
2007-09-11 20:14:51 +00:00
Richard Sandiford 8144a1a812 mips.h (CONSTANT_POOL_COST): Move to...
gcc/
2007-09-11  Richard Sandiford  <richard@codesourcery.com>
	    Nigel Stephens  <nigel@mips.com>
	    David Ung  <davidu@mips.com>
	
	* config/mips/mips.h (CONSTANT_POOL_COST): Move to...
	* config/mips/mips.c: ...here and set to 4 for TARGET_MIPS16.
	(mips16_constant_cost, mips_immediate_operand_p, mips_binary_cost)
	(mips_fp_mult_cost, mips_fp_div_cost, mips_sign_extend_cost)
	(mips_zero_extend_cost): New functions.
	(mips_rtx_costs): Treat COMPARE constants as having zero cost.
	Use the new functions.  Tweak many cost estimates, both here
	and in the new subroutines.  Return false when the cost of the
	operands has not been calculated.  Check for *clear_upper32.
	Check for floating-point multiply-add, reciprocal and rsqrt
	patterns.  Handle comparison and rotation codes.

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

From-SVN: r128364
2007-09-11 09:24:59 +00:00
Chao-ying Fu 9fc777ad25 mips.c (mips_scalar_mode_supported_p): Declare.
* config/mips/mips.c (mips_scalar_mode_supported_p): Declare.
	(TARGET_SCALAR_MODE_SUPPORTED_P): Define.
	(mips_emit_compare): Process fixed-point modes.
	(mips_pad_arg_upward): Support fixed-point types.
	(override_options): Allow fixed-point modes in accumulators.
	(mips_pass_by_reference): Pass DQ, UDQ, DA, and UDA modes in registers.
	(mips_vector_mode_supported_p): Support V2HQmode, V2UHQmode, V2HAmode,
	V2UHAmode, V4QQmode, and V4UQQmode when TARGET_DSP.
	(mips_scalar_mode_supported_p): New function to accept fixed-point
	modes if the width is not greater than two BITS_PER_WORD.
	* config/mips/mips.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.
	* config/mips/mips.md ("d"): Update mode attribute for fixed-point
	modes.
	("IMODE"): New mode attribute.
	(mips-fixed.md): Include.
	* config/mips/mips-modes.def: Create VECTOR_MODES for FRACT, UFRACT,
	ACCUM, UACCUM.
	* config/mips/mips-fixed.md: New file.

From-SVN: r128360
2007-09-11 01:04:08 +00:00
Richard Sandiford 7d8bed7be6 mips.h (MIPS_ARCH_FLOAT_SPEC): New macro.
gcc/
	* config/mips/mips.h (MIPS_ARCH_FLOAT_SPEC): New macro.
	* config/mips/mips.c (mips_cpu_info_table): Mention it in the
	the introductory comment.
	(MIPS_MARCH_CONTROLS_SOFT_FLOAT): Delete.
	(override_options): Don't test for it.
	* config/mips/sde.h (MIPS_MARCH_CONTROLS_SOFT_FLOAT): Delete.
	(DRIVER_SELF_SPECS): Add MIPS_ARCH_FLOAT_SPEC.
	* config/mips/vr.h: As for config/mips/sde.h.

From-SVN: r128346
2007-09-10 14:51:48 +00:00
Sandra Loosemore f9e4a411f9 Add mips16/nomips16 function attributes and -mflip-mips16 option for testing mixed-mode compilation.
2007-09-05  Sandra Loosemore  <sandra@codesourcery.com>
	    David Ung  <davidu@mips.com>
            Nigel Stephens <nigel@mips.com>

	Add mips16/nomips16 function attributes and -mflip-mips16 option
	for testing mixed-mode compilation.

	gcc/

	* config/mips/mips.opt (mflip-mips16): New.

	* config/mips/mips.h (SYMBOL_FLAG_MIPS16_FUNC): Define.
	(SYMBOL_FLAG_MIPS16_FUNC_P): Define.

	* config/mips/mips.c (mips_base_target_flags): New.
	(mips_base_mips16): New.
	(mips_base_schedule_insns): New.
	(mips_base_reorder_blocks_and_partition): New.
	(mips_base_align_loops): New.
	(mips_base_align_jumps): New.
	(mips_base_align_functions): New.
	(mips16_flipper): New.
	(mips_attribute_table): Add "mips16" and "nomips16" entries.
	(TARGET_SET_CURRENT_FUNCTION): Define.
	(mips_mips16_type_p, mips_nomips16_type_p): New.
	(mips_comp_type_attributes): Check mips16/nomips16 attributes.
	(mips_function_ok_for_sibcall): Make it deal with functions with
	mips16 attributes.
	(mips_init_split_addresses): New, split out from override_options.
	(mips_init_relocs): New, split out from override_options.
	(was_mips16_p): New.
	(mips_set_mips16_mode): New, split out from override_options.
	(mips_set_current_function): New.
	(override_options):  Add sorry for unsupported mips16/pic
	combination.  Remove error for mips16/dsp combination.	Save
	base option settings.  
	(mips_file_start): Move mips16 mode setting output from here....
	(mips_output_function_prologue): ....to here.
	(mips_output_mi_thunk): Check for mips16 function.
	(build_mips16_function_stub): Don't set .mips16 here.
	(build_mips16_call_stub): Likewise.
	(mips_expand_builtin): Error in mips16 mode.
	(mips_use_mips16_mode_p): New.
	(mips_encode_section_info): Check for mips16 function, and set
	SYMBOL_REF_FLAGS accordingly.

	* doc/extend.texi (Function Attributes): Document new
	mips16/nomips16 attributes.
	* doc/invoke.texi (Option Summary): Add -mflip-mips16.
	(MIPS Options): Document -mflip-mips16.

	gcc/testsuite/
	* gcc.target/mips/mips16-attributes.c: New.

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

From-SVN: r128134
2007-09-05 10:40:04 -04:00
David Daney 8d2fc1c481 mips.md (UNSPEC_COMPARE_AND_SWAP, [...]): New define_constants.
2007-09-02  David Daney  <ddaney@avtrex.com>

	* config/mips/mips.md (UNSPEC_COMPARE_AND_SWAP, UNSPEC_SYNC_OLD_OP,
	UNSPEC_SYNC_NEW_OP, UNSPEC_SYNC_EXCHANGE): New define_constants.
	(optab, insn): Add more attributes.
	(fetchop_bit): New code macro.
	(immediate_insn): New code macro attribute.
	(sync): Change condition to ISA_HAS_SYNC.
	(rdhwr): Change predicate for operand 0 to register_operand.
	(memory_barrier): New expand.
	(sync_compare_and_swap<mode>, sync_add<mode>, sync_sub<mode>,
	sync_old_add<mode>, sync_old_sub<mode>, sync_new_add<mode>,
	sync_new_sub<mode>, sync_<optab><mode>,	sync_old_<optab><mode>,
	sync_new_<optab><mode>, sync_nand<mode>, sync_old_nand<mode>,
	sync_new_nand<mode>, sync_lock_test_and_set<mode>): New insns.
	* config/mips/mips.h (ISA_HAS_SYNC, ISA_HAS_LL_SC): New ISA predicates.
	(MIPS_COMPARE_AND_SWAP, MIPS_SYNC_OP, MIPS_SYNC_OLD_OP,
	MIPS_SYNC_NEW_OP, MIPS_SYNC_NAND, MIPS_SYNC_OLD_NAND,
	MIPS_SYNC_NEW_NAND, MIPS_SYNC_EXCHANGE): New Macros.
	
2007-09-02  David Daney  <ddaney@avtrex.com>
	* gcc.target/mips/gcc-have-sync-compare-and-swap-1.c: New test.
	* gcc.target/mips/gcc-have-sync-compare-and-swap-2.c: Ditto.
	* gcc.target/mips/atomic-memory-1.c: Ditto.
	* testsuite/gcc.target/mips/atomic-memory-2.c: Ditto.

From-SVN: r128037
2007-09-03 05:34:30 +00: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
Kaveh R. Ghazi 586de21898 arc-protos.h (arc_select_cc_mode, gen_compare_reg): Wrap in RTX_CODE macro guard.
* config/arc/arc-protos.h arc_select_cc_mode, gen_compare_reg):
	Wrap in RTX_CODE macro guard.
	* config/arm/pe.c (arm_dllexport_p, arm_dllimport_p,
	arm_dllexport_name_p, arm_dllimport_name_p, arm_mark_dllexport,
	arm_mark_dllimport, arm_pe_encode_section_info,
	arm_pe_unique_section): Use ISO-C function declarations.
	* config/c4x/c4x-c.c (c4x_parse_pragma, c4x_pr_CODE_SECTION,
	c4x_pr_DATA_SECTION, c4x_pr_FUNC_IS_PURE,
	c4x_pr_FUNC_NEVER_RETURNS, c4x_pr_INTERRUPT, c4x_pr_ignored):
	Likewise.
	* config/iq2000/iq2000.h (ASM_OUTPUT_SKIP): Fix format warning.
	* config/m68hc11/m68hc11.h (ASM_OUTPUT_EXTERNAL): Undef before
	defining.
	* config/mips/mips.h (ASM_DECLARE_OBJECT_NAME): Fix format
	warnings.
	* config/mn10300/mn10300.h (OUTPUT_ADDR_CONST_EXTRA): Likewise.
	* config/pdp11/pdp11.c (pdp11_output_function_epilogue): Likewise.
	(register_move_cost): Use ISO-C function declarations.
	* config/pdp11/pdp11.h (PRINT_OPERAND): Fix format warnings.
	* config/score/score-protos.h (score_declare_object): Add
	ATTRIBUTE_PRINTF_4.
	* config/score/score.h (ASM_DECLARE_OBJECT_NAME): Fix format
	warnings.
	* final.c (profile_function): Avoid empty if-bodies.
	
	
	* calls.c (must_pass_in_stack_var_size,
	must_pass_in_stack_var_size_or_pad): Constify.
	* config/alpha/alpha-protos.h (function_value): Likewise.
	* config/alpha/alpha.c (alpha_return_in_memory,
	alpha_pass_by_reference, function_value,
	unicosmk_must_pass_in_stack, TARGET_PROMOTE_FUNCTION_ARGS,
	TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES):
	Likewise.
	* config/arc/arc.c (arc_return_in_memory, arc_pass_by_reference,
	TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN,
	TARGET_PROMOTE_PROTOTYPES): Likewise.
	* config/arm/arm-protos.h (arm_return_in_memory,
	arm_pad_arg_upward, arm_function_value): Likewise.
	* config/arm/arm.c (arm_pass_by_reference,
	arm_promote_prototypes, arm_return_in_msb, arm_must_pass_in_stack,
	TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN,
	arm_function_value, arm_return_in_memory, arm_pad_arg_upward):
	Likewise.
	* config/arm/arm.h (ARM_DECLARE_FUNCTION_NAME): Likewise.
	* config/avr/avr-protos.h (avr_function_value): Likewise.
	* config/avr/avr.c (avr_return_in_memory,
	gas_output_limited_string, gas_output_ascii, avr_function_value,
	avr_return_in_memory): Likewise.
	* config/bfin/bfin-protos.h (bfin_return_in_memory): Likewise.
	* config/bfin/bfin.c (bfin_pass_by_reference,
	bfin_return_in_memory, TARGET_PROMOTE_PROTOTYPES,
	TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN):
	Likewise.
	* config/cris/cris.c (cris_pass_by_reference,
	TARGET_PROMOTE_FUNCTION_ARGS): Likewise.
	* config/crx/crx.c (crx_return_in_memory): Likewise.
	* config/darwin.c (function_base, machopic_function_base_name):
	Likewise.
	* config/fr30/fr30.c (fr30_must_pass_in_stack,
	TARGET_PROMOTE_PROTOTYPES): Likewise.
	* config/frv/frv.c (frv_must_pass_in_stack): Likewise.
	* config/h8300/h8300.c (h8300_return_in_memory): Likewise.
	* config/i386/i386-protos.h (ix86_return_in_memory,
	ix86_sol10_return_in_memory): Likewise.
	* config/i386/i386.c (ix86_function_value,
	ix86_function_sseregparm, ix86_must_pass_in_stack,
	type_natural_mode, classify_argument, examine_argument,
	construct_container, ix86_pass_by_reference, function_value_32,
	function_value_64, ix86_function_value_1, return_in_memory_32,
	return_in_memory_64, return_in_memory_ms_64,
	ix86_return_in_memory, ix86_sol10_return_in_memory,
	TARGET_PROMOTE_PROTOTYPES): Likewise.
	* config/ia64/ia64-protos.h (ia64_function_value,
	ia64_hpux_function_arg_padding): Likewise.
	* config/ia64/ia64.c (hfa_element_mode, ia64_return_in_memory,
	ia64_function_value, bundle_state_hash, bundle_state_eq_p,
	ia64_hpux_function_arg_padding): Likewise.
	* config/iq2000/iq2000-protos.h (function_arg,
	iq2000_function_value): Likewise.
	* config/iq2000/iq2000.c (iq2000_return_in_memory,
	iq2000_pass_by_reference, TARGET_PROMOTE_FUNCTION_ARGS,
	TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES,
	function_arg, iq2000_function_value): Likewise.
	* config/m32c/m32c-protos.h (m32c_function_value,
	m32c_promote_function_return): Likewise.
	* config/m32c/m32c.c (m32c_pass_by_reference,
	m32c_promote_prototypes, m32c_promote_function_return,
	m32c_function_value): Likewise.
	* config/m32r/m32r.c (m32r_return_in_memory,
	m32r_pass_by_reference, TARGET_PROMOTE_PROTOTYPES,
	m32r_in_small_data_p): Likewise.
	* config/m68hc11/m68hc11-protos.h (m68hc11_function_arg_padding):
	Likewise.
	* config/m68hc11/m68hc11.c (m68hc11_return_in_memory,
	m68hc11_function_arg_padding): Likewise.
	* config/m68k/m68k-protos.h (m68k_function_value): Likewise.
	* config/m68k/m68k.c (TARGET_PROMOTE_PROTOTYPES,
	m68k_function_value): Likewise.
	* config/mcore/mcore-protos.h (mcore_num_arg_regs,
	mcore_function_value): Likewise.
	* config/mcore/mcore.c (handle_structs_in_regs,
	mcore_return_in_memory, TARGET_PROMOTE_FUNCTION_ARGS,
	TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES,
	mcore_num_arg_regs, mcore_function_value): Likewise.
	* config/mips/mips-protos.h (mips_pad_arg_upward,
	mips_function_value): Likewise.
	* config/mips/mips.c (mips_fpr_return_fields, mips_return_in_msb,
	mips_return_in_memory, mips_pass_by_reference, mips_callee_copies,
	TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN,
	TARGET_PROMOTE_PROTOTYPES, mips_pad_arg_upward,
	mips_function_value): Likewise.
	* config/mmix/mmix-protos.h (mmix_function_outgoing_value):
	Likewise.
	* config/mmix/mmix.c (mmix_pass_by_reference,
	TARGET_PROMOTE_FUNCTION_ARGS, mmix_function_outgoing_value,
	mmix_encode_section_info): Likewise.
	* config/mn10300/mn10300-protos.h (mn10300_function_value):
	Likewise.
	* config/mn10300/mn10300.c (mn10300_return_in_memory,
	mn10300_pass_by_reference, TARGET_PROMOTE_PROTOTYPES,
	mn10300_function_value): Likewise.
	* config/mt/mt-protos.h (mt_function_value): Likewise.
	* config/mt/mt.c (mt_pass_by_reference, mt_function_value,
	mt_pass_in_stack, TARGET_PROMOTE_PROTOTYPES): Likewise.
	* config/pa/pa-protos.h (function_arg_padding, function_value,
	pa_return_in_memory): Likewise.
	* config/pa/pa.c (pa_pass_by_reference,
	TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES,
	function_arg_padding, function_value, pa_return_in_memory):
	Likewise.
	* config/pdp11/pdp11.c (pdp11_return_in_memory): Likewise.
	* config/rs6000/rs6000-protos.h (rs6000_function_value,
	function_arg_padding): Likewise.
	* config/rs6000/rs6000.c (rs6000_return_in_memory,
	rs6000_darwin64_record_arg_recurse, rs6000_darwin64_record_arg,
	rs6000_pass_by_reference, rs6000_must_pass_in_stack,
	TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN,
	function_arg_padding, altivec_expand_dst_builtin,
	altivec_expand_builtin, rs6000_expand_builtin, spe_init_builtins,
	altivec_init_builtins, rs6000_common_init_builtins,
	rs6000_function_value): Likewise.
	* s390/s390-protos.h (s390_function_value): Likewise.
	* config/s390/s390.c (s390_function_arg_size,
	s390_pass_by_reference, s390_return_in_memory,
	s390_function_value, TARGET_PROMOTE_FUNCTION_ARGS,
	TARGET_PROMOTE_FUNCTION_RETURN): Likewise.
	* config/score/score-protos.h (score_function_value): Likewise.
	* config/score/score.c (score_arg_partial_bytes,
	TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN,
	TARGET_PROMOTE_PROTOTYPES, score_return_in_memory,
	score_pass_by_reference, score_add_offset, score_function_value):
	Likewise.
	* config/sh/sh-protos.h (sh_attr_renesas_p,
	sh_promote_prototypes): Likewise.
	* config/sh/sh.c (sh_return_in_memory, sh_pass_by_reference,
	sh_callee_copies, sh_promote_prototypes, shcompact_byref,
	sh_attr_renesas_p): Likewise.
	* config/sparc/sparc-protos.h (function_value,
	function_arg_padding): Likewise.
	* config/sparc/sparc.c (sparc_promote_prototypes,
	sparc_return_in_memory, sparc_pass_by_reference,
	TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN,
	function_arg_record_value_2, function_arg_record_value_1,
	function_arg_record_value, function_arg_record_value,
	function_arg_padding, function_value): Likewise.
	* config/spu/spu-protos.h (spu_function_value): Likewise.
	* config/spu/spu.c (spu_pass_by_reference, spu_return_in_memory,
	spu_function_value): Likewise.
	* config/stormy16/stormy16-protos.h (xstormy16_function_value):
	Likewise.
	* config/stormy16/stormy16.c (xstormy16_return_in_memory,
	xstormy16_function_value, TARGET_PROMOTE_FUNCTION_ARGS,
	TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES):
	Likewise.
	* config/v850/v850.c (v850_return_in_memory,
	v850_pass_by_reference, TARGET_PROMOTE_PROTOTYPES): Likewise.
	* config/vax/vax.c (TARGET_PROMOTE_PROTOTYPES): Likewise.
	* config/xtensa/xtensa.c (xtensa_return_in_msb,
	xtensa_return_in_memory, TARGET_PROMOTE_FUNCTION_ARGS,
	TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES):
	Likewise.
	* explow.c (promote_mode, hard_function_value): Likewise.
	* expr.h (hard_function_value, promote_mode): Likewise.
	* function.c (aggregate_value_p): Likewise.
	* hooks.c (hook_bool_const_tree_true): New.
	* hooks.h (hook_bool_const_tree_true): New.
	* sdbout.c (SET_KNOWN_TYPE_TAG, plain_type_1): Constify.
	* target-def.h (TARGET_PROMOTE_FUNCTION_ARGS,
	TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES,
	TARGET_RETURN_IN_MSB): Likewise.
	* target.h (promote_function_args, promote_function_return,
	promote_prototypes, return_in_memory, return_in_msb,
	pass_by_reference, must_pass_in_stack, callee_copies,
	function_value): Likewise.
	* targhooks.c (default_return_in_memory,
	hook_pass_by_reference_must_pass_in_stack,
	hook_callee_copies_named,
	hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false,
	hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true,
	default_function_value): Likewise. 
	* targhooks.h (default_return_in_memory,
	hook_pass_by_reference_must_pass_in_stack,
	hook_callee_copies_named,
	hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false,
	hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true,
	default_function_value): Likewise.
	* tree-ssa-structalias.c (const_equiv_class_label_t): New.
	(equiv_class_label_hash, equiv_class_label_eq): Constify.
	* tree-vectorizer.c (bb_in_loop_p): Likewise.
	* tree.c (needs_to_live_in_memory): Likewise.
	* tree.h (struct tree_type, needs_to_live_in_memory,
	aggregate_value_p, must_pass_in_stack_var_size,
	must_pass_in_stack_var_size_or_pad): Likewise.
	* vmsdbgout.c (write_debug_addr, write_debug_delta4,
	write_debug_string, ASM_OUTPUT_DEBUG_STRING, write_rtnbeg,
	lookup_filename): Likewise.

From-SVN: r127743
2007-08-23 15:49:56 +00:00