gcc/gcc/xcoffout.h

194 lines
6.5 KiB
C
Raw Normal View History

1992-03-12 13:18:14 +01:00
/* XCOFF definitions. These are needed in dbxout.c, final.c,
and xcoffout.h.
Copyright (C) 1998-2016 Free Software Foundation, Inc.
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 16:35:51 +02:00
This file is part of GCC.
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 16:35:51 +02:00
GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 3, or (at your option) any later
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 16:35:51 +02:00
version.
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 16:35:51 +02:00
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
#ifndef GCC_XCOFFOUT_H
#define GCC_XCOFFOUT_H
1992-03-12 13:18:14 +01:00
/* Tags and typedefs are C_DECL in XCOFF, not C_LSYM. */
1992-05-22 21:08:06 +02:00
#define DBX_TYPE_DECL_STABS_CODE N_DECL
1992-03-12 13:18:14 +01:00
/* Use the XCOFF predefined type numbers. */
debug.h (struct gcc_debug_hooks): Add type_decl field. * debug.h (struct gcc_debug_hooks): Add type_decl field. (debug_nothing_tree_int): Prototype. (dwarf_debug_hooks): Delete, unused. * debug.c (do_nothing_debug_hooks): Update. (debug_nothing_tree_int): New function. * langhooks.h (struct lang_hooks_for_decls): Remove builtin_type_decls field. * langhooks-def.h (LANG_HOOKS_BUILTIN_TYPE_DECLS): Delete. (LANG_HOOKS_DECLS): Update. * toplev.c (rest_of_decl_compilation, rest_of_type_compilation): Use debug_hooks->type_decl. * dbxout.c (preinit_symbols): New static. (dbx_debug_hooks, xcoff_debug_hooks): Update. (dbxout_init): Don't call DBX_OUTPUT_STANDARD_TYPES or lang_hooks.decls.builtin_type_decls. Do scan preinit_symbols for symbols to output. (dbxout_type_decl): New function. (dbxout_symbol): If called before dbxout_init has run, queue the symbol for later. Apply DBX_ASSIGN_FUNDAMENTAL_TYPE_NUMBER to TYPE_DECLs before emitting them. * xcoffout.c (assign_type_number): Delete. (xcoff_type_numbers): New static table. (xcoff_assign_fundamental_type_number): New function. * xcoffout.h: Define DBX_ASSIGN_FUNDAMENTAL_TYPE_NUMBER, not DBX_OUTPUT_STANDARD_TYPES. Remove unnecessary #ifdefs. * sdbout.c: Include varray.h. (deferred_global_decls): New static. (sdb_debug_hooks): Update. (sdbout_global_decl): If we can't emit something right now, remember it in deferred_global_decls. (sdbout_finish): Just scan deferred_global_decls; don't call getdecls. (sdbout_init): Initialize deferred_global_decls. * Makefile.in: Update dependencies of sdbout.o. * dwarf2out.c (dwarf2out_type_decl): New function. (dwarf2_debug_hooks): Update. * vmsdbgout.c (vmsdbg_debug_hooks): Update. * c-decl.c (getdecls): Just return 0. (check_for_loop_decls): Don't use getdecls. (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL. * c-objc-common.c (c_objc_common_finish_file): Don't use getdecls. cp: * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS. * cp-tree.h: Don't declare cxx_builtin_type_decls. * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete. (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL. From-SVN: r77730
2004-02-12 22:42:28 +01:00
#define DBX_ASSIGN_FUNDAMENTAL_TYPE_NUMBER(TYPE) \
xcoff_assign_fundamental_type_number (TYPE)
1992-03-12 13:18:14 +01:00
/* Any type with a negative type index has already been output. */
#define DBX_TYPE_DEFINED(TYPE) (TYPE_SYMTAB_ADDRESS (TYPE) < 0)
/* Must use N_STSYM for static const variables (those in the text section)
instead of N_FUN. */
#define DBX_STATIC_CONST_VAR_CODE N_STSYM
/* For static variables, output code to define the start of a static block. */
1992-03-12 13:18:14 +01:00
#define DBX_STATIC_BLOCK_START(ASMFILE,CODE) \
{ \
if ((CODE) == N_STSYM) \
fprintf ((ASMFILE), "\t.bs\t%s[RW]\n", xcoff_private_data_section_name);\
else if ((CODE) == N_LCSYM) \
fprintf ((ASMFILE), "\t.bs\t%s\n", xcoff_bss_section_name); \
1992-03-12 13:18:14 +01:00
}
/* For static variables, output code to define the end of a static block. */
#define DBX_STATIC_BLOCK_END(ASMFILE,CODE) \
{ \
if ((CODE) == N_STSYM || (CODE) == N_LCSYM) \
fputs ("\t.es\n", (ASMFILE)); \
1992-03-12 13:18:14 +01:00
}
/* We must use N_RPYSM instead of N_RSYM for register parameters. */
#define DBX_REGPARM_STABS_CODE N_RPSYM
/* We must use 'R' instead of 'P' for register parameters. */
#define DBX_REGPARM_STABS_LETTER 'R'
/* Define our own finish symbol function, since xcoff stabs have their
own different format. */
#define DBX_FINISH_STABS(SYM, CODE, LINE, ADDR, LABEL, NUMBER) do { \
if (ADDR) \
{ \
/* If we are writing a function name, we must emit a dot in \
order to refer to the function code, not its descriptor. */ \
if (CODE == N_FUN) \
putc ('.', asm_out_file); \
\
/* If we are writing a function name, we must ensure that \
there is no storage-class suffix on the name. */ \
if (CODE == N_FUN && GET_CODE (ADDR) == SYMBOL_REF) \
{ \
const char *_p = XSTR (ADDR, 0); \
if (*_p == '*') \
fputs (_p+1, asm_out_file); \
else \
for (; *_p != '[' && *_p; _p++) \
putc (*_p != '$' ? *_p : '_', asm_out_file); \
} \
else \
output_addr_const (asm_out_file, ADDR); \
} \
/* Another special case: N_GSYM always gets the symbol name, \
whether or not LABEL or NUMBER are set. */ \
else if (CODE == N_GSYM) \
assemble_name (asm_out_file, XSTR (XEXP (DECL_RTL (SYM), 0), 0)); \
else if (LABEL) \
assemble_name (asm_out_file, LABEL); \
else \
dbxout_int (NUMBER); \
putc (',', asm_out_file); \
dbxout_int (stab_to_sclass (CODE)); \
fputs (",0\n", asm_out_file); \
dbxout.c: Include obstack.h. * dbxout.c: Include obstack.h. (ASM_STABS_OP): Take XCOFF_DEBUGGING_INFO into account in default definition. (ASM_STABD_OP, NO_DBX_MAIN_SOURCE_DIRECTORY, DBX_CONTIN_CHAR): Default-define here. (DBX_CONTIN_LENGTH): Move definition with others. (DBX_FINISH_STABS): New target macro. (current_sym_code, current_sym_value, current_sym_addr) (current_sym_nchars, CHARS, dbxout_continue) (print_int_cst_octal, print_octal, print_wide_int) (dbxout_prepare_symbol, dbxout_finish_symbol): Delete. (stabstr_ob, stabstr_last_contin_point): New variables. (NUMBER_FMT_LOOP): New improper macro. (dbxout_int, dbxout_stab_value_zero, dbxout_stab_value_label) (dbxout_stab_value_label_diff, dbxout_stab_value_internal_label) (dbxout_stab_value_internal_label_diff, dbxout_stabd) (dbxout_begin_stabn, dbxout_begin_stabn_sline) (dbxout_begin_simple_stabs, dbxout_begin_simple_stabs_desc) (dbxout_begin_complex_stabs, dbxout_finish_complex_stabs) (stabstr_C, stabstr_S, stabstr_I, stabstr_D, stabstr_U, stabstr_O) (stabstr_continue, DECL_ACCESSIBILITY_CHAR) New functions and/or proper function-like macros. (CONTIN): Use stabstr_continue, unconditionally. (get_lang_number): Define unconditionally, with ATTRIBUTE_UNUSED. (dbxout_init): Initialize stabstr_ob. Check NO_DBX_MAIN_SOURCE_DIRECTORY. Only write out the Ltext label if it was used. Use the new interfaces. (dbxout_source_file): Remove file argument; always write to asm_out_file. Use the new interfaces. (dbxout_type_method_1): Remove second argument which is always DECL_ASSEMBLER_NAME of the first argument. Use the new interfaces. (dbxout_type_methods): Remove write-only variables. Use the new interfaces. (dbxout_parms): Refactor to remove code duplicated in each of several successive if-else-if blocks. Use the new interfaces. (dbxout_function_end, emit_bincl_stab, dbxout_end_source_file) (dbxout_source_line, dbxout_finish, dbxout_type_index) (dbxout_type_fields, dbxout_range_type, dbxout_type, dbxout_type_name) (dbxout_class_name_qualifiers, dbxout_symbol, dbxout_symbol_location) (dbxout_symbol_name, dbxout_reg_parms, dbxout_args) (dbx_output_lbrac, dbx_output_rbrac, dbxout_block): Use the new interfaces. * Makefile.in (dbxout.o): Update dependencies. * defaults.h: Don't define ASM_STABD_OP. * output.h: Prototype new dbxout_* interfaces. * system.h: Poison DBX_OUTPUT_GCC_MARKER and DBX_FINISH_SYMBOL. * varasm.c: Don't define ASM_STABS_OP. (default_stabs_asm_out_constructor, default_stabs_asm_out_destructor): Use the new dbxout.c interfaces. Call sorry if neither DBX_DEBUGGING_INFO nor XCOFF_DEBUGGING_INFO is defined. * xcoffout.h: Don't define ASM_STABS_OP. (DBX_FINISH_SYMBOL): Rewrite and rename DBX_FINISH_STABS. (DBX_OUTPUT_MAIN_SOURCE_DIRECTORY, DBX_OUTPUT_GCC_MARKER): Delete. (NO_DBX_MAIN_SOURCE_DIRECTORY, NO_DBX_GCC_MARKER): Define. (DBX_OUTPUT_MAIN_SOURCE_FILE_END): Change bare block to do { ... } while (0) idiom. * config/alpha/alpha.c (num_source_filenames): Export. * config/alpha/alpha.h (num_source_filenames): Declare. (DBX_OUTPUT_SOURCE_LINE): Use new interfaces. (SDB_OUTPUT_SOURCE_LINE): Add missing newline. * config/m32r/m32r.h (DBX_OUTPUT_SOURCE_LINE): Use new interfaces. Always use .debugsym. Update commentary. * config/mips/mips.h (DBX_OUTPUT_SOURCE_LINE): Use new interfaces. (SDB_OUTPUT_SOURCE_LINE): Add missing newline. * config/rs6000/linux64.h (DBX_OUTPUT_SOURCE_LINE, DBX_OUTPUT_BRAC): Use new interfaces. * config/rs6000/rs6000.c: If TARGET_MACHO, include gstab.h. (macho_branch_islands): Use new interfaces. * doc/tm.texi: Update. From-SVN: r89623
2004-10-27 03:29:42 +02:00
} while (0)
1992-03-12 13:18:14 +01:00
/* These are IBM XCOFF extensions we need to reference in dbxout.c
and xcoffout.c. */
/* AIX XCOFF uses this for typedefs. This can have any value, since it is
only used for translation into a C_DECL storage class. */
#ifndef N_DECL
#define N_DECL 0x8c
#endif
/* AIX XCOFF uses this for parameters passed in registers. This can have
any value, since it is only used for translation into a C_RPSYM storage
class. */
#ifndef N_RPSYM
#define N_RPSYM 0x8e
#endif
/* Name of the current include file. */
extern const char *xcoff_current_include_file;
1992-03-12 13:18:14 +01:00
/* Names of bss and data sections. These should be unique names for each
compilation unit. */
extern char *xcoff_bss_section_name;
extern char *xcoff_private_data_section_name;
extern char *xcoff_tls_data_section_name;
extern char *xcoff_tbss_section_name;
1992-03-12 13:18:14 +01:00
extern char *xcoff_read_only_section_name;
/* Last source file name mentioned in a NOTE insn. */
extern const char *xcoff_lastfile;
1992-03-12 13:18:14 +01:00
/* Don't write out path name for main source file. */
dbxout.c: Include obstack.h. * dbxout.c: Include obstack.h. (ASM_STABS_OP): Take XCOFF_DEBUGGING_INFO into account in default definition. (ASM_STABD_OP, NO_DBX_MAIN_SOURCE_DIRECTORY, DBX_CONTIN_CHAR): Default-define here. (DBX_CONTIN_LENGTH): Move definition with others. (DBX_FINISH_STABS): New target macro. (current_sym_code, current_sym_value, current_sym_addr) (current_sym_nchars, CHARS, dbxout_continue) (print_int_cst_octal, print_octal, print_wide_int) (dbxout_prepare_symbol, dbxout_finish_symbol): Delete. (stabstr_ob, stabstr_last_contin_point): New variables. (NUMBER_FMT_LOOP): New improper macro. (dbxout_int, dbxout_stab_value_zero, dbxout_stab_value_label) (dbxout_stab_value_label_diff, dbxout_stab_value_internal_label) (dbxout_stab_value_internal_label_diff, dbxout_stabd) (dbxout_begin_stabn, dbxout_begin_stabn_sline) (dbxout_begin_simple_stabs, dbxout_begin_simple_stabs_desc) (dbxout_begin_complex_stabs, dbxout_finish_complex_stabs) (stabstr_C, stabstr_S, stabstr_I, stabstr_D, stabstr_U, stabstr_O) (stabstr_continue, DECL_ACCESSIBILITY_CHAR) New functions and/or proper function-like macros. (CONTIN): Use stabstr_continue, unconditionally. (get_lang_number): Define unconditionally, with ATTRIBUTE_UNUSED. (dbxout_init): Initialize stabstr_ob. Check NO_DBX_MAIN_SOURCE_DIRECTORY. Only write out the Ltext label if it was used. Use the new interfaces. (dbxout_source_file): Remove file argument; always write to asm_out_file. Use the new interfaces. (dbxout_type_method_1): Remove second argument which is always DECL_ASSEMBLER_NAME of the first argument. Use the new interfaces. (dbxout_type_methods): Remove write-only variables. Use the new interfaces. (dbxout_parms): Refactor to remove code duplicated in each of several successive if-else-if blocks. Use the new interfaces. (dbxout_function_end, emit_bincl_stab, dbxout_end_source_file) (dbxout_source_line, dbxout_finish, dbxout_type_index) (dbxout_type_fields, dbxout_range_type, dbxout_type, dbxout_type_name) (dbxout_class_name_qualifiers, dbxout_symbol, dbxout_symbol_location) (dbxout_symbol_name, dbxout_reg_parms, dbxout_args) (dbx_output_lbrac, dbx_output_rbrac, dbxout_block): Use the new interfaces. * Makefile.in (dbxout.o): Update dependencies. * defaults.h: Don't define ASM_STABD_OP. * output.h: Prototype new dbxout_* interfaces. * system.h: Poison DBX_OUTPUT_GCC_MARKER and DBX_FINISH_SYMBOL. * varasm.c: Don't define ASM_STABS_OP. (default_stabs_asm_out_constructor, default_stabs_asm_out_destructor): Use the new dbxout.c interfaces. Call sorry if neither DBX_DEBUGGING_INFO nor XCOFF_DEBUGGING_INFO is defined. * xcoffout.h: Don't define ASM_STABS_OP. (DBX_FINISH_SYMBOL): Rewrite and rename DBX_FINISH_STABS. (DBX_OUTPUT_MAIN_SOURCE_DIRECTORY, DBX_OUTPUT_GCC_MARKER): Delete. (NO_DBX_MAIN_SOURCE_DIRECTORY, NO_DBX_GCC_MARKER): Define. (DBX_OUTPUT_MAIN_SOURCE_FILE_END): Change bare block to do { ... } while (0) idiom. * config/alpha/alpha.c (num_source_filenames): Export. * config/alpha/alpha.h (num_source_filenames): Declare. (DBX_OUTPUT_SOURCE_LINE): Use new interfaces. (SDB_OUTPUT_SOURCE_LINE): Add missing newline. * config/m32r/m32r.h (DBX_OUTPUT_SOURCE_LINE): Use new interfaces. Always use .debugsym. Update commentary. * config/mips/mips.h (DBX_OUTPUT_SOURCE_LINE): Use new interfaces. (SDB_OUTPUT_SOURCE_LINE): Add missing newline. * config/rs6000/linux64.h (DBX_OUTPUT_SOURCE_LINE, DBX_OUTPUT_BRAC): Use new interfaces. * config/rs6000/rs6000.c: If TARGET_MACHO, include gstab.h. (macho_branch_islands): Use new interfaces. * doc/tm.texi: Update. From-SVN: r89623
2004-10-27 03:29:42 +02:00
#define NO_DBX_MAIN_SOURCE_DIRECTORY 1
1992-03-12 13:18:14 +01:00
/* Write out main source file name using ".file" rather than ".stabs".
We don't actually do this here, because the assembler gets confused if there
target.h (asm_out.file_start, [...]): New hooks. * target.h (asm_out.file_start, file_start_app_off, file_start_file_directive): New hooks. * target-def.h (TARGET_ASM_FILE_START_FILE_DIRECTIVE, TARGET_ASM_FILE_START_APP_OFF, TARGET_ASM_FILE_START): New hook-definition macros. * doc/tm.texi: Document new hooks; remove docs of ASM_FILE_START. * varasm.c (default_file_start): New. * output.h: Prototype it. * toplev.c (init_asm_output): Use targetm.asm_out.file_start. * system.h: Poison ASM_FILE_START. * config/alpha/alpha.c (alpha_write_verstamp): Delete. (alpha_file_start): New, define if !TARGET_ABI_UNICOSMK. (unicosmk_asm_file_start): Rename unicosmk_file_start, make static, take no arguments. (TARGET_ASM_FILE_START, TARGET_ASM_FILE_END, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set as appropriate. * config/alpha/unicosmk.h: Don't define ASM_FILE_START nor TARGET_ASM_FILE_END. Remove reference to ASM_FILE_START in comment. * config/arc/arc.c (arc_asm_file_start): Rename arc_file_start, take no arguments, make static. (TARGET_ASM_FILE_START): Set it. * config/arm/arm.c (aof_file_start): New static function. (TARGET_ASM_FILE_START): Set it, when appropriate. * config/arm/coff.h, config/arm/elf.h: Set TARGET_ASM_FILE_START_APP_OFF to true. * config/avr/avr.c (asm_file_start): Rename avr_file_start, take no arguments, make static. (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set them. * config/c4x/c4x.c (c4x_file_start): New static function. (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set them. * config/cris/cris.c (cris_file_start): New static function. (TARGET_ASM_FILE_START): Set it. * config/dsp16xx/dsp16xx.c (coff_dsp16xx_file_start): Rename dsp16xx_file_start, make static. (luxworks_dsp16xx_file_start): Delete. (TARGET_ASM_FILE_START): Set it. * config/h8300/h8300.c (asm_file_start): Rename h8300_file_start, make static, take no arguments. (TARGET_ASM_FILE_START): Set it. * config/i370/i370.c (i370_file_start): New static function. (TARGET_ASM_FILE_START): Set it. * config/i386/i386.c (x86_file_start): New static function. (TARGET_ASM_FILE_START): Set it. * config/i386/i386.h (X86_FILE_START_VERSION_DIRECTIVE, X86_FILE_START_FLTUSED): New macros, default to false. * config/i386/i386-interix.h: Override X86_FILE_START_FLTUSED to 1. * config/i386/sysv4.h, config/i386/sco5.h: Override X86_FILE_START_VERSION_DIRECTIVE to true. * config/ia64/ia64.c (ia64_file_start): New static function. (TARGET_ASM_FILE_START): Set it. (emit_safe_across_calls): Take no arguments. * config/ia64/ia64.md: Update to match. * config/m32r/m32r.c (m32r_asm_file_start): Rename m32r_file_start, make static, take no arguments. (TARGET_ASM_FILE_START): Set it. * config/m68hc11/m68hc11.c (m68hc11_asm_file_start): Rename m68hc11_file_start, make static, take no arguments. (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set. (print_options): Delete. * config/m68k/m68k.c (m68k_hp320_file_start): New static function. (TARGET_ASM_FILE_START_APP_OFF): Set. * config/m68k/hp320.h: Set TARGET_ASM_FILE_START to m68k_hp320_file_start. * config/mips/mips.c (iris6_asm_file_start, mips_asm_file_start): Make static, take no arguments. (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set. * config/mmix/mmix.c (mmix_asm_file_start): Rename mmix_file_start, make static, take no arguments. (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set. * config/mn10300/mn10300.c (asm_file_start): Rename mn10300_file_start, make static, take no arguments. (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set. * config/ns32k/ns32k.c (TARGET_ASM_FILE_START_APP_OFF): Set. * config/pa/pa.c (pa_file_start_level, pa_file_start_space, pa_file_start_file, pa_file_start_mcount, pa_elf_file_start, pa_som_file_start, pa_linux_file_start, pa_hpux64_gas_file_start, pa_hpux64_hpas_file_start): New static functions. * config/pa/elf.h: Set TARGET_ASM_FILE_START to pa_elf_file_start. * config/pa/pa-linux.h: Set TARGET_ASM_FILE_START to pa_linux_file_start. * config/pa/pa64-hpux.h: Set TARGET_ASM_FILE_START to pa_hpux64_gas_file_start or pa_hpux64_hpas_file_start, as appropriate. * config/pa/som.h: Set TARGET_ASM_FILE_START to pa_som_file_start. * config/rs6000/rs6000.c: Include xcoffout.h when TARGET_XCOFF. (rs6000_file_start): Make static, take no arguments. Reset default_cpu under certain conditions. (rs6000_xcoff_file_start): New function. * config/rs6000/rs6000.h (TARGET_ASM_FILE_START): Set. * config/rs6000/xcoff.h (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Override. * config/sh/sh.c (output_file_start): Rename sh_file_start, make static, take no arguments. Merge in old code from sh/elf.h's ASM_FILE_START, conditioned on TARGET_ELF. (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set. * config/sh/sh.c (TARGET_ELF): Define to 0. * config/sh/elf.h (TARGET_ELF): Redefine to 1. * config/v850/v850.c (asm_file_start): Delete. (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set. * config/vax/vax.c (vax_file_start): New static function. (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_APP_OFF): Set. * config/darwin.h: Override ASM_FILE_START_FILE_DIRECTIVE to false. * config/elfos.h, config/svr3.h, config/arm/elf.h, config/arm/pe.h * config/i386/att.h, config/i386/gas.h, config/i386/linux.h * config/i386/sysv4.h, config/i386/sco5.h, config/i960/i960-coff.h * config/m68k/coff.h, config/m68k/hp320.h, config/mcore/mcore-pe.h * config/vax/vaxv.h: Set ASM_FILE_START_FILE_DIRECTIVE to true. * config/darwin.h, config/elfos.h, config/alpha/elf.h * config/alpha/openbsd.h, config/alpha/osf.h, config/alpha/vms.h * config/arc/arc.h, config/arm/aof.h, config/arm/aout.h * config/arm/coff.h, config/arm/elf.h, config/arm/pe.h * config/avr/avr.h, config/c4x/c4x.h, config/cris/cris.h * config/dsp16xx/dsp16xx.h, config/h8300/elf.h, config/h8300/h8300.h * config/i370/i370.h, config/i386/att.h, config/i386/gas.h * config/i386/i386-interix.h, config/i386/linux.h, config/i386/sysv4.h * config/i386/sco5.h, config/i960/i960-coff.h, config/i960/i960.h * config/ia64/ia64.h, config/ia64/sysv4.h, config/m32r/m32r.h * config/m68hc11/m68hc11.h, config/m68k/coff.h, config/m68k/m68k.h * config/mcore/mcore-pe.h, config/mips/iris6.h, config/mips/mips.h * config/mmix/mmix.h, config/mn10300/mn10300.h, config/ns32k/ns32k.h * config/pa/elf.h, config/pa/pa-linux.h, config/pa/pa64-hpux.h * config/pa/som.h, config/pdp11/pdp11.h, config/rs6000/linux64.h * config/rs6000/lynx.h, config/rs6000/xcoff.h, config/sh/elf.h * config/sh/sh.h, config/sparc/sparc.h, config/v850/v850.h * config/vax/vax.h, config/vax/vaxv.h: Don't (re)define ASM_FILE_START. * config/alpha/alpha-protos.h, config/arc/arc-protos.h * config/avr/avr-protos.h, config/dsp16xx/dsp16xx-protos.h * config/h8300/h8300-protos.h, config/ia64/ia64-protos.h * config/m32r/m32r-protos.h, config/m68hc11/m68hc11-protos.h * config/mips/mips-protos.h, config/mmix/mmix-protos.h * config/mn10300/mn10300-protos.h, config/rs6000/rs6000-protos.h * config/sh/sh-protos.h, config/v850/v850-protos.h: Update. * xcoffout.h, config/rs6000/aix.h, config/rs6000/xcoff.h: Remove reference to ASM_FILE_START in comment. * config/arm/aof.h, config/arm/aout.h, config/arm/freebsd.h * config/arm/linux-gas.h, config/arm/netbsd-elf.h * config/arm/netbsd.h: Delete definition of ARM_OS_NAME. From-SVN: r68229
2003-06-19 23:47:26 +02:00
is more than one .file directive. rs6000_xcoff_file_start is already
emitting a .file directory, so we don't output one here also.
Initialize xcoff_lastfile. */
1992-03-12 13:18:14 +01:00
#define DBX_OUTPUT_MAIN_SOURCE_FILENAME(FILE,FILENAME) \
xcoff_lastfile = (FILENAME)
1992-03-12 13:18:14 +01:00
/* If we are still in an include file, its end must be marked. */
#define DBX_OUTPUT_MAIN_SOURCE_FILE_END(FILE, FILENAME) \
dbxout.c: Include obstack.h. * dbxout.c: Include obstack.h. (ASM_STABS_OP): Take XCOFF_DEBUGGING_INFO into account in default definition. (ASM_STABD_OP, NO_DBX_MAIN_SOURCE_DIRECTORY, DBX_CONTIN_CHAR): Default-define here. (DBX_CONTIN_LENGTH): Move definition with others. (DBX_FINISH_STABS): New target macro. (current_sym_code, current_sym_value, current_sym_addr) (current_sym_nchars, CHARS, dbxout_continue) (print_int_cst_octal, print_octal, print_wide_int) (dbxout_prepare_symbol, dbxout_finish_symbol): Delete. (stabstr_ob, stabstr_last_contin_point): New variables. (NUMBER_FMT_LOOP): New improper macro. (dbxout_int, dbxout_stab_value_zero, dbxout_stab_value_label) (dbxout_stab_value_label_diff, dbxout_stab_value_internal_label) (dbxout_stab_value_internal_label_diff, dbxout_stabd) (dbxout_begin_stabn, dbxout_begin_stabn_sline) (dbxout_begin_simple_stabs, dbxout_begin_simple_stabs_desc) (dbxout_begin_complex_stabs, dbxout_finish_complex_stabs) (stabstr_C, stabstr_S, stabstr_I, stabstr_D, stabstr_U, stabstr_O) (stabstr_continue, DECL_ACCESSIBILITY_CHAR) New functions and/or proper function-like macros. (CONTIN): Use stabstr_continue, unconditionally. (get_lang_number): Define unconditionally, with ATTRIBUTE_UNUSED. (dbxout_init): Initialize stabstr_ob. Check NO_DBX_MAIN_SOURCE_DIRECTORY. Only write out the Ltext label if it was used. Use the new interfaces. (dbxout_source_file): Remove file argument; always write to asm_out_file. Use the new interfaces. (dbxout_type_method_1): Remove second argument which is always DECL_ASSEMBLER_NAME of the first argument. Use the new interfaces. (dbxout_type_methods): Remove write-only variables. Use the new interfaces. (dbxout_parms): Refactor to remove code duplicated in each of several successive if-else-if blocks. Use the new interfaces. (dbxout_function_end, emit_bincl_stab, dbxout_end_source_file) (dbxout_source_line, dbxout_finish, dbxout_type_index) (dbxout_type_fields, dbxout_range_type, dbxout_type, dbxout_type_name) (dbxout_class_name_qualifiers, dbxout_symbol, dbxout_symbol_location) (dbxout_symbol_name, dbxout_reg_parms, dbxout_args) (dbx_output_lbrac, dbx_output_rbrac, dbxout_block): Use the new interfaces. * Makefile.in (dbxout.o): Update dependencies. * defaults.h: Don't define ASM_STABD_OP. * output.h: Prototype new dbxout_* interfaces. * system.h: Poison DBX_OUTPUT_GCC_MARKER and DBX_FINISH_SYMBOL. * varasm.c: Don't define ASM_STABS_OP. (default_stabs_asm_out_constructor, default_stabs_asm_out_destructor): Use the new dbxout.c interfaces. Call sorry if neither DBX_DEBUGGING_INFO nor XCOFF_DEBUGGING_INFO is defined. * xcoffout.h: Don't define ASM_STABS_OP. (DBX_FINISH_SYMBOL): Rewrite and rename DBX_FINISH_STABS. (DBX_OUTPUT_MAIN_SOURCE_DIRECTORY, DBX_OUTPUT_GCC_MARKER): Delete. (NO_DBX_MAIN_SOURCE_DIRECTORY, NO_DBX_GCC_MARKER): Define. (DBX_OUTPUT_MAIN_SOURCE_FILE_END): Change bare block to do { ... } while (0) idiom. * config/alpha/alpha.c (num_source_filenames): Export. * config/alpha/alpha.h (num_source_filenames): Declare. (DBX_OUTPUT_SOURCE_LINE): Use new interfaces. (SDB_OUTPUT_SOURCE_LINE): Add missing newline. * config/m32r/m32r.h (DBX_OUTPUT_SOURCE_LINE): Use new interfaces. Always use .debugsym. Update commentary. * config/mips/mips.h (DBX_OUTPUT_SOURCE_LINE): Use new interfaces. (SDB_OUTPUT_SOURCE_LINE): Add missing newline. * config/rs6000/linux64.h (DBX_OUTPUT_SOURCE_LINE, DBX_OUTPUT_BRAC): Use new interfaces. * config/rs6000/rs6000.c: If TARGET_MACHO, include gstab.h. (macho_branch_islands): Use new interfaces. * doc/tm.texi: Update. From-SVN: r89623
2004-10-27 03:29:42 +02:00
do { \
1992-03-12 13:18:14 +01:00
if (xcoff_current_include_file) \
{ \
fputs ("\t.ei\t", (FILE)); \
output_quoted_string ((FILE), xcoff_current_include_file); \
putc ('\n', (FILE)); \
1992-03-12 13:18:14 +01:00
xcoff_current_include_file = NULL; \
} \
dbxout.c: Include obstack.h. * dbxout.c: Include obstack.h. (ASM_STABS_OP): Take XCOFF_DEBUGGING_INFO into account in default definition. (ASM_STABD_OP, NO_DBX_MAIN_SOURCE_DIRECTORY, DBX_CONTIN_CHAR): Default-define here. (DBX_CONTIN_LENGTH): Move definition with others. (DBX_FINISH_STABS): New target macro. (current_sym_code, current_sym_value, current_sym_addr) (current_sym_nchars, CHARS, dbxout_continue) (print_int_cst_octal, print_octal, print_wide_int) (dbxout_prepare_symbol, dbxout_finish_symbol): Delete. (stabstr_ob, stabstr_last_contin_point): New variables. (NUMBER_FMT_LOOP): New improper macro. (dbxout_int, dbxout_stab_value_zero, dbxout_stab_value_label) (dbxout_stab_value_label_diff, dbxout_stab_value_internal_label) (dbxout_stab_value_internal_label_diff, dbxout_stabd) (dbxout_begin_stabn, dbxout_begin_stabn_sline) (dbxout_begin_simple_stabs, dbxout_begin_simple_stabs_desc) (dbxout_begin_complex_stabs, dbxout_finish_complex_stabs) (stabstr_C, stabstr_S, stabstr_I, stabstr_D, stabstr_U, stabstr_O) (stabstr_continue, DECL_ACCESSIBILITY_CHAR) New functions and/or proper function-like macros. (CONTIN): Use stabstr_continue, unconditionally. (get_lang_number): Define unconditionally, with ATTRIBUTE_UNUSED. (dbxout_init): Initialize stabstr_ob. Check NO_DBX_MAIN_SOURCE_DIRECTORY. Only write out the Ltext label if it was used. Use the new interfaces. (dbxout_source_file): Remove file argument; always write to asm_out_file. Use the new interfaces. (dbxout_type_method_1): Remove second argument which is always DECL_ASSEMBLER_NAME of the first argument. Use the new interfaces. (dbxout_type_methods): Remove write-only variables. Use the new interfaces. (dbxout_parms): Refactor to remove code duplicated in each of several successive if-else-if blocks. Use the new interfaces. (dbxout_function_end, emit_bincl_stab, dbxout_end_source_file) (dbxout_source_line, dbxout_finish, dbxout_type_index) (dbxout_type_fields, dbxout_range_type, dbxout_type, dbxout_type_name) (dbxout_class_name_qualifiers, dbxout_symbol, dbxout_symbol_location) (dbxout_symbol_name, dbxout_reg_parms, dbxout_args) (dbx_output_lbrac, dbx_output_rbrac, dbxout_block): Use the new interfaces. * Makefile.in (dbxout.o): Update dependencies. * defaults.h: Don't define ASM_STABD_OP. * output.h: Prototype new dbxout_* interfaces. * system.h: Poison DBX_OUTPUT_GCC_MARKER and DBX_FINISH_SYMBOL. * varasm.c: Don't define ASM_STABS_OP. (default_stabs_asm_out_constructor, default_stabs_asm_out_destructor): Use the new dbxout.c interfaces. Call sorry if neither DBX_DEBUGGING_INFO nor XCOFF_DEBUGGING_INFO is defined. * xcoffout.h: Don't define ASM_STABS_OP. (DBX_FINISH_SYMBOL): Rewrite and rename DBX_FINISH_STABS. (DBX_OUTPUT_MAIN_SOURCE_DIRECTORY, DBX_OUTPUT_GCC_MARKER): Delete. (NO_DBX_MAIN_SOURCE_DIRECTORY, NO_DBX_GCC_MARKER): Define. (DBX_OUTPUT_MAIN_SOURCE_FILE_END): Change bare block to do { ... } while (0) idiom. * config/alpha/alpha.c (num_source_filenames): Export. * config/alpha/alpha.h (num_source_filenames): Declare. (DBX_OUTPUT_SOURCE_LINE): Use new interfaces. (SDB_OUTPUT_SOURCE_LINE): Add missing newline. * config/m32r/m32r.h (DBX_OUTPUT_SOURCE_LINE): Use new interfaces. Always use .debugsym. Update commentary. * config/mips/mips.h (DBX_OUTPUT_SOURCE_LINE): Use new interfaces. (SDB_OUTPUT_SOURCE_LINE): Add missing newline. * config/rs6000/linux64.h (DBX_OUTPUT_SOURCE_LINE, DBX_OUTPUT_BRAC): Use new interfaces. * config/rs6000/rs6000.c: If TARGET_MACHO, include gstab.h. (macho_branch_islands): Use new interfaces. * doc/tm.texi: Update. From-SVN: r89623
2004-10-27 03:29:42 +02:00
} while (0)
1992-03-12 13:18:14 +01:00
dbxout.c: Include obstack.h. * dbxout.c: Include obstack.h. (ASM_STABS_OP): Take XCOFF_DEBUGGING_INFO into account in default definition. (ASM_STABD_OP, NO_DBX_MAIN_SOURCE_DIRECTORY, DBX_CONTIN_CHAR): Default-define here. (DBX_CONTIN_LENGTH): Move definition with others. (DBX_FINISH_STABS): New target macro. (current_sym_code, current_sym_value, current_sym_addr) (current_sym_nchars, CHARS, dbxout_continue) (print_int_cst_octal, print_octal, print_wide_int) (dbxout_prepare_symbol, dbxout_finish_symbol): Delete. (stabstr_ob, stabstr_last_contin_point): New variables. (NUMBER_FMT_LOOP): New improper macro. (dbxout_int, dbxout_stab_value_zero, dbxout_stab_value_label) (dbxout_stab_value_label_diff, dbxout_stab_value_internal_label) (dbxout_stab_value_internal_label_diff, dbxout_stabd) (dbxout_begin_stabn, dbxout_begin_stabn_sline) (dbxout_begin_simple_stabs, dbxout_begin_simple_stabs_desc) (dbxout_begin_complex_stabs, dbxout_finish_complex_stabs) (stabstr_C, stabstr_S, stabstr_I, stabstr_D, stabstr_U, stabstr_O) (stabstr_continue, DECL_ACCESSIBILITY_CHAR) New functions and/or proper function-like macros. (CONTIN): Use stabstr_continue, unconditionally. (get_lang_number): Define unconditionally, with ATTRIBUTE_UNUSED. (dbxout_init): Initialize stabstr_ob. Check NO_DBX_MAIN_SOURCE_DIRECTORY. Only write out the Ltext label if it was used. Use the new interfaces. (dbxout_source_file): Remove file argument; always write to asm_out_file. Use the new interfaces. (dbxout_type_method_1): Remove second argument which is always DECL_ASSEMBLER_NAME of the first argument. Use the new interfaces. (dbxout_type_methods): Remove write-only variables. Use the new interfaces. (dbxout_parms): Refactor to remove code duplicated in each of several successive if-else-if blocks. Use the new interfaces. (dbxout_function_end, emit_bincl_stab, dbxout_end_source_file) (dbxout_source_line, dbxout_finish, dbxout_type_index) (dbxout_type_fields, dbxout_range_type, dbxout_type, dbxout_type_name) (dbxout_class_name_qualifiers, dbxout_symbol, dbxout_symbol_location) (dbxout_symbol_name, dbxout_reg_parms, dbxout_args) (dbx_output_lbrac, dbx_output_rbrac, dbxout_block): Use the new interfaces. * Makefile.in (dbxout.o): Update dependencies. * defaults.h: Don't define ASM_STABD_OP. * output.h: Prototype new dbxout_* interfaces. * system.h: Poison DBX_OUTPUT_GCC_MARKER and DBX_FINISH_SYMBOL. * varasm.c: Don't define ASM_STABS_OP. (default_stabs_asm_out_constructor, default_stabs_asm_out_destructor): Use the new dbxout.c interfaces. Call sorry if neither DBX_DEBUGGING_INFO nor XCOFF_DEBUGGING_INFO is defined. * xcoffout.h: Don't define ASM_STABS_OP. (DBX_FINISH_SYMBOL): Rewrite and rename DBX_FINISH_STABS. (DBX_OUTPUT_MAIN_SOURCE_DIRECTORY, DBX_OUTPUT_GCC_MARKER): Delete. (NO_DBX_MAIN_SOURCE_DIRECTORY, NO_DBX_GCC_MARKER): Define. (DBX_OUTPUT_MAIN_SOURCE_FILE_END): Change bare block to do { ... } while (0) idiom. * config/alpha/alpha.c (num_source_filenames): Export. * config/alpha/alpha.h (num_source_filenames): Declare. (DBX_OUTPUT_SOURCE_LINE): Use new interfaces. (SDB_OUTPUT_SOURCE_LINE): Add missing newline. * config/m32r/m32r.h (DBX_OUTPUT_SOURCE_LINE): Use new interfaces. Always use .debugsym. Update commentary. * config/mips/mips.h (DBX_OUTPUT_SOURCE_LINE): Use new interfaces. (SDB_OUTPUT_SOURCE_LINE): Add missing newline. * config/rs6000/linux64.h (DBX_OUTPUT_SOURCE_LINE, DBX_OUTPUT_BRAC): Use new interfaces. * config/rs6000/rs6000.c: If TARGET_MACHO, include gstab.h. (macho_branch_islands): Use new interfaces. * doc/tm.texi: Update. From-SVN: r89623
2004-10-27 03:29:42 +02:00
/* Do not emit any marker for XCOFF until assembler allows XFT_CV. */
#define NO_DBX_GCC_MARKER
/* XCOFF32 maximum length is 64K; XLC limits to 16K. */
#define DBX_CONTIN_LENGTH 16384
/* XLC uses '?' as continuation character. */
#define DBX_CONTIN_CHAR '?'
1992-03-12 13:18:14 +01:00
/* Don't try to use the `x' type-cross-reference character in DBX data.
Also has the consequence of putting each struct, union or enum
into a separate .stabs, containing only cross-refs to the others. */
#define DBX_NO_XREFS
/* We must put stabs in the text section. If we don't the assembler
won't handle them correctly; it will sometimes put stabs where gdb
can't find them. */
#define DEBUG_SYMS_TEXT
Warning fixes: * Makefile.in (xcoffout.o): Depend on toplev.h, output.h and dbxout.h. * config/fp-bit.c (_fpmul_parts): Move variables `x', `ylow', `yhigh' and `bit' into the scope in which they are used. (_fpdiv_parts): Remove unused variables `low', `high', `r0', `r1', `y0', `y1', `q', `remainder', `carry', `d0' and `d1'. * rs6000.c: Move include of output.h below tree.h. Include toplev.h. (any_operand): Mark unused parameters `op' and `mode' with ATTRIBUTE_UNUSED. (count_register_operand): Likewise for parameter `mode'. (fpmem_operand): Likewise. (short_cint_operand): Likewise. (u_short_cint_operand): Likewise. (non_short_cint_operand): Likewise. (got_operand): Likewise. (got_no_const_operand): Likewise. (non_add_cint_operand): Likewise. (non_logical_cint_operand): Likewise. (mask_operand): Likewise. (current_file_function_operand): Likewise. (small_data_operand): Likewise for parameters `op' and `mode' but only when !TARGET_ELF. (init_cumulative_args): Mark parameters `libname' with ATTRIBUTE_UNUSED. (function_arg_pass_by_reference): Likewise for parameters `cum', `mode' and `named'. (expand_builtin_saveregs): Likewise for parameter `args'. (load_multiple_operation): Likewise for parameter `mode'. (store_multiple_operation): Likewise. (branch_comparison_operator): Likewise. (secondary_reload_class): Likewise. (print_operand): Add parentheses around & operation. (output_prolog): Mark parameter `size' with ATTRIBUTE_UNUSED. (output_epilog): Likewise. Cast argument to fprintf to int. (rs6000_adjust_cost): Mark parameter `dep_insn' with ATTRIBUTE_UNUSED. (rs6000_valid_decl_attribute_p): Likewise for parameters `decl', `attributes', `identifier' and `args'. (rs6000_valid_type_attribute_p): Likewise for parameter `attributes'. (rs6000_comp_type_attributes): Likewise for parameters `type1' and `type2'. (rs6000_set_default_type_attributes): Likewise for parameter `type'. * rs6000.h (RTX_COSTS): Add parentheses around & operation. (toc_section, private_data_section, trap_comparison_operator): Add prototypes. * dbxout.h (dbxout_parms, dbxout_reg_parms, dbxout_syms): Add prototypes. * xcoffout.c: Include toplev.h, outout.h and dbxout.h. * xcoffout.h (stab_to_sclass, xcoffout_begin_function, xcoffout_begin_block, xcoffout_end_epilogue, xcoffout_end_function, xcoffout_end_block, xcoff_output_standard_types, xcoffout_declare_function, xcoffout_source_line): Add prototypes. From-SVN: r20717
1998-06-25 15:05:20 +02:00
/* Prototype functions in xcoffout.c. */
Warning fixes: * Makefile.in (xcoffout.o): Depend on toplev.h, output.h and dbxout.h. * config/fp-bit.c (_fpmul_parts): Move variables `x', `ylow', `yhigh' and `bit' into the scope in which they are used. (_fpdiv_parts): Remove unused variables `low', `high', `r0', `r1', `y0', `y1', `q', `remainder', `carry', `d0' and `d1'. * rs6000.c: Move include of output.h below tree.h. Include toplev.h. (any_operand): Mark unused parameters `op' and `mode' with ATTRIBUTE_UNUSED. (count_register_operand): Likewise for parameter `mode'. (fpmem_operand): Likewise. (short_cint_operand): Likewise. (u_short_cint_operand): Likewise. (non_short_cint_operand): Likewise. (got_operand): Likewise. (got_no_const_operand): Likewise. (non_add_cint_operand): Likewise. (non_logical_cint_operand): Likewise. (mask_operand): Likewise. (current_file_function_operand): Likewise. (small_data_operand): Likewise for parameters `op' and `mode' but only when !TARGET_ELF. (init_cumulative_args): Mark parameters `libname' with ATTRIBUTE_UNUSED. (function_arg_pass_by_reference): Likewise for parameters `cum', `mode' and `named'. (expand_builtin_saveregs): Likewise for parameter `args'. (load_multiple_operation): Likewise for parameter `mode'. (store_multiple_operation): Likewise. (branch_comparison_operator): Likewise. (secondary_reload_class): Likewise. (print_operand): Add parentheses around & operation. (output_prolog): Mark parameter `size' with ATTRIBUTE_UNUSED. (output_epilog): Likewise. Cast argument to fprintf to int. (rs6000_adjust_cost): Mark parameter `dep_insn' with ATTRIBUTE_UNUSED. (rs6000_valid_decl_attribute_p): Likewise for parameters `decl', `attributes', `identifier' and `args'. (rs6000_valid_type_attribute_p): Likewise for parameter `attributes'. (rs6000_comp_type_attributes): Likewise for parameters `type1' and `type2'. (rs6000_set_default_type_attributes): Likewise for parameter `type'. * rs6000.h (RTX_COSTS): Add parentheses around & operation. (toc_section, private_data_section, trap_comparison_operator): Add prototypes. * dbxout.h (dbxout_parms, dbxout_reg_parms, dbxout_syms): Add prototypes. * xcoffout.c: Include toplev.h, outout.h and dbxout.h. * xcoffout.h (stab_to_sclass, xcoffout_begin_function, xcoffout_begin_block, xcoffout_end_epilogue, xcoffout_end_function, xcoffout_end_block, xcoff_output_standard_types, xcoffout_declare_function, xcoffout_source_line): Add prototypes. From-SVN: r20717
1998-06-25 15:05:20 +02:00
extern int stab_to_sclass (int);
extern void xcoffout_begin_prologue (unsigned int, const char *);
extern void xcoffout_begin_block (unsigned, unsigned);
extern void xcoffout_end_epilogue (unsigned int, const char *);
extern void xcoffout_end_function (unsigned int);
extern void xcoffout_end_block (unsigned, unsigned);
debug.h (struct gcc_debug_hooks): Add type_decl field. * debug.h (struct gcc_debug_hooks): Add type_decl field. (debug_nothing_tree_int): Prototype. (dwarf_debug_hooks): Delete, unused. * debug.c (do_nothing_debug_hooks): Update. (debug_nothing_tree_int): New function. * langhooks.h (struct lang_hooks_for_decls): Remove builtin_type_decls field. * langhooks-def.h (LANG_HOOKS_BUILTIN_TYPE_DECLS): Delete. (LANG_HOOKS_DECLS): Update. * toplev.c (rest_of_decl_compilation, rest_of_type_compilation): Use debug_hooks->type_decl. * dbxout.c (preinit_symbols): New static. (dbx_debug_hooks, xcoff_debug_hooks): Update. (dbxout_init): Don't call DBX_OUTPUT_STANDARD_TYPES or lang_hooks.decls.builtin_type_decls. Do scan preinit_symbols for symbols to output. (dbxout_type_decl): New function. (dbxout_symbol): If called before dbxout_init has run, queue the symbol for later. Apply DBX_ASSIGN_FUNDAMENTAL_TYPE_NUMBER to TYPE_DECLs before emitting them. * xcoffout.c (assign_type_number): Delete. (xcoff_type_numbers): New static table. (xcoff_assign_fundamental_type_number): New function. * xcoffout.h: Define DBX_ASSIGN_FUNDAMENTAL_TYPE_NUMBER, not DBX_OUTPUT_STANDARD_TYPES. Remove unnecessary #ifdefs. * sdbout.c: Include varray.h. (deferred_global_decls): New static. (sdb_debug_hooks): Update. (sdbout_global_decl): If we can't emit something right now, remember it in deferred_global_decls. (sdbout_finish): Just scan deferred_global_decls; don't call getdecls. (sdbout_init): Initialize deferred_global_decls. * Makefile.in: Update dependencies of sdbout.o. * dwarf2out.c (dwarf2out_type_decl): New function. (dwarf2_debug_hooks): Update. * vmsdbgout.c (vmsdbg_debug_hooks): Update. * c-decl.c (getdecls): Just return 0. (check_for_loop_decls): Don't use getdecls. (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL. * c-objc-common.c (c_objc_common_finish_file): Don't use getdecls. cp: * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS. * cp-tree.h: Don't declare cxx_builtin_type_decls. * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete. (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL. From-SVN: r77730
2004-02-12 22:42:28 +01:00
extern int xcoff_assign_fundamental_type_number (tree);
extern void xcoffout_declare_function (FILE *, tree, const char *);
extern void xcoffout_source_line (unsigned int, const char *, int, bool);
#endif /* GCC_XCOFFOUT_H */