Commit Graph

268 Commits

Author SHA1 Message Date
Richard Henderson 2a1ee410ce defaults.h (ASM_PREFERRED_EH_DATA_FORMAT): New.
* defaults.h (ASM_PREFERRED_EH_DATA_FORMAT): New.
	* dwarf2asm.c (dw2_force_const_mem, dw2_output_indirect_constant_1,
	dw2_output_indirect_constants, dw2_asm_output_encoded_addr_rtx): New.
	* dwarf2asm.h (dw2_asm_output_encoded_addr_rtx): Prototype.
	(dw2_output_indirect_constants): Prototype.
	* dwarf2out.c (dwarf2out_begin_prologue): Generate
	current_function_func_begin_label if we'll need it for EH.  Exit
	early for IA64_UNWIND_INFO.
	* except.c: Get DW_EH_PE_* defines from dwarf2.h.
	(eh_data_format_name): Update for indirect references.
	(output_function_exception_table): Care for IA64_UNWIND_INFO.
	Handle ASM_PREFERRED_EH_DATA_FORMAT.
	* except.h (MUST_USE_SJLJ_EXCEPTIONS): IA64_UNWIND_INFO needn't
	define HAVE_eh_return etc.
	* final.c (final_start_function): Always call dwarf2out_begin_prologue.
	(final_end_function): Don't call output_function_exception_table.
	* toplev.c (compile_file): Call dw2_output_indirect_constants.
	(rest_of_compilation): Invoke output_function_exception_table
	for ia64 before assemble_end_function.
	* tm.texi (ASM_PREFERRED_EH_DATA_FORMAT): Document.
	(ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX): Document.

	* unwind-dw2.c (_Unwind_GetTextRelBase, _Unwind_GetDataRelBase): New.
	* unwind.h: Declare them.
	* libgcc-std.ver: Export them.
	* unwind-pe.h: New file.

	* config/alpha/elf.h (ASM_PREFERRED_EH_DATA_FORMAT): New.

	* config/ia64/fde-glibc.c: Use "struct unw_table_entry"
	instead of "fde".
	(find_fde_for_dso): Extract DT_PLTGOT.
	(_Unwind_FindTableEntry): Rename from __ia64_find_fde; return
	the segment and gp as well.
	* config/ia64/frame-ia64.c: Remove file.
	* config/ia64/frame-ia64.h: Remove file.
	* config/ia64/unwind-ia64.c: New file.
	* config/ia64/unwind-ia64.h: New file.
	* config/ia64/ia64.h (ASM_OUTPUT_EH_CHAR): Remove.
	(ASM_OUTPUT_EH_SHORT, ASM_OUTPUT_EH_INT): Remove.
	(ASM_OUTPUT_EH_DOUBLE_INT): Remove.
	(ASM_PREFERRED_EH_DATA_FORMAT): New.
	(ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX): New.
	(IA64_UNWIND_INFO): Re-enable.
	(HANDLER_SECTION): Remove.
	(EH_RETURN_DATA_REGNO): New.
	* config/ia64/ia64.md (exception_receiver): Remove.
	* config/ia64/t-glibc (LIB2ADDEH): Re-enable.
	* config/ia64/t-ia64 (LIB2ADDEH): Re-enable.

From-SVN: r41981
2001-05-11 23:03:20 -07:00
Kaveh R. Ghazi df4ae16082 alpha.h: NULL_PTR -> NULL.
* alpha.h: NULL_PTR -> NULL.
	* arm.c: Likewise.
	* arm.h: Likewise.
	* avr.h: Likewise.
	* c4x.c: Likewise.
	* c4x.h: Likewise.
	* i386.c: Likewise.
	* i386.md: Likewise.
	* i860.c: Likewise.
	* ia64.c: Likewise.
	* m68hc11.h: Likewise.
	* rs6000.h: Likewise.
	* sh.c: Likewise.
	* sh.h: Likewise.
	* sparc.h: Likewise.
	* v850.c: Likewise.

	* expr.c: Likewise.
	* final.c: Likewise.
	* gcc.c: Likewise.
	* recog.c: Likewise.

From-SVN: r41831
2001-05-04 15:06:41 +00:00
Zack Weinberg 7719ffbf1d dbxout.c, [...]: Always include gstab.h, not system stab.h.
* dbxout.c, mips-tfile.c, config/mips/mips.c, xcoffout.c:
	Always include gstab.h, not system stab.h.  Don't provide
	default definitions of N_CATCH or N_OPT.  Always use the
	gstab.h variant of STAB_CODE_TYPE.
	* final.c: Don't include stab.h/gstab.h at all, or provide
	defaults for N_SLINE and N_SOL.

	* xcoffout.c: Can assume N_MAIN, N_DSLINE, N_BSLINE, N_BINCL,
	N_EINCL, N_EXCL, N_M2C, N_SCOPE, N_CATCH, and N_OPT are
	available.
	* sdbout.c: Always include gsyms.h instead of system syms.h.

	* configure.in: No need to check for stab.h.
	* configure, config.in: Regenerate.
	* Makefile.in (final.o): Don't depend on gstab.h.

From-SVN: r41713
2001-05-01 01:58:32 +00:00
Jakub Jelinek ddef6bc7a3 Use byte offsets in SUBREGs instead of words.
2001-04-03  Jakub Jelinek  <jakub@redhat.com>
	    David S. Miller  <davem@pierdol.cobaltmicro.com>
            Andrew MacLeod  <amacleod@redhat.com>

	Use byte offsets in SUBREGs instead of words.

	* alias.c (nonlocal_mentioned_p): Use subreg_regno function.
	* caller-save.c (mark_set_regs): Change callers of subreg_hard_regno
	to pass new argument.
	(add_stored_regs): Use subreg_regno_offset function.
	* calls.c (expand_call): For non-paradoxical SUBREG take endianess
	into account.
	(precompute_arguments): Use gen_lowpart_SUBREG.
	* combine.c (try_combine): Replace explicit XEXP with SUBREG_REG.
	(combine_simplify_rtx): Rework to use SUBREG_BYTE.
	(simplify_set): Rework to use SUBREG_BYTE.
	(expand_field_assignment): Use SUBREG_BYTE.
	(make_extraction): Use SUBREG_BYTE.
	(if_then_else_cond): Use SUBREG_BYTE.
	(apply_distributive_law): Use SUBREG_BYTE and fixup subreg comments.
	(gen_lowpart_for_combine): Compute full byte offset.
	* cse.c (mention_regs): Use SUBREG_BYTE.
	(remove_invalid_subreg_refs): Rework to use SUBREG_BYTE.
	(canon_hash): Use SUBREG_BYTE.
	(fold_rtx): Pass SUBREG_BYTE div UNITS_PER_WORD to operand_subword.
	(gen_lowpart_if_possible): Formatting.
	* dbxout.c (dbxout_symbol_location): Compute SUBREG hard regnos
	correctly.
	* dwarf2out.c (is_pseudo_reg): Fixup explicit XEXP into SUBREG_REG
	(mem_loc_descriptor): Fixup explicit XEXP into SUBREG_REG
	(loc_descriptor): Fixup explicit XEXP into SUBREG_REG
	* dwarfout.c (is_pseudo_reg): Fixup explicit XEXP into SUBREG_REG
	(output_mem_loc_descriptor): Fixup explicit XEXP into SUBREG_REG
	(output_loc_descriptor): Fixup explicit XEXP into SUBREG_REG
	* emit-rtl.c (gen_rtx_SUBREG): New function, used to verify
	certain invariants about SUBREGs the compiler creates.
	(gen_lowpart_SUBREG): New function.
	(subreg_hard_regno): New function to get the final register number.
	(gen_lowpart_common): Use SUBREG_BYTE.
	(gen_imagpart): Spacing nits.
	(subreg_realpart_p): Use SUBREG_BYTE.
	(gen_highpart): Use SUBREG_BYTE.
	(subreg_lowpart_p): Always compute endian corrected goal offset,
	even at the byte level, then compare against that.
	(constant_subword): New function, pulled out all constant cases
	from operand_subword and changed second argument name to offset.
	(operand_subword): Detect non REG/SUBREG/CONCAT/MEM cases early
	and call constant_subword to do the work.  Return const0_rtx if
	looking for a word outside of OP.
	(operand_subword_force): Change second arg name to offset.
	* expmed.c (store_bit_field): Use SUBREG_BYTE.
	(store_split_bit_field): Use SUBREG_BYTE.
	(extract_bit_field): Use SUBREG_BYTE.
	(extract_split_bit_field): Use SUBREG_BYTE.
	(expand_shift): Use SUBREG_BYTE.
	* expr.c (store_expr, expand_expr): Use gen_lowpart_SUBREG.
	* final.c (alter_subreg) Use subreg_hard_regno and SUBREG_BYTE.
	* flow.c (set_noop_p): Use SUBREG_BYTE.
	(mark_set_1): Remove ALTER_HARD_SUBREG. Use subreg_regno_offset instead.
	* function.c (fixup_var_refs_1): Fixup explicit XEXP into a SUBREG_REG.
	(fixup_memory_subreg): Use SUBREG_BYTE and remove byte endian
	correction code.
	(optimize_bit_field): Use SUBREG_BYTE.
	(purge_addressof_1): Use SUBREG_BYTE.
	(purge_single_hard_subreg_set): Use subreg_regno_offset function.
	(assign_params): Mark arguments SUBREG_PROMOTED_VAR_P if they are
	actually promoted by the caller and PROMOTE_FOR_CALLS_ONLY is true.
	* gengenrtl.c (special_rtx): Add SUBREG.
	* global.c (mark_reg_store): Use SUBREG_BYTE.
	(set_preference): Rework to use subreg_regno_offset and SUBREG_BYTE.
	* ifcvt (noce_emit_move_insn): Use SUBREG_BYTE.
	* integrate.c (copy_rtx_and_substitute): Use SUBREG_BYTE and make sure
	final byte offset is congruent to subreg's mode size.
	(subst_constants): Use SUBREG_BYTE.
	(mark_stores): Use subreg_regno_offset function.
	* jump.c (rtx_renumbered_equal_p, true_regnum): Use subreg_regno_offset
	function and SUBREG_BYTE.
	* local-alloc.c (combine_regs): Use subreg_regno_offset function.
	(reg_is_born): Use subreg_hard_regno.
	* recog.c (valid_replace_rtx_1): Use SUBREG_BYTE and remove byte
	endian correction code.  Don't combine subregs unless resulting
	offset aligns with type.  Fix subreg constant extraction for DImode.
	Simplify SUBREG of VOIDmode CONST_DOUBLE.
	(general_operand): Remove dead mode_altering_drug code.
	(indirect_operand): Use SUBREG_BYTE.
	(constrain_operands): Use subreg_regno_offset function.
	* reg-stack.c (get_true_reg): Use subreg_regno_offset function.
	* regmove.c (regmove_optimize): Use SUBREG_BYTE.
	(optimize_reg_copy_3): Use gen_lowpart_SUBREG.
	* regs.h (REG_SIZE): Allow target to override.
	(REGMODE_NATURAL_SIZE): New macro which target can override.
	* reload.c (reload_inner_reg_of_subreg): subreg_regno should be used
	on the entire subreg rtx.
	(push_reload): Use SUBREG_BYTE in comments and code.
	(find_dummy_reload): Use subreg_regno_offset.  Only adjust offsets
	for hard registers inside subregs.
	(operands_match_p): Use subreg_regno_offset.
	(find_reloads): Use SUBREG_BYTE and only advance offset for subregs
	containing hard regs.
	(find_reload_toplev): Use SUBREG_BYTE.  Remove byte endian
	corrections when fixing up MEM subregs.
	(find_reloads_address_1): Use SUBREG_BYTE, subreg_regno, and
	subreg_regno_offset where appropriate.
	(find_reloads_subreg_address): Use SUBREG_BYTE.  Remove
	byte endian corrections when fixing up MEM subregs.
	(subst_reloads): When combining two subregs, make sure final
	offset is congruent to subreg's mode size.
	(find_replacement): Use SUBREG_BYTE and subreg_regno_offset.
	(refers_to_regno_for_reload_p): Use subreg_regno.
	(reg_overlap_mentioned_for_reload_p): Use subreg_regno_offset.
	* reload1.c (eliminate_regs) Use SUBREG_BYTE. Remove byte endian
	correction code for memory subreg fixups.
	(forget_old_reload_1): Use subreg_regno_offset.
	(choose_reload_regs): Use subreg_regno.
	(emit_input_reload_insns): Use SUBREG_BYTE.
	(reload_combine_note_store): Use subreg_regno_offset.
	(move2add_note_store): Use subreg_regno_offset.
	* resource.c (update_live_status, mark_referenced_resources): Use
	subreg_regno function.
	(mark_set_resources): Use subreg_regno function.
	* rtl.h (SUBREG_WORD): Rename to SUBREG_BYTE.
	(subreg_regno_offset, subreg_regno): Define prototypes.
	(subreg_hard_regno, constant_subword, gen_rtx_SUBREG): Newi functions.
	(gen_lowpart_SUBREG): Add prototype.
	* rtl.texi (subreg): Update to reflect new byte offset representation.
	Add mentioning of the effect that BYTES_BIG_ENDIAN has on subregs now.
	* rtlanal.c (refers_to_regno_p): Use subreg_regno.
	(reg_overlap_mentioned_p): Use subreg_regno.
	(replace_regs); Make sure final offset of combined subreg is
	congruent to size of subreg's mode.
	(subreg_regno_offset): New function.
	(subreg_regno): New function.
	* sched-vis.c (print_value): Change SUBREG_WORD to SUBREG_BYTE.
	* sdbout.c (sdbout_symbol): Compute offset using alter_subreg.
	* stmt.c (expand_anon_union_decl): Use gen_lowpart_SUBREG.
	* tm.texi (ALTER_HARD_SUBREG): Remove, it is now dead.
	(SUBREG_REGNO_OFFSET): Describe SUBREG_REGNO_OFFSET overrides.
	* config/a29k/a29k.c (gpc_reg_operand): Use subreg_regno.
	(a29k_get_reloaded_address): Use SUBREG_BYTE.
	(print_operand): Use SUBREG_BYTE.
	* config/alpha/alpha.c (print_operand_address): Use SUBREG_BYTE.
	* config/arm/arm.c (arm_reload_in_hi): Use SUBREG_BYTE.
	(arm_reload_out_hi): Use SUBREG_BYTE.
	* config/d30v/d30v.c (d30v_split_double): Use subreg_regno_offset
	instead of SUBREG_WORD.
	(d30v_print_operand_memory_reference): Use subreg_regno_offset.
	* config/dsp16xx/dsp16xx.md (extendqihi2, zero_extendqihi2): Fix
	SUBREG creation to use byte offset.
	* config/h8300/h8300.md (Unnamed HImode zero extraction and 16bit
	inverted load insns): Fix explicit rtl subregs to use byte
	offsets.
	* config/i370/i370.md (cmpstrsi, movstrsi, mulsi3, divsi3,
	udivsi3, umodsi3): Generate SUBREGs with byte offsets.
	* config/i860/i860.c (single_insn_src_p): Use SUBREG_BYTE.
	* config/i860/i860.md (mulsi3_big): Fixup explicit SUBREGs in rtl
	to use byte offsets.
	(unnamed fmlow.dd insn): Fixup SUBREGS to use byte offsets.
	* config/i960/i960.md (extendhisi2): Generate SUBREGs with byte
	offsets, also make sure it is congruent to SUBREG's mode size.
	(extendqisi2, extendqihi2, zero_extendhisi2, zero_extendqisi2,
	unnamed ldob insn): Generate SUBREGs with byte offset.
	(zero_extendqihi2): SUBREG's are byte offsets.
	* config/m68hc11/m68hc11.c (m68hc11_gen_lowpart): Use SUBREG_BYTE.
	(m68hc11_gen_highpart): Use SUBREG_BYTE.
	* config/m68k/m68k.md (zero_extendhisi2, zero_extendqihi2,
	zero-extendqisi2): Generate SUBREGs with byte offset.
	(umulsidi3, mulsidi3, subreghi1ashrdi_const32,
	subregsi1ashrdi_const32, subreg1lshrdi_const32): Fixup explicit
	subregs in rtl to use byte offsets.
	* config/m88k/m88k.md (extendsidi2): fixup subregs to use byte offset.
	* config/mips/mips.c (mips_move_1word): Use subreg_regno_offset.
	(mips_move_2words): Use subreg_regno_offset.
	(mips_secondary_reload_class): Use subreg_regno_offset.
	* config/mips/mips.md (DImode plus, minus, move, and logical op
	splits): Fixup explicit subregs in rtl to use byte offsets.
	* config/mn10200/mn10200.c (print_operand): Use subreg_regno function.
	* config/mn10300/mn10300.c (print_operand): Use subreg_regno function.
	* config/ns32k/ns32k.md (udivmoddisi4): Fix explicit subregs in
	rtl to use byte offsets.
	* config/pa/pa.c (emit_move_sequence): Use SUBREG_BYTE.
	* config/pa/pa.md (floatunssisf2, floatunssidf2, mulsi3): fix explicit
	subregs to use byte offsets.
	* config/pdp11/pdp11.md (zero_extendhisi2, modhi3, modhi3+1):
	Fixup explicit subregs in rtl to use byte offsets.
	* config/romp/romp.c (memory_offset_in_range_p): Use SUBREG_BYTE
	and remove byte endian correction code.
	* config/sh/sh.c (output_movedouble): Use subreg_regno.
	(gen_ashift_hi): Use SUBREG_BYTE.
	(regs_used): Use subreg_regno_offset.
	(machine_dependent_reorg): Use subreg_regno_offset.
	* config/sh/sh.h (INDEX_REGISTER_RTX_P): Use SUBREG_BYTE.
	* config/sh/sh.md (DImode and DFmode move splits): Use subreg_regno.
	(movdf_i4): Subregs are byte offsets now.
	* config/sparc/sparc.c (ultra_find_type): Use SUBREG_BYTE.
	* config/sparc/sparc.h (ALTER_HARD_SUBREG): Removed.
	(REGMODE_NATURAL_SIZE): Override.
	(REG_SIZE): For SUBREG check float mode on SUBREG_REG's mode.
	* config/sparc/sparc.md (TFmode move splits): Generate SUBREGs
	with byte offsets.
	(zero_extendhisi2, zero_extendqidi2_insn, extendhisi2,
	extendqihi2, sign_extendqihi2_insn, sign_extendqisi2_insn,
	extendqidi2): Generate SUBREGs with byte offsets, also make sure
	it is congruent to SUBREG's mode size.
	(smulsi3_highpart_v8plus): Fix explicit subregs in rtl to use byte
	offsets.
	(cmp_siqi_trunc, cmp_siqi_trunc_set, cmp_diqi_trunc,
	cmp_diqi_trunc_set, lshrdi3_v8plus+1, lshrdi3_v8plus+2,
	lshrdi3_v8plus+3, lshrdi3_v8plus+4): Use proper
	SUBREG_BYTE offset for non-paradoxical subregs in patterns.
	* config/v850/v850.c (print_operand, output_move_double): Use
	subreg_regno function.

Co-Authored-By: Andrew MacLeod <amacleod@redhat.com>
Co-Authored-By: David S. Miller <davem@pierdol.cobaltmicro.com>

From-SVN: r41058
2001-04-03 15:06:12 +00:00
Richard Henderson 52a11cbfcf IA-64 ABI Exception Handling.
From-SVN: r40924
2001-03-28 03:04:51 -08:00
Richard Henderson 461fc4de6a Remove flag_new_exceptions.
From-SVN: r40908
2001-03-27 22:11:49 -08:00
Richard Henderson 531073e70e Make -fsjlj-exceptions a configure option.
From-SVN: r40905
2001-03-27 21:24:24 -08:00
Jim Wilson ad0fc69878 Fix ia64-linux kernel miscompile, bad unwind info when reorder epilogue block.
* final.c (final_scan_insn, case NOTE_INSN_BASIC_BLOCK): Call
	IA64_UNWIND_EMIT.
	* config/ia64/ia64.c (block_num, need_copy_state): New static vars.
	(process_epilogue): New static function.
	(process_set): Call process_epilogue instead of emitting .restore
	directly.
	(process_for_unwind_directive): Handle NOTE_INSN_BASIC_BLOCK.

From-SVN: r40885
2001-03-27 15:15:04 -08:00
Richard Henderson 5e7f4a4ab9 mkconfig.sh: Include insn-flags.h.
* mkconfig.sh: Include insn-flags.h.
	* Makefile.in (CONFIG_H): Include insn-flags.h.
	(lots of objects): Remove insn-codes.h and insn-flags.h.

	* alias.c, bb-reorder.c, calls.c, do-loop.c, flow.c, haifa-sched.c,
	integrate.c, jump.c, loop.c, predict.c, profile.c, reg-stack.c,
	regmove.c, reorg.c, a29k/a29k.c, alpha/alpha.c, arc/arc.c, arm/arm.c,
	avr/avr.c, clipper/clipper.c, convex/convex.c, d30v/d30v.c,
	dsp16xx/dsp16xx.c, fr30/fr30.c, h8300/h8300.c, i370/i370.c,
	i386/i386.c, i860/i860.c, ia64/ia64.c, m32r/m32r.c, m68hc11/m68hc11.c,
	m68k/m68k.c, m88k/m88k.c, mcore/mcore.c, mn10200/mn10200.c,
	mn10300/mn10300.c, ns32k/ns32k.c, pa/pa.c, pdp11/pdp11.c,
	pj/pj.c, romp/romp.c, rs6000/rs6000.c, sh/sh.c, sparc/sparc.c,
	v850/v850.c, vax/vax.c:
	Don't include insn-flags.h.

	* diagnostic.c, expr.h, reload.c, toplev.c:
	Don't include insn-codes.h.

	* builtins.c, combine.c, except.c, explow.c, expmed.c, expr.c,
	final.c, function.c, optabs.c, recog.c, reload1.c, stmt.c,
	c4x/c4x.c, i960/i960.c, mips/mips.c:
	Don't include insn-codes.h or insn-flags.h.

	* genemit.c, genopinit.c, genoutput.c: Don't include insn-codes.h
	or insn-flags.h in the generated code.
	* genflags.c (gen_proto): Use "struct rtx_def *" instead of "rtx".
	(main): Forward declare struct rtx_def.

From-SVN: r40754
2001-03-22 10:48:52 -08:00
Richard Henderson bf501a6512 defaults.h (ACCUMULATE_OUTGOING_ARGS, PUSH_ARGS): Move from ...
* defaults.h (ACCUMULATE_OUTGOING_ARGS, PUSH_ARGS): Move from ...
        * calls.c: ... here.
        * combine.c, expr.c, final.c, function.c toplev.c: Don't provide
        defaults for them here.

From-SVN: r40603
2001-03-18 13:38:33 -08:00
Richard Henderson fbfa55b0f6 dwarf2out.c (queue_reg_save): New.
* dwarf2out.c (queue_reg_save): New.
        (flush_queued_reg_saves, clobbers_queued_reg_save): New.
        (dwarf2out_frame_debug_expr): Call queue_reg_save instead of
        dwarf2out_reg_save.
        (dwarf2out_frame_debug): Call flush_queued_reg_saves when needed.
        (cfa, cfa_store, cfa_temp): Make static.
        * final.c (final_scan_insn): Always call dwarf2out_frame_debug.

From-SVN: r40594
2001-03-17 21:09:55 -08:00
Jan Hubicka 5274639a7c Undo the accidental checkin :(
From-SVN: r40129
2001-02-28 17:53:35 +00:00
Jan Hubicka c679d0489a i386.md (sse_andti3, [...]): Add SSE2 versions; add missing '%' in constraints.
* i386.md (sse_andti3, sse_nandti_3, sse_xorti3): Add SSE2 versions;
	add missing '%' in constraints.

From-SVN: r40127
2001-02-28 17:49:37 +00:00
Richard Kenner 651a788e3b * final.c (output_operand_lossage): Use internal_error, not error.
From-SVN: r39850
2001-02-18 15:50:41 -05:00
Bernd Schmidt 0433762093 Eliminate SUBREGs inside MEMs.
From-SVN: r39538
2001-02-08 15:09:05 +00:00
Chandrakala Chavva 8480e4804c final.c: Revert back my previous changes.
* final.c: Revert back my previous changes.
        * output.h: Make profile_label_no extern.
        * config/rs6000/rs6000.c (output_profile_hook): Use standard functions
        for generating label.

From-SVN: r39506
2001-02-06 20:05:35 -05:00
Chandrakala Chavva 411707f4e4 final.c: Move the declaration profile_label_no to ...
* final.c: Move the declaration profile_label_no to ...
        * output.h: ... here.
        * function.c (expand_function_start): Call PROFILE_HOOK.
        * config/rs6000/aix.h: Define PROFILE_HOOK.
        * config/rs6000/rs6000-protos.h: output_profile_hook new.
        * config/rs6000/rs6000.c (output_profile_hook): Define.
        (output_prolog): Do nothing for ABI_AIX as it is taken care by
        output_profile_hook.
        tm.texi : Explain new macro PROFILE_HOOK.

From-SVN: r39473
2001-02-05 20:23:13 -05:00
Kaveh R. Ghazi c913b6f18e configure.in: Arrange to include defaults.h in [ht]config.h/tm.h.
* configure.in: Arrange to include defaults.h in [ht]config.h/tm.h.

	* Makefile.in: Remove all dependencies on defaults.h.
	* builtins.c: Don't include defaults.h.
	* c-common.c: Likewise.
	* c-decl.c: Likewise.
	* c-pragma.c: Likewise.
	* c-typeck.c: Likewise.
	* combine.c: Likewise.
	* i386.c: Likewise.
	* frame-ia64.c: Likewise.
	* cppexp.c: Likewise.
	* crtstuff.c: Likewise.
	* dbxout.c: Likewise.
	* dwarf2out.c: Likewise.
	* dwarfout.c: Likewise.
	* emit-rtl.c: Likewise.
	* except.c: Likewise.
	* expr.c: Likewise.
	* final.c: Likewise.
	* frame-dwarf2.c: Likewise.
	* libgcc2.c: Likewise.
	* optabs.c: Likewise.
	* profile.c: Likewise.
	* sdbout.c: Likewise.
	* toplev.c: Likewise.
	* tradcif.y: Likewise.
	* tree.c: Likewise.
	* varasm.c: Likewise.

ch:
	* Makefile.in: Remove all dependencies on defaults.h.
	* decl.c: Don't include defaults.h.
	* timing.c: Likewise.

cp:
	* Make-lang.in: Remove all dependencies on defaults.h.
	* call.c: Don't include defaults.h.
	* decl.c: Likewise.
	* decl2.c: Likewise.
	* except.c: Likewise.
	* pt.c: Likewise.
	* rtti.c: Likewise.
	* tree.c: Likewise.
	* typeck.c: Likewise.

f:
	* Make-lang.in: Remove all dependencies on defaults.h.
	* com.c: Don't include defaults.h.

java:
	* Make-lang.in: Remove all dependencies on defaults.h.
	* decl.c: Don't include defaults.h.
	* expr.c: Likewise.
	* parse.y: Likewise.

From-SVN: r39308
2001-01-28 01:50:22 +00:00
John Wehle b660f82f15 * final.c: (leaf_function_p): Fix typo.
From-SVN: r38935
2001-01-12 05:02:00 +00:00
Bernd Schmidt 08394eefae Introduce ORIGINAL_REGNO macro
From-SVN: r38546
2000-12-29 17:35:57 +00:00
Alexandre Oliva 99c8c61c83 final.c (output_addr_const): Use ASM_OUTPUT_SYMBOL_REF.
* final.c (output_addr_const): Use ASM_OUTPUT_SYMBOL_REF.
* tm.texi: Document it.

From-SVN: r38395
2000-12-20 09:03:23 +00:00
J"orn Rennecke 2a84158850 * final.c (final_addr_vec_align): Fix clipping to BIGGEST_ALIGNMENT.
From-SVN: r38080
2000-12-07 00:13:23 +00:00
Alexandre Oliva 08106825b9 final.c (output_addr_const): Don't assume at least one operand is a CONST_INT.
* final.c (output_addr_const) <PLUS>: Don't assume at least one
operand is a CONST_INT.

From-SVN: r37935
2000-12-01 23:29:57 +00:00
Alexandre Oliva 422be3c3cc final.c (output_addr_const): Simplify.
* final.c (output_addr_const) [LABEL_REF]: Simplify.
[MINUS]: Enclose non-CONST_INTs in parentheses.
[default]: Try OUTPUT_ADDR_CONST_EXTRA.
* tm.texi (OUTPUT_ADDR_CONST_EXTRA): Document it.
* varasm.c (decode_rtx_const) [CONST]: If it's not something
PLUS or MINUS a CONST_INT, use the whole CONST with offset 0
instead of abort()ing.
* sh.c (output_pic_addr_const): Removed.  Fixed all callers.
* sh.h (OUTPUT_ADDR_CONST_EXTRA): New.  Handle the UNSPECs
formerly handled in output_pic_addr_const.
* sh.md (sym_label2reg, symPLT_label2reg): Enclose UNSPEC
operands of MINUS in CONSTs so that decode_rtx_const() will
accept them.

From-SVN: r37691
2000-11-23 06:37:23 +00:00
Kaveh R. Ghazi 4e135bdd14 alpha.c (check_float_value): Use memcpy, not bcopy.
* alpha.c (check_float_value): Use memcpy, not bcopy.
	* arm.c (output_move_double): Likewise.
	* arm.md: Likewise.
	* m88k.c (legitimize_operand): Likewise.
	* m88k.h (ORDER_REGS_FOR_LOCAL_ALLOC): Likewise.
	* m88k.md: Likewise.
	* mips.c (override_options): Likewise.
	* mips.md: Likewise.
	* romp.c (output_fpops): Likewise.
	* rs6000.c (rs6000_override_options): Likewise.
	* sh.md: Likewise.
	* vax.c (check_float_value): Likewise.

	* emit-rtl.c (copy_rtx_if_shared, init_emit_once): Likewise.
	* expmed.c (synth_mult): Likewise.
	* final.c (add_bb_string): Likewise.
	* genattr.c (main): Likewise.
	* genattrtab.c (attr_string, simplify_cond, copy_rtx_unchanging):
	Likewise.
	* jump.c (thread_jumps): Likewise.
	* prefix.c (save_string): Likewise.
	* real.h (REAL_VALUE_FROM_CONST_DOUBLE): Likewise.
	* regclass.c (init_reg_sets, init_reg_sets_1): Likewise.
	* reload1.c (reload, eliminate_regs): Likewise.

cp:
	* decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
	* lex.c (copy_lang_decl): Likewise.

java:
	* decl.c (copy_lang_decl): Use memcpy, not bcopy.
	* jcf-parse.c (jcf_figure_file_type): Likewise.

From-SVN: r37367
2000-11-10 16:01:28 +00:00
Richard Henderson 6623457026 dwarfout.c (INSN_LABEL_FMT): Remove.
* dwarfout.c (INSN_LABEL_FMT): Remove.
        (output_label_die): Use ASM_GENERATE_INTERNAL_LABEL.
        (dwarfout_label): Remove.
        * dwarfout.h: Remove it's prototype.
        * dwarf2out.c (INSN_LABEL_FMT): Remove.
        (gen_label_die): Use ASM_GENERATE_INTERNAL_LABEL.
        (dwarf2out_label): Remove.
        * dwarf2out.h: Remove it's prototype.
        * final.c (final_scan_insn): Don't call dwarf[2]out_label.

From-SVN: r37310
2000-11-07 18:18:00 -08:00
Jim Wilson 8215347ec3 Make ia64 port use tags instead of labels for debug info labels.
* defaults.h (ASM_OUTPUT_DEBUG_LABEL): New.
	* tm.texi (ASM_OUTPUT_DEBUG_LABEL): Document.
	* dwarf2out.c (dwarf2out_begin_block): Use ASM_OUTPUT_DEBUG_LABEL
	instead of ASM_OUTPUT_INTERNAL_LABEL.
	(dwarf2out_end_block, dwarf2out_label): Likewise.
	* final.c (final_scan_insn, case NOTE_INSN_DELETED_LABEL): Likewise
	* config/ia64/ia64.h (ASM_OUTPUT_DEBUG_LABEL): Define.

From-SVN: r37174
2000-10-31 16:20:34 -08:00
Jan Hubicka 6c698a6d9b final.c (final_scan_insn): Remove extra extract_insn call; Use caching for constrain_operands.
* final.c (final_scan_insn): Remove extra extract_insn call;
	Use caching for constrain_operands.
	(cleanup_subreg_operands): Use caching for extract_insn.
	* recog.c (constrain_operands_cached): New.
	* recog.h (constrain_operands_cached): Declare.
	* i386.c (ix86_attr_length_immediate_default,
	ix86_attr_length_address_default, ix86_agi_dependant): Cache
	extract_insn call.

	* recog.c (asm_noperands): Tweak.
	(extract_insn): Do not call asm_noperads for non-asm instructions.

From-SVN: r36665
2000-09-29 11:40:24 +00:00
Bernd Schmidt afc6898e10 Fix shorten_branches bugs
From-SVN: r36538
2000-09-19 16:43:36 +00:00
Stephane Carrez c349e40b5b flags.h (flag_dump_rtl_in_asm): Declare.
* flags.h (flag_dump_rtl_in_asm): Declare.
	* toplev.c (flag_dump_rtl_in_asm): Define.
	(decode_d_option): Set flag_dump_rtl_in_asm and flag_print_asm_name
	if -dP is specified.
	* rtl.h (print_rtx_head): Declare.
	* print-rtl.c (print_rtx_head): Define.
	(print_rtx): Print the string pointed to by print_rtx_head
	at beginning of each dump line.
	(print_rtl): Likewise.
	(print_rtl_single): Likewise.
	* final.c (final_scan_insn): Dump the insn in the assembly
	file for debugging.
	* gcc.1: Document -dP option.
	* invoke.texi (Debugging Options): Likewise.

From-SVN: r36394
2000-09-13 21:34:05 +02:00
Kazu Hirata f5d927c07f * final.c: Fix formatting.
From-SVN: r36338
2000-09-11 16:00:04 -06:00
Zack Weinberg d8ea8f2871 defaults.h: Provide default definitions for...
* defaults.h: Provide default definitions for: CHAR_TYPE_SIZE,
        SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE,
        LONG_LONG_TYPE_SIZE, WCHAR_TYPE_SIZE, FLOAT_TYPE_SIZE,
        DOUBLE_TYPE_SIZE, LONG_DOUBLE_TYPE_SIZE, and WCHAR_UNSIGNED.

        * cppexp.c, dwarfout.c, dwarf2out.c, emit-rtl.c, final.c, optabs.c,
        profile.c, sdbout.c, tradcif.y, tree.c, ch/decl.c, ch/timing.c,
        cp/decl.c, cp/rtti.c, f/com.c, f/com.h, java/decl.c, java/expr.c:
        Include defaults.h if not already included.
        Don't define the above macros.

        * Makefile.in, ch/Makefile.in, cp/Makefile.in, f/Makefile.in:
        Update dependencies.

From-SVN: r36307
2000-09-11 01:50:49 +00:00
Rodney Brown 2c3c49dec3 alias.c (mark_constant_function): Use INSN_P.
* alias.c (mark_constant_function): Use INSN_P.
	(init_alias_analysis): Likewise.
	* combine.c (combine_instructions): Use INSN_P.
	(can_combine_p): Likewise.
	(try_combine): Likewise.
	(distribute_notes): Likewise.
	(distribute_links): Likewise.
	* cse.c (cse_around_loop): Use INSN_P.
	(invalidate_skipped_block): Likewise.
	(cse_set_around_loop): Likewise.
	(cse_end_of_basic_block): Likewise.
	(delete_trivially_dead_insns): Likewise.
	* emit-rtl.c (unshare_all_rtl_again): Use INSN_P.
	(unshare_all_rtl_1): Likewise.
	(next_cc0_user): Likewise.
	(try_split make_insn_raw): Likewise.
	(remove_unnecessary_notes): Likewise.
	* final.c (shorten_branches): Use INSN_P.
	(leaf_renumber_regs): Likewise.
	(leaf_renumber_regs_insn): Likewise.
	* flow.c (find_label_refs): Use INSN_P.
	(verify_wide_reg): Likewise.
	(notice_stack_pointer_modification): Likewise.
	(count_or_remove_death_notes): Likewise.
	(verify_flow_info): Likewise.
	(clear_log_links): Likewise.
	* function.c (fixup_var_refs_insns): Use INSN_P.
	(compute_insns_for_mem): Likewise.
	* gcse.c (alloc_gcse_mem): Use INSN_P.
	(compute_sets): Likewise.
	(compute_hash_table): Likewise.
	(classic_gcse): Likewise.
	(cprop): Likewise.
	(insert_insn_end_bb): Likewise.
	(delete_null_pointer_checks_1): Likewise.
	* global.c (expand_preferences): Use INSN_P.
	(build_insn_chain): Likewise.
	* graph.c (node_data): Use INSN_P.
	* haifa-sched.c (priority): Use INSN_P.
	(rm_line_notes): Likewise.
	(rm_other_notes): Likewise.
	(find_insn_reg_weight): Likewise.
	(init_target_units): Likewise.
	(schedule_block): Likewise.
	(compute_block_forward_dependences): Likewise.
	(debug_dependencies): Likewise.
	(set_priorities): Likewise.
	* integrate.c (function_cannot_inline_p): Use INSN_P.
	(save_parm_insns): Likewise.
	(copy_insn_list): Likewise.
	* jump.c (mark_all_labels): Use INSN_P.
	(never_reached_warning): Likewise.
	* lcm.c (optimize_mode_switching): Use INSN_P.
	* local-alloc.c (validate_equiv_mem): Use INSN_P.
	(memref_used_between_p): Likewise.
	(update_equiv_regs): Likewise.
	(block_alloc): Likewise.
	(no_conflict_p): Likewise.
	* loop.c (scan_loop): Use INSN_P.
	(find_and_verify_loops): Likewise.
	(count_loop_regs_set): Likewise.
	(loop_reg_used_before_p): Likewise.
	(strength_reduce): Likewise.
	(recombine_givs): Likewise.
	(check_dbra_loop): Likewise.
	(load_mems): Likewise.
	(try_copy_prop): Likewise.
	* print-rtl.c (print_rtx): Use INSN_P.
	* recog.c (find_single_use): Use INSN_P.
	* reg-stack.c (stack_regs_mentioned): Use INSN_P.
	(next_flags_user): Likewise.
	(swap_rtx_condition): Likewise.
	* regmove.c (mark_flags_life_zones): Use INSN_P.
	(optimize_reg_copy_1): Likewise.
	(optimize_reg_copy_2): Likewise.
	(optimize_reg_copy_3): Likewise.
	(reg_is_remote_constant_p): Likewise.
	(fixup_match_2): Likewise.
	(regmove_optimize): Likewise.
	(fixup_match_1): Likewise.
	* regrename.c (build_def_use): Use INSN_P.
	(replace_reg_in_block): Likewise.
	(consider_use): Likewise.
	* reload.c (find_equiv_reg): Use INSN_P.
	* reload1.c (reload): Use INSN_P.
	(maybe_fix_stack_asms): Likewise.
	(calculate_needs_all_insns): Likewise.
	(reload_as_needed): Likewise.
	(emit_output_reload_insns): Likewise.
	(delete_address_reloads_1): Likewise.
	(reload_cse_regs_1): Likewise.
	(reload_combine): Likewise.
	(reload_cse_move2add): Likewise.
	* reorg.c (redundant_insn): Use INSN_P.
	(dbr_schedule): Likewise.
	* resource.c (find_dead_or_set_registers): Use INSN_P.
	(mark_target_live_regs): Likewise.
	* rtlanal.c (reg_used_between_p): Use INSN_P.
	(reg_referenced_between_p): Likewise.
	(reg_set_between_p): Likewise.
	(reg_set_p): Likewise.
	(single_set): Likewise.
	(multiple_sets): Likewise.
	(find_last_value): Likewise.
	(reg_set_last): Likewise.
	(find_reg_note): Likewise.
	(find_regno_note): Likewise.
	* sibcall.c (sequence_uses_addressof): Use INSN_P.
	* simplify-rtx.c (cselib_process_insn): Use INSN_P.
	* ssa.c (find_evaluations): Use INSN_P.
	(rename_block): Likewise.
	(rename_equivalent_regs): Likewise.
	* unroll.c (loop_find_equiv_value): Use INSN_P.
	(set_dominates_use): Likewise.
	* varasm.c (mark_constant_pool): Use INSN_P.
	(mark_constants): Likewise.
	* config/alpha/alpha.c (alpha_does_function_need_gp): Use INSN_P.
	(alphaev4_next_group): Likewise.
	(alphaev5_next_group): Likewise.
	* config/c4x/c4x.c (c4x_process_after_reload): Use INSN_P.
	(c4x_rptb_rpts_p): Likewise.
	* config/mips/mips.c (mips16_optimize_gp): Use INSN_P.
	* config/rs6000/rs6000.c (uses_TOC): Use INSN_P.
	(rs6000_adjust_priority): Likewise.
	* config/sh/sh.c (sh_loop_align): Use INSN_P.
	(machine_dependent_reorg): Likewise.
	(split_branches): Likewise.
	* config/tahoe/tahoe.c (tahoe_cmp_check): Use INSN_P.

From-SVN: r35494
2000-08-04 14:28:08 -06:00
Richard Henderson 5527bf14a5 Makefile.in (OBJS): Add doloop.o.
* Makefile.in (OBJS): Add doloop.o.
	* doloop.c: New file.

	* final.c (insn_current_reference_address): Return 0 before final.
	* flags.h (flag_branch_on_count_reg): Fix typos in commentary.
	* jump.c (any_uncondjump_p): Likewise.
	* loop.c (indirect_jump_in_function): Make static.
	(strength_reduce): Call doloop_optimize.
	(insert_bct, instrument_loop_bct): Remove.
	* loop.h (doloop_optimize): Prototype.
	* recog.c (split_all_insns): Split all INSN_P.
	* toplev.c (flag_branch_on_count_reg): Default on.

	* config/c4x/c4x.c (c4x_optimization_options): Don't set
	flag_branch_on_count_reg.
	* config/i386/i386.c (override_options): Likewise.
	* config/rs6000/rs6000.c (optimization_options): Likewise.

	* config/i386/i386.md (decrement_and_branch_on_count): Remove.
	(doloop_end): New.
	(dbra_ge): Remove, as well as all it's splitters.

	* config/rs6000/rs6000.md (decrement_and_branch_on_count): Remove.
	(doloop_end): New.

	* config/ia64/ia64-protos.h (ar_lc_reg_operand): Declare.
	(ia64_register_move_cost): Declare.
	* config/ia64/ia64.c (ar_lc_reg_operand): New.
	(struct ia64_frame_info): Add ar_size.
	(ia64_compute_frame_size): Set it.
	(save_restore_insns): Save and restore ar.lc.
	(ia64_register_move_cost): New, moved from header file.  Handle
	application registers.
	(REG_AR_PFS, REG_AR_EC): Remove.  Replace with AR_*_REGNUM numbers.
	(emit_insn_group_barriers): Special case doloop_end_internal.
	(ia64_epilogue_uses): Mark ar.lc live at end.
	* config/ia64/ia64.h (AR_CCV_REGNUM, AR_LC_REGNUM): New registers.
	(AR_EC_REGNUM, AR_PFS_REGNUM): New registers.
	(FIRST_PSEUDO_REGISTER): Make room.
	(AR_M_REGNO_P, AR_I_REGNO_P, AR_REGNO_P): New.
	(FIXED_REGISTERS, CALL_USED_REGISTERS): Update.
	(REG_ALLOC_ORDER): Update.
	(HARD_REGNO_MODE_OK): Update.
	(REGISTER_NAMES): Update.
	(enum reg_class): Add AR_M_REGS and AR_I_REGS.
	(REG_CLASS_NAMES, REG_CLASS_CONTENTS): Update.
	(REGNO_REG_CLASS): Update.
	(LEGITIMATE_ADDRESS_DISP): Displacement range is 9 bits, not 10.
	(REGISTER_MOVE_COST): Move out of line.
	(PREDICATE_CODES): Update.
	* config/ia64/ia64.md (movdi patterns): Handle ar register classes.
	(addsi3_plus1_alt, adddi3_plus1_alt): New.
	(shladd_elim splitter): Allow constants in the predicate.
	(doloop_end, doloop_end_internal): New.

From-SVN: r35358
2000-07-30 16:58:03 -07:00
Alexandre Oliva 9d98a69423 Makefile.in (INSN_ATTR_H): New macro.
* Makefile.in (INSN_ATTR_H): New macro.  Replace all dependencies
on insn-attr.h with it.
* genattr.c: Generate `#include "insn-addr.h"' if HAVE_ATTR_length.
* insn-addr.h: New header.
(insn_addresses_): Renamed from insn_addresses.
(INSN_ADDRESSES_DEFN, INSN_ADDRESSES, INSN_ADDRESSES_ALLOC,
INSN_ADDRESSES_FREE, INSN_ADDRESSES_SET_P, INSN_ADDRESSES_SIZE,
INSN_ADDRESSES_NEW): New macros.
* genattrtab.c (write_test_expr): Use new macros.
* final.c (insn_addresses, init_insn_lengths): Likewise.
(align_fuzz, shorten_branches): Likewise.
(final): Likewise.  Do not reject new insns if their addresses
have been added to INSN_ADDRESSES.
* config/arm/arm.c, config/avr/avr.c: Use new macros.
* config/h8300/h8300.c, config/i370/i370.c: Likewise.
* config/m88k/m88k.c, config/pa/pa.c, config/pa/pa.md: Likewise.
* config/sparc/sparc.c, config/sparc/sparc.md: Likewise.
* config/sh/sh.c: Likewise.
(output_branchy_insn): Use INSN_ADDRESSES_NEW.

From-SVN: r35307
2000-07-28 02:17:26 +00:00
Zack Weinberg dcacfa04fe final.c (profile_function): Do not emit profile counters in the data section, if NO_PROFILE_COUNTERS is defined.
* final.c (profile_function): Do not emit profile counters in
	the data section, if NO_PROFILE_COUNTERS is defined.
	* tm.texi: Document NO_PROFILE_COUNTERS.  Update doc for
	FUNCTION_PROFILER.

	* config/i386/linux.h (NO_PROFILE_COUNTERS): Define.
	(FUNCTION_PROFILER): Just emit a call to mcount.

From-SVN: r35005
2000-07-13 04:40:23 +00:00
Richard Henderson 0ac76ad9eb final.c (final): Do not abort when reg-stack introduces a new insn.
* final.c (final): Do not abort when reg-stack introduces
        a new insn.

From-SVN: r34927
2000-07-08 14:17:51 -07:00
Jeffrey A Law a12cf65042 final.c (final): Detect out of bounds array access to the insn_lengths array.
* final.c (final): Detect out of bounds array access to
        the insn_lengths array.

From-SVN: r34901
2000-07-07 07:48:38 -06:00
Hans-Peter Nilsson efd0378bd3 final.c (final_scan_insn): Delete notes between cc0 setter and user when restarting from setter.
* final.c (final_scan_insn): Delete notes between cc0 setter and
        user when restarting from setter.

From-SVN: r34517
2000-06-13 10:06:26 -06:00
Richard Henderson b1a9f6a07a final.c (current_output_insn): New.
* final.c (current_output_insn): New.
        (final_scan_insn): Set it.
        * output.h: Declare it.

From-SVN: r34258
2000-05-29 15:02:42 -07:00
Andrew MacLeod ce152ef836 except.c (func_eh_entry): Add emitted field.
2000-05-25  Andrew MacLeod  <amacleod@cygnus.com>
            Andrew Haley  <aph@cygnus.com>

	* except.c  (func_eh_entry): Add emitted field.
	(new_eh_region_entry): Set emitted field to 0;
	(output_exception_table_entry): Only emit previously un-emitted data,
	and send it to the eh_data section.
	(output_exception_table): Break out common parts. Output
	exception table for entire compilation unit to eh_data section.
	(output_exception_table_data): Common parts of output_exception_table.
	Send output to eh_data section.
	(output_function_exception_table): Output exception table data for
	a single function to eh_data section.
	(free_exception_table): New external to free the table.
	* except.h (free_exception_table): Add prototype.
	(output_function_exception_table): Add prototype.
	* final.c (final_end_function): Output function exception table
	for IA64_UNWIND_INFO.
	(final_scan_insn): Emit any unwind directives for an insn.

	* frame-dwarf2.c: New file containing all DWARF 2 specific code
	from frame.c.
	* frame.c: Remove all DWARF 2 specific code.
	* config/ia64/frame-ia64.c: New file.
	(gthread_stuff): Make all gthread available with
	IA64_UNWIND_INFO.
	(dwarf_fde): Define an IA64 struct for dwarf_fde.
	(__register_frame_info, __register_frame): Move to common area of file.
	(__register_frame_info_table, __register_frame_table): Move to common i
	area.
	(__deregister_frame_info, __deregister_frame): Move to common area.
	(__frame_init, find_fde): New versions for IA64_UNWIND_INFO.
	(read_uleb128): New version for ia64.
	(get_unwind_record): Read the next IA-64 unwind record.
	(read_R_record): Read a region header record.
	(process_a_b_reg_code): X record helper.
	(read_X_record): Read an X format record.
	(read_B_record): Read a B format record.
	(P3_record_types): List of record types matching the P3 format.
	(P7_record_types): List of record types matching the P7 format.
	(P8_record_types): List of record types matching the P8 format.
	(read_P_record): Read a P format record.
	(init_ia64_reg_loc): Set default fields for a register.
	(init_ia64_unwind_frame): Set defaults for all register records.
	(execute_one_ia64_descriptor): Execute one descriptor record.
	(rse_address_add): Calculate the position of a local reg in memory.
	(normalize_reg_loc): Turn a location descriptor into a memory address.
	(maybe_normalize_reg_loc): Only normalize a descriptor if it falls
	within a specified PC offset range.
	(get_real_reg_value): Given a register location, retrieve its value.
	(set_real_reg_value): Change the value of a register location.
	(copy_reg_value): Copy reg values, if needed.
	(copy_saved_reg_state): Copy all registers that need to be copied.
	(process_state_between): Normalize all frame register records that
	fall within the specified PC range.
	(frame_translate): Take a processed frame description, and turn
	everything into addresses.
	(build_ia64_frame_state ): Find and create frame state record for a PC.
	(get_personality): Get the personality routine for a given frame.
	(get_except_table): Get the exception table for a given frame.
	(record_name): Unwind record names for debugging.
	(print_record): Print and unwind record.
	(print_all_records): Print an entire unwind image.
	(__ia64_backtrace): Print a backtrace.
	(ia64_backtrace_helper): New function.
	(__register_frame_info_aux): New function.
	* config/ia64/crtend.asm (__do_frame_setup_aux): New function.

	* frame.h (enum unw_record_type): New unwind record types.
	(struct unw_p_record, unw_b_record, unw_x_record) : New unwind records.
	(struct unw_r_record, unwind_record): New unwind record structs.
	(struct unwind_info_ptr): Unwind information layout.
	(IA64_UNW_LOC_TYPE_*): Macros for different types for location
	descriptors.
	(struct ia64_reg_loc): Register location description.
	(struct ia64_frame_state): Location of all registers in a frame.
	(struct object): Add pc_base and fde_end for IA64_UNWIND_INFO.
	* libgcc2.c (__ia64_personality_v1): Personality routine.
	(__calc_caller_bsp): Calculate the bsp register for the caller's
	frame.
	(ia64_throw_helper): Figure out who to return to and set up the
	registers.
	(__throw): Throw routine.

	* output.h (assemble_eh_align, assemble_eh_label): New functions
	to generate EH info where we want it.
	(assemble_eh_integer): New function.
	* toplev.c (compile_file): Output module level exception table for
	non-ia64 targets.
	(main): Set exceptions_via_longjump and flag_new_exceptions based
	on IA64_UNWIND_INFO too.

	* varasm.c (assemble_eh_label): Generate a label via
	ASM_OUTPUT_EH_LABEL if it has been specified.
	(assemble_eh_align): Generate an alignment directive via
	ASM_OUTPUT_EH_ALIGN if it has been specified.
	(assemble_eh_label): Generate an integer value via
	ASM_OUTPUT_EH_type if they have been specified.
	* config/ia64/ia64.c (rtx_needs_barrier): Add flushrs.
	(ia64_init_builtins): Add __builtin_ia64_bsp
	and __builtin_ia64_flushrs.
	(ia64_expand_builtin): Add IA64_BUILTIN_BSP and
	IA64_BUILTIN_FLUSHRS.
	* config/ia64/ia64.h (ia64_builtins): Add IA64_BUILTIN_BSP and
	IA64_BUILTIN_FLUSHRS.

	* config/ia64/ia64.md (flushrs): New insn to flush the register
	stack.  Add to unspec list.

	* config/ia64/crtbegin.asm (frame_object): Change size.
	(__do_frame_setup_aux): New function.
	* config/ia64/crtend.asm: call __do_frame_setup_aux.
	* config/ia64/t-ia64 (LIB2ADDEH): Add.
	* Makefile.in (LIB2ADDEH): Add.
	(LIB2ADD): Use LIB2ADDEH.

Co-Authored-By: Andrew Haley <aph@cygnus.com>

From-SVN: r34169
2000-05-25 15:21:51 +00:00
Richard Kenner 2bc9f98c24 final.c (final_scan_insn, [...]): Remove dangling "else" that causes "break" to be conditional.
* final.c (final_scan_insn, case NOTE_INSN_FUNCTION_BEG): Remove
	dangling "else" that causes "break" to be conditional.
	Also remove unneeded code at start.

From-SVN: r34082
2000-05-22 13:05:15 -04:00
Alexandre Oliva 7f251deef0 final.c (split_double): Right shift of negative values is not portable.
* final.c (split_double): Right shift of negative values is not
portable.

From-SVN: r34061
2000-05-20 23:01:00 +00:00
Zack Weinberg fbd4035990 top level:
* diagnostic.c: Eliminate implicit int.
	* except.c, gcc.c: Add static prototypes.
	* final.c (final_end_function): Mark file arg ATTRIBUTE_UNUSED.
	* gensupport.c (process_rtx): Use XVEC to initialize vector
	slot of 'split'.

	* print-rtl.c: If DEBUG_REGISTER_NAMES, define static
	debug_reg_names instead of static reg_names.  If not, define
	global reg_names.
	* regclass.c: Don't define global reg_names unless
	DEBUG_REGISTER_NAMES is defined.

	* reload1.c (order_regs_for_reload): Remove unused variable.
	* varasm.c: Include output.h after defaults.h.  Define
	eh_frame_section as function of no args, not of unspecified args.

	* gcc.c: Constify argbuf; arguments to store_arg,
	process_command, main; elements of struct command and struct
	switchstr; local variables in execute, process_command, main.

cp:
	* except.c: Add static prototypes.

From-SVN: r34054
2000-05-20 19:45:36 +00:00
Jan Hubicka 51891abe62 basic-block.h (struct edge_def): New field "count".
* basic-block.h (struct edge_def): New field "count".
	(struct basic_block_def): Likewise.
	* flow.c (entry_exit_blocks): Add count fileds.
	(split_edge): Keep count information up-to-date.
        (dump_edge_info, dump_flow_info): Dump count fields.

	* final.c (count_instrumented_edges): Rename to edge from arc.
	(end_final): Update users.
	* profile.c: Include expr.h, basic-block.h.
	(struct adj_list, ARC_TARGET, ARC_SOURCE, ARC_COUNT): Kill.
        (struct bb_info, label_to_bb, label_to_bb_size, bb_graph): Kill.
        (ignore_next_note, return_label_execution_count): Kill.
	(bbg_file_name, da_file_name): Kill.
        (edge_info, bb_info): New structures.
        (EDGE_INFO, BB_INFO, GCOV_INDEX_TO_BB, BB_TO_GCOV_INDEX): New macros.
	(count_instrumented_edges, total_num_edges): Rename to edge from arc.
	(total_num_edges_instrumented): Likewise.
	(init_arc, expand_spanning_tree): Kill.
	(fill_spanning_tree, tablejump_entry_p): Kill.
	(instrument_edges):  Rewrite from instrument_arcs to use
	commit_edge_insertions infrastructure.
	(compute_branch_probabilities): Remove arguments; rewrite for
	CFG infrastructure; use rtl_dump_file directly.
	(branch_prob, find_spanning_tree): Likewise.
	(union_groups, find_group): New.
	(init_branch_prob): Make bbg_file_name and da_file_name local.
	(end_branch_prob): Use rtl_dump_file directly.
	(init_edge_profiler): Rename to edge from arc.
	(output_arc_profiler): Kill.
	(gen_edge_profiler): New.
	(output_func_start_profiler): Turn off profiling.  Make the
	constructor static when we can.
	* rtl.h (branch_prob, end_branch_prob): Update prototypes.

	* toplev.c (DFI_flow): Remove.
	(DFI_cfg, DFI_life): New.
	(dump_file): Update accordingly.
	(compile_file): Call end_branch_prob if profile_arc_flag too.
	(rest_of_compilation): Move flow1 cfg creation to DFI_cfg.  Do edge
	profiling after the CFG is built.  Move flow1 life analysis to
	DFI_life.  Always estimate remaining probabilities.

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

From-SVN: r34037
2000-05-19 13:51:49 -07:00
Jakub Jelinek 21835d9b74 print-rtl.c (print_rtx): Only print note line number as string if between NOTE_INSN_BIAS and NOTE_INSN_MAX.
* print-rtl.c (print_rtx): Only print note line number as string
	if between NOTE_INSN_BIAS and NOTE_INSN_MAX.
	* final.c (final_scan_insn): Do nothing for note line number 0.

From-SVN: r33997
2000-05-18 21:26:57 +02:00
Richard Henderson be1bb65263 Makefile.in (final.o): Depend on BASIC_BLOCK_H.
* Makefile.in (final.o): Depend on BASIC_BLOCK_H.
	* final.c (final_end_function): Use app_disable.  Rearrange note
	handling into a switch.  Emit deleted labels.
	(output_asm_label): Generate label strings for deleted labels.
	* flow.c (tail_recursion_label_list): New.
	(find_basic_blocks_1): Set label_value_list directly.  Collect list
	of tail recursion labels from call_placeholders.  Don't add deleted
	labels to the label value list.
	(cleanup_cfg): Use free_EXPR_LIST_list.
	(flow_delete_insn_chain): Turn non-removable labels into notes.
	(flow_delete_block): Don't disable deleting the block because of
	a non-removable label.
	(tail_recursion_label_p): New.
	(merge_blocks_move_predecessor_nojumps): Don't disable the merge
	because of a label.
	(merge_blocks_move_successor_nojumps): Likewise.  Also move a
	jump table.
	(merge_blocks): Disable a merge because of tail recursion labels.
	* ifcvt.c (merge_if_block): Don't disable a merge because of a label.
	Use a more accurate measure of not merging the join block.
	(find_if_block): Don't disable conversion because of a label.
	(find_if_case_1, find_if_case_2): Likewise.
	* jump.c (duplicate_loop_exit_test): Preserve the kind of list
	element when copying.
	(squeeze_notes): Also leave EH notes.
	(mark_jump_label): Ignore deleted labels.  Use an INSN_LIST for
	REG_LABEL notes.
	(delete_insn): Preserve LABEL_NAME in NOTE_SOURCE_FILE when
	deleting a label.
	* print-rtl.c (print_rtx): Print NOTE_SOURCE_FILE for
	NOTE_INSN_DELETED_LABEL.  Print `[# deleted]' for a label_ref
	referring to a deleted label.  Convert tail handling to a switch.
	* rtl.def (CODE_LABEL): Rearrange elements to be compatible with NOTE
	for NOTE_INSN_DELETED_LABEL.
	(NOTE): Fix commentary.
	* rtl.h (REG_LABEL): Update commentary wrt INSN_LIST.
	(REG_CC_SETTER, REG_CC_USER, REG_LIBCALL): Likewise.
	(CODE_LABEL_NUMBER, LABEL_NAME): Update index.
	(LABEL_NUSES, LABEL_REFS): Likewise.
	* unroll.c (copy_loop_body): Don't copy NOTE_INSN_DELETED_LABEL.

From-SVN: r33876
2000-05-12 09:26:15 -07:00
Richard Henderson afe48e0687 final.c (current_insn_predicate): New.
* final.c (current_insn_predicate): New.
        (final_scan_insn): Set it.
        * output.h (current_insn_predicate): Declare.

From-SVN: r33790
2000-05-08 23:10:36 -07:00
Richard Kenner bf49b1396b rtl.h (MEM_COPY_ATTRIBUTES): Also copy RTX_UNCHANGING_P and MEM_ALIAS_SET.
* rtl.h (MEM_COPY_ATTRIBUTES): Also copy RTX_UNCHANGING_P and
	MEM_ALIAS_SET.
	* alias.c (canon_rtx): Don't copy RTX_UNCHANGING_P or MEM_ALIAS_SET
	when calling MEM_COPY_ATTRIBUTES.
	* emit-rtl.c (operand_subword, change_address): Likewise.
	* explow.c (stabilize): Likewise.
	* expr.c (protect_from_queue, emit_move_insn_1): Likewise.
	* integrate.c (copy_rtx_and_substitute): Likewise.
	* combine.c (combine_simplify_rtx): Don't copy RTX_UNCHANGING_P
	when calling MEM_COPY_ATTRIBUTES.
	(make_extraction, simplify_shift_const, gen_lowpart_for_combine):
	Likewise.
	* cse.c (gen_lowpart_if_possible): Likewise.
	* function.c (fixup_var_refs_1, purge_addressof_1): Likewise.
	* optabs.c (gen_move_insn): Likewise.
	* recog.c (validate_replace_rtx_1): Likewise.
	* simplify-rtx.c (add_mem_for_addr): Likewise.
	* stmt.c (expand_anon_union_decl): Likewise.
	* config/arm/arm.md: Likewise.
	* config/h8300/h7300.c (fix_bit_operand): Likewise.
	* config/m88k/m88k.c (legitimize_address, block_move_loop): Likewise.
	(block_move_no_loop, block_move_sequence): Likewise.
	* config/rs6000/rs6000.c (expand_block_move_mem): Likewise.
	* config/alpha/alpha.c (get_aligned_mem): Likewise.
	Clear MEM_ALIAS_SET.
	* final.c (alter_subreg): Don't copy MEM_ALIAS_SET when calling
	MEM_COPY_ATTRIBUTES.

From-SVN: r33665
2000-05-04 09:49:50 -04:00
Mumit Khan 3ac7948224 final.c (final_start_function): Fix spelling of "necessary".
2000-05-02  Mumit Khan  <khan@xraylith.wisc.edu>

	* final.c (final_start_function): Fix spelling of "necessary".

From-SVN: r33617
2000-05-02 21:52:27 +00:00