gcc/gcc/xcoffout.c

488 lines
13 KiB
C
Raw Normal View History

1992-03-11 23:24:26 +01:00
/* Output xcoff-format symbol table information from GNU compiler.
Copyright (C) 1992, 1994, 1995, 1997, 1998, 1999, 2000, 2002, 2003, 2004
Free Software Foundation, Inc.
1992-03-11 23:24:26 +01:00
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.
1992-03-11 23:24:26 +01:00
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 2, or (at your option) any later
version.
1992-03-11 23:24:26 +01:00
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.
1992-03-11 23:24:26 +01:00
You should have received a copy of the GNU General Public License
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
along with GCC; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
1992-03-11 23:24:26 +01:00
/* Output xcoff-format symbol table data. The main functionality is contained
in dbxout.c. This file implements the sdbout-like parts of the xcoff
interface. Many functions are very similar to their counterparts in
sdbout.c. */
#include "config.h"
Major cutover to using system.h: * Makefile.in (alias.o, bitmap.o, c-aux-info.o, c-common.o, c-decl.o, c-iterate.o, c-lang.o, c-lex.o, c-pragma.o, c-typeck.o, caller-save.o, calls.o, collect2.o, combine.o, cse.o, dbxout.o, dwarf2out.o, dwarfout.o, emit-rtl.o, except.o, explow.o, expmed.o, expr.o, final.o, flow.o, function.o, getpwd.o, global.o, integrate.o, jump.o, local-alloc.o, loop.o, optabs.o, pexecute.o, prefix.o, print-rtl.o, print-tree.o, profile.o, real.o, recog.o, reg-stack.o, regclass.o, regmove.o, reload.o, reload1.o, reorg.o, rtl.o, rtlanal.o, sdbout.o, stmt.o, stor-layout.o, stupid.o, tlink.o, toplev.o, tree.o, unroll.o, varasm.o, xcoffout.o): Depend on system.h. * alias.c, bitmap.c, c-aux-info.c, c-common.c, c-decl.c, c-iterate.c, c-lang.c, c-lex.c, c-pragma.c, c-typeck.c, caller-save.c, calls.c, collect2.c, combine.c, cse.c, dbxout.c, dwarf2out.c, dwarfout.c, emit-rtl.c, except.c, explow.c, expmed.c, expr.c, final.c, flow.c, function.c, gcc.c, getpwd.c, global.c, integrate.c, jump.c, local-alloc.c, loop.c, optabs.c, pexecute.c, prefix.c, print-rtl.c, print-tree.c, profile.c, real.c, recog.c, reg-stack.c, regclass.c, regmove.c, reload.c, reload1.c, reorg.c, rtl.c, rtlanal.c, sched.c, sdbout.c, stmt.c, stor-layout.c, stupid.c, tlink.c, toplev.c, tree.c, unroll.c, varasm.c, xcoffout.c: Include system.h. Organize include ordering so that stdarg/varargs comes before other system headers. Remove spurious casts of functions assured of a prototype in system.h. From-SVN: r18726
1998-03-20 15:58:42 +01:00
#include "system.h"
#include "coretypes.h"
#include "tm.h"
1992-03-11 23:24:26 +01:00
#include "tree.h"
#include "rtl.h"
#include "flags.h"
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
#include "toplev.h"
#include "output.h"
#include "ggc.h"
system.h (STRIP_NAME_ENCODING): Poison it. * system.h (STRIP_NAME_ENCODING): Poison it. * output.h (STRIP_NAME_ENCODING): Remove. (default_strip_name_encoding): Declare. * target-def.h (TARGET_STRIP_NAME_ENCODING): New. * target.h (strip_name_encoding): New. * varasm.c (default_strip_name_encoding): New. * dwarf2asm.c, varasm.c, config/darwin.c, config/darwin.h, config/alpha/alpha.c, config/arm/pe.c, config/avr/avr.c, config/cris/cris.c, config/i386/cygwin.h, config/i386/interix.c, config/i386/winnt.c, config/m32r/m32r.h, config/mcore/mcore-elf.h, config/mcore/mcore-pe.h, config/mcore/mcore.c, config/mcore/mcore.h, config/mips/mips.c, config/mn10200/mn10200.h, config/mn10300/mn10300.h, config/pa/pa.c, config/pa/pa.h, config/pa/som.h, config/rs6000/rs6000.c, config/rs6000/sysv4.h, config/rs6000/xcoff.h, config/v850/v850.h: Use the hook, not the macro. * config/darwin-protos.h, config/darwin.c, config/darwin.h, config/alpha/alpha.c, config/alpha/alpha.h, config/h8300/h8300.c, config/h8300/h8300.h, config/i386/cygwin.h, config/i386/i386-interix.h, config/i386/i386-protos.h, config/i386/win32.h, config/i386/winnt.c, config/ia64/ia64.c, config/ia64/ia64.h, config/m32r/m32r.c, config/m32r/m32r.h, config/mcore/mcore.c, config/mcore/mcore.h, config/pa/pa.c, config/rs6000/rs6000.c, config/rs6000/sysv4.h, config/rs6000/xcoff.h, config/sh/sh.c, config/sh/sh.h, config/v850/v850.c, config/v850/v850.h: Move STRIP_NAME_ENCODING to out-of-line function and add TARGET_STRIP_NAME_ENCODING. * config/arm/arm.c, config/arm/arm.h, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mmix/mmix.h: Replace STRIP_NAME_ENCODING with TARGET_STRIP_NAME_ENCODING referencing existing function; make function static. * xcoffout.c: Include target.h * Makefile.in (xcoffout.o): Update. * config/avr/avr.c (avr_encode_section_info): Correct prototype. * config/avr/avr.h (STRIP_NAME_ENCODING): Remove. * config/rs6000/rs6000.c (rs6000_xcoff_unique_section): Mark reloc argument unused. * config/sh/sh.c (TARGET_ENCODE_SECTION_INFO): New. * doc/tm.texi (TARGET_STRIP_NAME_ENCODING): Update from previous STRIP_NAME_ENCODING docs. From-SVN: r53615
2002-05-19 09:55:48 +02:00
#include "target.h"
1992-03-11 23:24:26 +01:00
#ifdef XCOFF_DEBUGGING_INFO
/* This defines the C_* storage classes. */
#include "xcoff.h"
#include "xcoffout.h"
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
#include "dbxout.h"
1992-03-11 23:24:26 +01:00
#include "gstab.h"
/* Line number of beginning of current function, minus one.
Negative means not in a function or not using xcoff. */
static int xcoff_begin_function_line = -1;
static int xcoff_inlining = 0;
1992-03-11 23:24:26 +01:00
/* Name of the current include file. */
const char *xcoff_current_include_file;
1992-03-11 23:24:26 +01:00
/* Name of the current function file. This is the file the `.bf' is
emitted from. In case a line is emitted from a different file,
(by including that file of course), then the line number will be
absolute. */
static const char *xcoff_current_function_file;
1992-03-11 23:24:26 +01:00
/* Names of bss and data sections. These should be unique names for each
compilation unit. */
char *xcoff_bss_section_name;
char *xcoff_private_data_section_name;
char *xcoff_read_only_section_name;
/* Last source file name mentioned in a NOTE insn. */
const char *xcoff_lastfile;
1992-03-11 23:24:26 +01:00
/* Macro definitions used below. */
#define ABS_OR_RELATIVE_LINENO(LINENO) \
((xcoff_inlining) ? (LINENO) : (LINENO) - xcoff_begin_function_line)
/* Output source line numbers via ".line" rather than ".stabd". */
dbxout.c (dbxout_source_line_counter): New global variable. * dbxout.c (dbxout_source_line_counter): New global variable. Mark it with GTY(()). (dbxout_source_line): Increment dbxout_source_line_counter and pass it to ASM_OUTPUT_SOURCE_LINE. * sdbout.c (sdbout_source_line_counter): New global variable. Mark it with GTY(()). (unnamed_struct_number): Mark it with GTY(()). (sdbout_source_line): Increment sdbout_source_line_counter and pass it to ASM_OUTPUT_SOURCE_LINE. * xcoffout.c (ASM_OUTPUT_SOURCE_LINE): Add third parameter (xcoffout_source_line): Pass 0 as third argument to ASM_OUTPUT_SOURCE_LINE. (xcoffout_begin_prologue): Likewise. * config/dbxout.h (ASM_OUTPUT_SOURCE_LINE): Add third parameter. Use it instead of 'sym_lineno' but without incrementing it. * config/dbxelf.h (ASM_OUTPUT_SOURCE_LINE): Likewise. * config/lynx.h (ASM_OUTPUT_SOURCE_LINE): Likewise. * config/ptx4.h (ASM_OUTPUT_SOURCE_LINE): Likewise. * config/alpha/alpha.c (alpha_start_function): Pass 0 as third argument to ASM_OUTPUT_SOURCE_LINE. * config/alpha/alpha.h (ASM_OUTPUT_SOURCE_LINE): Add third parameter. * config/arm/aout.h: Remove useless comment. * config/avr/avr.h (ASM_OUTPUT_SOURCE_LINE): Add third parameter. * config/i960/i960.h (ASM_OUTPUT_SOURCE_LINE): Likewise. * config/m32r/m32r.h (ASM_OUTPUT_SOURCE_LINE): Add third parameter. Use it instead of 'sym_lineno' but without incrementing it. * config/m68k/hp320.h (ASM_OUTPUT_SOURCE_LINE): Add third parameter. * config/mcore/mcore-pe.h (ASM_OUTPUT_SOURCE_LINE): Add third parameter. Use it instead of 'sym_lineno' but without incrementing it. * config/mips/mips.c (mips_output_function_prologue): Pass 0 as third argument to ASM_OUTPUT_SOURCE_LINE. * config/mips/mips.h (ASM_OUTPUT_SOURCE_LINE): Add third parameter. * config/mmix/mmix.h (ASM_OUTPUT_SOURCE_LINE): Likewise. * config/pa/som.h (ASM_OUTPUT_SOURCE_LINE): Add third parameter. Use it instead of 'sym_lineno' but without incrementing it. * config/rs6000/linux64.h (ASM_OUTPUT_SOURCE_LINE): Likewise. * config/sh/elf.h (ASM_OUTPUT_SOURCE_LINE): Likewise. * config/sparc/aout.h (ASM_OUTPUT_SOURCE_LINE): Likewise. * config/sparc/pbd.h (ASM_OUTPUT_SOURCE_LINE): Likewise. * doc/tm.texi (ASM_OUTPUT_SOURCE_LINE): Document third parameter. From-SVN: r68072
2003-06-17 10:06:58 +02:00
#define ASM_OUTPUT_SOURCE_LINE(FILE,LINENUM,COUNTER) \
do \
{ \
if (xcoff_begin_function_line >= 0) \
fprintf (FILE, "\t.line\t%d\n", ABS_OR_RELATIVE_LINENO (LINENUM)); \
} \
while (0)
1992-03-11 23:24:26 +01:00
#define ASM_OUTPUT_LFB(FILE,LINENUM) \
{ \
if (xcoff_begin_function_line == -1) \
{ \
xcoff_begin_function_line = (LINENUM) - 1;\
fprintf (FILE, "\t.bf\t%d\n", (LINENUM)); \
} \
xcoff_current_function_file \
= (xcoff_current_include_file \
? xcoff_current_include_file : main_input_filename); \
}
#define ASM_OUTPUT_LFE(FILE,LINENUM) \
do \
{ \
fprintf (FILE, "\t.ef\t%d\n", (LINENUM)); \
xcoff_begin_function_line = -1; \
} \
while (0)
1992-03-11 23:24:26 +01:00
#define ASM_OUTPUT_LBB(FILE,LINENUM,BLOCKNUM) \
fprintf (FILE, "\t.bb\t%d\n", ABS_OR_RELATIVE_LINENO (LINENUM))
1992-03-11 23:24:26 +01:00
#define ASM_OUTPUT_LBE(FILE,LINENUM,BLOCKNUM) \
fprintf (FILE, "\t.eb\t%d\n", ABS_OR_RELATIVE_LINENO (LINENUM))
Major cutover to using system.h: * Makefile.in (alias.o, bitmap.o, c-aux-info.o, c-common.o, c-decl.o, c-iterate.o, c-lang.o, c-lex.o, c-pragma.o, c-typeck.o, caller-save.o, calls.o, collect2.o, combine.o, cse.o, dbxout.o, dwarf2out.o, dwarfout.o, emit-rtl.o, except.o, explow.o, expmed.o, expr.o, final.o, flow.o, function.o, getpwd.o, global.o, integrate.o, jump.o, local-alloc.o, loop.o, optabs.o, pexecute.o, prefix.o, print-rtl.o, print-tree.o, profile.o, real.o, recog.o, reg-stack.o, regclass.o, regmove.o, reload.o, reload1.o, reorg.o, rtl.o, rtlanal.o, sdbout.o, stmt.o, stor-layout.o, stupid.o, tlink.o, toplev.o, tree.o, unroll.o, varasm.o, xcoffout.o): Depend on system.h. * alias.c, bitmap.c, c-aux-info.c, c-common.c, c-decl.c, c-iterate.c, c-lang.c, c-lex.c, c-pragma.c, c-typeck.c, caller-save.c, calls.c, collect2.c, combine.c, cse.c, dbxout.c, dwarf2out.c, dwarfout.c, emit-rtl.c, except.c, explow.c, expmed.c, expr.c, final.c, flow.c, function.c, gcc.c, getpwd.c, global.c, integrate.c, jump.c, local-alloc.c, loop.c, optabs.c, pexecute.c, prefix.c, print-rtl.c, print-tree.c, profile.c, real.c, recog.c, reg-stack.c, regclass.c, regmove.c, reload.c, reload1.c, reorg.c, rtl.c, rtlanal.c, sched.c, sdbout.c, stmt.c, stor-layout.c, stupid.c, tlink.c, toplev.c, tree.c, unroll.c, varasm.c, xcoffout.c: Include system.h. Organize include ordering so that stdarg/varargs comes before other system headers. Remove spurious casts of functions assured of a prototype in system.h. From-SVN: r18726
1998-03-20 15:58:42 +01:00
static void xcoffout_block (tree, int, tree);
static void xcoffout_source_file (FILE *, const char *, int);
1992-03-11 23:24:26 +01:00
/* Support routines for XCOFF debugging info. */
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
struct xcoff_type_number
1992-03-11 23:24:26 +01:00
{
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
const char *name;
int number;
};
static const struct xcoff_type_number xcoff_type_numbers[] = {
{ "int", -1 },
{ "char", -2 },
{ "short int", -3 },
{ "long int", -4 }, /* fiddled to -31 if 64 bits */
{ "unsigned char", -5 },
{ "signed char", -6 },
{ "short unsigned int", -7 },
{ "unsigned int", -8 },
1992-03-11 23:24:26 +01:00
/* No such type "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
{ "long unsigned int", -10 }, /* fiddled to -32 if 64 bits */
{ "void", -11 },
{ "float", -12 },
{ "double", -13 },
{ "long double", -14 },
1992-03-11 23:24:26 +01:00
/* Pascal and Fortran types run from -15 to -29. */
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
{ "wchar", -30 }, /* XXX Should be "wchar_t" ? */
{ "long long int", -31 },
{ "long long unsigned int", -32 },
/* Additional Fortran types run from -33 to -37. */
1992-03-11 23:24:26 +01:00
/* ??? Should also handle built-in C++ and Obj-C types. There perhaps
aren't any that C doesn't already have. */
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
};
/* Returns an XCOFF fundamental type number for DECL (assumed to be a
TYPE_DECL), or 0 if dbxout.c should assign a type number normally. */
int
xcoff_assign_fundamental_type_number (tree decl)
{
const char *name;
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
size_t i;
/* Do not waste time searching the list for non-intrinsic types. */
if (DECL_NAME (decl) == 0 || ! DECL_IS_BUILTIN (decl))
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
return 0;
name = IDENTIFIER_POINTER (DECL_NAME (decl));
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
/* Linear search, blech, but the list is too small to bother
doing anything else. */
for (i = 0; i < ARRAY_SIZE (xcoff_type_numbers); i++)
if (!strcmp (xcoff_type_numbers[i].name, name))
goto found;
return 0;
found:
/* -4 and -10 should be replaced with -31 and -32, respectively,
when used for a 64-bit type. */
if (int_size_in_bytes (TREE_TYPE (decl)) == 8)
{
if (xcoff_type_numbers[i].number == -4)
return -31;
if (xcoff_type_numbers[i].number == -10)
return -32;
}
return xcoff_type_numbers[i].number;
1992-03-11 23:24:26 +01:00
}
/* Print an error message for unrecognized stab codes. */
#define UNKNOWN_STAB(STR) \
c-decl.c (duplicate_decls, [...]): Remove leading capital from diagnostics. * c-decl.c (duplicate_decls, push_parm_decl): Remove leading capital from diagnostics. * c-lex.c (cb_file_change): Similarly. * c-parse.in : Similarly. * cfgrtl.c (verify_flow_info): Similarly. * collect2.c: Similarly. * cppfiles.c (find_include_file): Similarly. * cppinit.c (cpp_handle_option): Similarly. * cpplex.c (cpp_spell_token): Similarly. * cppmain.c (do_preprocessing): Similarly. * gcc.c (translate_options, process_command, do_spec1, main, pfatal_execute): Similarly. * genattr.c (main): Similarly. * genattrtab.c (check_attr_test, operate_exp, simplify_test_exp, write_test_expr, main): Similarly. * gencodes.c (main): Similarly. * genconfig.c (main): Similarly. * genconstants.c (main): Similarly. * genemit.c (main): Similarly. * genextract.c (main): Similarly. * genflags.c (main): Similarly. * genopinit.c (main): Similarly. * genoutput.c (process_template, main): Similarly. * genpeep.c (main): Similarly. * genrecog.c (main): Similarly. * gensupport.c (is_predicable, identify_predicable_attribute, alter_predicate_for_insn, init_md_reader_args, main): Similarly. * ggc-page.c (alloc_anon): Similarly. * mips-tfile.c (add_string, add_procedure, add_file, read_line, parse_begin, parse_bend, parse_def, parse_end, parse_file, parse_stabs_common, parse_stabs, write_varray, write_object, read_seek, copy_object, main, error): Similarly. * profile.c (compute_branch_probabilities): Similarly. * reg-stack.c (check_asm_stack_operands): Similarly. * reload.c (find_reloads): Similarly. * reload1.c (spill_failure, failed_reload): Similarly. * rtl-error.c (_fatal_insn_not_found): Similarly. * toplev.c (read_integral_parameter, crash_signal, decode_f_option, set_target_switch, parse_options_and_default_flags) : Similarly. * tradcif.y (parse_number, yylex): Similarly. * tradcpp.c (main, fancy_abort): Similarly. * tree.c (tree_check_failed): Similarly. * varray.c (varray_check_failed): Similarly. * xcoffout.c (xcoff_output_standard_types): Similarly. cp: * call.c (build_java_interface_fn_ref): Similarly. * except.c (is_admissible_throw_operand): Similarly. * init.c (build_java_class_ref): Similarly. * xref.c (open_xref_file): Similarly. objc: * objc-act.c (get_object_ref, lookup_and_install_protocols, build_objc_string_object, objc_declare_alias, build_ivar_chain, finish_message_expr, build_protocol_expr, is_public, start_class): Similarly. testsuite: * objc.dg/alias.m: Update. * objc.dg/class-1.m: Update. * objc.dg/const-str-1.m: Update. * objc.dg/fwd-proto-1.m: Update. * objc.dg/id-1.m: Update. * objc.dg/super-class-1.m: Update. From-SVN: r47518
2001-12-02 01:04:36 +01:00
internal_error ("no sclass for %s stab (0x%x)\n", STR, stab)
1992-03-11 23:24:26 +01:00
/* Conversion routine from BSD stabs to AIX storage classes. */
int
stab_to_sclass (int stab)
1992-03-11 23:24:26 +01:00
{
switch (stab)
{
case N_GSYM:
return C_GSYM;
case N_FNAME:
UNKNOWN_STAB ("N_FNAME");
1992-03-11 23:24:26 +01:00
case N_FUN:
return C_FUN;
case N_STSYM:
case N_LCSYM:
return C_STSYM;
case N_MAIN:
UNKNOWN_STAB ("N_MAIN");
1992-03-11 23:24:26 +01:00
case N_RSYM:
return C_RSYM;
case N_SSYM:
UNKNOWN_STAB ("N_SSYM");
1992-03-11 23:24:26 +01:00
case N_RPSYM:
return C_RPSYM;
case N_PSYM:
return C_PSYM;
case N_LSYM:
return C_LSYM;
case N_DECL:
return C_DECL;
case N_ENTRY:
return C_ENTRY;
case N_SO:
UNKNOWN_STAB ("N_SO");
1992-03-11 23:24:26 +01:00
case N_SOL:
UNKNOWN_STAB ("N_SOL");
1992-03-11 23:24:26 +01:00
case N_SLINE:
UNKNOWN_STAB ("N_SLINE");
1992-03-11 23:24:26 +01:00
case N_DSLINE:
UNKNOWN_STAB ("N_DSLINE");
1992-03-11 23:24:26 +01:00
case N_BSLINE:
UNKNOWN_STAB ("N_BSLINE");
1992-03-11 23:24:26 +01:00
case N_BINCL:
UNKNOWN_STAB ("N_BINCL");
1992-03-11 23:24:26 +01:00
case N_EINCL:
UNKNOWN_STAB ("N_EINCL");
1992-03-11 23:24:26 +01:00
case N_EXCL:
UNKNOWN_STAB ("N_EXCL");
1992-03-11 23:24:26 +01:00
case N_LBRAC:
UNKNOWN_STAB ("N_LBRAC");
1992-03-11 23:24:26 +01:00
case N_RBRAC:
UNKNOWN_STAB ("N_RBRAC");
1992-03-11 23:24:26 +01:00
case N_BCOMM:
return C_BCOMM;
case N_ECOMM:
return C_ECOMM;
case N_ECOML:
return C_ECOML;
case N_LENG:
UNKNOWN_STAB ("N_LENG");
1992-03-11 23:24:26 +01:00
case N_PC:
UNKNOWN_STAB ("N_PC");
1992-03-11 23:24:26 +01:00
case N_M2C:
UNKNOWN_STAB ("N_M2C");
1992-03-11 23:24:26 +01:00
case N_SCOPE:
UNKNOWN_STAB ("N_SCOPE");
1992-03-11 23:24:26 +01:00
case N_CATCH:
UNKNOWN_STAB ("N_CATCH");
case N_OPT:
UNKNOWN_STAB ("N_OPT");
1992-03-11 23:24:26 +01:00
default:
UNKNOWN_STAB ("?");
}
1992-03-11 23:24:26 +01:00
}
/* Output debugging info to FILE to switch to sourcefile FILENAME.
INLINE_P is true if this is from an inlined function. */
static void
xcoffout_source_file (FILE *file, const char *filename, int inline_p)
{
if (filename
&& (xcoff_lastfile == 0 || strcmp (filename, xcoff_lastfile)
|| (inline_p && ! xcoff_inlining)
|| (! inline_p && xcoff_inlining)))
{
if (xcoff_current_include_file)
{
fprintf (file, "\t.ei\t");
output_quoted_string (file, xcoff_current_include_file);
fprintf (file, "\n");
xcoff_current_include_file = NULL;
}
xcoff_inlining = inline_p;
if (strcmp (main_input_filename, filename) || inline_p)
{
fprintf (file, "\t.bi\t");
output_quoted_string (file, filename);
fprintf (file, "\n");
xcoff_current_include_file = filename;
}
xcoff_lastfile = filename;
}
}
dbxout.c (dbxout_really_begin_function): Rename to dbxout_begin_function. * dbxout.c (dbxout_really_begin_function): Rename to dbxout_begin_function. (dbx_debug_hooks, xcoff_debug_hooks): Update. (dbxout_begin_function): Remove. (dbxout_function): Update. (dbxout_source_line): Update prototype. * dbxout.h (dbxout_begin_function): Remove. * debug.c (do_nothing_debug_hooks): Update. (debug_nothing_tree): Update. (debug_nothing_charstar_rtx): Remove. * debug.h (union tree_node): Declare. (struct rtx_def): Remove. (gcc_debug_hooks): New hooks begin_prologue, end_prologue, begin_function. Change source_line prototype. (debug_nothing_tree): New. (debug_nothing_charstar_rtx): Delete. (dwarf2out_begin_prologue): Moved from ... * tree.h: ... here. * dwarf2out.c (dwarf2_debug_hooks): Update. (dwarf2out_begin_prologue): Update prototype. If genuine dwarf2 debug info, call dwarf2out_source_line. (dwarf2out_souce_line): Update prototype. * dwarfout.c (dwarfout_begin_function): Rename dwarfout_end_prologue. Change prototype, make static. (dwarfout_source_line): Update prototype. (dwarf_debug_hooks): Update. * dwarfout.h (dwarfout_begin_function): Remove. * final.c (final_start_function, final_scan_insn): Use appropriate debug hooks, update to use notice_source_line. (output_source_line): Rename notice_source_line. Don't call the source_line debug hook. * sdbout.c (sdbout_begin_function): Rename sdbout_begin_prologue, make static, update prototype. (sdbout_mark_begin_function): Rename sdbout_begin_function, update prototype. (sdbout_end_prologue): New. (sdbout_source_line): Update prototype. (sdbout_debug_hooks): Update. (sdbout_symbol): Remove unused var. * sdbout.h (sdbout_begin_function, sdbout_mark_begin_function): Delete. * varasm.c: Include debug.h. (assemble_start_function): Use begin_function debug_hook. * xcoffout.c (xcoffout_begin_prologue): Rename xcoffout_begin_function, update with prototype. (xcoffout_source_line): Update prototype. * xcoffout.h (xcoffout_begin_prologue): Rename xcoffout_begin_function, update prototype. (xcoffout_source_line): Update prototype. From-SVN: r44087
2001-07-17 21:47:58 +02:00
/* Output a line number symbol entry for location (FILENAME, LINE). */
void
xcoffout_source_line (unsigned int line, const char *filename)
{
dbxout.c (dbxout_really_begin_function): Rename to dbxout_begin_function. * dbxout.c (dbxout_really_begin_function): Rename to dbxout_begin_function. (dbx_debug_hooks, xcoff_debug_hooks): Update. (dbxout_begin_function): Remove. (dbxout_function): Update. (dbxout_source_line): Update prototype. * dbxout.h (dbxout_begin_function): Remove. * debug.c (do_nothing_debug_hooks): Update. (debug_nothing_tree): Update. (debug_nothing_charstar_rtx): Remove. * debug.h (union tree_node): Declare. (struct rtx_def): Remove. (gcc_debug_hooks): New hooks begin_prologue, end_prologue, begin_function. Change source_line prototype. (debug_nothing_tree): New. (debug_nothing_charstar_rtx): Delete. (dwarf2out_begin_prologue): Moved from ... * tree.h: ... here. * dwarf2out.c (dwarf2_debug_hooks): Update. (dwarf2out_begin_prologue): Update prototype. If genuine dwarf2 debug info, call dwarf2out_source_line. (dwarf2out_souce_line): Update prototype. * dwarfout.c (dwarfout_begin_function): Rename dwarfout_end_prologue. Change prototype, make static. (dwarfout_source_line): Update prototype. (dwarf_debug_hooks): Update. * dwarfout.h (dwarfout_begin_function): Remove. * final.c (final_start_function, final_scan_insn): Use appropriate debug hooks, update to use notice_source_line. (output_source_line): Rename notice_source_line. Don't call the source_line debug hook. * sdbout.c (sdbout_begin_function): Rename sdbout_begin_prologue, make static, update prototype. (sdbout_mark_begin_function): Rename sdbout_begin_function, update prototype. (sdbout_end_prologue): New. (sdbout_source_line): Update prototype. (sdbout_debug_hooks): Update. (sdbout_symbol): Remove unused var. * sdbout.h (sdbout_begin_function, sdbout_mark_begin_function): Delete. * varasm.c: Include debug.h. (assemble_start_function): Use begin_function debug_hook. * xcoffout.c (xcoffout_begin_prologue): Rename xcoffout_begin_function, update with prototype. (xcoffout_source_line): Update prototype. * xcoffout.h (xcoffout_begin_prologue): Rename xcoffout_begin_function, update prototype. (xcoffout_source_line): Update prototype. From-SVN: r44087
2001-07-17 21:47:58 +02:00
bool inline_p = (strcmp (xcoff_current_function_file, filename) != 0
|| (int) line < xcoff_begin_function_line);
xcoffout_source_file (asm_out_file, filename, inline_p);
dbxout.c (dbxout_source_line_counter): New global variable. * dbxout.c (dbxout_source_line_counter): New global variable. Mark it with GTY(()). (dbxout_source_line): Increment dbxout_source_line_counter and pass it to ASM_OUTPUT_SOURCE_LINE. * sdbout.c (sdbout_source_line_counter): New global variable. Mark it with GTY(()). (unnamed_struct_number): Mark it with GTY(()). (sdbout_source_line): Increment sdbout_source_line_counter and pass it to ASM_OUTPUT_SOURCE_LINE. * xcoffout.c (ASM_OUTPUT_SOURCE_LINE): Add third parameter (xcoffout_source_line): Pass 0 as third argument to ASM_OUTPUT_SOURCE_LINE. (xcoffout_begin_prologue): Likewise. * config/dbxout.h (ASM_OUTPUT_SOURCE_LINE): Add third parameter. Use it instead of 'sym_lineno' but without incrementing it. * config/dbxelf.h (ASM_OUTPUT_SOURCE_LINE): Likewise. * config/lynx.h (ASM_OUTPUT_SOURCE_LINE): Likewise. * config/ptx4.h (ASM_OUTPUT_SOURCE_LINE): Likewise. * config/alpha/alpha.c (alpha_start_function): Pass 0 as third argument to ASM_OUTPUT_SOURCE_LINE. * config/alpha/alpha.h (ASM_OUTPUT_SOURCE_LINE): Add third parameter. * config/arm/aout.h: Remove useless comment. * config/avr/avr.h (ASM_OUTPUT_SOURCE_LINE): Add third parameter. * config/i960/i960.h (ASM_OUTPUT_SOURCE_LINE): Likewise. * config/m32r/m32r.h (ASM_OUTPUT_SOURCE_LINE): Add third parameter. Use it instead of 'sym_lineno' but without incrementing it. * config/m68k/hp320.h (ASM_OUTPUT_SOURCE_LINE): Add third parameter. * config/mcore/mcore-pe.h (ASM_OUTPUT_SOURCE_LINE): Add third parameter. Use it instead of 'sym_lineno' but without incrementing it. * config/mips/mips.c (mips_output_function_prologue): Pass 0 as third argument to ASM_OUTPUT_SOURCE_LINE. * config/mips/mips.h (ASM_OUTPUT_SOURCE_LINE): Add third parameter. * config/mmix/mmix.h (ASM_OUTPUT_SOURCE_LINE): Likewise. * config/pa/som.h (ASM_OUTPUT_SOURCE_LINE): Add third parameter. Use it instead of 'sym_lineno' but without incrementing it. * config/rs6000/linux64.h (ASM_OUTPUT_SOURCE_LINE): Likewise. * config/sh/elf.h (ASM_OUTPUT_SOURCE_LINE): Likewise. * config/sparc/aout.h (ASM_OUTPUT_SOURCE_LINE): Likewise. * config/sparc/pbd.h (ASM_OUTPUT_SOURCE_LINE): Likewise. * doc/tm.texi (ASM_OUTPUT_SOURCE_LINE): Document third parameter. From-SVN: r68072
2003-06-17 10:06:58 +02:00
ASM_OUTPUT_SOURCE_LINE (asm_out_file, line, 0);
}
1992-03-11 23:24:26 +01:00
/* Output the symbols defined in block number DO_BLOCK.
This function works by walking the tree structure of blocks,
counting blocks until it finds the desired block. */
static int do_block = 0;
static void
xcoffout_block (tree block, int depth, tree args)
1992-03-11 23:24:26 +01:00
{
while (block)
{
/* Ignore blocks never expanded or otherwise marked as real. */
if (TREE_USED (block))
{
/* When we reach the specified block, output its symbols. */
emit-rtl.c (remove_unncessary_notes): Remove notes for empty blocks. * emit-rtl.c (remove_unncessary_notes): Remove notes for empty blocks. * final.c (next_block_index): Remove. (max_block_depth): Likewise. (pending_blocks): Likewise. (init_final): Don't initialize them. (final_start_function): Don't set next_block_index. Set up BLOCK_NUMBER. (final_scan_insn): Use BLOCK_NUMBER, not next_block_index. * function.h (number_blocks): New function. * function.c (get_block_vector): New function. (identify_blocks): Use it. (reorder_blocks): Set NOTE_BLOCK. (number_blocks): New function. * tree.def (BLOCK): Add documentation for TREE_ASM_WRITTEN flag. * tree.h (BLOCK_NUMBER): New macro. (tree_block): Add block_num field. * dbxout.c (next_block_number): Remove. (dbxout_init): Don't set it. (dbxout_block): Only output blocks that have TREE_ASM_WRITTEN set. Use BLOCK_NUMBER, rather than next_block_num, to determine block numbers. * toplev.c (rest_of_compilation): Always call find_loop_tree_blocks. Fix indentation. * dwarf2out.c (next_block_number): Remove. (gen_lexical_block_die): Use BLOCK_NUMBER, not next_block_number, to determine block numbers. (gen_inlined_subroutine_die): Likewise. (gen_block_die): Only output blocks that have TREE_ASM_WRITTEN set. (decls_for_scope): Don't increment next_block_number. * dwarfout.c (next_block_number): Remove. (output_lexical_block_die): Use BLOCK_NUMBER, not next_block_number, to determine block numbers. (output_inlined_subroutine_die): Likewise. (output_block): Only output blocks that have TREE_ASM_WRITTEN set. (output_decls_for_scope): Don't increment next_block_number. * sdbout.c (next_block_number): Remove. (sdbout_block): Use BLOCK_NUMBER. (sdbout_begin_block): Simplify. * xcoffout.c (next_block_number): Remove. (xcoffout_block): Use BLOCK_NUMBER, not next_block_number. (xcoffout_begin_block): Don't set next_block_number. (xcoffout_begin_function): Likewise. Use BLOCK_NUMBER, not next_block_number. From-SVN: r32228
2000-02-28 10:51:42 +01:00
if (BLOCK_NUMBER (block) == do_block)
1992-03-11 23:24:26 +01:00
{
/* Output the syms of the block. */
if (debug_info_level != DINFO_LEVEL_TERSE || depth == 0)
dbxout_syms (BLOCK_VARS (block));
if (args)
dbxout_reg_parms (args);
/* We are now done with the block. Don't go to inner blocks. */
return;
}
/* If we are past the specified block, stop the scan. */
emit-rtl.c (remove_unncessary_notes): Remove notes for empty blocks. * emit-rtl.c (remove_unncessary_notes): Remove notes for empty blocks. * final.c (next_block_index): Remove. (max_block_depth): Likewise. (pending_blocks): Likewise. (init_final): Don't initialize them. (final_start_function): Don't set next_block_index. Set up BLOCK_NUMBER. (final_scan_insn): Use BLOCK_NUMBER, not next_block_index. * function.h (number_blocks): New function. * function.c (get_block_vector): New function. (identify_blocks): Use it. (reorder_blocks): Set NOTE_BLOCK. (number_blocks): New function. * tree.def (BLOCK): Add documentation for TREE_ASM_WRITTEN flag. * tree.h (BLOCK_NUMBER): New macro. (tree_block): Add block_num field. * dbxout.c (next_block_number): Remove. (dbxout_init): Don't set it. (dbxout_block): Only output blocks that have TREE_ASM_WRITTEN set. Use BLOCK_NUMBER, rather than next_block_num, to determine block numbers. * toplev.c (rest_of_compilation): Always call find_loop_tree_blocks. Fix indentation. * dwarf2out.c (next_block_number): Remove. (gen_lexical_block_die): Use BLOCK_NUMBER, not next_block_number, to determine block numbers. (gen_inlined_subroutine_die): Likewise. (gen_block_die): Only output blocks that have TREE_ASM_WRITTEN set. (decls_for_scope): Don't increment next_block_number. * dwarfout.c (next_block_number): Remove. (output_lexical_block_die): Use BLOCK_NUMBER, not next_block_number, to determine block numbers. (output_inlined_subroutine_die): Likewise. (output_block): Only output blocks that have TREE_ASM_WRITTEN set. (output_decls_for_scope): Don't increment next_block_number. * sdbout.c (next_block_number): Remove. (sdbout_block): Use BLOCK_NUMBER. (sdbout_begin_block): Simplify. * xcoffout.c (next_block_number): Remove. (xcoffout_block): Use BLOCK_NUMBER, not next_block_number. (xcoffout_begin_block): Don't set next_block_number. (xcoffout_begin_function): Likewise. Use BLOCK_NUMBER, not next_block_number. From-SVN: r32228
2000-02-28 10:51:42 +01:00
else if (BLOCK_NUMBER (block) >= do_block)
1992-03-11 23:24:26 +01:00
return;
/* Output the subblocks. */
1992-07-06 22:15:06 +02:00
xcoffout_block (BLOCK_SUBBLOCKS (block), depth + 1, NULL_TREE);
1992-03-11 23:24:26 +01:00
}
block = BLOCK_CHAIN (block);
}
}
/* Describe the beginning of an internal block within a function.
Also output descriptions of variables defined in this block.
N is the number of the block, by order of beginning, counting from 1,
and not counting the outermost (function top-level) block.
The blocks match the BLOCKs in DECL_INITIAL (current_function_decl),
if the count starts at 0 for the outermost one. */
void
xcoffout_begin_block (unsigned int line, unsigned int n)
1992-03-11 23:24:26 +01:00
{
tree decl = current_function_decl;
/* The IBM AIX compiler does not emit a .bb for the function level scope,
so we avoid it here also. */
if (n != 1)
dbxout.c (dbxout_source_line): Make static, update prototype. * dbxout.c (dbxout_source_line): Make static, update prototype. (dbx_debug_hooks, xcoff_debug_hooks): Add new hooks. (dbxout_init, dbxout_finish, dbxout_source_line, dbxout_begin_block, dbxout_end_block): Update for new prototypes. * dbxout.h (dbxout_source_line): Delete. * debug.c (debug_nothing_file, debug_nothing_file_int, debug_nothing_file_charstar_rtx): New. (do_nothing_debug_hooks): Update. (debug_nothing_void, debug_nothing_charstar_rtx, dwarf2out_end_epilogue): New. (debug_nothing_file_charstar, debug_nothing_file_int_int): Rename. * debug.h (struct rtx_def): Declare. (gcc_debug_hooks): New hooks source_line, end_epilogue and end_function. (debug_nothing_void, debug_nothing_charstar_rtx, dwarf2out_end_epilogue): New. (debug_nothing_file_charstar, debug_nothing_file_int_int): Rename. * dwarf2out.c (dwarf2out_source_line): Make static, update prototype. (dwarf2_debug_hooks): Update. (dwarf2out_init, dwarf2out_finish, dwarf2out_source_line, dwarf2out_begin_block, dwarf2out_end_block): Update for new prototypes. * dwarf2out.h (dwarf2out_source_line): Remove. * dwarfout.c (dwarfout_end_epilogue, dwarfout_end_function): Make static, update prototype. (dwarfout_init, dwarfout_finish, dwarfout_source_line, dwarfout_begin_block, dwarfout_end_block): Update for new prototypes. (dwarf_debug_hooks): Update. * dwarfout.h (dwarfout_end_epilogue, dwarfout_source_line, dwarfout_end_function): Remove. * final.c (profile_function): Use debug hooks for ending functions and epilogues. (output_source_line, final_end_function): Update prototype, use debug hooks. (final_start_function, final_scan_insn): Update. * output.h (sdb_begin_function_line): Remove. (final_end_function): Update prototype. * sdbout.c (sdb_begin_function_line): Make static. (PUT_SDB_EPILOGUE_END): Move to sdbout_end_epilogue. (sdbout_source_line): New. (sdbout_end_epilogue, sdbout_end_function): Make static, update prototypes. (sdb_debug_hooks): Update. (sdbout_init, sdbout_source_line, sdbout_begin_block, sdbout_end_block): Update for new prototypes. * sdbout.h (sdbout_end_epilogue, sdbout_end_function): Remove. * toplev.c (compile_file, rest_of_compilation): Update. * tree.h (dwarf2out_end_epilogue): Move to debug.h. * xcoffout.c (xcoffout_source_line, xcoffout_begin_block, xcoffout_end_block, xcoffout_end_epilogue, xcoffout_end_function): Update for prototype changes. * xcoffout.h (xcoffout_source_line, xcoffout_begin_block, xcoffout_end_block, xcoffout_end_epilogue): Update prototypes. From-SVN: r44017
2001-07-15 10:34:46 +02:00
ASM_OUTPUT_LBB (asm_out_file, line, n);
1992-03-11 23:24:26 +01:00
do_block = n;
xcoffout_block (DECL_INITIAL (decl), 0, DECL_ARGUMENTS (decl));
}
/* Describe the end line-number of an internal block within a function. */
void
xcoffout_end_block (unsigned int line, unsigned int n)
1992-03-11 23:24:26 +01:00
{
if (n != 1)
dbxout.c (dbxout_source_line): Make static, update prototype. * dbxout.c (dbxout_source_line): Make static, update prototype. (dbx_debug_hooks, xcoff_debug_hooks): Add new hooks. (dbxout_init, dbxout_finish, dbxout_source_line, dbxout_begin_block, dbxout_end_block): Update for new prototypes. * dbxout.h (dbxout_source_line): Delete. * debug.c (debug_nothing_file, debug_nothing_file_int, debug_nothing_file_charstar_rtx): New. (do_nothing_debug_hooks): Update. (debug_nothing_void, debug_nothing_charstar_rtx, dwarf2out_end_epilogue): New. (debug_nothing_file_charstar, debug_nothing_file_int_int): Rename. * debug.h (struct rtx_def): Declare. (gcc_debug_hooks): New hooks source_line, end_epilogue and end_function. (debug_nothing_void, debug_nothing_charstar_rtx, dwarf2out_end_epilogue): New. (debug_nothing_file_charstar, debug_nothing_file_int_int): Rename. * dwarf2out.c (dwarf2out_source_line): Make static, update prototype. (dwarf2_debug_hooks): Update. (dwarf2out_init, dwarf2out_finish, dwarf2out_source_line, dwarf2out_begin_block, dwarf2out_end_block): Update for new prototypes. * dwarf2out.h (dwarf2out_source_line): Remove. * dwarfout.c (dwarfout_end_epilogue, dwarfout_end_function): Make static, update prototype. (dwarfout_init, dwarfout_finish, dwarfout_source_line, dwarfout_begin_block, dwarfout_end_block): Update for new prototypes. (dwarf_debug_hooks): Update. * dwarfout.h (dwarfout_end_epilogue, dwarfout_source_line, dwarfout_end_function): Remove. * final.c (profile_function): Use debug hooks for ending functions and epilogues. (output_source_line, final_end_function): Update prototype, use debug hooks. (final_start_function, final_scan_insn): Update. * output.h (sdb_begin_function_line): Remove. (final_end_function): Update prototype. * sdbout.c (sdb_begin_function_line): Make static. (PUT_SDB_EPILOGUE_END): Move to sdbout_end_epilogue. (sdbout_source_line): New. (sdbout_end_epilogue, sdbout_end_function): Make static, update prototypes. (sdb_debug_hooks): Update. (sdbout_init, sdbout_source_line, sdbout_begin_block, sdbout_end_block): Update for new prototypes. * sdbout.h (sdbout_end_epilogue, sdbout_end_function): Remove. * toplev.c (compile_file, rest_of_compilation): Update. * tree.h (dwarf2out_end_epilogue): Move to debug.h. * xcoffout.c (xcoffout_source_line, xcoffout_begin_block, xcoffout_end_block, xcoffout_end_epilogue, xcoffout_end_function): Update for prototype changes. * xcoffout.h (xcoffout_source_line, xcoffout_begin_block, xcoffout_end_block, xcoffout_end_epilogue): Update prototypes. From-SVN: r44017
2001-07-15 10:34:46 +02:00
ASM_OUTPUT_LBE (asm_out_file, line, n);
1992-03-11 23:24:26 +01:00
}
/* Called at beginning of function (before prologue).
Declare function as needed for debugging. */
void
xcoffout_declare_function (FILE *file, tree decl, const char *name)
{
int i;
if (*name == '*')
name++;
else
for (i = 0; name[i]; ++i)
{
if (name[i] == '[')
{
char *n = alloca (i + 1);
strncpy (n, name, i);
n[i] = '\0';
name = n;
break;
}
}
1995-05-16 14:39:54 +02:00
/* Any pending .bi or .ei must occur before the .function pseudo op.
Otherwise debuggers will think that the function is in the previous
file and/or at the wrong line number. */
xcoffout_source_file (file, DECL_SOURCE_FILE (decl), 0);
dbxout_symbol (decl, 0);
/* .function NAME, TOP, MAPPING, TYPE, SIZE
16 and 044 are placeholders for backwards compatibility */
fprintf (file, "\t.function .%s,.%s,16,044,FE..%s-.%s\n",
name, name, name, name);
}
dbxout.c (dbxout_really_begin_function): Rename to dbxout_begin_function. * dbxout.c (dbxout_really_begin_function): Rename to dbxout_begin_function. (dbx_debug_hooks, xcoff_debug_hooks): Update. (dbxout_begin_function): Remove. (dbxout_function): Update. (dbxout_source_line): Update prototype. * dbxout.h (dbxout_begin_function): Remove. * debug.c (do_nothing_debug_hooks): Update. (debug_nothing_tree): Update. (debug_nothing_charstar_rtx): Remove. * debug.h (union tree_node): Declare. (struct rtx_def): Remove. (gcc_debug_hooks): New hooks begin_prologue, end_prologue, begin_function. Change source_line prototype. (debug_nothing_tree): New. (debug_nothing_charstar_rtx): Delete. (dwarf2out_begin_prologue): Moved from ... * tree.h: ... here. * dwarf2out.c (dwarf2_debug_hooks): Update. (dwarf2out_begin_prologue): Update prototype. If genuine dwarf2 debug info, call dwarf2out_source_line. (dwarf2out_souce_line): Update prototype. * dwarfout.c (dwarfout_begin_function): Rename dwarfout_end_prologue. Change prototype, make static. (dwarfout_source_line): Update prototype. (dwarf_debug_hooks): Update. * dwarfout.h (dwarfout_begin_function): Remove. * final.c (final_start_function, final_scan_insn): Use appropriate debug hooks, update to use notice_source_line. (output_source_line): Rename notice_source_line. Don't call the source_line debug hook. * sdbout.c (sdbout_begin_function): Rename sdbout_begin_prologue, make static, update prototype. (sdbout_mark_begin_function): Rename sdbout_begin_function, update prototype. (sdbout_end_prologue): New. (sdbout_source_line): Update prototype. (sdbout_debug_hooks): Update. (sdbout_symbol): Remove unused var. * sdbout.h (sdbout_begin_function, sdbout_mark_begin_function): Delete. * varasm.c: Include debug.h. (assemble_start_function): Use begin_function debug_hook. * xcoffout.c (xcoffout_begin_prologue): Rename xcoffout_begin_function, update with prototype. (xcoffout_source_line): Update prototype. * xcoffout.h (xcoffout_begin_prologue): Rename xcoffout_begin_function, update prototype. (xcoffout_source_line): Update prototype. From-SVN: r44087
2001-07-17 21:47:58 +02:00
/* Called at beginning of function body (at start of prologue).
1992-03-11 23:24:26 +01:00
Record the function's starting line number, so we can output
relative line numbers for the other lines.
Record the file name that this function is contained in. */
void
xcoffout_begin_prologue (unsigned int line,
const char *file ATTRIBUTE_UNUSED)
1992-03-11 23:24:26 +01:00
{
dbxout.c (dbxout_really_begin_function): Rename to dbxout_begin_function. * dbxout.c (dbxout_really_begin_function): Rename to dbxout_begin_function. (dbx_debug_hooks, xcoff_debug_hooks): Update. (dbxout_begin_function): Remove. (dbxout_function): Update. (dbxout_source_line): Update prototype. * dbxout.h (dbxout_begin_function): Remove. * debug.c (do_nothing_debug_hooks): Update. (debug_nothing_tree): Update. (debug_nothing_charstar_rtx): Remove. * debug.h (union tree_node): Declare. (struct rtx_def): Remove. (gcc_debug_hooks): New hooks begin_prologue, end_prologue, begin_function. Change source_line prototype. (debug_nothing_tree): New. (debug_nothing_charstar_rtx): Delete. (dwarf2out_begin_prologue): Moved from ... * tree.h: ... here. * dwarf2out.c (dwarf2_debug_hooks): Update. (dwarf2out_begin_prologue): Update prototype. If genuine dwarf2 debug info, call dwarf2out_source_line. (dwarf2out_souce_line): Update prototype. * dwarfout.c (dwarfout_begin_function): Rename dwarfout_end_prologue. Change prototype, make static. (dwarfout_source_line): Update prototype. (dwarf_debug_hooks): Update. * dwarfout.h (dwarfout_begin_function): Remove. * final.c (final_start_function, final_scan_insn): Use appropriate debug hooks, update to use notice_source_line. (output_source_line): Rename notice_source_line. Don't call the source_line debug hook. * sdbout.c (sdbout_begin_function): Rename sdbout_begin_prologue, make static, update prototype. (sdbout_mark_begin_function): Rename sdbout_begin_function, update prototype. (sdbout_end_prologue): New. (sdbout_source_line): Update prototype. (sdbout_debug_hooks): Update. (sdbout_symbol): Remove unused var. * sdbout.h (sdbout_begin_function, sdbout_mark_begin_function): Delete. * varasm.c: Include debug.h. (assemble_start_function): Use begin_function debug_hook. * xcoffout.c (xcoffout_begin_prologue): Rename xcoffout_begin_function, update with prototype. (xcoffout_source_line): Update prototype. * xcoffout.h (xcoffout_begin_prologue): Rename xcoffout_begin_function, update prototype. (xcoffout_source_line): Update prototype. From-SVN: r44087
2001-07-17 21:47:58 +02:00
ASM_OUTPUT_LFB (asm_out_file, line);
dbxout_parms (DECL_ARGUMENTS (current_function_decl));
/* Emit the symbols for the outermost BLOCK's variables. sdbout.c does this
in sdbout_begin_block, but there is no guarantee that there will be any
inner block 1, so we must do it here. This gives a result similar to
dbxout, so it does make some sense. */
do_block = BLOCK_NUMBER (DECL_INITIAL (current_function_decl));
xcoffout_block (DECL_INITIAL (current_function_decl), 0,
DECL_ARGUMENTS (current_function_decl));
dbxout.c (dbxout_source_line_counter): New global variable. * dbxout.c (dbxout_source_line_counter): New global variable. Mark it with GTY(()). (dbxout_source_line): Increment dbxout_source_line_counter and pass it to ASM_OUTPUT_SOURCE_LINE. * sdbout.c (sdbout_source_line_counter): New global variable. Mark it with GTY(()). (unnamed_struct_number): Mark it with GTY(()). (sdbout_source_line): Increment sdbout_source_line_counter and pass it to ASM_OUTPUT_SOURCE_LINE. * xcoffout.c (ASM_OUTPUT_SOURCE_LINE): Add third parameter (xcoffout_source_line): Pass 0 as third argument to ASM_OUTPUT_SOURCE_LINE. (xcoffout_begin_prologue): Likewise. * config/dbxout.h (ASM_OUTPUT_SOURCE_LINE): Add third parameter. Use it instead of 'sym_lineno' but without incrementing it. * config/dbxelf.h (ASM_OUTPUT_SOURCE_LINE): Likewise. * config/lynx.h (ASM_OUTPUT_SOURCE_LINE): Likewise. * config/ptx4.h (ASM_OUTPUT_SOURCE_LINE): Likewise. * config/alpha/alpha.c (alpha_start_function): Pass 0 as third argument to ASM_OUTPUT_SOURCE_LINE. * config/alpha/alpha.h (ASM_OUTPUT_SOURCE_LINE): Add third parameter. * config/arm/aout.h: Remove useless comment. * config/avr/avr.h (ASM_OUTPUT_SOURCE_LINE): Add third parameter. * config/i960/i960.h (ASM_OUTPUT_SOURCE_LINE): Likewise. * config/m32r/m32r.h (ASM_OUTPUT_SOURCE_LINE): Add third parameter. Use it instead of 'sym_lineno' but without incrementing it. * config/m68k/hp320.h (ASM_OUTPUT_SOURCE_LINE): Add third parameter. * config/mcore/mcore-pe.h (ASM_OUTPUT_SOURCE_LINE): Add third parameter. Use it instead of 'sym_lineno' but without incrementing it. * config/mips/mips.c (mips_output_function_prologue): Pass 0 as third argument to ASM_OUTPUT_SOURCE_LINE. * config/mips/mips.h (ASM_OUTPUT_SOURCE_LINE): Add third parameter. * config/mmix/mmix.h (ASM_OUTPUT_SOURCE_LINE): Likewise. * config/pa/som.h (ASM_OUTPUT_SOURCE_LINE): Add third parameter. Use it instead of 'sym_lineno' but without incrementing it. * config/rs6000/linux64.h (ASM_OUTPUT_SOURCE_LINE): Likewise. * config/sh/elf.h (ASM_OUTPUT_SOURCE_LINE): Likewise. * config/sparc/aout.h (ASM_OUTPUT_SOURCE_LINE): Likewise. * config/sparc/pbd.h (ASM_OUTPUT_SOURCE_LINE): Likewise. * doc/tm.texi (ASM_OUTPUT_SOURCE_LINE): Document third parameter. From-SVN: r68072
2003-06-17 10:06:58 +02:00
ASM_OUTPUT_SOURCE_LINE (asm_out_file, line, 0);
1992-03-11 23:24:26 +01:00
}
/* Called at end of function (before epilogue).
Describe end of outermost block. */
void
xcoffout_end_function (unsigned int last_linenum)
1992-03-11 23:24:26 +01:00
{
dbxout.c (dbxout_source_line): Make static, update prototype. * dbxout.c (dbxout_source_line): Make static, update prototype. (dbx_debug_hooks, xcoff_debug_hooks): Add new hooks. (dbxout_init, dbxout_finish, dbxout_source_line, dbxout_begin_block, dbxout_end_block): Update for new prototypes. * dbxout.h (dbxout_source_line): Delete. * debug.c (debug_nothing_file, debug_nothing_file_int, debug_nothing_file_charstar_rtx): New. (do_nothing_debug_hooks): Update. (debug_nothing_void, debug_nothing_charstar_rtx, dwarf2out_end_epilogue): New. (debug_nothing_file_charstar, debug_nothing_file_int_int): Rename. * debug.h (struct rtx_def): Declare. (gcc_debug_hooks): New hooks source_line, end_epilogue and end_function. (debug_nothing_void, debug_nothing_charstar_rtx, dwarf2out_end_epilogue): New. (debug_nothing_file_charstar, debug_nothing_file_int_int): Rename. * dwarf2out.c (dwarf2out_source_line): Make static, update prototype. (dwarf2_debug_hooks): Update. (dwarf2out_init, dwarf2out_finish, dwarf2out_source_line, dwarf2out_begin_block, dwarf2out_end_block): Update for new prototypes. * dwarf2out.h (dwarf2out_source_line): Remove. * dwarfout.c (dwarfout_end_epilogue, dwarfout_end_function): Make static, update prototype. (dwarfout_init, dwarfout_finish, dwarfout_source_line, dwarfout_begin_block, dwarfout_end_block): Update for new prototypes. (dwarf_debug_hooks): Update. * dwarfout.h (dwarfout_end_epilogue, dwarfout_source_line, dwarfout_end_function): Remove. * final.c (profile_function): Use debug hooks for ending functions and epilogues. (output_source_line, final_end_function): Update prototype, use debug hooks. (final_start_function, final_scan_insn): Update. * output.h (sdb_begin_function_line): Remove. (final_end_function): Update prototype. * sdbout.c (sdb_begin_function_line): Make static. (PUT_SDB_EPILOGUE_END): Move to sdbout_end_epilogue. (sdbout_source_line): New. (sdbout_end_epilogue, sdbout_end_function): Make static, update prototypes. (sdb_debug_hooks): Update. (sdbout_init, sdbout_source_line, sdbout_begin_block, sdbout_end_block): Update for new prototypes. * sdbout.h (sdbout_end_epilogue, sdbout_end_function): Remove. * toplev.c (compile_file, rest_of_compilation): Update. * tree.h (dwarf2out_end_epilogue): Move to debug.h. * xcoffout.c (xcoffout_source_line, xcoffout_begin_block, xcoffout_end_block, xcoffout_end_epilogue, xcoffout_end_function): Update for prototype changes. * xcoffout.h (xcoffout_source_line, xcoffout_begin_block, xcoffout_end_block, xcoffout_end_epilogue): Update prototypes. From-SVN: r44017
2001-07-15 10:34:46 +02:00
ASM_OUTPUT_LFE (asm_out_file, last_linenum);
1992-03-11 23:24:26 +01:00
}
/* Output xcoff info for the absolute end of a function.
Called after the epilogue is output. */
void
xcoffout_end_epilogue (unsigned int line ATTRIBUTE_UNUSED,
const char *file ATTRIBUTE_UNUSED)
1992-03-11 23:24:26 +01:00
{
/* We need to pass the correct function size to .function, otherwise,
the xas assembler can't figure out the correct size for the function
aux entry. So, we emit a label after the last instruction which can
be used by the .function pseudo op to calculate the function size. */
1992-03-11 23:24:26 +01:00
const char *fname = XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0);
1992-03-11 23:24:26 +01:00
if (*fname == '*')
++fname;
dbxout.c (dbxout_source_line): Make static, update prototype. * dbxout.c (dbxout_source_line): Make static, update prototype. (dbx_debug_hooks, xcoff_debug_hooks): Add new hooks. (dbxout_init, dbxout_finish, dbxout_source_line, dbxout_begin_block, dbxout_end_block): Update for new prototypes. * dbxout.h (dbxout_source_line): Delete. * debug.c (debug_nothing_file, debug_nothing_file_int, debug_nothing_file_charstar_rtx): New. (do_nothing_debug_hooks): Update. (debug_nothing_void, debug_nothing_charstar_rtx, dwarf2out_end_epilogue): New. (debug_nothing_file_charstar, debug_nothing_file_int_int): Rename. * debug.h (struct rtx_def): Declare. (gcc_debug_hooks): New hooks source_line, end_epilogue and end_function. (debug_nothing_void, debug_nothing_charstar_rtx, dwarf2out_end_epilogue): New. (debug_nothing_file_charstar, debug_nothing_file_int_int): Rename. * dwarf2out.c (dwarf2out_source_line): Make static, update prototype. (dwarf2_debug_hooks): Update. (dwarf2out_init, dwarf2out_finish, dwarf2out_source_line, dwarf2out_begin_block, dwarf2out_end_block): Update for new prototypes. * dwarf2out.h (dwarf2out_source_line): Remove. * dwarfout.c (dwarfout_end_epilogue, dwarfout_end_function): Make static, update prototype. (dwarfout_init, dwarfout_finish, dwarfout_source_line, dwarfout_begin_block, dwarfout_end_block): Update for new prototypes. (dwarf_debug_hooks): Update. * dwarfout.h (dwarfout_end_epilogue, dwarfout_source_line, dwarfout_end_function): Remove. * final.c (profile_function): Use debug hooks for ending functions and epilogues. (output_source_line, final_end_function): Update prototype, use debug hooks. (final_start_function, final_scan_insn): Update. * output.h (sdb_begin_function_line): Remove. (final_end_function): Update prototype. * sdbout.c (sdb_begin_function_line): Make static. (PUT_SDB_EPILOGUE_END): Move to sdbout_end_epilogue. (sdbout_source_line): New. (sdbout_end_epilogue, sdbout_end_function): Make static, update prototypes. (sdb_debug_hooks): Update. (sdbout_init, sdbout_source_line, sdbout_begin_block, sdbout_end_block): Update for new prototypes. * sdbout.h (sdbout_end_epilogue, sdbout_end_function): Remove. * toplev.c (compile_file, rest_of_compilation): Update. * tree.h (dwarf2out_end_epilogue): Move to debug.h. * xcoffout.c (xcoffout_source_line, xcoffout_begin_block, xcoffout_end_block, xcoffout_end_epilogue, xcoffout_end_function): Update for prototype changes. * xcoffout.h (xcoffout_source_line, xcoffout_begin_block, xcoffout_end_block, xcoffout_end_epilogue): Update prototypes. From-SVN: r44017
2001-07-15 10:34:46 +02:00
fprintf (asm_out_file, "FE..");
ASM_OUTPUT_LABEL (asm_out_file, fname);
1992-03-11 23:24:26 +01:00
}
#endif /* XCOFF_DEBUGGING_INFO */