Commit Graph

9 Commits

Author SHA1 Message Date
Andreas Jaeger f55ade6e34 basic-block.h: Convert prototypes to ISO C90.
* basic-block.h: Convert prototypes to ISO C90.
	* c-parse.in: Likewise.
	* c-pragma.h: Likewise.
	* c-typeck.c: Likewise.
	* cfghooks.h: Likewise.
	* cfgloopanal.c: Likewise.
	* dbxout.h: Likewise.
	* debug.h: Likewise.
	* dwarf2asm.h: Likewise.
	* gcov.c: Likewise.
	* gengtype-lex.l: Likewise.
	* sched-int.h: Likewise.
	* timevar.c: Likewise.

From-SVN: r69010
2003-07-06 20:59:38 +02:00
Kaveh R. Ghazi d41c4351fe ansidecl.h (ATTRIBUTE_NONNULL, [...]): New.
include:
	* ansidecl.h (ATTRIBUTE_NONNULL, ATTRIBUTE_NULL_PRINTF,
	ATTRIBUTE_NULL_PRINTF_1, ATTRIBUTE_NULL_PRINTF_2,
	ATTRIBUTE_NULL_PRINTF_3, ATTRIBUTE_NULL_PRINTF_4,
	ATTRIBUTE_NULL_PRINTF_5): New.
	(ATTRIBUTE_PRINTF): Add ATTRIBUTE_NONNULL.

gcc:
	* dwarf2asm.h: Delete obsolete comment.
	(dw2_asm_output_data, dw2_asm_output_delta, dw2_asm_output_offset,
	dw2_asm_output_pcrel, dw2_asm_output_addr,
	dw2_asm_output_addr_rtx, dw2_asm_output_encoded_addr_rtx,
	dw2_asm_output_nstring, dw2_asm_output_data_uleb128,
	dw2_asm_output_data_sleb128, dw2_asm_output_delta_uleb128,
	dw2_asm_output_delta_sleb128): Add ATTRIBUTE_NULL_PRINTF.

From-SVN: r64505
2003-03-17 22:57:27 +00:00
Richard Sandiford 301d03af8a target.h (asm_out.byte_op, [...]): New fields.
* target.h (asm_out.byte_op, asm_out.aligned_op, asm_out.unaligned_op,
	asm_out.integer): New fields.
	* target-def.h (TARGET_ASM_BYTE_OP, TARGET_ASM_ALIGNED_[HSDT]I_OP,
	TARGET_ASM_UNALIGNED_[HSDT]I_OP, TARGET_ASM_INTEGER): New initialisers.
	(TARGET_ASM_ALIGNED_INT_OP, TARGET_ASM_UNALIGNED_INT_OP): Collect
	the individual initialisers together.
	(TARGET_ASM_OUT): Add the new initialisers.
	* output.h (assemble_integer): Return bool.
	(integer_asm_op): Declare.
	(default_assemble_integer): Declare.
	(assemble_aligned_integer): New interface to assemble_integer.
	* varasm.c (integer_asm_op): New function to select pseudo-op.
	(default_assemble_integer): Default implementation of asm_out.integer.
	(assemble_integer): Use the new target hook.  Split objects into
	words or bytes if the target hook fails.  Return bool.
	* doc/tm.texi (ASM_OUTPUT_CHAR, ASM_OUTPUT_BYTE, ASM_OUTPUT_SHORT,
	ASM_OUTPUT_INT, ASM_OUTPUT_DOUBLE_INT, ASM_OUTPUT_QUADRUPLE_INT,
	UNALIGNED_SHORT_ASM_OP,	UNALIGNED_INT_ASM_OP,
	UNALIGNED_DOUBLE_INT_ASM_OP): Undocument.
	Document new target hooks.

	* defaults.h (ASM_OUTPUT_ADDR_VEC_ELT): Use integer_asm_op.
	* dwarf2asm.c (unaligned_integer_asm_op): Remove.
	(dw2_assemble_integer): New.
	(dw2_asm_output_data, dw2_asm_output_delta, dw2_asm_output_offset,
	dw2_asm_output_pcrel, dw2_asm_output_addr, dw2_asm_output_addr_rtx,
	dw2_asm_output_encoded_addr_rtx): Use it.
	(dw2_asm_output_nstring): Use assemble_integer for the null terminator.
	(dw2_asm_output_data_uleb128, dw2_asm_output_data_sleb128): Use
	integer_asm_op to get the byte pseudo-op.  Use assemble_integer
        if it returns NULL.
	* dwarf2asm.h (dw2_assemble_integer): Declare.
	* dwarfout.c: Include dwarf2asm.h.  Use dwarf2 functions for the
	default	implementation of most macros.
	(output_unsigned_leb128): Use dw2_asm_output_data.
	(output_signed_leb128, dwarfout_source_line): Likewise.
	(output_reg_number): Use dw2_assemble_integer.
	(generate_macinfo_entry): Separate the type and offset arguments.
	Use assemble_integer to write the value.
	(dwarfout_start_source_file): Update generate_macinfo_entry usage.
	(dwarfout_end_source_file, dwarfout_define, dwarfout_undef): Likewise.
	* final.c (output_addr_const): Don't put brackets round a subtracted
	symbol value or ".".
	* halfpic.c (half_pic_finish): Use assemble_aligned_integer.

	* config/1750a/1750a.c (assemble_integer_1750a): New,
	* config/alpha/alpha.h (literal_section): Avoid ASM_OUTPUT_INT.
	* config/arc/arc.c (arc_assemble_integer): New.
	* config/arc/arc.h (TRAMPOLINE_TEMPLATE): Avoid ASM_OUTPUT_INT.
	* config/arm/arm.c (arm_poke_function_name): Likewise.
	(arm_assemble_integer): New, extracted from...
	* config/arm/arm.h (OUTPUT_INT_ADDR_CONST): ...here, now removed.
	(ARM_TRAMPOLINE_TEMPLATE, ARM_FUNCTION_PROFILER): Avoid ASM_OUTPUT_INT.
	(ARM_FUNCTION_PROFILER): Likewise.
	* config/avr/avr-protos.h (asm_output_byte): Remove.
	(asm_output_char, asm_output_short): Remove.
	* config/avr/avr.c (avr_assemble_integer): New.
	(asm_output_byte, asm_output_char, asm_output_short): Remove.
	* config/clipper/clipper.h (ASM_LONG): Remove.
	* config/dsp16xx/dsp16xx-protos.h (asm_output_long): Remove.
	* config/dsp16xx/dsp16xx.c (asm_output_long): Remove.
	* config/elxsi/elxsi.c (elxsi_assemble_integer): New.
	* config/i370/i370.c (i370_hlasm_assemble_integer): New.
	* config/i370/i370.h (TRAMPOLINE_TEMPLATE): Avoid ASM_OUTPUT_SHORT.
	(ASM_BYTE, ASM_SHORT, ASM_LONG): Delete.
	* config/i386/att.h, (ASM_OUTPUT_ASCII): Avoid ASM_BYTE_OP.
	* config/i386/linux.h (ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX): Use
	ASM_LONG instead of UNALIGNED_INT_ASM_OP.
	* config/i386/sco5.h (ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX): Likewise.
	(ASM_OUTPUT_ASCII): Avoid ASM_BYTE_OP.
	* config/i386/sysv4.h (ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX): Use
	ASM_LONG instead of UNALIGNED_INT_ASM_OP.
	* config/i860/fx2800.h (ASM_FILE_END): Avoid ASM_LONG.
	* config/i860/i860.c (i860_output_function_epilogue): Likewise.
	* config/i860/i860.h (TRAMPOLINE_TEMPLATE): Avoid ASM_OUTPUT_INT.
	(ASM_SHORT, ASM_LONG): Undefine.
	* config/i860/paragon.h (ASM_OUTPUT_ASCII): Avoid ASM_BYTE_OP.
	* config/i860/sysv3.h (ASM_OUTPUT_ASCII): Likewise.
	* config/i960/i960.h (TRAMPOLINE_TEMPLATE): Avoid ASM_OUTPUT_INT.
	* config/ia64/ia64.c (ia64_assemble_integer): New.
	* config/ia64/ia64.h (ASM_OUTPUT_DWARF_OFFSET): Use integer_asm_op.
	(ASM_OUTPUT_DWARF_PCREL): Likewise.
	* config/m68hc11/m68hc11.h (ASM_OUTPUT_DOUBLE, ASM_OUTPUT_FLOAT,
	ASM_OUTPUT_ADDR_DIFF_ELT, ASM_OUTPUT_ADDR_VEC_ELT): Avoid ASM_LONG.
	(ASM_SHORT, ASM_LONG): Remove.
	* config/m68k/m68k.h (INT_OP_GROUP): New macro.
	(INT_OP_STANDARD, INT_OP_DOT_WORD, INT_OP_NO_DOT, INT_OP_DC): New
	macros, the allowed values for INT_OP_GROUP.
	* config/m68k/amix.h (ASM_OUTPUT_ASCII): Avoid ASM_BYTE_OP
	* config/m68k/atari.h (ASM_OUTPUT_ASCII): Likewise
	* config/m68k/m68kelf.h (ASM_OUTPUT_ASCII): Likewise
	* config/m68k/auxas.h (BYTE_ASM_OP, WORD_ASM_OP, LONG_ASM_OP): Remove.
	(INT_OP_GROUP): Define to INT_OP_NO_DOT.
	* config/m68k/dpx2.h (ASM_LONG): Undefine.
	(INT_OP_GROUP): Define to INT_OP_DC.
	* config/m68k/dpx2g.h (ASM_LONG): Undefine.
	* config/m68k/hp320.h (INT_OP_GROUP): Define to INT_OP_NO_DOT.
	* config/m68k/lynx.h (ASM_LONG): Undefine.
	* config/m68k/dpx2g.h (ASM_LONG): Undefine.
	* config/m68k/m68kelf.h (ASM_OUTPUT_ASCII): Avoid ASM_BYTE_OP.
	* config/m68k/m68kv4.h (ASM_OUTPUT_ASCII): Likewise.
	(TRAMPOLINE_TEMPLATE): Avoid ASM_OUTPUT_*.
	* config/m68k/mot3300.h (INT_OP_GROUP): Define to INT_OP_STANDARD
	for GAS and INT_OP_NO_DOT otherwise.
	(ASM_CHAR, ASM_BYTE, ASM_SHORT, ASM_LONG): Remove.
	(ASM_OUTPUT_LONG_DOUBLE, ASM_OUTPUT_DOUBLE, ASM_OUTPUT_FLOAT,
	ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Avoid ASM_LONG.
	(ASM_OUTPUT_ASCII): Avoid ASM_BYTE_OP.
	* config/m68k/sgs.h (BYTE_ASM_OP, WORD_ASM_OP, LONG_ASM_OP): Remove.
	(INT_OP_GROUP): Define to INT_OP_STANDARD.
	(ASM_OUTPUT_LONG_DOUBLE, ASM_OUTPUT_DOUBLE, ASM_OUTPUT_FLOAT,
	ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Avoid LONG_ASM_OP.
	(ASM_OUTPUT_ASCII): Avoid BYTE_ASM_OP.
	* config/m68k/tower-as.h (ASM_LONG): Remove.
	(INT_OP_GROUP): Define to INT_OP_NO_DOT.
	* config/m88k/m88k.c (output_tdesc): Avoid ASM_LONG.
	* config/m88k/m88k.h (TRAMPOLINE_TEMPLATE): Avoid ASM_OUTPUT_INT.
	(ASM_OUTPUT_DOUBLE, ASM_OUTPUT_FLOAT): Avoid ASM_LONG.
	* config/mips/iris5.h (TARGET_IRIX5): Define.
	* config/mips/mips.c (mips_assemble_integer): New.
	* config/mips/sni-svr4.h (ASM_LONG): Undefine.
	* config/mmix/mmix-protos.h (mmix_asm_output_double_int): Remove.
	* config/mmix/mmix.c (mmix_assemble_integer): New.
	(mmix_asm_output_double_int): Remove.
	(mmix_print_operand): Call mmix_output_octa directly.
	* config/mmix/mmix.h (ASM_LONG): Remove.
	* config/ns32k/ns32k.h (TRAMPOLINE_TEMPLATE): Avoid ASM_OUTPUT_INT.
	* config/pa/pa.c (pa_assemble_integer): New.
	(pa_override_options): Only use aligned DI ops on 64-bit targets.
	Only use the unaligned ops if TARGET_GAS.
	* config/pdp11/pdp11.c (pdp11_assemble_integer): New.
	* config/pdp11/pdp11.h (TRAMPOLINE_TEMPLATE): Avoid ASM_OUTPUT_SHORT.
	* config/pj/pj.h (ASM_LONG): Undefine.
	* config/rs6000/linux64.h (RELOCATABLE_NEEDS_FIXUP): Undefine.
	* config/rs6000/rs6000.c (rs6000_assemble_integer): New, mostly
	extracted from ASM_OUTPUT_INT in sysv4.h.  Use in_text_section()
	and in_toc_section() rather than the in_section variable.
	(rs6000_override_options): Only use DI ops when TARGET_POWERPC64.
	* config/rs6000/sysv4.h (TOC_SECTION_FUNCTION): Add in_toc_section().
	(RELOCATABLE_NEEDS_FIXUP): Define.
	* config/rs6000/xcoff.h (DOUBLE_INT_ASM_OP): Change space to tab.
	* config/s390/linux.h (ASM_SHORT, ASM_LONG, ASM_QUAD): Remove.
	(ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Use integer_asm_op
	to get the word directive.
	(ASM_OUTPUT_ASCII): Avoid ASM_BYTE_OP.
	* config/s390/s390.c (s390_assemble_integer): New.
	* config/s390/s390.h (ASM_OUTPUT_SPECIAL_POOL_ENTRY): Use
	integer_asm_op to get the word directive.
	* config/sparc/sol2.h (ASM_SHORT, ASM_LONG): Remove.
	* config/sparc/sparc-protos.h (output_double_int): Remove.
	* config/sparc/sparc.c (output_double_int): Move to...
	(sparc_assemble_integer): ...this new function.
	(sparc_override_options): Only use .uaxword if TARGET_ARCH64.
	* config/sparc/sparc.h (ASM_SHORT, ASM_LONG, ASM_LONGLONG): Remove.
	* config/sparc/sysv4.h (ASM_LONG): Remove.
	(ASM_OUTPUT_LONG_DOUBLE, ASM_OUTPUT_DOUBLE, ASM_OUTPUT_FLOAT): Avoid
	ASM_LONG.
	* config/vax/vax.h (TRAMPOLINE_TEMPLATE): Use assemble_aligned_integer.
	* config/we32k/we32k.h (TRAMPOLINE_TEMPLATE): Likewise.

	* config/1750a/1750a.c, config/a29k/a29k.c, config/alpha/alpha.c,
	config/arc/arc.c, config/arm/arm.c, config/avr/avr.c, config/c4x/c4x.c,
	config/clipper/clipper.c, config/convex/convex.c, config/cris/cris.c,
	config/d30v/d30v.c, config/dsp16xx/dsp16xx.c, config/elxsi/elxsi.c,
	config/fr30/fr30.c, config/h8300/h8300.c, config/i370/i370.c,
	config/i386/i386.c, config/i860/i860.c, config/i960/i960.c,
	config/ia64/ia64.c, config/m32r/m32r.c, config/m68hc11/m68hc11.c,
	config/m68k/m68k.c, config/m88k/m88k.c, config/mips/mips.c,
	config/mmix/mmix.c, config/mn10200/mn10200.c, config/mn10300/mn10300.c,
	config/ns32k/ns32k.c, config/pa/pa.c, config/pdp11/pdp11.c,
	config/sh/sh.c, config/sparc/sparc.c, config/stormy16/stormy16.c,
	config/v850/v850.c, config/vax/vax.c, config/we32k/we32k.c
	(TARGET_ASM_BYTE_OP, TARGET_ASM_ALIGNED_HI_OP,
	TARGET_ASM_ALIGNED_SI_OP, TARGET_ASM_ALIGNED_DI_OP,
	TARGET_ASM_UNALIGNED_HI_OP, TARGET_ASM_UNALIGNED_SI_OP,
	TARGET_ASM_UNALIGNED_DI_OP, TARGET_ASM_INTEGER): Redefine as
	appropriate.

	* config/defaults.h, config/darwin.h, config/elfos.h, config/svr3.h,
	config/1750a/1750a.h, config/a29k/a29k.h, config/alpha/alpha.h,
	config/arc/arc.h, config/arm/arm.h, config/avr/avr.h, config/c4x/c4x.h,
	config/clipper/clipper.h, config/convex/convex.h, config/cris/cris.h,
	config/d30v/d30v.h, config/dsp16xx/dsp16xx.h, config/elxsi/elxsi.h,
	config/fr30/fr30.h, config/h8300/h8300.h, config/i370/i370.h,
	config/i386/bsd.h, config/i386/djgpp.h, config/i386/i386.h,
	config/i386/sco5.h, config/i386/sol2.h, config/i386/sun386.h,
	config/i860/i860.h, config/i960/i960.h, config/ia64/ia64.h,
	config/m32r/m32r.h, config/m68hc11/m68hc11.h, config/m68k/auxas.h,
	config/m68k/dpx2.h, config/m68k/hp320.h, config/m68k/m68k.h,
	config/m68k/mot3300.h, config/m68k/sgs.h, config/m68k/tower-as.h,
	config/m88k/m88k.h, config/mcore/mcore-elf.h, config/mcore/mcore.h,
	config/mips/iris5.h, config/mips/iris6.h, config/mips/mips.h,
	config/mmix/mmix.h, config/mn10200/mn10200.h, config/mn10300/mn10300.h
	config/ns32k/encore.h, config/ns32k/ns32k.h, config/pa/pa-64.h,
	config/pa/pa.h, config/pdp11/pdp11.h, config/pj/pj.h,
	config/romp/romp.h, config/rs6000/linux64.h, config/rs6000/rs6000.h,
	config/rs6000/sysv4.h, config/rs6000/xcoff.h, config/s390/linux.h,
	config/sh/sh.h, config/sparc/linux64.h, config/sparc/sol2.h,
	config/sparc/sp64-elf.h, config/sparc/sparc.h, config/sparc/sysv4.h,
	config/stormy16/stormy16.h, config/v850/v850.h, config/vax/vax.h,
	config/we32k/we32k.h (ASM_OUTPUT_CHAR, ASM_OUTPUT_BYTE, ASM_BYTE_OP,
	ASM_BYTE, ASM_OUTPUT_SHORT, ASM_OUTPUT_INT, ASM_OUTPUT_DOUBLE_INT,
	UNALIGNED_SHORT_ASM_OP, UNALIGNED_INT_ASM_OP,
	UNALIGNED_DOUBLE_INT_ASM_OP): Undefine, where defined.

From-SVN: r48101
2001-12-17 15:05:40 +00:00
Lars Brinkhoff 1322177dbd Makefile.in, [...]: replace "GNU CC" with "GCC".
* Makefile.in, alias.c, basic-block.h, bb-reorder.c, bitmap.c,
	bitmap.h, builtin-types.def, builtins.c, builtins.def,
	c-aux-info.c, c-common.c, c-common.def, c-common.h,
	c-convert.c, c-decl.c, c-dump.c, c-dump.h, c-errors.c,
	c-format.c, c-lang.c, c-lex.c, c-lex.h, c-parse.in,
	c-pragma.c, c-pragma.h, c-semantics.c, c-tree.h, c-typeck.c,
	caller-save.c, calls.c, collect2.c, collect2.h, combine.c,
	conditions.h, config.gcc, configure.frag, configure.in,
	conflict.c, convert.c, convert.h, cppspec.c, crtstuff.c,
	cse.c, cselib.c, cselib.h, dbxout.c, dbxout.h, defaults.h,
	dependence.c, df.c, df.h, diagnostic.c, diagnostic.h,
	doloop.c, dominance.c, dwarf.h, dwarf2.h, dwarf2asm.c,
	dwarf2asm.h, dwarf2out.c, dwarf2out.h, dwarfout.c,
	emit-rtl.c, errors.c, errors.h, except.c, except.h,
	exgettext, explow.c, expmed.c, expr.c, expr.h, final.c,
	fixproto, flags.h, flow.c, fold-const.c, fp-test.c,
	function.c, function.h, gbl-ctors.h, gcc.c, gcc.h, gcc.hlp,
	gccspec.c, gcov-io.h, gcse.c, genattr.c, genattrtab.c,
	gencheck.c, gencodes.c, genconfig.c, genemit.c,
	genextract.c, genflags.c, gengenrtl.c, genmultilib,
	genopinit.c, genoutput.c, genpeep.c, genrecog.c,
	gensupport.c, gensupport.h, ggc-callbacks.c, ggc-common.c,
	ggc-none.c, ggc-page.c, ggc-simple.c, ggc.h, global.c,
	graph.c, graph.h, gthr-aix.h, gthr-dce.h, gthr-posix.h,
	gthr-rtems.h, gthr-single.h, gthr-solaris.h, gthr-vxworks.h,
	gthr-win32.h, gthr.h, haifa-sched.c, halfpic.c, halfpic.h,
	hard-reg-set.h, hwint.h, ifcvt.c, input.h, insn-addr.h,
	integrate.c, integrate.h, jump.c, lcm.c, libgcc2.c,
	libgcc2.h, lists.c, local-alloc.c, loop.c, loop.h,
	machmode.def, machmode.h, main.c, mbchar.c, mbchar.h,
	mips-tdump.c, mips-tfile.c, mklibgcc.in, mkmap-flat.awk,
	mkmap-symver.awk, optabs.c, output.h, params.c, params.def,
	params.h, predict.c, predict.def, predict.h, prefix.c,
	prefix.h, print-rtl.c, print-tree.c, profile.c, protoize.c,
	read-rtl.c, real.c, real.h, recog.c, recog.h, reg-stack.c,
	regclass.c, regmove.c, regrename.c, regs.h, reload.c,
	reload.h, reload1.c, reorg.c, resource.c, resource.h, rtl.c,
	rtl.def, rtl.h, rtlanal.c, sbitmap.c, sbitmap.h,
	sched-deps.c, sched-ebb.c, sched-int.h, sched-rgn.c,
	sched-vis.c, sdbout.c, sdbout.h, sibcall.c, simplify-rtx.c,
	ssa-ccp.c, ssa-dce.c, ssa.c, ssa.h, stmt.c, stor-layout.c,
	stringpool.c, system.h, timevar.c, timevar.def, timevar.h,
	tlink.c, toplev.c, toplev.h, tree.c, tree.def, tree.h,
	tsystem.h, unroll.c, unwind-dw2-fde.c, unwind-dw2-fde.h,
	unwind-dw2.c, unwind-pe.h, unwind-sjlj.c, unwind.h,
	unwind.inc, varasm.c, varray.c, varray.h, xcoffout.c,
	xcoffout.h: replace "GNU CC" with "GCC".

From-SVN: r45105
2001-08-22 14:35:51 +00:00
Richard Henderson e1f9550a64 except.c (eh_data_format_name): Move to ...
* except.c (eh_data_format_name): Move to ...
	* dwarf2asm.c: ... here.  Use designated initializers if available.
	(dw2_asm_output_encoded_addr_rtx): Accept varargs commentary.
	* dwarf2asm.h: Update declarations.
	* dwarf2out.c (output_cfi) [DW_CFA_set_loc]: If for_eh, mind
	ASM_PREFERRED_EH_DATA_FORMAT.
	(output_call_frame_info): Likewise.  Use 'L' augmentation for
	the LSDA encoding.

	* unwind-dw2-fde.h (struct fde_vector): New.
	(struct old_object): Rename from struct object.
	(struct object): New.
	(__register_frame_info_bases): Declare.
	(__register_frame_info_table_bases): Declare.
	(struct dwarf_fde): Remove explicit pc_begin/pc_range members.
	* unwind-dw2-fde.c (objects): Remove.
	(unseen_objects, seen_objects): New.
	(__register_frame_info_bases): New.
	(__register_frame_info): Use it.
	(__register_frame_info_table_bases): New.
	(__register_frame_info_table): Use it.
	(__deregister_frame_info): Rewrite for changed object struct.
	(base_from_object, get_cie_encoding, get_fde_encoding): New.
	(fde_unencoded_compare): Rename from fde_compare; uninline.
	(fde_single_encoding_compare, fde_mixed_encoding_compare): New.
	(start_fde_sort): Adjust for new definition of fde_vector.
	(fde_insert): Likewise.
	(end_fde_sort): Likewise.  Select comparison function based
	on properties of the object.
	(fde_split): Take object and fde_compare_t arguments.
	(frame_heapsort, fde_merge): Likewise.
	(classify_object_over_fdes): Rename from count_fdes.  Handle
	encoded pointers.  Collect encoding, mixed_encoding, and pc_begin
	for the object.
	(add_fdes): Handle encoded pointers.
	(init_object): Rename from frame_init.  Update for new struct object.
	(linear_search_fdes): Rename from search_fdes.  Handle encoded
	pointers.
	(binary_search_unencoded_fdes): Broken out from _Unwind_Find_FDE.
	(binary_search_single_encoding_fdes): New.
	(binary_search_mixed_encoding_fdes): New.
	(search_object): New.
	(_Unwind_Find_FDE): Update for new struct object.  Fill in
	the dwarf_eh_bases.
	* unwind-dw2.c: Include unwind-pe.h.  Constify all pointers
	iterating over EH data.
	(_Unwind_FrameState): Remove saw_lsda, addr_encoding.  Add
	fde_encoding, lsda_encoding.
	(read_uleb128, read_sleb128): Remove.
	(read_encoded_pointer): Remove.  All callers use read_encoded_value.
	(extract_cie_info): Set lsda_encoding from 'L' augmentation.
	(uw_frame_state_for): Don't set bases.func.  Handle encoded fde
	pointers.
	* unwind-pe.h: Add "struct" to _Unwind_Context references.

From-SVN: r42176
2001-05-16 15:42:36 -07:00
Richard Henderson b627d6fe5d dwarf2asm.c (size_of_encoded_value): New function.
* dwarf2asm.c (size_of_encoded_value): New function.
        * dwarf2asm.h: Declare it.
        * except.c (output_function_exception_table): Align the TType
        array only as wide as the encoding.

From-SVN: r42028
2001-05-12 21:30:09 -07:00
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
Richard Henderson 8e7fa2c825 dwarf2asm.c (dw2_asm_output_offset): Use ASM_OUTPUT_DWARF_OFFSET if provided by the target.
* dwarf2asm.c (dw2_asm_output_offset): Use ASM_OUTPUT_DWARF_OFFSET
        if provided by the target.
        (dw2_asm_output_pcrel): Likewise with ASM_OUTPUT_DWARF_PCREL.
        (dw2_asm_output_addr): New.
        * dwarf2asm.h (dw2_asm_output_addr): Declare.
        * dwarf2out.c (output_cfi): Use it for program addresses.
        (output_call_frame_info, output_die): Likewise.
        (output_aranges, output_line_info): Likewise.

From-SVN: r40524
2001-03-15 17:14:47 -08:00
Richard Henderson 2e4b9b8cc2 Makefile.in (OBJS): Add dwarf2asm.o.
* Makefile.in (OBJS): Add dwarf2asm.o.
	* dwarf2asm.c, dwarf2asm.h: New files.
	* dwarf2out.c (*): Use them.
	(size_of_uleb128, size_of_sleb128): Remove.
	(output_uleb128, output_sleb128): Remove.
	(UNALIGNED_SHORT_ASM_OP, UNALIGNED_INT_ASM_OP): Remove.
	(UNALIGNED_DOUBLE_INT_ASM_OP, ASM_BYTE_OP): Remove.
	(UNALIGNED_OFFSET_ASM_OP, UNALIGNED_WORD_ASM_OP): Remove.
	(FDE_LABEL, LINE_NUMBER_BEGIN_LABEL, LINE_NUMBER_END_LABEL): New.
	(ASM_OUTPUT_DWARF_DATA1, ASM_OUTPUT_DWARF_DELTA1): Remove.
	(ASM_OUTPUT_DWARF_DATA2, ASM_OUTPUT_DWARF_DELTA2): Remove.
	(ASM_OUTPUT_DWARF_DATA4, ASM_OUTPUT_DWARF_DELTA4): Remove.
	(ASM_OUTPUT_DWARF_DATA, ASM_OUTPUT_DWARF_DELTA): Remove.
	(ASM_OUTPUT_DWARF_ADDR, ASM_OUTPUT_DWARF_ADDR_DATA): Remove.
	(ASM_OUTPUT_DWARF_ADDR_DELTA, ASM_OUTPUT_DWARF_ADDR_CONST): Remove.
	(ASM_OUTPUT_DWARF_OFFSET4, ASM_OUTPUT_DWARF_OFFSET): Remove.
	(ASM_OUTPUT_DWARF_CONST_DOUBLE): Remove.
	(ASM_OUTPUT_DWARF_NSTRING, ASM_OUTPUT_DWARF_STRING): Remove.
	(dwarf2out_frame_debug): Remove unused variables.
	(output_loc_operands): Don't abort on 8 byte constants if
	host integers are wide enough.
	(output_symbolic_ref): Remove.
	(size_of_die): Don't assume 4 byte host integers.
	(output_line_info): Use ASM_GENERATE_INTERNAL_LABEL for begin
	and end labels.
	(add_const_value_attribute) [CONST_INT]: Verify we're not doing
	something stupid with HOST_WIDE_INT to long truncation.
	[CONST_DOUBLE]: Likewise.

	* config/arm/conix-elf.h (UNALIGNED_WORD_ASM_OP): Remove.
	(ASM_OUTPUT_DWARF2_ADDR_CONST, ASM_OUTPUT_DWARF_ADDR_CONST): Remove.
	* config/arm/unknown-elf.h: Likewise.
	* config/rs6000/aix.h (UNALIGNED_SHORT_ASM_OP): New.
	(UNALIGNED_INT_ASM_OP, UNALIGNED_DOUBLE_INT_ASM_OP): New.
	(ASM_OUTPUT_DWARF_ADDR_VAR, ASM_OUTPUT_DWARF_DELTA_VAR): Remove.
	(ASM_OUTPUT_DWARF_DELTA2, ASM_OUTPUT_DWARF_DELTA4): Remove.
	(ASM_OUTPUT_DWARF_DELTA, ASM_OUTPUT_DWARF_ADDR_DELTA): Remove.
	(ASM_OUTPUT_DWARF_ADDR, ASM_OUTPUT_DWARF_DATA4): Remove.
	(ASM_OUTPUT_DWARF_DATA2, ASM_OUTPUT_DWARF_OFFSET4): Remove.
	(ASM_OUTPUT_DWARF_OFFSET): Remove.
	* config/rs6000/sysv4.h (ASM_OUTPUT_DWARF_ADDR): Remove.
	* config/sparc/sp64-elf.h (UNALIGNED_DOUBLE_INT_ASM_OP): New.
	(UNALIGNED_LONGLONG_ASM_OP, ASM_OUTPUT_DWARF_ADDR): Remove.
	(ASM_OUTPUT_DWARF_ADDR_CONST, ASM_OUTPUT_DWARF_REF): Remove.

From-SVN: r40197
2001-03-02 18:17:07 -08:00