1991-12-23 23:45:25 +01:00
|
|
|
|
/* Output sdb-format symbol table information from GNU compiler.
|
2001-01-28 02:50:22 +01:00
|
|
|
|
Copyright (C) 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
2002-01-22 15:33:35 +01:00
|
|
|
|
2000, 2001, 2002 Free Software Foundation, Inc.
|
1991-12-23 23:45:25 +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.
|
1991-12-23 23:45:25 +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.
|
1991-12-23 23:45:25 +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.
|
1991-12-23 23:45:25 +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. */
|
1991-12-23 23:45:25 +01:00
|
|
|
|
|
|
|
|
|
/* mike@tredysvr.Tredydev.Unisys.COM says:
|
|
|
|
|
I modified the struct.c example and have a nm of a .o resulting from the
|
|
|
|
|
AT&T C compiler. From the example below I would conclude the following:
|
|
|
|
|
|
|
|
|
|
1. All .defs from structures are emitted as scanned. The example below
|
|
|
|
|
clearly shows the symbol table entries for BoxRec2 are after the first
|
|
|
|
|
function.
|
|
|
|
|
|
|
|
|
|
2. All functions and their locals (including statics) are emitted as scanned.
|
|
|
|
|
|
|
|
|
|
3. All nested unnamed union and structure .defs must be emitted before
|
|
|
|
|
the structure in which they are nested. The AT&T assembler is a
|
|
|
|
|
one pass beast as far as symbolics are concerned.
|
|
|
|
|
|
|
|
|
|
4. All structure .defs are emitted before the typedefs that refer to them.
|
|
|
|
|
|
|
|
|
|
5. All top level static and external variable definitions are moved to the
|
1992-05-07 08:41:23 +02:00
|
|
|
|
end of file with all top level statics occurring first before externs.
|
1991-12-23 23:45:25 +01:00
|
|
|
|
|
|
|
|
|
6. All undefined references are at the end of the file.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include "config.h"
|
2002-06-04 09:11:05 +02:00
|
|
|
|
#include "system.h"
|
2002-12-16 19:23:00 +01:00
|
|
|
|
#include "coretypes.h"
|
|
|
|
|
#include "tm.h"
|
2002-06-04 09:11:05 +02:00
|
|
|
|
#include "debug.h"
|
|
|
|
|
#include "tree.h"
|
|
|
|
|
#include "ggc.h"
|
|
|
|
|
|
|
|
|
|
static GTY(()) tree anonymous_types;
|
1991-12-23 23:45:25 +01:00
|
|
|
|
|
|
|
|
|
#ifdef SDB_DEBUGGING_INFO
|
|
|
|
|
|
|
|
|
|
#include "rtl.h"
|
|
|
|
|
#include "regs.h"
|
|
|
|
|
#include "flags.h"
|
|
|
|
|
#include "insn-config.h"
|
|
|
|
|
#include "reload.h"
|
1998-06-22 07:32:38 +02:00
|
|
|
|
#include "output.h"
|
|
|
|
|
#include "toplev.h"
|
2000-01-11 23:57:39 +01:00
|
|
|
|
#include "tm_p.h"
|
1991-12-23 23:45:25 +01:00
|
|
|
|
#include "gsyms.h"
|
Makefile.in (fold-const.o, [...]): Update.
* Makefile.in (fold-const.o, stor-layout.o, stmt.o,
sdbout.o, profile.o): Update.
* c-common.c (c_common_nodes_and_builtins): Use pushdecl
langhook.
* c-common.h (gettags): Move here from tree.h.
* c-tree.h (pushdecl, pushlevel, poplevel, set_block,
insert_block, getdecls, kept_level_p, global_bindings_p): New.
* dbxout.c (dbxout_init): Use getdecls langhook.
* expr.c (expand_expr): Use insert_block langhook.
* fold-const.c: Include langhooks.h.
(fold_range_test, fold_binary_op_with_conditional_arg,
fold): Use global_bindings_p langhook.
* integrate.c (expand_inline_function): Use insert_block langhook.
* langhooks-def.h (LANG_HOOKS_DECLS, LANG_HOOKS_PUSHLEVEL,
LANG_HOOKS_POPLEVEL, LANG_HOOKS_GLOBAL_BINDINGS_P,
LANG_HOOKS_INSERT_BLOCK, LANG_HOOKS_SET_BLOCK, LANG_HOOKS_PUSHDECL,
LANG_HOOKS_GETDECLS): New.
(LANG_HOOKS_INITIALIZER): Update.
* langhooks.c (lhd_clear_binding_stack): Use global_bindings_p
langhook.
* langhooks.h (struct lang_hooks_for_decls): New.
(struct lang_hooks): Update.
* profile.c: Include langhooks.h.
(output_func_start_profiler): Use new langhooks.
* sdbout.c: Include langhooks.h.
(sdbout_init, sdbout_finish): Use getdecls langhook.
* stmt.c: Include langhooks.h.
(expand_fixup, fixup_gotos): Use new langhooks.
* stor-layout.c: Include langhooks.h.
(variable_size): Use global_bindings_p langhook.
* toplev.c (compile_file): Use getdecls langhook.
* tree-inline.c (remap_block): Use insert_block langhook.
* tree.h (pushdecl, pushlevel, poplevel, set_block, gettags,
insert_block, getdecls, kept_level_p, global_bindings_p): Remove.
cp:
* cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
insert_block, getdecls, global_bindings_p): New.
java:
* cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
insert_block, getdecls, kept_level_p, global_bindings_p): New.
f:
* cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
insert_block, getdecls, global_bindings_p): New.
From-SVN: r51136
2002-03-21 19:39:29 +01:00
|
|
|
|
#include "langhooks.h"
|
2002-12-16 19:23:00 +01:00
|
|
|
|
#include "target.h"
|
1991-12-23 23:45:25 +01:00
|
|
|
|
|
|
|
|
|
/* 1 if PARM is passed to this function in memory. */
|
|
|
|
|
|
|
|
|
|
#define PARM_PASSED_IN_MEMORY(PARM) \
|
|
|
|
|
(GET_CODE (DECL_INCOMING_RTL (PARM)) == MEM)
|
|
|
|
|
|
|
|
|
|
/* A C expression for the integer offset value of an automatic variable
|
|
|
|
|
(C_AUTO) having address X (an RTX). */
|
|
|
|
|
#ifndef DEBUGGER_AUTO_OFFSET
|
|
|
|
|
#define DEBUGGER_AUTO_OFFSET(X) \
|
|
|
|
|
(GET_CODE (X) == PLUS ? INTVAL (XEXP (X, 1)) : 0)
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
/* A C expression for the integer offset value of an argument (C_ARG)
|
|
|
|
|
having address X (an RTX). The nominal offset is OFFSET. */
|
|
|
|
|
#ifndef DEBUGGER_ARG_OFFSET
|
|
|
|
|
#define DEBUGGER_ARG_OFFSET(OFFSET, X) (OFFSET)
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
/* Line number of beginning of current function, minus one.
|
|
|
|
|
Negative means not in a function or not using sdb. */
|
|
|
|
|
|
2001-07-16 08:01:40 +02:00
|
|
|
|
int sdb_begin_function_line = -1;
|
1991-12-23 23:45:25 +01:00
|
|
|
|
|
|
|
|
|
/* Counter to generate unique "names" for nameless struct members. */
|
|
|
|
|
|
|
|
|
|
static int unnamed_struct_number = 0;
|
|
|
|
|
|
|
|
|
|
extern FILE *asm_out_file;
|
|
|
|
|
|
|
|
|
|
extern tree current_function_decl;
|
|
|
|
|
|
dwarfout.h, [...]: New files.
* dwarfout.h, dwarf2out.h, dbxout.h, sdbout.h: New files.
Prototypes for externally used functions in respective C files.
* dwarfout.c, dbxout.c, dwarf2out.c, sdbout.c, toplev,c,
final.c: Include above files.
* Makefile.in (toplev.o): Add dependency for above four headers.
(final.o): Likewise.
(dwarfout.o, dbxout.o, dwarf2out.o, sdbout.o): Depend on four
respective header files.
From-SVN: r19835
1998-05-18 09:11:42 +02:00
|
|
|
|
#include "sdbout.h"
|
1991-12-23 23:45:25 +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
|
|
|
|
static void sdbout_init PARAMS ((const char *));
|
2001-07-22 19:02:53 +02:00
|
|
|
|
static void sdbout_finish PARAMS ((const char *));
|
2001-09-10 12:55:20 +02:00
|
|
|
|
static void sdbout_start_source_file PARAMS ((unsigned int, const char *));
|
|
|
|
|
static void sdbout_end_source_file PARAMS ((unsigned int));
|
|
|
|
|
static void sdbout_begin_block PARAMS ((unsigned int, unsigned int));
|
|
|
|
|
static void sdbout_end_block PARAMS ((unsigned int, unsigned int));
|
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
|
|
|
|
static void sdbout_source_line PARAMS ((unsigned int, const char *));
|
2002-08-15 21:59:29 +02:00
|
|
|
|
static void sdbout_end_epilogue PARAMS ((unsigned int, const char *));
|
Makefile.in (toplev.o, [...]): Don't depend on dwarfout.h.
* Makefile.in (toplev.o, dwarfout.o, final.o): Don't depend on
dwarfout.h.
* dbxout.c (dbxout_function): Rename dbxout_funciton_decl, move
to conditionally compiled block.
(dbx_debug_hooks, xcoff_debug_hooks): Update.
* dbxout.h (dbxout_function): Remove.
* debug.c (do_nothing_debug_hooks): Update.
* debug.h (struct gcc_debug_hooks): New hooks function_decl,
global_decl, deferred_inline_function.
* dwarf2out.c (dwarf2_debug_hooks): Update.
(dwarf2out_global_decl): New.
* dwarfout.c: Don't include dwarfout.h.
(dwarfout_global_decl, dwarfout_function_decl,
dwarfout_deferred_inline_function): New.
(dwarf_debug_hooks): Update.
* dwarfout.h: Remove.
* final.c: Don't include dwarfout.h.
* sdbout.c (sdbout_global_decl): New.
(sdbout_debug_hooks): Update.
* toplev.c: Don't include dwarfout.h.
(check_global_declarations, rest_of_compilation): Use new debug hooks.
(note_deferral_of_defined_inline_function): Remove.
* toplev.h (note_deferral_of_defined_inline_function): Remove.
* ch/Makefile.in (lex.o): No dependence on dwarfout.h.
* ch/lex.c: Don't include dwarfout.h.
* cp/Make-lang.in (decl2.o): No dependence on dwarfout.h, dwarf2out.h.
(semantics.o, optimize.o): Depend on debug.h not dwarfout.h.
* cp/decl2.c: Don't include dwarfout.h and dwarf2out.h.
* cp/optimize.c: Include debug.h.
(maybe_clone_body): Use debug hook.
* cp/semantics.c: Include debug.h.
(expand_body): Use debug hook.
* po/POTFILES.in: Remove dwarfout.h.
From-SVN: r44145
2001-07-19 08:22:04 +02:00
|
|
|
|
static void sdbout_global_decl PARAMS ((tree));
|
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
|
|
|
|
#ifndef MIPS_DEBUGGING_INFO
|
|
|
|
|
static void sdbout_begin_prologue PARAMS ((unsigned int, const char *));
|
|
|
|
|
#endif
|
2002-08-15 21:59:29 +02:00
|
|
|
|
static void sdbout_end_prologue PARAMS ((unsigned int, const char *));
|
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
|
|
|
|
static void sdbout_begin_function PARAMS ((tree));
|
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
|
|
|
|
static void sdbout_end_function PARAMS ((unsigned int));
|
Makefile.in (emit-rtl.o, c-decl.o): Depend on debug.h.
* Makefile.in (emit-rtl.o, c-decl.o): Depend on debug.h.
(final.o): Don't depend on xcoffout.h, dbxout.h or sdbout.h.
(toplev.o): Don't depend on xcoffout.h.
* c-decl.c: Include debug.h
(duplicate_decls): Use debug hook.
* dbxout.c (dbxout_source_file, dbxout_args): Make static.
(dbx_debug_hooks, xcoff_debug_hooks): Update.
(dbxout_types): Remove.
* dbxout.h (dbxout_source_file, dbxout_types, dbxout_args): Remove.
* debug.c (do_nothing_debug_hooks): Update.
(debug_true_tree, debug_nothing_rtx): New.
* debug.h (struct rtx_def): New.
(struct gcc_debug_hooks): New hooks ignore_block,
outlining_inline_function and label.
(debug_true_tree, debug_nothing_rtx, dwarf2out_frame_init,
dwarf2out_frame_finish): New.
* dwarf2out.c (dwarf2out_ignore_block, dwarf2out_abstract_function):
Make static, update prototype.
(dwarf2_debug_hooks): Update.
* dwarf2out.h (dwarf2out_ignore_block, dwarf2out_abstract_function,
dwarf2out_frame_init, dwarf2out_frame_finish): Remove.
* dwarfout.c (dwarf_debug_hooks): Update.
* emit-rtl.c: Include debug.h.
(remove_unnecessary_notes): Use debug hook.
* final.c: Don't include dbxout.h, xcoffout.h or sdbout.h.
(final_scan_insn): Use debug hook.
* integrate.c (output_inline_function): Use debug hook.
* sdbout.c (sdbout_toplevel_data, sdbout_label): Make static.
(sdb_debug_hooks): Update.
* sdbout.h (sdbout_label, sdbout_toplevel_data): Remove.
* toplev.c: Don't include xcoffout.h.
(note_outlining_of_inline_function, debug_ignore_block): Remove.
* toplev.h (note_outlining_of_inline_function, debug_ignore_block):
Remove.
* tree.h (dwarf2out_do_frame): Remove.
From-SVN: r44163
2001-07-19 23:17:09 +02:00
|
|
|
|
static void sdbout_toplevel_data PARAMS ((tree));
|
|
|
|
|
static void sdbout_label PARAMS ((rtx));
|
2000-01-17 16:47:29 +01:00
|
|
|
|
static char *gen_fake_label PARAMS ((void));
|
|
|
|
|
static int plain_type PARAMS ((tree));
|
|
|
|
|
static int template_name_p PARAMS ((tree));
|
|
|
|
|
static void sdbout_record_type_name PARAMS ((tree));
|
|
|
|
|
static int plain_type_1 PARAMS ((tree, int));
|
|
|
|
|
static void sdbout_block PARAMS ((tree));
|
|
|
|
|
static void sdbout_syms PARAMS ((tree));
|
2000-01-11 00:48:03 +01:00
|
|
|
|
#ifdef SDB_ALLOW_FORWARD_REFERENCES
|
2000-01-17 16:47:29 +01:00
|
|
|
|
static void sdbout_queue_anonymous_type PARAMS ((tree));
|
|
|
|
|
static void sdbout_dequeue_anonymous_types PARAMS ((void));
|
2000-01-11 00:48:03 +01:00
|
|
|
|
#endif
|
2000-01-17 16:47:29 +01:00
|
|
|
|
static void sdbout_type PARAMS ((tree));
|
|
|
|
|
static void sdbout_field_types PARAMS ((tree));
|
|
|
|
|
static void sdbout_one_type PARAMS ((tree));
|
|
|
|
|
static void sdbout_parms PARAMS ((tree));
|
|
|
|
|
static void sdbout_reg_parms PARAMS ((tree));
|
2001-07-22 19:02:53 +02:00
|
|
|
|
static void sdbout_global_decl PARAMS ((tree));
|
1991-12-23 23:45:25 +01:00
|
|
|
|
|
|
|
|
|
/* Random macros describing parts of SDB data. */
|
|
|
|
|
|
|
|
|
|
/* Put something here if lines get too long */
|
|
|
|
|
#define CONTIN
|
|
|
|
|
|
|
|
|
|
/* Default value of delimiter is ";". */
|
|
|
|
|
#ifndef SDB_DELIM
|
|
|
|
|
#define SDB_DELIM ";"
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
/* Maximum number of dimensions the assembler will allow. */
|
|
|
|
|
#ifndef SDB_MAX_DIM
|
|
|
|
|
#define SDB_MAX_DIM 4
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifndef PUT_SDB_SCL
|
|
|
|
|
#define PUT_SDB_SCL(a) fprintf(asm_out_file, "\t.scl\t%d%s", (a), SDB_DELIM)
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifndef PUT_SDB_INT_VAL
|
1998-06-22 07:32:38 +02:00
|
|
|
|
#define PUT_SDB_INT_VAL(a) \
|
|
|
|
|
do { \
|
|
|
|
|
fputs ("\t.val\t", asm_out_file); \
|
2002-01-22 15:33:35 +01:00
|
|
|
|
fprintf (asm_out_file, HOST_WIDE_INT_PRINT_DEC, (HOST_WIDE_INT) (a)); \
|
1998-06-22 07:32:38 +02:00
|
|
|
|
fprintf (asm_out_file, "%s", SDB_DELIM); \
|
|
|
|
|
} while (0)
|
|
|
|
|
|
1991-12-23 23:45:25 +01:00
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifndef PUT_SDB_VAL
|
|
|
|
|
#define PUT_SDB_VAL(a) \
|
|
|
|
|
( fputs ("\t.val\t", asm_out_file), \
|
|
|
|
|
output_addr_const (asm_out_file, (a)), \
|
|
|
|
|
fprintf (asm_out_file, SDB_DELIM))
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifndef PUT_SDB_DEF
|
|
|
|
|
#define PUT_SDB_DEF(a) \
|
|
|
|
|
do { fprintf (asm_out_file, "\t.def\t"); \
|
2000-09-18 22:00:58 +02:00
|
|
|
|
assemble_name (asm_out_file, a); \
|
1991-12-23 23:45:25 +01:00
|
|
|
|
fprintf (asm_out_file, SDB_DELIM); } while (0)
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifndef PUT_SDB_PLAIN_DEF
|
|
|
|
|
#define PUT_SDB_PLAIN_DEF(a) fprintf(asm_out_file,"\t.def\t.%s%s",a, SDB_DELIM)
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifndef PUT_SDB_ENDEF
|
|
|
|
|
#define PUT_SDB_ENDEF fputs("\t.endef\n", asm_out_file)
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifndef PUT_SDB_TYPE
|
|
|
|
|
#define PUT_SDB_TYPE(a) fprintf(asm_out_file, "\t.type\t0%o%s", a, SDB_DELIM)
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifndef PUT_SDB_SIZE
|
1998-06-22 07:32:38 +02:00
|
|
|
|
#define PUT_SDB_SIZE(a) \
|
|
|
|
|
do { \
|
|
|
|
|
fputs ("\t.size\t", asm_out_file); \
|
2002-01-22 15:33:35 +01:00
|
|
|
|
fprintf (asm_out_file, HOST_WIDE_INT_PRINT_DEC, (HOST_WIDE_INT) (a)); \
|
1998-06-22 07:32:38 +02:00
|
|
|
|
fprintf (asm_out_file, "%s", SDB_DELIM); \
|
|
|
|
|
} while(0)
|
1991-12-23 23:45:25 +01:00
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifndef PUT_SDB_START_DIM
|
|
|
|
|
#define PUT_SDB_START_DIM fprintf(asm_out_file, "\t.dim\t")
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifndef PUT_SDB_NEXT_DIM
|
|
|
|
|
#define PUT_SDB_NEXT_DIM(a) fprintf(asm_out_file, "%d,", a)
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifndef PUT_SDB_LAST_DIM
|
|
|
|
|
#define PUT_SDB_LAST_DIM(a) fprintf(asm_out_file, "%d%s", a, SDB_DELIM)
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifndef PUT_SDB_TAG
|
|
|
|
|
#define PUT_SDB_TAG(a) \
|
|
|
|
|
do { fprintf (asm_out_file, "\t.tag\t"); \
|
2000-09-18 22:00:58 +02:00
|
|
|
|
assemble_name (asm_out_file, a); \
|
1991-12-23 23:45:25 +01:00
|
|
|
|
fprintf (asm_out_file, SDB_DELIM); } while (0)
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifndef PUT_SDB_BLOCK_START
|
|
|
|
|
#define PUT_SDB_BLOCK_START(LINE) \
|
|
|
|
|
fprintf (asm_out_file, \
|
|
|
|
|
"\t.def\t.bb%s\t.val\t.%s\t.scl\t100%s\t.line\t%d%s\t.endef\n", \
|
|
|
|
|
SDB_DELIM, SDB_DELIM, SDB_DELIM, (LINE), SDB_DELIM)
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifndef PUT_SDB_BLOCK_END
|
|
|
|
|
#define PUT_SDB_BLOCK_END(LINE) \
|
|
|
|
|
fprintf (asm_out_file, \
|
|
|
|
|
"\t.def\t.eb%s\t.val\t.%s\t.scl\t100%s\t.line\t%d%s\t.endef\n", \
|
|
|
|
|
SDB_DELIM, SDB_DELIM, SDB_DELIM, (LINE), SDB_DELIM)
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifndef PUT_SDB_FUNCTION_START
|
|
|
|
|
#define PUT_SDB_FUNCTION_START(LINE) \
|
|
|
|
|
fprintf (asm_out_file, \
|
|
|
|
|
"\t.def\t.bf%s\t.val\t.%s\t.scl\t101%s\t.line\t%d%s\t.endef\n", \
|
|
|
|
|
SDB_DELIM, SDB_DELIM, SDB_DELIM, (LINE), SDB_DELIM)
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifndef PUT_SDB_FUNCTION_END
|
|
|
|
|
#define PUT_SDB_FUNCTION_END(LINE) \
|
|
|
|
|
fprintf (asm_out_file, \
|
|
|
|
|
"\t.def\t.ef%s\t.val\t.%s\t.scl\t101%s\t.line\t%d%s\t.endef\n", \
|
|
|
|
|
SDB_DELIM, SDB_DELIM, SDB_DELIM, (LINE), SDB_DELIM)
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifndef SDB_GENERATE_FAKE
|
|
|
|
|
#define SDB_GENERATE_FAKE(BUFFER, NUMBER) \
|
|
|
|
|
sprintf ((BUFFER), ".%dfake", (NUMBER));
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
/* Return the sdb tag identifier string for TYPE
|
2001-10-10 13:33:39 +02:00
|
|
|
|
if TYPE has already been defined; otherwise return a null pointer. */
|
1991-12-23 23:45:25 +01:00
|
|
|
|
|
1993-10-12 22:06:37 +01:00
|
|
|
|
#define KNOWN_TYPE_TAG(type) TYPE_SYMTAB_POINTER (type)
|
1991-12-23 23:45:25 +01:00
|
|
|
|
|
|
|
|
|
/* Set the sdb tag identifier string for TYPE to NAME. */
|
|
|
|
|
|
|
|
|
|
#define SET_KNOWN_TYPE_TAG(TYPE, NAME) \
|
1993-10-12 22:06:37 +01:00
|
|
|
|
TYPE_SYMTAB_POINTER (TYPE) = (NAME)
|
1991-12-23 23:45:25 +01:00
|
|
|
|
|
|
|
|
|
/* Return the name (a string) of the struct, union or enum tag
|
|
|
|
|
described by the TREE_LIST node LINK. This is 0 for an anonymous one. */
|
|
|
|
|
|
|
|
|
|
#define TAG_NAME(link) \
|
|
|
|
|
(((link) && TREE_PURPOSE ((link)) \
|
|
|
|
|
&& IDENTIFIER_POINTER (TREE_PURPOSE ((link)))) \
|
|
|
|
|
? IDENTIFIER_POINTER (TREE_PURPOSE ((link))) : (char *) 0)
|
|
|
|
|
|
|
|
|
|
/* Ensure we don't output a negative line number. */
|
|
|
|
|
#define MAKE_LINE_SAFE(line) \
|
2001-09-10 12:55:20 +02:00
|
|
|
|
if ((int) line <= sdb_begin_function_line) \
|
|
|
|
|
line = sdb_begin_function_line + 1
|
1996-11-15 23:37:40 +01:00
|
|
|
|
|
|
|
|
|
/* Perform linker optimization of merging header file definitions together
|
|
|
|
|
for targets with MIPS_DEBUGGING_INFO defined. This won't work without a
|
|
|
|
|
post 960826 version of GAS. Nothing breaks with earlier versions of GAS,
|
|
|
|
|
the optimization just won't be done. The native assembler already has the
|
|
|
|
|
necessary support. */
|
|
|
|
|
|
|
|
|
|
#ifdef MIPS_DEBUGGING_INFO
|
|
|
|
|
|
|
|
|
|
#ifndef PUT_SDB_SRC_FILE
|
|
|
|
|
#define PUT_SDB_SRC_FILE(FILENAME) \
|
|
|
|
|
output_file_directive (asm_out_file, (FILENAME))
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
/* ECOFF linkers have an optimization that does the same kind of thing as
|
|
|
|
|
N_BINCL/E_INCL in stabs: eliminate duplicate debug information in the
|
|
|
|
|
executable. To achieve this, GCC must output a .file for each file
|
|
|
|
|
name change. */
|
|
|
|
|
|
|
|
|
|
/* This is a stack of input files. */
|
|
|
|
|
|
|
|
|
|
struct sdb_file
|
|
|
|
|
{
|
|
|
|
|
struct sdb_file *next;
|
2000-06-06 14:08:44 +02:00
|
|
|
|
const char *name;
|
1996-11-15 23:37:40 +01:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/* This is the top of the stack. */
|
|
|
|
|
|
|
|
|
|
static struct sdb_file *current_file;
|
|
|
|
|
|
|
|
|
|
#endif /* MIPS_DEBUGGING_INFO */
|
1991-12-23 23:45:25 +01:00
|
|
|
|
|
Makefile.in (c-lex.o): Wrap long lines.
* Makefile.in (c-lex.o): Wrap long lines. Depend on debug.h.
* c-lex.c (cb_file_change, cb_define, cb_undef): Use debug
hooks directly.
* dbxout.c (dbx_debug_hooks): Add new hooks.
(dbxout_start_new_source_file): Rename dbxout_start_source_file,
make static.
(dbxout_resume_previous_source_file): Rename dbxout_end_source_file,
make static.
* dbxout.h (dbxout_start_new_source_file,
dbxout_resume_previous_source_file): Delete.
* debug.c (do_nothing_debug_hooks): Add new hooks.
(debug_nothing_init_finish): Rename debug_nothing_file_charstar.
(debug_nothing_int_charstar, debug_nothing_int): New.
* debug.h (gcc_debug_hooks): New hooks define, undef,
start_source_file and end_source_file.
(debug_nothing_init_finish): Rename debug_nothing_file_charstar.
(debug_nothing_int_charstar, debug_nothing_int): New.
* dwarf2out.c (dwarf2_debug_hooks): Add new hooks.
(dwarf2out_start_source_file, dwarf2out_end_source_file,
dwarf2out_define, dwarf2out_undef): Make static.
* dwarf2out.h (dwarf2out_start_source_file, dwarf2out_end_source_file,
dwarf2out_define, dwarf2out_undef): Remove.
* dwarfout.c (dwarf_debug_hooks): Add new hooks.
(dwarfout_start_source_file, dwarfout_end_source_file,
dwarfout_define, dwarfout_undef): Make static.
(dwarfout_start_source_file_check,
dwarfout_end_source_file_check): New.
(dwarfout_define, dwarfout_finish): Update.
* dwarfout.h (dwarfout_start_new_source_file,
dwarfout_resume_previous_source_file, dwarfout_define,
dwarfout_undef): Remove.
* sdbout.c (sdb_debug_hooks): Add new hooks.
(sdbout_start_new_source_file): Rename sdbout_start_source_file,
make static.
(sdbout_resume_previous_source_file): Rename sdbout_end_source_file,
make static, take an arg.
* sdbout.h (sdbout_start_new_source_file,
sdbout_resume_previous_source_file): Delete.
* toplev.c (debug_start_source_file, debug_end_source_file,
debug_define, debug_undef): Delete.
* toplev.h (debug_start_source_file, debug_end_source_file,
debug_define, debug_undef): Delete.
* java/jcf-parse.c: Include debug.h.
(parse_class_file): Update to use debug hooks directly.
* java/Make-lang.in (jcf-parse.o): Depend on debug.h.
From-SVN: r43952
2001-07-11 22:51:46 +02:00
|
|
|
|
/* The debug hooks structure. */
|
2002-03-12 06:40:36 +01:00
|
|
|
|
const struct gcc_debug_hooks sdb_debug_hooks =
|
Makefile.in (toplev.o, [...]): Depend on debug.h, wrap long lines.
* Makefile.in (toplev.o, sdbout.o, dbxout.o, dwarfout.o,
dwarf2out.o): Depend on debug.h, wrap long lines.
* dbxout.c: Include debug.h.
(dbx_debug_hooks): New.
(dbxout_init): Make static, take just 2 args.
(dbxout_finish): Make static.
* dbxout.h (dbxout_init, dbxout_finish): Delete.
* debug.c: New file.
* debug.h: New file.
* dwarf2out.c: Include debug.h.
(dwarf2_debug_hooks): New.
(dwarf2out_init): Make static.
(dwarf2out_finish): Make static, take 2 args.
* dwarf2out.h (dwarf2out_init, dwarf2out_finish): Delete.
* dwarfout.c: Include debug.h.
(dwarf_debug_hooks): New.
(dwarfout_init): Make static.
(dwarfout_finish): Make static, take 2 args.
* dwarfout.h (dwarfout_init, dwarfout_finish): Delete.
* sdbout.c: Include debug.h.
(sdb_debug_hooks): New.
(sdbout_init): Make static, take 2 args.
* sdbout.h (sdbout_init): Delete.
* toplev.c: Include debug.h.
(debug_hooks): New.
(compile_file): Set deubg_hooks based on command line options.
Use the hooks unconditionally rather than conditional compilation.
From-SVN: r43908
2001-07-10 20:44:34 +02:00
|
|
|
|
{
|
2001-07-22 19:02:53 +02:00
|
|
|
|
sdbout_init, /* init */
|
|
|
|
|
sdbout_finish, /* finish */
|
|
|
|
|
debug_nothing_int_charstar, /* define */
|
|
|
|
|
debug_nothing_int_charstar, /* undef */
|
|
|
|
|
sdbout_start_source_file, /* start_source_file */
|
|
|
|
|
sdbout_end_source_file, /* end_source_file */
|
|
|
|
|
sdbout_begin_block, /* begin_block */
|
|
|
|
|
sdbout_end_block, /* end_block */
|
Makefile.in (emit-rtl.o, c-decl.o): Depend on debug.h.
* Makefile.in (emit-rtl.o, c-decl.o): Depend on debug.h.
(final.o): Don't depend on xcoffout.h, dbxout.h or sdbout.h.
(toplev.o): Don't depend on xcoffout.h.
* c-decl.c: Include debug.h
(duplicate_decls): Use debug hook.
* dbxout.c (dbxout_source_file, dbxout_args): Make static.
(dbx_debug_hooks, xcoff_debug_hooks): Update.
(dbxout_types): Remove.
* dbxout.h (dbxout_source_file, dbxout_types, dbxout_args): Remove.
* debug.c (do_nothing_debug_hooks): Update.
(debug_true_tree, debug_nothing_rtx): New.
* debug.h (struct rtx_def): New.
(struct gcc_debug_hooks): New hooks ignore_block,
outlining_inline_function and label.
(debug_true_tree, debug_nothing_rtx, dwarf2out_frame_init,
dwarf2out_frame_finish): New.
* dwarf2out.c (dwarf2out_ignore_block, dwarf2out_abstract_function):
Make static, update prototype.
(dwarf2_debug_hooks): Update.
* dwarf2out.h (dwarf2out_ignore_block, dwarf2out_abstract_function,
dwarf2out_frame_init, dwarf2out_frame_finish): Remove.
* dwarfout.c (dwarf_debug_hooks): Update.
* emit-rtl.c: Include debug.h.
(remove_unnecessary_notes): Use debug hook.
* final.c: Don't include dbxout.h, xcoffout.h or sdbout.h.
(final_scan_insn): Use debug hook.
* integrate.c (output_inline_function): Use debug hook.
* sdbout.c (sdbout_toplevel_data, sdbout_label): Make static.
(sdb_debug_hooks): Update.
* sdbout.h (sdbout_label, sdbout_toplevel_data): Remove.
* toplev.c: Don't include xcoffout.h.
(note_outlining_of_inline_function, debug_ignore_block): Remove.
* toplev.h (note_outlining_of_inline_function, debug_ignore_block):
Remove.
* tree.h (dwarf2out_do_frame): Remove.
From-SVN: r44163
2001-07-19 23:17:09 +02:00
|
|
|
|
debug_true_tree, /* ignore_block */
|
2001-07-22 19:02:53 +02:00
|
|
|
|
sdbout_source_line, /* source_line */
|
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
|
|
|
|
#ifdef MIPS_DEBUGGING_INFO
|
|
|
|
|
/* Defer on MIPS systems so that parameter descriptions follow
|
|
|
|
|
function entry. */
|
|
|
|
|
debug_nothing_int_charstar, /* begin_prologue */
|
|
|
|
|
sdbout_end_prologue, /* end_prologue */
|
|
|
|
|
#else
|
|
|
|
|
sdbout_begin_prologue, /* begin_prologue */
|
2002-08-15 21:59:29 +02:00
|
|
|
|
debug_nothing_int_charstar, /* end_prologue */
|
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
|
|
|
|
#endif
|
2001-07-22 19:02:53 +02:00
|
|
|
|
sdbout_end_epilogue, /* end_epilogue */
|
|
|
|
|
sdbout_begin_function, /* begin_function */
|
|
|
|
|
sdbout_end_function, /* end_function */
|
Makefile.in (toplev.o, [...]): Don't depend on dwarfout.h.
* Makefile.in (toplev.o, dwarfout.o, final.o): Don't depend on
dwarfout.h.
* dbxout.c (dbxout_function): Rename dbxout_funciton_decl, move
to conditionally compiled block.
(dbx_debug_hooks, xcoff_debug_hooks): Update.
* dbxout.h (dbxout_function): Remove.
* debug.c (do_nothing_debug_hooks): Update.
* debug.h (struct gcc_debug_hooks): New hooks function_decl,
global_decl, deferred_inline_function.
* dwarf2out.c (dwarf2_debug_hooks): Update.
(dwarf2out_global_decl): New.
* dwarfout.c: Don't include dwarfout.h.
(dwarfout_global_decl, dwarfout_function_decl,
dwarfout_deferred_inline_function): New.
(dwarf_debug_hooks): Update.
* dwarfout.h: Remove.
* final.c: Don't include dwarfout.h.
* sdbout.c (sdbout_global_decl): New.
(sdbout_debug_hooks): Update.
* toplev.c: Don't include dwarfout.h.
(check_global_declarations, rest_of_compilation): Use new debug hooks.
(note_deferral_of_defined_inline_function): Remove.
* toplev.h (note_deferral_of_defined_inline_function): Remove.
* ch/Makefile.in (lex.o): No dependence on dwarfout.h.
* ch/lex.c: Don't include dwarfout.h.
* cp/Make-lang.in (decl2.o): No dependence on dwarfout.h, dwarf2out.h.
(semantics.o, optimize.o): Depend on debug.h not dwarfout.h.
* cp/decl2.c: Don't include dwarfout.h and dwarf2out.h.
* cp/optimize.c: Include debug.h.
(maybe_clone_body): Use debug hook.
* cp/semantics.c: Include debug.h.
(expand_body): Use debug hook.
* po/POTFILES.in: Remove dwarfout.h.
From-SVN: r44145
2001-07-19 08:22:04 +02:00
|
|
|
|
debug_nothing_tree, /* function_decl */
|
2001-07-22 19:02:53 +02:00
|
|
|
|
sdbout_global_decl, /* global_decl */
|
Makefile.in (emit-rtl.o, c-decl.o): Depend on debug.h.
* Makefile.in (emit-rtl.o, c-decl.o): Depend on debug.h.
(final.o): Don't depend on xcoffout.h, dbxout.h or sdbout.h.
(toplev.o): Don't depend on xcoffout.h.
* c-decl.c: Include debug.h
(duplicate_decls): Use debug hook.
* dbxout.c (dbxout_source_file, dbxout_args): Make static.
(dbx_debug_hooks, xcoff_debug_hooks): Update.
(dbxout_types): Remove.
* dbxout.h (dbxout_source_file, dbxout_types, dbxout_args): Remove.
* debug.c (do_nothing_debug_hooks): Update.
(debug_true_tree, debug_nothing_rtx): New.
* debug.h (struct rtx_def): New.
(struct gcc_debug_hooks): New hooks ignore_block,
outlining_inline_function and label.
(debug_true_tree, debug_nothing_rtx, dwarf2out_frame_init,
dwarf2out_frame_finish): New.
* dwarf2out.c (dwarf2out_ignore_block, dwarf2out_abstract_function):
Make static, update prototype.
(dwarf2_debug_hooks): Update.
* dwarf2out.h (dwarf2out_ignore_block, dwarf2out_abstract_function,
dwarf2out_frame_init, dwarf2out_frame_finish): Remove.
* dwarfout.c (dwarf_debug_hooks): Update.
* emit-rtl.c: Include debug.h.
(remove_unnecessary_notes): Use debug hook.
* final.c: Don't include dbxout.h, xcoffout.h or sdbout.h.
(final_scan_insn): Use debug hook.
* integrate.c (output_inline_function): Use debug hook.
* sdbout.c (sdbout_toplevel_data, sdbout_label): Make static.
(sdb_debug_hooks): Update.
* sdbout.h (sdbout_label, sdbout_toplevel_data): Remove.
* toplev.c: Don't include xcoffout.h.
(note_outlining_of_inline_function, debug_ignore_block): Remove.
* toplev.h (note_outlining_of_inline_function, debug_ignore_block):
Remove.
* tree.h (dwarf2out_do_frame): Remove.
From-SVN: r44163
2001-07-19 23:17:09 +02:00
|
|
|
|
debug_nothing_tree, /* deferred_inline_function */
|
|
|
|
|
debug_nothing_tree, /* outlining_inline_function */
|
|
|
|
|
sdbout_label
|
Makefile.in (toplev.o, [...]): Depend on debug.h, wrap long lines.
* Makefile.in (toplev.o, sdbout.o, dbxout.o, dwarfout.o,
dwarf2out.o): Depend on debug.h, wrap long lines.
* dbxout.c: Include debug.h.
(dbx_debug_hooks): New.
(dbxout_init): Make static, take just 2 args.
(dbxout_finish): Make static.
* dbxout.h (dbxout_init, dbxout_finish): Delete.
* debug.c: New file.
* debug.h: New file.
* dwarf2out.c: Include debug.h.
(dwarf2_debug_hooks): New.
(dwarf2out_init): Make static.
(dwarf2out_finish): Make static, take 2 args.
* dwarf2out.h (dwarf2out_init, dwarf2out_finish): Delete.
* dwarfout.c: Include debug.h.
(dwarf_debug_hooks): New.
(dwarfout_init): Make static.
(dwarfout_finish): Make static, take 2 args.
* dwarfout.h (dwarfout_init, dwarfout_finish): Delete.
* sdbout.c: Include debug.h.
(sdb_debug_hooks): New.
(sdbout_init): Make static, take 2 args.
* sdbout.h (sdbout_init): Delete.
* toplev.c: Include debug.h.
(debug_hooks): New.
(compile_file): Set deubg_hooks based on command line options.
Use the hooks unconditionally rather than conditional compilation.
From-SVN: r43908
2001-07-10 20:44:34 +02:00
|
|
|
|
};
|
|
|
|
|
|
1991-12-23 23:45:25 +01:00
|
|
|
|
#if 0
|
|
|
|
|
|
|
|
|
|
/* return the tag identifier for type
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
char *
|
|
|
|
|
tag_of_ru_type (type,link)
|
|
|
|
|
tree type,link;
|
|
|
|
|
{
|
|
|
|
|
if (TYPE_SYMTAB_ADDRESS (type))
|
1993-10-12 22:06:37 +01:00
|
|
|
|
return TYPE_SYMTAB_ADDRESS (type);
|
1991-12-23 23:45:25 +01:00
|
|
|
|
if (link && TREE_PURPOSE (link)
|
|
|
|
|
&& IDENTIFIER_POINTER (TREE_PURPOSE (link)))
|
1993-10-12 22:06:37 +01:00
|
|
|
|
TYPE_SYMTAB_ADDRESS (type) = IDENTIFIER_POINTER (TREE_PURPOSE (link));
|
1991-12-23 23:45:25 +01:00
|
|
|
|
else
|
|
|
|
|
return (char *) TYPE_SYMTAB_ADDRESS (type);
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
/* Return a unique string to name an anonymous type. */
|
|
|
|
|
|
|
|
|
|
static char *
|
|
|
|
|
gen_fake_label ()
|
|
|
|
|
{
|
|
|
|
|
char label[10];
|
|
|
|
|
char *labelstr;
|
|
|
|
|
SDB_GENERATE_FAKE (label, unnamed_struct_number);
|
|
|
|
|
unnamed_struct_number++;
|
2002-08-05 00:45:31 +02:00
|
|
|
|
labelstr = xstrdup (label);
|
1991-12-23 23:45:25 +01:00
|
|
|
|
return labelstr;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Return the number which describes TYPE for SDB.
|
|
|
|
|
For pointers, etc., this function is recursive.
|
|
|
|
|
Each record, union or enumeral type must already have had a
|
|
|
|
|
tag number output. */
|
|
|
|
|
|
|
|
|
|
/* The number is given by d6d5d4d3d2d1bbbb
|
|
|
|
|
where bbbb is 4 bit basic type, and di indicate one of notype,ptr,fn,array.
|
|
|
|
|
Thus, char *foo () has bbbb=T_CHAR
|
|
|
|
|
d1=D_FCN
|
|
|
|
|
d2=D_PTR
|
|
|
|
|
N_BTMASK= 017 1111 basic type field.
|
|
|
|
|
N_TSHIFT= 2 derived type shift
|
|
|
|
|
N_BTSHFT= 4 Basic type shift */
|
|
|
|
|
|
|
|
|
|
/* Produce the number that describes a pointer, function or array type.
|
|
|
|
|
PREV is the number describing the target, value or element type.
|
|
|
|
|
DT_type describes how to transform that type. */
|
1993-03-09 01:10:48 +01:00
|
|
|
|
#define PUSH_DERIVED_LEVEL(DT_type,PREV) \
|
2002-01-22 15:33:35 +01:00
|
|
|
|
((((PREV) & ~(int) N_BTMASK) << (int) N_TSHIFT) \
|
|
|
|
|
| ((int) DT_type << (int) N_BTSHFT) \
|
|
|
|
|
| ((PREV) & (int) N_BTMASK))
|
1991-12-23 23:45:25 +01:00
|
|
|
|
|
|
|
|
|
/* Number of elements used in sdb_dims. */
|
|
|
|
|
static int sdb_n_dims = 0;
|
|
|
|
|
|
|
|
|
|
/* Table of array dimensions of current type. */
|
|
|
|
|
static int sdb_dims[SDB_MAX_DIM];
|
|
|
|
|
|
|
|
|
|
/* Size of outermost array currently being processed. */
|
|
|
|
|
static int sdb_type_size = -1;
|
|
|
|
|
|
|
|
|
|
static int
|
|
|
|
|
plain_type (type)
|
|
|
|
|
tree type;
|
|
|
|
|
{
|
1995-05-04 20:14:53 +02:00
|
|
|
|
int val = plain_type_1 (type, 0);
|
1991-12-23 23:45:25 +01:00
|
|
|
|
|
|
|
|
|
/* If we have already saved up some array dimensions, print them now. */
|
|
|
|
|
if (sdb_n_dims > 0)
|
|
|
|
|
{
|
|
|
|
|
int i;
|
|
|
|
|
PUT_SDB_START_DIM;
|
|
|
|
|
for (i = sdb_n_dims - 1; i > 0; i--)
|
|
|
|
|
PUT_SDB_NEXT_DIM (sdb_dims[i]);
|
|
|
|
|
PUT_SDB_LAST_DIM (sdb_dims[0]);
|
|
|
|
|
sdb_n_dims = 0;
|
|
|
|
|
|
|
|
|
|
sdb_type_size = int_size_in_bytes (type);
|
|
|
|
|
/* Don't kill sdb if type is not laid out or has variable size. */
|
|
|
|
|
if (sdb_type_size < 0)
|
|
|
|
|
sdb_type_size = 0;
|
|
|
|
|
}
|
|
|
|
|
/* If we have computed the size of an array containing this type,
|
|
|
|
|
print it now. */
|
|
|
|
|
if (sdb_type_size >= 0)
|
|
|
|
|
{
|
|
|
|
|
PUT_SDB_SIZE (sdb_type_size);
|
|
|
|
|
sdb_type_size = -1;
|
|
|
|
|
}
|
|
|
|
|
return val;
|
|
|
|
|
}
|
|
|
|
|
|
1992-11-24 06:18:35 +01:00
|
|
|
|
static int
|
|
|
|
|
template_name_p (name)
|
|
|
|
|
tree name;
|
|
|
|
|
{
|
2001-10-11 05:16:15 +02:00
|
|
|
|
const char *ptr = IDENTIFIER_POINTER (name);
|
1992-11-24 06:18:35 +01:00
|
|
|
|
while (*ptr && *ptr != '<')
|
|
|
|
|
ptr++;
|
|
|
|
|
|
|
|
|
|
return *ptr != '\0';
|
|
|
|
|
}
|
|
|
|
|
|
1991-12-23 23:45:25 +01:00
|
|
|
|
static void
|
|
|
|
|
sdbout_record_type_name (type)
|
|
|
|
|
tree type;
|
|
|
|
|
{
|
2002-01-12 15:05:32 +01:00
|
|
|
|
const char *name = 0;
|
1991-12-23 23:45:25 +01:00
|
|
|
|
int no_name;
|
|
|
|
|
|
|
|
|
|
if (KNOWN_TYPE_TAG (type))
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
if (TYPE_NAME (type) != 0)
|
|
|
|
|
{
|
|
|
|
|
tree t = 0;
|
2002-01-12 15:05:32 +01:00
|
|
|
|
|
1991-12-23 23:45:25 +01:00
|
|
|
|
/* Find the IDENTIFIER_NODE for the type name. */
|
|
|
|
|
if (TREE_CODE (TYPE_NAME (type)) == IDENTIFIER_NODE)
|
1995-04-12 20:35:15 +02:00
|
|
|
|
t = TYPE_NAME (type);
|
1995-03-10 20:37:52 +01:00
|
|
|
|
else if (TREE_CODE (TYPE_NAME (type)) == TYPE_DECL)
|
1991-12-23 23:45:25 +01:00
|
|
|
|
{
|
|
|
|
|
t = DECL_NAME (TYPE_NAME (type));
|
1992-11-24 06:18:35 +01:00
|
|
|
|
/* The DECL_NAME for templates includes "<>", which breaks
|
|
|
|
|
most assemblers. Use its assembler name instead, which
|
|
|
|
|
has been mangled into being safe. */
|
|
|
|
|
if (t && template_name_p (t))
|
|
|
|
|
t = DECL_ASSEMBLER_NAME (TYPE_NAME (type));
|
1991-12-23 23:45:25 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Now get the name as a string, or invent one. */
|
1992-11-24 06:18:35 +01:00
|
|
|
|
if (t != NULL_TREE)
|
1991-12-23 23:45:25 +01:00
|
|
|
|
name = IDENTIFIER_POINTER (t);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
no_name = (name == 0 || *name == 0);
|
|
|
|
|
if (no_name)
|
|
|
|
|
name = gen_fake_label ();
|
|
|
|
|
|
|
|
|
|
SET_KNOWN_TYPE_TAG (type, name);
|
|
|
|
|
#ifdef SDB_ALLOW_FORWARD_REFERENCES
|
|
|
|
|
if (no_name)
|
|
|
|
|
sdbout_queue_anonymous_type (type);
|
|
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
|
|
1995-05-04 20:14:53 +02:00
|
|
|
|
/* Return the .type value for type TYPE.
|
|
|
|
|
|
|
|
|
|
LEVEL indicates how many levels deep we have recursed into the type.
|
|
|
|
|
The SDB debug format can only represent 6 derived levels of types.
|
|
|
|
|
After that, we must output inaccurate debug info. We deliberately
|
|
|
|
|
stop before the 7th level, so that ADA recursive types will not give an
|
|
|
|
|
infinite loop. */
|
|
|
|
|
|
1991-12-23 23:45:25 +01:00
|
|
|
|
static int
|
1995-05-04 20:14:53 +02:00
|
|
|
|
plain_type_1 (type, level)
|
1991-12-23 23:45:25 +01:00
|
|
|
|
tree type;
|
1995-05-04 20:14:53 +02:00
|
|
|
|
int level;
|
1991-12-23 23:45:25 +01:00
|
|
|
|
{
|
|
|
|
|
if (type == 0)
|
|
|
|
|
type = void_type_node;
|
1995-05-04 20:14:53 +02:00
|
|
|
|
else if (type == error_mark_node)
|
1991-12-23 23:45:25 +01:00
|
|
|
|
type = integer_type_node;
|
1995-05-04 20:14:53 +02:00
|
|
|
|
else
|
|
|
|
|
type = TYPE_MAIN_VARIANT (type);
|
1991-12-23 23:45:25 +01:00
|
|
|
|
|
|
|
|
|
switch (TREE_CODE (type))
|
|
|
|
|
{
|
|
|
|
|
case VOID_TYPE:
|
|
|
|
|
return T_VOID;
|
1999-03-11 00:30:08 +01:00
|
|
|
|
case BOOLEAN_TYPE:
|
1991-12-23 23:45:25 +01:00
|
|
|
|
case INTEGER_TYPE:
|
|
|
|
|
{
|
|
|
|
|
int size = int_size_in_bytes (type) * BITS_PER_UNIT;
|
1993-01-02 01:39:33 +01:00
|
|
|
|
|
|
|
|
|
/* Carefully distinguish all the standard types of C,
|
|
|
|
|
without messing up if the language is not C.
|
|
|
|
|
Note that we check only for the names that contain spaces;
|
|
|
|
|
other names might occur by coincidence in other languages. */
|
|
|
|
|
if (TYPE_NAME (type) != 0
|
|
|
|
|
&& TREE_CODE (TYPE_NAME (type)) == TYPE_DECL
|
|
|
|
|
&& DECL_NAME (TYPE_NAME (type)) != 0
|
|
|
|
|
&& TREE_CODE (DECL_NAME (TYPE_NAME (type))) == IDENTIFIER_NODE)
|
|
|
|
|
{
|
c-parse.in (yyerror): Const-ification and/or static-ization.
* c-parse.in (yyerror): Const-ification and/or static-ization.
* c-typeck.c (push_member_name): Likewise.
* collect2.c (main): Likewise.
* dbxout.c (dbxout_parms): Likewise.
* diagnostic.c (format_with_decl): Likewise.
* dwarf2out.c (output_ranges): Likewise.
* dwarfout.c (fundamental_type_code): Likewise.
* except.c (dw2_output_call_site_table): Likewise.
* gcc.c (do_spec_1): Likewise.
* genopinit.c (optabs): Likewise.
* objc/objc-act.c (synth_id_with_class_suffix, start_class,
gen_declaration_1, handle_impent): Likewise.
* protoize.c (default_include, in_system_include_dir, abspath):
Likewise.
* sched-vis.c (visualize_stall_cycles): Likewise.
* sdbout.c (plain_type_1, sdbout_end_function,
sdbout_end_epilogue): Likewise.
* varasm.c (decode_reg_name): Likewise.
* 1750a.c (mod_regno_adjust): Likewise.
* alpha.c (alpha_write_one_linkage,
unicosmk_output_default_externs): Likewise.
* arm.c (arm_condition_codes): Likewise.
* arm.h (arm_condition_codes): Likewise.
* avr.c (output_movsisf, encode_section_info): Likewise.
* darwin.h (GEN_BINDER_NAME_FOR_STUB, GEN_SYMBOL_NAME_FOR_SYMBOL):
Likewise.
* i386.c (hi_reg_name, qi_reg_name, qi_high_reg_name): Likewise.
* i386.h (hi_reg_name, qi_reg_name, qi_high_reg_name): Likewise.
* m88k.c (output_function_profiler): Likewise.
* mips.c (mips_output_conditional_branch): Likewise.
* ns32k.c (ns32k_out_reg_names): Likewise.
* ns32k.h (ns32k_out_reg_names): Likewise.
* pj.c (pj_output_rval): Likewise.
* rs6000.c (GEN_LOCAL_LABEL_FOR_SYMBOL): Likewise.
* sparc.c (sparc_flat_function_prologue,
sparc_flat_function_epilogue): Likewise.
cp:
* decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
Const-ification.
* pt.c (tsubst_decl): Likewise.
f:
* bad.c (ffebad_finish): Const-ification and/or static-ization.
* intrin.c (ffeintrin_cmp_name_): Likewise.
* stc.c (ffestc_R904): Likewise.
java:
* expr.c (expand_invoke): Const-ification.
* parse.y (patch_method_invocation): Likewise.
From-SVN: r45581
2001-09-13 16:37:29 +02:00
|
|
|
|
const char *const name
|
2000-10-20 21:17:41 +02:00
|
|
|
|
= IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (type)));
|
1993-01-02 01:39:33 +01:00
|
|
|
|
|
1998-01-14 21:57:58 +01:00
|
|
|
|
if (!strcmp (name, "char"))
|
|
|
|
|
return T_CHAR;
|
1993-01-02 01:39:33 +01:00
|
|
|
|
if (!strcmp (name, "unsigned char"))
|
|
|
|
|
return T_UCHAR;
|
|
|
|
|
if (!strcmp (name, "signed char"))
|
|
|
|
|
return T_CHAR;
|
1998-01-14 21:57:58 +01:00
|
|
|
|
if (!strcmp (name, "int"))
|
|
|
|
|
return T_INT;
|
1993-01-02 01:39:33 +01:00
|
|
|
|
if (!strcmp (name, "unsigned int"))
|
|
|
|
|
return T_UINT;
|
|
|
|
|
if (!strcmp (name, "short int"))
|
|
|
|
|
return T_SHORT;
|
|
|
|
|
if (!strcmp (name, "short unsigned int"))
|
|
|
|
|
return T_USHORT;
|
|
|
|
|
if (!strcmp (name, "long int"))
|
|
|
|
|
return T_LONG;
|
|
|
|
|
if (!strcmp (name, "long unsigned int"))
|
|
|
|
|
return T_ULONG;
|
|
|
|
|
}
|
|
|
|
|
|
1998-01-14 21:57:58 +01:00
|
|
|
|
if (size == INT_TYPE_SIZE)
|
|
|
|
|
return (TREE_UNSIGNED (type) ? T_UINT : T_INT);
|
1991-12-23 23:45:25 +01:00
|
|
|
|
if (size == CHAR_TYPE_SIZE)
|
|
|
|
|
return (TREE_UNSIGNED (type) ? T_UCHAR : T_CHAR);
|
|
|
|
|
if (size == SHORT_TYPE_SIZE)
|
|
|
|
|
return (TREE_UNSIGNED (type) ? T_USHORT : T_SHORT);
|
1992-11-10 22:27:39 +01:00
|
|
|
|
if (size == LONG_TYPE_SIZE)
|
|
|
|
|
return (TREE_UNSIGNED (type) ? T_ULONG : T_LONG);
|
1995-01-14 02:40:18 +01:00
|
|
|
|
if (size == LONG_LONG_TYPE_SIZE) /* better than nothing */
|
|
|
|
|
return (TREE_UNSIGNED (type) ? T_ULONG : T_LONG);
|
1991-12-23 23:45:25 +01:00
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
case REAL_TYPE:
|
|
|
|
|
{
|
1996-06-08 02:12:38 +02:00
|
|
|
|
int precision = TYPE_PRECISION (type);
|
|
|
|
|
if (precision == FLOAT_TYPE_SIZE)
|
1991-12-23 23:45:25 +01:00
|
|
|
|
return T_FLOAT;
|
1996-06-08 02:12:38 +02:00
|
|
|
|
if (precision == DOUBLE_TYPE_SIZE)
|
1991-12-23 23:45:25 +01:00
|
|
|
|
return T_DOUBLE;
|
1996-06-08 02:12:38 +02:00
|
|
|
|
#ifdef EXTENDED_SDB_BASIC_TYPES
|
|
|
|
|
if (precision == LONG_DOUBLE_TYPE_SIZE)
|
|
|
|
|
return T_LNGDBL;
|
1998-04-04 15:32:39 +02:00
|
|
|
|
#else
|
|
|
|
|
if (precision == LONG_DOUBLE_TYPE_SIZE)
|
|
|
|
|
return T_DOUBLE; /* better than nothing */
|
1996-06-08 02:12:38 +02:00
|
|
|
|
#endif
|
1991-12-23 23:45:25 +01:00
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
case ARRAY_TYPE:
|
|
|
|
|
{
|
|
|
|
|
int m;
|
1995-05-04 20:14:53 +02:00
|
|
|
|
if (level >= 6)
|
|
|
|
|
return T_VOID;
|
|
|
|
|
else
|
|
|
|
|
m = plain_type_1 (TREE_TYPE (type), level+1);
|
1991-12-23 23:45:25 +01:00
|
|
|
|
if (sdb_n_dims < SDB_MAX_DIM)
|
|
|
|
|
sdb_dims[sdb_n_dims++]
|
|
|
|
|
= (TYPE_DOMAIN (type)
|
* Clean up usages of TREE_INT_CST_LOW.
* c-parse.in (RESTORE_WARN_FLAGS): Use tree_low_cst.
* c-parse.y, c-parse.c, objc/objc-parse.y, objc/objc-parse.c:
Regenerated.
* c-tree.h (min_precision): Move declaration to here.
* c-typeck.c (build_binary_op): Use host_integerp and tree_low_cst.
(build_unary_op, add_pending_init): Use bit_position.
(pending_init_member, process_init_element): Likewise.
(really_start_incremental_init, push_init_level, pop_init_level):
Don't make copies of nodes or modify them in place, use consistent
types when tracking positions, and use tree routines computations.
(set_init_index, output_init_element): Likewise.
(output_pending_init_elements, process_init_element): Likewise.
* dbxout.c (dbxout_type_fields): Use bit_position, host_integerp,
tree_low_cst and int_bit_position; also minor cleanup.
(dbxout_type_method_1, dbxout_range_type, dbxout_type): Likewise.
(print_cst_octal): Precision is unsigned.
(dbxout_symbol): Ensure DECL_INITIAL is in-range and use tree_low_cst.
* dwarf2out.c (ceiling): Input and output are unsigned HOST_WIDE_INT.
(simple_type_align_in_bits): Result is unsigned int.
Use tree_int_low_cst and host_integerp.
(simple_type_size_in_bits): Result is unsigned HOST_WIDE_INT.
(field_byte_offset): Result is HOST_WIDE_INT.
Change types of internal variables so alignments are unsigned int,
offsets are HOST_WIDE_INT and sizes are unsigned HOST_WIDE_INT.
Use host_integerp, tree_low_cst, and int_bit_position.
(add_bit_offset_attribute): Likewise.
(add_data_member_location_attribute): Use tree_cst_low.
(add_bound_info): Use host_integerp, integer_zerop, and integer_onep.
(add_bit_size_attribute): Use tree_low_cst.
(add_pure_or_virtual_attribute, gen_enumeration_type_die): Likewise.
* dwarfout.c: Similar changes to dwarf2out.c.
* expr.c (expand_expr, case ARRAY_REF): Remove redundant code.
* genoutput.c (n_occurences): Return -1 for null string.
(strip_whitespace): Accept null string and make into function.
(scan_operands): Reflect above changes.
* sdbout.c (plain_type_1): Use host_integerp and tree_low_cst.
(sdbout_field_types, sdbout_one_type): Likewise; also use bit_position.
* ssa.c (rename_registers): Add missing cast of arg to bzero.
* tree.c (int_size_in_bytes): Check for too big to represent.
(bit_position, int_bit_position, host_integerp, tree_low_cst): New fns.
* tree.h (host_integerp, tree_low_cst, bit_position, int_bit_position):
New declarations.
(min_precision): Delete from here.
* varasm.c (decode_addr_const): Use host_integerp, bit_position,
and int_bit_position.
* objc/objc-act.c (encode_method_prototype): Sizes are HOST_WIDE_INT.
(encode_method_def): Likewise.
(build_ivar_list_initializer): Use int_bit_position.
(generate_shared_structures): Convert size.
(encode_type, encode_complete_bitfield): Use integer_zerop.
(encode_bitfield): Use tree_low_cst and int_bit_position.
* ch/typeck.c (min_precision): New function.
(build_chill_slice): Use host_integerp and tree_low_cst.
(expand_constant_to_buffer): Likewise and also int_bit_position.
LO is unsigned HOST_WIDE_INT
(build_chill_array_ref_1): Make `i' be HOST_WIDE_INT; use tree_low_cst.
(extract_constant_from_buffer): Sizes are now HOST_WIDE_INT.
Use host_integerp and tree_low_cst.
(build_chill_bin_type): Use host_integerp and tree_low_cst.
(layout_chill_range_type): Use tree_int_cst_sgn, compare_tree_int,
tree_low_cst, and min_precision.
(apply_chill_array_layout): Cleanups for types of variables
and use tree_int_cst_sgn, compare_tree_int, and tree_low_cst.
(apply_chill_field_layout): Likewise.
* cp/class.c (build_vbase_path): Use integer_zerop.
(build_vtable_entry): Use tree_low_cst.
(get_vfield_offset): Use bit_position.
(dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
Use tree_low_cst.
(check_bitfield_decl): Set DECL_SIZE using convert.
(build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
(layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
Use tree_low_cst.
(finish_struct_1): Use bit_position.
(dump_class_hierarchy): Use tree_low_cst.
* cp/cp-tree.h (min_precision): Add declaration.
* cp/decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
* cp/error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
(dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
* cp/expr.c (cplus_expand_constant): Use bit_position.
* cp/init.c (build_vec_init): Use host_integerp and tree_low_cst.
* cp/rtti.c (get_base_offset): Use bit_position.
* cp/typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
host_integerp, and tree_low_cst.
(pointer_int_sum): Use integer_zerop.
(build_component_addr): Use bit_position.
* java/class.c (make_field_value): Properly handle sizes.
(get_dispatch_vector): Use tree_low_cst and host_integerp.
(layout_class_method): Count using trees.
* java/decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with
copy_node.
* java/expr.c (java_array_data_offset): Use int_bit_position.
(build_newarray, build_anewarray): Use host_integerp and tree_low_cst.
(build_invokevirtual): Use tree_low_cst and do computations with trees.
From-SVN: r32607
2000-03-17 18:31:58 +01:00
|
|
|
|
&& TYPE_MIN_VALUE (TYPE_DOMAIN (type)) != 0
|
|
|
|
|
&& TYPE_MAX_VALUE (TYPE_DOMAIN (type)) != 0
|
|
|
|
|
&& host_integerp (TYPE_MAX_VALUE (TYPE_DOMAIN (type)), 0)
|
|
|
|
|
&& host_integerp (TYPE_MIN_VALUE (TYPE_DOMAIN (type)), 0)
|
|
|
|
|
? (tree_low_cst (TYPE_MAX_VALUE (TYPE_DOMAIN (type)), 0)
|
|
|
|
|
- tree_low_cst (TYPE_MIN_VALUE (TYPE_DOMAIN (type)), 0) + 1)
|
1991-12-23 23:45:25 +01:00
|
|
|
|
: 0);
|
* Clean up usages of TREE_INT_CST_LOW.
* c-parse.in (RESTORE_WARN_FLAGS): Use tree_low_cst.
* c-parse.y, c-parse.c, objc/objc-parse.y, objc/objc-parse.c:
Regenerated.
* c-tree.h (min_precision): Move declaration to here.
* c-typeck.c (build_binary_op): Use host_integerp and tree_low_cst.
(build_unary_op, add_pending_init): Use bit_position.
(pending_init_member, process_init_element): Likewise.
(really_start_incremental_init, push_init_level, pop_init_level):
Don't make copies of nodes or modify them in place, use consistent
types when tracking positions, and use tree routines computations.
(set_init_index, output_init_element): Likewise.
(output_pending_init_elements, process_init_element): Likewise.
* dbxout.c (dbxout_type_fields): Use bit_position, host_integerp,
tree_low_cst and int_bit_position; also minor cleanup.
(dbxout_type_method_1, dbxout_range_type, dbxout_type): Likewise.
(print_cst_octal): Precision is unsigned.
(dbxout_symbol): Ensure DECL_INITIAL is in-range and use tree_low_cst.
* dwarf2out.c (ceiling): Input and output are unsigned HOST_WIDE_INT.
(simple_type_align_in_bits): Result is unsigned int.
Use tree_int_low_cst and host_integerp.
(simple_type_size_in_bits): Result is unsigned HOST_WIDE_INT.
(field_byte_offset): Result is HOST_WIDE_INT.
Change types of internal variables so alignments are unsigned int,
offsets are HOST_WIDE_INT and sizes are unsigned HOST_WIDE_INT.
Use host_integerp, tree_low_cst, and int_bit_position.
(add_bit_offset_attribute): Likewise.
(add_data_member_location_attribute): Use tree_cst_low.
(add_bound_info): Use host_integerp, integer_zerop, and integer_onep.
(add_bit_size_attribute): Use tree_low_cst.
(add_pure_or_virtual_attribute, gen_enumeration_type_die): Likewise.
* dwarfout.c: Similar changes to dwarf2out.c.
* expr.c (expand_expr, case ARRAY_REF): Remove redundant code.
* genoutput.c (n_occurences): Return -1 for null string.
(strip_whitespace): Accept null string and make into function.
(scan_operands): Reflect above changes.
* sdbout.c (plain_type_1): Use host_integerp and tree_low_cst.
(sdbout_field_types, sdbout_one_type): Likewise; also use bit_position.
* ssa.c (rename_registers): Add missing cast of arg to bzero.
* tree.c (int_size_in_bytes): Check for too big to represent.
(bit_position, int_bit_position, host_integerp, tree_low_cst): New fns.
* tree.h (host_integerp, tree_low_cst, bit_position, int_bit_position):
New declarations.
(min_precision): Delete from here.
* varasm.c (decode_addr_const): Use host_integerp, bit_position,
and int_bit_position.
* objc/objc-act.c (encode_method_prototype): Sizes are HOST_WIDE_INT.
(encode_method_def): Likewise.
(build_ivar_list_initializer): Use int_bit_position.
(generate_shared_structures): Convert size.
(encode_type, encode_complete_bitfield): Use integer_zerop.
(encode_bitfield): Use tree_low_cst and int_bit_position.
* ch/typeck.c (min_precision): New function.
(build_chill_slice): Use host_integerp and tree_low_cst.
(expand_constant_to_buffer): Likewise and also int_bit_position.
LO is unsigned HOST_WIDE_INT
(build_chill_array_ref_1): Make `i' be HOST_WIDE_INT; use tree_low_cst.
(extract_constant_from_buffer): Sizes are now HOST_WIDE_INT.
Use host_integerp and tree_low_cst.
(build_chill_bin_type): Use host_integerp and tree_low_cst.
(layout_chill_range_type): Use tree_int_cst_sgn, compare_tree_int,
tree_low_cst, and min_precision.
(apply_chill_array_layout): Cleanups for types of variables
and use tree_int_cst_sgn, compare_tree_int, and tree_low_cst.
(apply_chill_field_layout): Likewise.
* cp/class.c (build_vbase_path): Use integer_zerop.
(build_vtable_entry): Use tree_low_cst.
(get_vfield_offset): Use bit_position.
(dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
Use tree_low_cst.
(check_bitfield_decl): Set DECL_SIZE using convert.
(build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
(layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
Use tree_low_cst.
(finish_struct_1): Use bit_position.
(dump_class_hierarchy): Use tree_low_cst.
* cp/cp-tree.h (min_precision): Add declaration.
* cp/decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
* cp/error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
(dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
* cp/expr.c (cplus_expand_constant): Use bit_position.
* cp/init.c (build_vec_init): Use host_integerp and tree_low_cst.
* cp/rtti.c (get_base_offset): Use bit_position.
* cp/typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
host_integerp, and tree_low_cst.
(pointer_int_sum): Use integer_zerop.
(build_component_addr): Use bit_position.
* java/class.c (make_field_value): Properly handle sizes.
(get_dispatch_vector): Use tree_low_cst and host_integerp.
(layout_class_method): Count using trees.
* java/decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with
copy_node.
* java/expr.c (java_array_data_offset): Use int_bit_position.
(build_newarray, build_anewarray): Use host_integerp and tree_low_cst.
(build_invokevirtual): Use tree_low_cst and do computations with trees.
From-SVN: r32607
2000-03-17 18:31:58 +01:00
|
|
|
|
|
1991-12-23 23:45:25 +01:00
|
|
|
|
return PUSH_DERIVED_LEVEL (DT_ARY, m);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
case RECORD_TYPE:
|
|
|
|
|
case UNION_TYPE:
|
1993-04-13 12:47:33 +02:00
|
|
|
|
case QUAL_UNION_TYPE:
|
1991-12-23 23:45:25 +01:00
|
|
|
|
case ENUMERAL_TYPE:
|
|
|
|
|
{
|
|
|
|
|
char *tag;
|
|
|
|
|
#ifdef SDB_ALLOW_FORWARD_REFERENCES
|
|
|
|
|
sdbout_record_type_name (type);
|
|
|
|
|
#endif
|
|
|
|
|
#ifndef SDB_ALLOW_UNKNOWN_REFERENCES
|
|
|
|
|
if ((TREE_ASM_WRITTEN (type) && KNOWN_TYPE_TAG (type) != 0)
|
|
|
|
|
#ifdef SDB_ALLOW_FORWARD_REFERENCES
|
|
|
|
|
|| TYPE_MODE (type) != VOIDmode
|
|
|
|
|
#endif
|
|
|
|
|
)
|
|
|
|
|
#endif
|
|
|
|
|
{
|
|
|
|
|
/* Output the referenced structure tag name
|
|
|
|
|
only if the .def has already been finished.
|
|
|
|
|
At least on 386, the Unix assembler
|
|
|
|
|
cannot handle forward references to tags. */
|
1996-07-04 00:07:53 +02:00
|
|
|
|
/* But the 88100, it requires them, sigh... */
|
|
|
|
|
/* And the MIPS requires unknown refs as well... */
|
1991-12-23 23:45:25 +01:00
|
|
|
|
tag = KNOWN_TYPE_TAG (type);
|
|
|
|
|
PUT_SDB_TAG (tag);
|
|
|
|
|
/* These 3 lines used to follow the close brace.
|
|
|
|
|
However, a size of 0 without a tag implies a tag of 0,
|
|
|
|
|
so if we don't know a tag, we can't mention the size. */
|
|
|
|
|
sdb_type_size = int_size_in_bytes (type);
|
|
|
|
|
if (sdb_type_size < 0)
|
|
|
|
|
sdb_type_size = 0;
|
|
|
|
|
}
|
|
|
|
|
return ((TREE_CODE (type) == RECORD_TYPE) ? T_STRUCT
|
|
|
|
|
: (TREE_CODE (type) == UNION_TYPE) ? T_UNION
|
1993-04-13 12:47:33 +02:00
|
|
|
|
: (TREE_CODE (type) == QUAL_UNION_TYPE) ? T_UNION
|
1991-12-23 23:45:25 +01:00
|
|
|
|
: T_ENUM);
|
|
|
|
|
}
|
|
|
|
|
case POINTER_TYPE:
|
|
|
|
|
case REFERENCE_TYPE:
|
|
|
|
|
{
|
1995-05-04 20:14:53 +02:00
|
|
|
|
int m;
|
|
|
|
|
if (level >= 6)
|
|
|
|
|
return T_VOID;
|
|
|
|
|
else
|
|
|
|
|
m = plain_type_1 (TREE_TYPE (type), level+1);
|
1991-12-23 23:45:25 +01:00
|
|
|
|
return PUSH_DERIVED_LEVEL (DT_PTR, m);
|
|
|
|
|
}
|
|
|
|
|
case FUNCTION_TYPE:
|
|
|
|
|
case METHOD_TYPE:
|
|
|
|
|
{
|
1995-05-04 20:14:53 +02:00
|
|
|
|
int m;
|
|
|
|
|
if (level >= 6)
|
|
|
|
|
return T_VOID;
|
|
|
|
|
else
|
|
|
|
|
m = plain_type_1 (TREE_TYPE (type), level+1);
|
1991-12-23 23:45:25 +01:00
|
|
|
|
return PUSH_DERIVED_LEVEL (DT_FCN, m);
|
|
|
|
|
}
|
|
|
|
|
default:
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* 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
|
|
|
|
|
sdbout_block (block)
|
2001-10-11 05:16:15 +02:00
|
|
|
|
tree block;
|
1991-12-23 23:45:25 +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. */
|
2000-02-28 10:51:42 +01:00
|
|
|
|
if (BLOCK_NUMBER (block) == do_block)
|
|
|
|
|
sdbout_syms (BLOCK_VARS (block));
|
1991-12-23 23:45:25 +01:00
|
|
|
|
|
|
|
|
|
/* If we are past the specified block, stop the scan. */
|
2000-02-28 10:51:42 +01:00
|
|
|
|
if (BLOCK_NUMBER (block) > do_block)
|
1991-12-23 23:45:25 +01:00
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
/* Scan the blocks within this block. */
|
|
|
|
|
sdbout_block (BLOCK_SUBBLOCKS (block));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
block = BLOCK_CHAIN (block);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Call sdbout_symbol on each decl in the chain SYMS. */
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
sdbout_syms (syms)
|
|
|
|
|
tree syms;
|
|
|
|
|
{
|
|
|
|
|
while (syms)
|
|
|
|
|
{
|
1992-03-11 05:52:53 +01:00
|
|
|
|
if (TREE_CODE (syms) != LABEL_DECL)
|
|
|
|
|
sdbout_symbol (syms, 1);
|
1991-12-23 23:45:25 +01:00
|
|
|
|
syms = TREE_CHAIN (syms);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Output SDB information for a symbol described by DECL.
|
|
|
|
|
LOCAL is nonzero if the symbol is not file-scope. */
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
sdbout_symbol (decl, local)
|
|
|
|
|
tree decl;
|
|
|
|
|
int local;
|
|
|
|
|
{
|
|
|
|
|
tree type = TREE_TYPE (decl);
|
|
|
|
|
tree context = NULL_TREE;
|
|
|
|
|
rtx value;
|
|
|
|
|
int regno = -1;
|
2000-10-20 21:17:41 +02:00
|
|
|
|
const char *name;
|
1991-12-23 23:45:25 +01:00
|
|
|
|
|
1992-05-31 07:03:41 +02:00
|
|
|
|
sdbout_one_type (type);
|
|
|
|
|
|
|
|
|
|
#if 0 /* This loses when functions are marked to be ignored,
|
|
|
|
|
which happens in the C++ front end. */
|
1992-05-27 23:54:51 +02:00
|
|
|
|
if (DECL_IGNORED_P (decl))
|
|
|
|
|
return;
|
1992-05-31 07:03:41 +02:00
|
|
|
|
#endif
|
1991-12-23 23:45:25 +01:00
|
|
|
|
|
|
|
|
|
switch (TREE_CODE (decl))
|
|
|
|
|
{
|
|
|
|
|
case CONST_DECL:
|
|
|
|
|
/* Enum values are defined by defining the enum type. */
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
case FUNCTION_DECL:
|
|
|
|
|
/* Don't mention a nested function under its parent. */
|
|
|
|
|
context = decl_function_context (decl);
|
|
|
|
|
if (context == current_function_decl)
|
|
|
|
|
return;
|
1995-12-19 01:08:11 +01:00
|
|
|
|
/* Check DECL_INITIAL to distinguish declarations from definitions.
|
|
|
|
|
Don't output debug info here for declarations; they will have
|
|
|
|
|
a DECL_INITIAL value of 0. */
|
|
|
|
|
if (! DECL_INITIAL (decl))
|
1991-12-23 23:45:25 +01:00
|
|
|
|
return;
|
|
|
|
|
if (GET_CODE (DECL_RTL (decl)) != MEM
|
|
|
|
|
|| GET_CODE (XEXP (DECL_RTL (decl), 0)) != SYMBOL_REF)
|
|
|
|
|
return;
|
|
|
|
|
PUT_SDB_DEF (IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)));
|
|
|
|
|
PUT_SDB_VAL (XEXP (DECL_RTL (decl), 0));
|
|
|
|
|
PUT_SDB_SCL (TREE_PUBLIC (decl) ? C_EXT : C_STAT);
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case TYPE_DECL:
|
|
|
|
|
/* Done with tagged types. */
|
|
|
|
|
if (DECL_NAME (decl) == 0)
|
|
|
|
|
return;
|
1992-05-31 07:03:41 +02:00
|
|
|
|
if (DECL_IGNORED_P (decl))
|
|
|
|
|
return;
|
1991-12-23 23:45:25 +01:00
|
|
|
|
|
|
|
|
|
/* Output typedef name. */
|
1992-11-24 06:18:35 +01:00
|
|
|
|
if (template_name_p (DECL_NAME (decl)))
|
|
|
|
|
PUT_SDB_DEF (IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)));
|
|
|
|
|
else
|
|
|
|
|
PUT_SDB_DEF (IDENTIFIER_POINTER (DECL_NAME (decl)));
|
1991-12-23 23:45:25 +01:00
|
|
|
|
PUT_SDB_SCL (C_TPDEF);
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case PARM_DECL:
|
|
|
|
|
/* Parm decls go in their own separate chains
|
|
|
|
|
and are output by sdbout_reg_parms and sdbout_parms. */
|
|
|
|
|
abort ();
|
|
|
|
|
|
|
|
|
|
case VAR_DECL:
|
|
|
|
|
/* Don't mention a variable that is external.
|
|
|
|
|
Let the file that defines it describe it. */
|
1992-07-12 04:43:19 +02:00
|
|
|
|
if (DECL_EXTERNAL (decl))
|
1991-12-23 23:45:25 +01:00
|
|
|
|
return;
|
|
|
|
|
|
1992-05-31 07:03:41 +02:00
|
|
|
|
/* Ignore __FUNCTION__, etc. */
|
|
|
|
|
if (DECL_IGNORED_P (decl))
|
|
|
|
|
return;
|
|
|
|
|
|
1991-12-23 23:45:25 +01:00
|
|
|
|
/* If there was an error in the declaration, don't dump core
|
|
|
|
|
if there is no RTL associated with the variable doesn't
|
|
|
|
|
exist. */
|
2001-03-15 21:48:48 +01:00
|
|
|
|
if (!DECL_RTL_SET_P (decl))
|
1991-12-23 23:45:25 +01:00
|
|
|
|
return;
|
|
|
|
|
|
2002-05-09 14:02:29 +02:00
|
|
|
|
SET_DECL_RTL (decl,
|
2001-03-15 21:48:48 +01:00
|
|
|
|
eliminate_regs (DECL_RTL (decl), 0, NULL_RTX));
|
1992-06-30 03:12:43 +02:00
|
|
|
|
#ifdef LEAF_REG_REMAP
|
1999-04-18 15:09:37 +02:00
|
|
|
|
if (current_function_uses_only_leaf_regs)
|
1992-06-30 03:12:43 +02:00
|
|
|
|
leaf_renumber_regs_insn (DECL_RTL (decl));
|
|
|
|
|
#endif
|
|
|
|
|
value = DECL_RTL (decl);
|
1991-12-23 23:45:25 +01:00
|
|
|
|
|
|
|
|
|
/* Don't mention a variable at all
|
|
|
|
|
if it was completely optimized into nothingness.
|
|
|
|
|
|
|
|
|
|
If DECL was from an inline function, then its rtl
|
|
|
|
|
is not identically the rtl that was used in this
|
|
|
|
|
particular compilation. */
|
|
|
|
|
if (GET_CODE (value) == REG)
|
|
|
|
|
{
|
2001-11-18 20:08:43 +01:00
|
|
|
|
regno = REGNO (value);
|
1991-12-23 23:45:25 +01:00
|
|
|
|
if (regno >= FIRST_PSEUDO_REGISTER)
|
|
|
|
|
return;
|
|
|
|
|
}
|
1992-06-30 03:12:43 +02:00
|
|
|
|
else if (GET_CODE (value) == SUBREG)
|
1991-12-23 23:45:25 +01:00
|
|
|
|
{
|
|
|
|
|
while (GET_CODE (value) == SUBREG)
|
Use byte offsets in SUBREGs instead of words.
2001-04-03 Jakub Jelinek <jakub@redhat.com>
David S. Miller <davem@pierdol.cobaltmicro.com>
Andrew MacLeod <amacleod@redhat.com>
Use byte offsets in SUBREGs instead of words.
* alias.c (nonlocal_mentioned_p): Use subreg_regno function.
* caller-save.c (mark_set_regs): Change callers of subreg_hard_regno
to pass new argument.
(add_stored_regs): Use subreg_regno_offset function.
* calls.c (expand_call): For non-paradoxical SUBREG take endianess
into account.
(precompute_arguments): Use gen_lowpart_SUBREG.
* combine.c (try_combine): Replace explicit XEXP with SUBREG_REG.
(combine_simplify_rtx): Rework to use SUBREG_BYTE.
(simplify_set): Rework to use SUBREG_BYTE.
(expand_field_assignment): Use SUBREG_BYTE.
(make_extraction): Use SUBREG_BYTE.
(if_then_else_cond): Use SUBREG_BYTE.
(apply_distributive_law): Use SUBREG_BYTE and fixup subreg comments.
(gen_lowpart_for_combine): Compute full byte offset.
* cse.c (mention_regs): Use SUBREG_BYTE.
(remove_invalid_subreg_refs): Rework to use SUBREG_BYTE.
(canon_hash): Use SUBREG_BYTE.
(fold_rtx): Pass SUBREG_BYTE div UNITS_PER_WORD to operand_subword.
(gen_lowpart_if_possible): Formatting.
* dbxout.c (dbxout_symbol_location): Compute SUBREG hard regnos
correctly.
* dwarf2out.c (is_pseudo_reg): Fixup explicit XEXP into SUBREG_REG
(mem_loc_descriptor): Fixup explicit XEXP into SUBREG_REG
(loc_descriptor): Fixup explicit XEXP into SUBREG_REG
* dwarfout.c (is_pseudo_reg): Fixup explicit XEXP into SUBREG_REG
(output_mem_loc_descriptor): Fixup explicit XEXP into SUBREG_REG
(output_loc_descriptor): Fixup explicit XEXP into SUBREG_REG
* emit-rtl.c (gen_rtx_SUBREG): New function, used to verify
certain invariants about SUBREGs the compiler creates.
(gen_lowpart_SUBREG): New function.
(subreg_hard_regno): New function to get the final register number.
(gen_lowpart_common): Use SUBREG_BYTE.
(gen_imagpart): Spacing nits.
(subreg_realpart_p): Use SUBREG_BYTE.
(gen_highpart): Use SUBREG_BYTE.
(subreg_lowpart_p): Always compute endian corrected goal offset,
even at the byte level, then compare against that.
(constant_subword): New function, pulled out all constant cases
from operand_subword and changed second argument name to offset.
(operand_subword): Detect non REG/SUBREG/CONCAT/MEM cases early
and call constant_subword to do the work. Return const0_rtx if
looking for a word outside of OP.
(operand_subword_force): Change second arg name to offset.
* expmed.c (store_bit_field): Use SUBREG_BYTE.
(store_split_bit_field): Use SUBREG_BYTE.
(extract_bit_field): Use SUBREG_BYTE.
(extract_split_bit_field): Use SUBREG_BYTE.
(expand_shift): Use SUBREG_BYTE.
* expr.c (store_expr, expand_expr): Use gen_lowpart_SUBREG.
* final.c (alter_subreg) Use subreg_hard_regno and SUBREG_BYTE.
* flow.c (set_noop_p): Use SUBREG_BYTE.
(mark_set_1): Remove ALTER_HARD_SUBREG. Use subreg_regno_offset instead.
* function.c (fixup_var_refs_1): Fixup explicit XEXP into a SUBREG_REG.
(fixup_memory_subreg): Use SUBREG_BYTE and remove byte endian
correction code.
(optimize_bit_field): Use SUBREG_BYTE.
(purge_addressof_1): Use SUBREG_BYTE.
(purge_single_hard_subreg_set): Use subreg_regno_offset function.
(assign_params): Mark arguments SUBREG_PROMOTED_VAR_P if they are
actually promoted by the caller and PROMOTE_FOR_CALLS_ONLY is true.
* gengenrtl.c (special_rtx): Add SUBREG.
* global.c (mark_reg_store): Use SUBREG_BYTE.
(set_preference): Rework to use subreg_regno_offset and SUBREG_BYTE.
* ifcvt (noce_emit_move_insn): Use SUBREG_BYTE.
* integrate.c (copy_rtx_and_substitute): Use SUBREG_BYTE and make sure
final byte offset is congruent to subreg's mode size.
(subst_constants): Use SUBREG_BYTE.
(mark_stores): Use subreg_regno_offset function.
* jump.c (rtx_renumbered_equal_p, true_regnum): Use subreg_regno_offset
function and SUBREG_BYTE.
* local-alloc.c (combine_regs): Use subreg_regno_offset function.
(reg_is_born): Use subreg_hard_regno.
* recog.c (valid_replace_rtx_1): Use SUBREG_BYTE and remove byte
endian correction code. Don't combine subregs unless resulting
offset aligns with type. Fix subreg constant extraction for DImode.
Simplify SUBREG of VOIDmode CONST_DOUBLE.
(general_operand): Remove dead mode_altering_drug code.
(indirect_operand): Use SUBREG_BYTE.
(constrain_operands): Use subreg_regno_offset function.
* reg-stack.c (get_true_reg): Use subreg_regno_offset function.
* regmove.c (regmove_optimize): Use SUBREG_BYTE.
(optimize_reg_copy_3): Use gen_lowpart_SUBREG.
* regs.h (REG_SIZE): Allow target to override.
(REGMODE_NATURAL_SIZE): New macro which target can override.
* reload.c (reload_inner_reg_of_subreg): subreg_regno should be used
on the entire subreg rtx.
(push_reload): Use SUBREG_BYTE in comments and code.
(find_dummy_reload): Use subreg_regno_offset. Only adjust offsets
for hard registers inside subregs.
(operands_match_p): Use subreg_regno_offset.
(find_reloads): Use SUBREG_BYTE and only advance offset for subregs
containing hard regs.
(find_reload_toplev): Use SUBREG_BYTE. Remove byte endian
corrections when fixing up MEM subregs.
(find_reloads_address_1): Use SUBREG_BYTE, subreg_regno, and
subreg_regno_offset where appropriate.
(find_reloads_subreg_address): Use SUBREG_BYTE. Remove
byte endian corrections when fixing up MEM subregs.
(subst_reloads): When combining two subregs, make sure final
offset is congruent to subreg's mode size.
(find_replacement): Use SUBREG_BYTE and subreg_regno_offset.
(refers_to_regno_for_reload_p): Use subreg_regno.
(reg_overlap_mentioned_for_reload_p): Use subreg_regno_offset.
* reload1.c (eliminate_regs) Use SUBREG_BYTE. Remove byte endian
correction code for memory subreg fixups.
(forget_old_reload_1): Use subreg_regno_offset.
(choose_reload_regs): Use subreg_regno.
(emit_input_reload_insns): Use SUBREG_BYTE.
(reload_combine_note_store): Use subreg_regno_offset.
(move2add_note_store): Use subreg_regno_offset.
* resource.c (update_live_status, mark_referenced_resources): Use
subreg_regno function.
(mark_set_resources): Use subreg_regno function.
* rtl.h (SUBREG_WORD): Rename to SUBREG_BYTE.
(subreg_regno_offset, subreg_regno): Define prototypes.
(subreg_hard_regno, constant_subword, gen_rtx_SUBREG): Newi functions.
(gen_lowpart_SUBREG): Add prototype.
* rtl.texi (subreg): Update to reflect new byte offset representation.
Add mentioning of the effect that BYTES_BIG_ENDIAN has on subregs now.
* rtlanal.c (refers_to_regno_p): Use subreg_regno.
(reg_overlap_mentioned_p): Use subreg_regno.
(replace_regs); Make sure final offset of combined subreg is
congruent to size of subreg's mode.
(subreg_regno_offset): New function.
(subreg_regno): New function.
* sched-vis.c (print_value): Change SUBREG_WORD to SUBREG_BYTE.
* sdbout.c (sdbout_symbol): Compute offset using alter_subreg.
* stmt.c (expand_anon_union_decl): Use gen_lowpart_SUBREG.
* tm.texi (ALTER_HARD_SUBREG): Remove, it is now dead.
(SUBREG_REGNO_OFFSET): Describe SUBREG_REGNO_OFFSET overrides.
* config/a29k/a29k.c (gpc_reg_operand): Use subreg_regno.
(a29k_get_reloaded_address): Use SUBREG_BYTE.
(print_operand): Use SUBREG_BYTE.
* config/alpha/alpha.c (print_operand_address): Use SUBREG_BYTE.
* config/arm/arm.c (arm_reload_in_hi): Use SUBREG_BYTE.
(arm_reload_out_hi): Use SUBREG_BYTE.
* config/d30v/d30v.c (d30v_split_double): Use subreg_regno_offset
instead of SUBREG_WORD.
(d30v_print_operand_memory_reference): Use subreg_regno_offset.
* config/dsp16xx/dsp16xx.md (extendqihi2, zero_extendqihi2): Fix
SUBREG creation to use byte offset.
* config/h8300/h8300.md (Unnamed HImode zero extraction and 16bit
inverted load insns): Fix explicit rtl subregs to use byte
offsets.
* config/i370/i370.md (cmpstrsi, movstrsi, mulsi3, divsi3,
udivsi3, umodsi3): Generate SUBREGs with byte offsets.
* config/i860/i860.c (single_insn_src_p): Use SUBREG_BYTE.
* config/i860/i860.md (mulsi3_big): Fixup explicit SUBREGs in rtl
to use byte offsets.
(unnamed fmlow.dd insn): Fixup SUBREGS to use byte offsets.
* config/i960/i960.md (extendhisi2): Generate SUBREGs with byte
offsets, also make sure it is congruent to SUBREG's mode size.
(extendqisi2, extendqihi2, zero_extendhisi2, zero_extendqisi2,
unnamed ldob insn): Generate SUBREGs with byte offset.
(zero_extendqihi2): SUBREG's are byte offsets.
* config/m68hc11/m68hc11.c (m68hc11_gen_lowpart): Use SUBREG_BYTE.
(m68hc11_gen_highpart): Use SUBREG_BYTE.
* config/m68k/m68k.md (zero_extendhisi2, zero_extendqihi2,
zero-extendqisi2): Generate SUBREGs with byte offset.
(umulsidi3, mulsidi3, subreghi1ashrdi_const32,
subregsi1ashrdi_const32, subreg1lshrdi_const32): Fixup explicit
subregs in rtl to use byte offsets.
* config/m88k/m88k.md (extendsidi2): fixup subregs to use byte offset.
* config/mips/mips.c (mips_move_1word): Use subreg_regno_offset.
(mips_move_2words): Use subreg_regno_offset.
(mips_secondary_reload_class): Use subreg_regno_offset.
* config/mips/mips.md (DImode plus, minus, move, and logical op
splits): Fixup explicit subregs in rtl to use byte offsets.
* config/mn10200/mn10200.c (print_operand): Use subreg_regno function.
* config/mn10300/mn10300.c (print_operand): Use subreg_regno function.
* config/ns32k/ns32k.md (udivmoddisi4): Fix explicit subregs in
rtl to use byte offsets.
* config/pa/pa.c (emit_move_sequence): Use SUBREG_BYTE.
* config/pa/pa.md (floatunssisf2, floatunssidf2, mulsi3): fix explicit
subregs to use byte offsets.
* config/pdp11/pdp11.md (zero_extendhisi2, modhi3, modhi3+1):
Fixup explicit subregs in rtl to use byte offsets.
* config/romp/romp.c (memory_offset_in_range_p): Use SUBREG_BYTE
and remove byte endian correction code.
* config/sh/sh.c (output_movedouble): Use subreg_regno.
(gen_ashift_hi): Use SUBREG_BYTE.
(regs_used): Use subreg_regno_offset.
(machine_dependent_reorg): Use subreg_regno_offset.
* config/sh/sh.h (INDEX_REGISTER_RTX_P): Use SUBREG_BYTE.
* config/sh/sh.md (DImode and DFmode move splits): Use subreg_regno.
(movdf_i4): Subregs are byte offsets now.
* config/sparc/sparc.c (ultra_find_type): Use SUBREG_BYTE.
* config/sparc/sparc.h (ALTER_HARD_SUBREG): Removed.
(REGMODE_NATURAL_SIZE): Override.
(REG_SIZE): For SUBREG check float mode on SUBREG_REG's mode.
* config/sparc/sparc.md (TFmode move splits): Generate SUBREGs
with byte offsets.
(zero_extendhisi2, zero_extendqidi2_insn, extendhisi2,
extendqihi2, sign_extendqihi2_insn, sign_extendqisi2_insn,
extendqidi2): Generate SUBREGs with byte offsets, also make sure
it is congruent to SUBREG's mode size.
(smulsi3_highpart_v8plus): Fix explicit subregs in rtl to use byte
offsets.
(cmp_siqi_trunc, cmp_siqi_trunc_set, cmp_diqi_trunc,
cmp_diqi_trunc_set, lshrdi3_v8plus+1, lshrdi3_v8plus+2,
lshrdi3_v8plus+3, lshrdi3_v8plus+4): Use proper
SUBREG_BYTE offset for non-paradoxical subregs in patterns.
* config/v850/v850.c (print_operand, output_move_double): Use
subreg_regno function.
Co-Authored-By: Andrew MacLeod <amacleod@redhat.com>
Co-Authored-By: David S. Miller <davem@pierdol.cobaltmicro.com>
From-SVN: r41058
2001-04-03 17:06:12 +02:00
|
|
|
|
value = SUBREG_REG (value);
|
1991-12-23 23:45:25 +01:00
|
|
|
|
if (GET_CODE (value) == REG)
|
|
|
|
|
{
|
Use byte offsets in SUBREGs instead of words.
2001-04-03 Jakub Jelinek <jakub@redhat.com>
David S. Miller <davem@pierdol.cobaltmicro.com>
Andrew MacLeod <amacleod@redhat.com>
Use byte offsets in SUBREGs instead of words.
* alias.c (nonlocal_mentioned_p): Use subreg_regno function.
* caller-save.c (mark_set_regs): Change callers of subreg_hard_regno
to pass new argument.
(add_stored_regs): Use subreg_regno_offset function.
* calls.c (expand_call): For non-paradoxical SUBREG take endianess
into account.
(precompute_arguments): Use gen_lowpart_SUBREG.
* combine.c (try_combine): Replace explicit XEXP with SUBREG_REG.
(combine_simplify_rtx): Rework to use SUBREG_BYTE.
(simplify_set): Rework to use SUBREG_BYTE.
(expand_field_assignment): Use SUBREG_BYTE.
(make_extraction): Use SUBREG_BYTE.
(if_then_else_cond): Use SUBREG_BYTE.
(apply_distributive_law): Use SUBREG_BYTE and fixup subreg comments.
(gen_lowpart_for_combine): Compute full byte offset.
* cse.c (mention_regs): Use SUBREG_BYTE.
(remove_invalid_subreg_refs): Rework to use SUBREG_BYTE.
(canon_hash): Use SUBREG_BYTE.
(fold_rtx): Pass SUBREG_BYTE div UNITS_PER_WORD to operand_subword.
(gen_lowpart_if_possible): Formatting.
* dbxout.c (dbxout_symbol_location): Compute SUBREG hard regnos
correctly.
* dwarf2out.c (is_pseudo_reg): Fixup explicit XEXP into SUBREG_REG
(mem_loc_descriptor): Fixup explicit XEXP into SUBREG_REG
(loc_descriptor): Fixup explicit XEXP into SUBREG_REG
* dwarfout.c (is_pseudo_reg): Fixup explicit XEXP into SUBREG_REG
(output_mem_loc_descriptor): Fixup explicit XEXP into SUBREG_REG
(output_loc_descriptor): Fixup explicit XEXP into SUBREG_REG
* emit-rtl.c (gen_rtx_SUBREG): New function, used to verify
certain invariants about SUBREGs the compiler creates.
(gen_lowpart_SUBREG): New function.
(subreg_hard_regno): New function to get the final register number.
(gen_lowpart_common): Use SUBREG_BYTE.
(gen_imagpart): Spacing nits.
(subreg_realpart_p): Use SUBREG_BYTE.
(gen_highpart): Use SUBREG_BYTE.
(subreg_lowpart_p): Always compute endian corrected goal offset,
even at the byte level, then compare against that.
(constant_subword): New function, pulled out all constant cases
from operand_subword and changed second argument name to offset.
(operand_subword): Detect non REG/SUBREG/CONCAT/MEM cases early
and call constant_subword to do the work. Return const0_rtx if
looking for a word outside of OP.
(operand_subword_force): Change second arg name to offset.
* expmed.c (store_bit_field): Use SUBREG_BYTE.
(store_split_bit_field): Use SUBREG_BYTE.
(extract_bit_field): Use SUBREG_BYTE.
(extract_split_bit_field): Use SUBREG_BYTE.
(expand_shift): Use SUBREG_BYTE.
* expr.c (store_expr, expand_expr): Use gen_lowpart_SUBREG.
* final.c (alter_subreg) Use subreg_hard_regno and SUBREG_BYTE.
* flow.c (set_noop_p): Use SUBREG_BYTE.
(mark_set_1): Remove ALTER_HARD_SUBREG. Use subreg_regno_offset instead.
* function.c (fixup_var_refs_1): Fixup explicit XEXP into a SUBREG_REG.
(fixup_memory_subreg): Use SUBREG_BYTE and remove byte endian
correction code.
(optimize_bit_field): Use SUBREG_BYTE.
(purge_addressof_1): Use SUBREG_BYTE.
(purge_single_hard_subreg_set): Use subreg_regno_offset function.
(assign_params): Mark arguments SUBREG_PROMOTED_VAR_P if they are
actually promoted by the caller and PROMOTE_FOR_CALLS_ONLY is true.
* gengenrtl.c (special_rtx): Add SUBREG.
* global.c (mark_reg_store): Use SUBREG_BYTE.
(set_preference): Rework to use subreg_regno_offset and SUBREG_BYTE.
* ifcvt (noce_emit_move_insn): Use SUBREG_BYTE.
* integrate.c (copy_rtx_and_substitute): Use SUBREG_BYTE and make sure
final byte offset is congruent to subreg's mode size.
(subst_constants): Use SUBREG_BYTE.
(mark_stores): Use subreg_regno_offset function.
* jump.c (rtx_renumbered_equal_p, true_regnum): Use subreg_regno_offset
function and SUBREG_BYTE.
* local-alloc.c (combine_regs): Use subreg_regno_offset function.
(reg_is_born): Use subreg_hard_regno.
* recog.c (valid_replace_rtx_1): Use SUBREG_BYTE and remove byte
endian correction code. Don't combine subregs unless resulting
offset aligns with type. Fix subreg constant extraction for DImode.
Simplify SUBREG of VOIDmode CONST_DOUBLE.
(general_operand): Remove dead mode_altering_drug code.
(indirect_operand): Use SUBREG_BYTE.
(constrain_operands): Use subreg_regno_offset function.
* reg-stack.c (get_true_reg): Use subreg_regno_offset function.
* regmove.c (regmove_optimize): Use SUBREG_BYTE.
(optimize_reg_copy_3): Use gen_lowpart_SUBREG.
* regs.h (REG_SIZE): Allow target to override.
(REGMODE_NATURAL_SIZE): New macro which target can override.
* reload.c (reload_inner_reg_of_subreg): subreg_regno should be used
on the entire subreg rtx.
(push_reload): Use SUBREG_BYTE in comments and code.
(find_dummy_reload): Use subreg_regno_offset. Only adjust offsets
for hard registers inside subregs.
(operands_match_p): Use subreg_regno_offset.
(find_reloads): Use SUBREG_BYTE and only advance offset for subregs
containing hard regs.
(find_reload_toplev): Use SUBREG_BYTE. Remove byte endian
corrections when fixing up MEM subregs.
(find_reloads_address_1): Use SUBREG_BYTE, subreg_regno, and
subreg_regno_offset where appropriate.
(find_reloads_subreg_address): Use SUBREG_BYTE. Remove
byte endian corrections when fixing up MEM subregs.
(subst_reloads): When combining two subregs, make sure final
offset is congruent to subreg's mode size.
(find_replacement): Use SUBREG_BYTE and subreg_regno_offset.
(refers_to_regno_for_reload_p): Use subreg_regno.
(reg_overlap_mentioned_for_reload_p): Use subreg_regno_offset.
* reload1.c (eliminate_regs) Use SUBREG_BYTE. Remove byte endian
correction code for memory subreg fixups.
(forget_old_reload_1): Use subreg_regno_offset.
(choose_reload_regs): Use subreg_regno.
(emit_input_reload_insns): Use SUBREG_BYTE.
(reload_combine_note_store): Use subreg_regno_offset.
(move2add_note_store): Use subreg_regno_offset.
* resource.c (update_live_status, mark_referenced_resources): Use
subreg_regno function.
(mark_set_resources): Use subreg_regno function.
* rtl.h (SUBREG_WORD): Rename to SUBREG_BYTE.
(subreg_regno_offset, subreg_regno): Define prototypes.
(subreg_hard_regno, constant_subword, gen_rtx_SUBREG): Newi functions.
(gen_lowpart_SUBREG): Add prototype.
* rtl.texi (subreg): Update to reflect new byte offset representation.
Add mentioning of the effect that BYTES_BIG_ENDIAN has on subregs now.
* rtlanal.c (refers_to_regno_p): Use subreg_regno.
(reg_overlap_mentioned_p): Use subreg_regno.
(replace_regs); Make sure final offset of combined subreg is
congruent to size of subreg's mode.
(subreg_regno_offset): New function.
(subreg_regno): New function.
* sched-vis.c (print_value): Change SUBREG_WORD to SUBREG_BYTE.
* sdbout.c (sdbout_symbol): Compute offset using alter_subreg.
* stmt.c (expand_anon_union_decl): Use gen_lowpart_SUBREG.
* tm.texi (ALTER_HARD_SUBREG): Remove, it is now dead.
(SUBREG_REGNO_OFFSET): Describe SUBREG_REGNO_OFFSET overrides.
* config/a29k/a29k.c (gpc_reg_operand): Use subreg_regno.
(a29k_get_reloaded_address): Use SUBREG_BYTE.
(print_operand): Use SUBREG_BYTE.
* config/alpha/alpha.c (print_operand_address): Use SUBREG_BYTE.
* config/arm/arm.c (arm_reload_in_hi): Use SUBREG_BYTE.
(arm_reload_out_hi): Use SUBREG_BYTE.
* config/d30v/d30v.c (d30v_split_double): Use subreg_regno_offset
instead of SUBREG_WORD.
(d30v_print_operand_memory_reference): Use subreg_regno_offset.
* config/dsp16xx/dsp16xx.md (extendqihi2, zero_extendqihi2): Fix
SUBREG creation to use byte offset.
* config/h8300/h8300.md (Unnamed HImode zero extraction and 16bit
inverted load insns): Fix explicit rtl subregs to use byte
offsets.
* config/i370/i370.md (cmpstrsi, movstrsi, mulsi3, divsi3,
udivsi3, umodsi3): Generate SUBREGs with byte offsets.
* config/i860/i860.c (single_insn_src_p): Use SUBREG_BYTE.
* config/i860/i860.md (mulsi3_big): Fixup explicit SUBREGs in rtl
to use byte offsets.
(unnamed fmlow.dd insn): Fixup SUBREGS to use byte offsets.
* config/i960/i960.md (extendhisi2): Generate SUBREGs with byte
offsets, also make sure it is congruent to SUBREG's mode size.
(extendqisi2, extendqihi2, zero_extendhisi2, zero_extendqisi2,
unnamed ldob insn): Generate SUBREGs with byte offset.
(zero_extendqihi2): SUBREG's are byte offsets.
* config/m68hc11/m68hc11.c (m68hc11_gen_lowpart): Use SUBREG_BYTE.
(m68hc11_gen_highpart): Use SUBREG_BYTE.
* config/m68k/m68k.md (zero_extendhisi2, zero_extendqihi2,
zero-extendqisi2): Generate SUBREGs with byte offset.
(umulsidi3, mulsidi3, subreghi1ashrdi_const32,
subregsi1ashrdi_const32, subreg1lshrdi_const32): Fixup explicit
subregs in rtl to use byte offsets.
* config/m88k/m88k.md (extendsidi2): fixup subregs to use byte offset.
* config/mips/mips.c (mips_move_1word): Use subreg_regno_offset.
(mips_move_2words): Use subreg_regno_offset.
(mips_secondary_reload_class): Use subreg_regno_offset.
* config/mips/mips.md (DImode plus, minus, move, and logical op
splits): Fixup explicit subregs in rtl to use byte offsets.
* config/mn10200/mn10200.c (print_operand): Use subreg_regno function.
* config/mn10300/mn10300.c (print_operand): Use subreg_regno function.
* config/ns32k/ns32k.md (udivmoddisi4): Fix explicit subregs in
rtl to use byte offsets.
* config/pa/pa.c (emit_move_sequence): Use SUBREG_BYTE.
* config/pa/pa.md (floatunssisf2, floatunssidf2, mulsi3): fix explicit
subregs to use byte offsets.
* config/pdp11/pdp11.md (zero_extendhisi2, modhi3, modhi3+1):
Fixup explicit subregs in rtl to use byte offsets.
* config/romp/romp.c (memory_offset_in_range_p): Use SUBREG_BYTE
and remove byte endian correction code.
* config/sh/sh.c (output_movedouble): Use subreg_regno.
(gen_ashift_hi): Use SUBREG_BYTE.
(regs_used): Use subreg_regno_offset.
(machine_dependent_reorg): Use subreg_regno_offset.
* config/sh/sh.h (INDEX_REGISTER_RTX_P): Use SUBREG_BYTE.
* config/sh/sh.md (DImode and DFmode move splits): Use subreg_regno.
(movdf_i4): Subregs are byte offsets now.
* config/sparc/sparc.c (ultra_find_type): Use SUBREG_BYTE.
* config/sparc/sparc.h (ALTER_HARD_SUBREG): Removed.
(REGMODE_NATURAL_SIZE): Override.
(REG_SIZE): For SUBREG check float mode on SUBREG_REG's mode.
* config/sparc/sparc.md (TFmode move splits): Generate SUBREGs
with byte offsets.
(zero_extendhisi2, zero_extendqidi2_insn, extendhisi2,
extendqihi2, sign_extendqihi2_insn, sign_extendqisi2_insn,
extendqidi2): Generate SUBREGs with byte offsets, also make sure
it is congruent to SUBREG's mode size.
(smulsi3_highpart_v8plus): Fix explicit subregs in rtl to use byte
offsets.
(cmp_siqi_trunc, cmp_siqi_trunc_set, cmp_diqi_trunc,
cmp_diqi_trunc_set, lshrdi3_v8plus+1, lshrdi3_v8plus+2,
lshrdi3_v8plus+3, lshrdi3_v8plus+4): Use proper
SUBREG_BYTE offset for non-paradoxical subregs in patterns.
* config/v850/v850.c (print_operand, output_move_double): Use
subreg_regno function.
Co-Authored-By: Andrew MacLeod <amacleod@redhat.com>
Co-Authored-By: David S. Miller <davem@pierdol.cobaltmicro.com>
From-SVN: r41058
2001-04-03 17:06:12 +02:00
|
|
|
|
if (REGNO (value) >= FIRST_PSEUDO_REGISTER)
|
1992-06-30 03:12:43 +02:00
|
|
|
|
return;
|
1991-12-23 23:45:25 +01:00
|
|
|
|
}
|
2001-11-18 20:08:43 +01:00
|
|
|
|
regno = REGNO (alter_subreg (&value));
|
|
|
|
|
SET_DECL_RTL (decl, value);
|
1991-12-23 23:45:25 +01:00
|
|
|
|
}
|
1993-11-16 11:22:29 +01:00
|
|
|
|
/* Don't output anything if an auto variable
|
|
|
|
|
gets RTL that is static.
|
|
|
|
|
GAS version 2.2 can't handle such output. */
|
|
|
|
|
else if (GET_CODE (value) == MEM && CONSTANT_P (XEXP (value, 0))
|
|
|
|
|
&& ! TREE_STATIC (decl))
|
|
|
|
|
return;
|
1991-12-23 23:45:25 +01:00
|
|
|
|
|
|
|
|
|
/* Emit any structure, union, or enum type that has not been output.
|
|
|
|
|
This occurs for tag-less structs (et al) used to declare variables
|
|
|
|
|
within functions. */
|
|
|
|
|
if (TREE_CODE (type) == ENUMERAL_TYPE
|
|
|
|
|
|| TREE_CODE (type) == RECORD_TYPE
|
1993-04-13 12:47:33 +02:00
|
|
|
|
|| TREE_CODE (type) == UNION_TYPE
|
|
|
|
|
|| TREE_CODE (type) == QUAL_UNION_TYPE)
|
1991-12-23 23:45:25 +01:00
|
|
|
|
{
|
tree.h (COMPLETE_TYPE_P): New macro.
gcc
* tree.h (COMPLETE_TYPE_P): New macro.
(COMPLETE_OR_VOID_TYPE_P): New macro.
(COMPLETE_OR_UNBOUND_ARRAY_TYPE_P): New macro.
* stor-layout.c (layout_type, case VOID_TYPE): Don't set TYPE_SIZE.
* c-aux-info.c (gen_type): Use them.
* c-common.c (c_expand_expr_stmt): Likewise.
* c-decl.c (poplevel, pushdecl, start_decl, finish_decl,
grokdeclarator, grokparms, finish_struct, start_function,
store_parm_decls, combine_parm_decls): Likewise.
* c-parse.y (cast_expr): Likewise.
* c-typeck.c (require_complete_type, c_sizeof, c_sizeof_nowarn,
c_size_in_bytes, c_alignof, build_component_ref,
build_indirect_ref, build_array_ref, convert_arguments,
build_binary_op, pointer_diff, build_unary_op, digest_init: Likewise.
* calls.c (initialize_argument_information): Likewise.
* convert.c (convert_to_integer): Likewise.
* dbxout.c (dbxout_typedefs, dbxout_type, dbxout_symbol): Likewise.
* dwarfout.c (location_or_const_value_attribute,
output_enumeration_type_die, output_structure_type_die,
output_union_type_die, output_type): Likewise.
* expr.c (safe_from_p, expand_expr): Likewise.
* function.c (assign_parms): Likewise.
* sdbout.c (sdbout_symbol, sdbout_one_type): Likewise.
* tree.c (build_array_type, build_function_type,
build_method_type, build_offset_type, build_complex_type): Likewise.
* c-parse.c, c-parse.h: Regenerated.
gcc/cp
* typeck.c (require_complete_type, complete_type,
complete_type_or_else, c_sizeof, c_sizeof_nowarn,
build_array_ref, convert_arguments, pointer_diff,
build_x_unary_op, build_unary_op, build_c_cast,
build_modify_expr): Use COMPLETE_TYPE_P etc.
* call.c (is_complete, convert_like_real,
build_new_method_call): Likewise.
* class.c (build_vbase_pointer_fields, check_bases,
build_base_field, finish_struct_1, pushclass): Likewise.
* cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
* decl.c (maybe_process_template_type_declaration, pushtag,
pushdecl, redeclaration_error_message, start_decl, start_decl_1,
layout_var_decl, check_initializer, cp_finish_decl,
grokdeclarator, require_complete_types_for_parms,
grok_op_properties, xref_tag, xref_basetypes,
check_function_type): Likewise.
* decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
* friend.c (do_friend): Likewise.
* init.c (build_offset_ref): Likewise.
* parse.y (structsp): Likewise.
* pt.c (maybe_process_partial_specialization,
tsubst_friend_function, instantiate_class_template, tsubst,
do_type_instantiation, instantiate_pending_templates): Likewise.
* repo.c (repo_get_id): Likewise.
* rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
synthesize_tinfo_var, emit_support_tinfos): Likewise.
* search.c (lookup_fnfields_1, lookup_conversions): Likewise.
* semantics.c (begin_class_definition): Likewise.
* tree.c (build_cplus_method_type): Likewise.
* typeck2.c (digest_init, build_functional_cast,
add_exception_specifier): Likewise.
* parse.h, parse.c: Regenerated.
From-SVN: r32671
2000-03-21 19:10:48 +01:00
|
|
|
|
if (COMPLETE_TYPE_P (type) /* not a forward reference */
|
1991-12-23 23:45:25 +01:00
|
|
|
|
&& KNOWN_TYPE_TAG (type) == 0) /* not yet declared */
|
|
|
|
|
sdbout_one_type (type);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Defer SDB information for top-level initialized variables! */
|
|
|
|
|
if (! local
|
|
|
|
|
&& GET_CODE (value) == MEM
|
|
|
|
|
&& DECL_INITIAL (decl))
|
|
|
|
|
return;
|
|
|
|
|
|
1992-10-24 02:19:09 +01:00
|
|
|
|
/* C++ in 2.3 makes nameless symbols. That will be fixed later.
|
|
|
|
|
For now, avoid crashing. */
|
|
|
|
|
if (DECL_NAME (decl) == NULL_TREE)
|
|
|
|
|
return;
|
|
|
|
|
|
1991-12-23 23:45:25 +01:00
|
|
|
|
/* Record the name for, starting a symtab entry. */
|
2001-03-21 20:43:36 +01:00
|
|
|
|
if (local)
|
|
|
|
|
name = IDENTIFIER_POINTER (DECL_NAME (decl));
|
|
|
|
|
else
|
|
|
|
|
name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
|
1991-12-23 23:45:25 +01:00
|
|
|
|
|
|
|
|
|
if (GET_CODE (value) == MEM
|
|
|
|
|
&& GET_CODE (XEXP (value, 0)) == SYMBOL_REF)
|
|
|
|
|
{
|
|
|
|
|
PUT_SDB_DEF (name);
|
|
|
|
|
if (TREE_PUBLIC (decl))
|
|
|
|
|
{
|
|
|
|
|
PUT_SDB_VAL (XEXP (value, 0));
|
2002-05-09 14:02:29 +02:00
|
|
|
|
PUT_SDB_SCL (C_EXT);
|
1991-12-23 23:45:25 +01:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
PUT_SDB_VAL (XEXP (value, 0));
|
2002-05-09 14:02:29 +02:00
|
|
|
|
PUT_SDB_SCL (C_STAT);
|
1991-12-23 23:45:25 +01:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (regno >= 0)
|
|
|
|
|
{
|
|
|
|
|
PUT_SDB_DEF (name);
|
|
|
|
|
PUT_SDB_INT_VAL (DBX_REGISTER_NUMBER (regno));
|
|
|
|
|
PUT_SDB_SCL (C_REG);
|
|
|
|
|
}
|
|
|
|
|
else if (GET_CODE (value) == MEM
|
|
|
|
|
&& (GET_CODE (XEXP (value, 0)) == MEM
|
|
|
|
|
|| (GET_CODE (XEXP (value, 0)) == REG
|
1993-09-24 21:55:19 +02:00
|
|
|
|
&& REGNO (XEXP (value, 0)) != HARD_FRAME_POINTER_REGNUM
|
1992-03-11 05:52:53 +01:00
|
|
|
|
&& REGNO (XEXP (value, 0)) != STACK_POINTER_REGNUM)))
|
1991-12-23 23:45:25 +01:00
|
|
|
|
/* If the value is indirect by memory or by a register
|
|
|
|
|
that isn't the frame pointer
|
|
|
|
|
then it means the object is variable-sized and address through
|
|
|
|
|
that register or stack slot. COFF has no way to represent this
|
|
|
|
|
so all we can do is output the variable as a pointer. */
|
|
|
|
|
{
|
|
|
|
|
PUT_SDB_DEF (name);
|
|
|
|
|
if (GET_CODE (XEXP (value, 0)) == REG)
|
|
|
|
|
{
|
|
|
|
|
PUT_SDB_INT_VAL (DBX_REGISTER_NUMBER (REGNO (XEXP (value, 0))));
|
|
|
|
|
PUT_SDB_SCL (C_REG);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
/* DECL_RTL looks like (MEM (MEM (PLUS (REG...)
|
|
|
|
|
(CONST_INT...)))).
|
|
|
|
|
We want the value of that CONST_INT. */
|
|
|
|
|
/* Encore compiler hates a newline in a macro arg, it seems. */
|
|
|
|
|
PUT_SDB_INT_VAL (DEBUGGER_AUTO_OFFSET
|
|
|
|
|
(XEXP (XEXP (value, 0), 0)));
|
|
|
|
|
PUT_SDB_SCL (C_AUTO);
|
|
|
|
|
}
|
|
|
|
|
|
1999-03-28 01:50:47 +01:00
|
|
|
|
/* Effectively do build_pointer_type, but don't cache this type,
|
|
|
|
|
since it might be temporary whereas the type it points to
|
|
|
|
|
might have been saved for inlining. */
|
|
|
|
|
/* Don't use REFERENCE_TYPE because dbx can't handle that. */
|
|
|
|
|
type = make_node (POINTER_TYPE);
|
|
|
|
|
TREE_TYPE (type) = TREE_TYPE (decl);
|
1991-12-23 23:45:25 +01:00
|
|
|
|
}
|
|
|
|
|
else if (GET_CODE (value) == MEM
|
1994-01-04 19:43:51 +01:00
|
|
|
|
&& ((GET_CODE (XEXP (value, 0)) == PLUS
|
|
|
|
|
&& GET_CODE (XEXP (XEXP (value, 0), 0)) == REG
|
|
|
|
|
&& GET_CODE (XEXP (XEXP (value, 0), 1)) == CONST_INT)
|
|
|
|
|
/* This is for variables which are at offset zero from
|
|
|
|
|
the frame pointer. This happens on the Alpha.
|
|
|
|
|
Non-frame pointer registers are excluded above. */
|
|
|
|
|
|| (GET_CODE (XEXP (value, 0)) == REG)))
|
1991-12-23 23:45:25 +01:00
|
|
|
|
{
|
1994-01-04 19:43:51 +01:00
|
|
|
|
/* DECL_RTL looks like (MEM (PLUS (REG...) (CONST_INT...)))
|
|
|
|
|
or (MEM (REG...)). We want the value of that CONST_INT
|
|
|
|
|
or zero. */
|
1991-12-23 23:45:25 +01:00
|
|
|
|
PUT_SDB_DEF (name);
|
|
|
|
|
PUT_SDB_INT_VAL (DEBUGGER_AUTO_OFFSET (XEXP (value, 0)));
|
|
|
|
|
PUT_SDB_SCL (C_AUTO);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
/* It is something we don't know how to represent for SDB. */
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
break;
|
1997-12-20 12:31:54 +01:00
|
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
break;
|
1991-12-23 23:45:25 +01:00
|
|
|
|
}
|
|
|
|
|
PUT_SDB_TYPE (plain_type (type));
|
|
|
|
|
PUT_SDB_ENDEF;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Output SDB information for a top-level initialized variable
|
|
|
|
|
that has been delayed. */
|
|
|
|
|
|
Makefile.in (emit-rtl.o, c-decl.o): Depend on debug.h.
* Makefile.in (emit-rtl.o, c-decl.o): Depend on debug.h.
(final.o): Don't depend on xcoffout.h, dbxout.h or sdbout.h.
(toplev.o): Don't depend on xcoffout.h.
* c-decl.c: Include debug.h
(duplicate_decls): Use debug hook.
* dbxout.c (dbxout_source_file, dbxout_args): Make static.
(dbx_debug_hooks, xcoff_debug_hooks): Update.
(dbxout_types): Remove.
* dbxout.h (dbxout_source_file, dbxout_types, dbxout_args): Remove.
* debug.c (do_nothing_debug_hooks): Update.
(debug_true_tree, debug_nothing_rtx): New.
* debug.h (struct rtx_def): New.
(struct gcc_debug_hooks): New hooks ignore_block,
outlining_inline_function and label.
(debug_true_tree, debug_nothing_rtx, dwarf2out_frame_init,
dwarf2out_frame_finish): New.
* dwarf2out.c (dwarf2out_ignore_block, dwarf2out_abstract_function):
Make static, update prototype.
(dwarf2_debug_hooks): Update.
* dwarf2out.h (dwarf2out_ignore_block, dwarf2out_abstract_function,
dwarf2out_frame_init, dwarf2out_frame_finish): Remove.
* dwarfout.c (dwarf_debug_hooks): Update.
* emit-rtl.c: Include debug.h.
(remove_unnecessary_notes): Use debug hook.
* final.c: Don't include dbxout.h, xcoffout.h or sdbout.h.
(final_scan_insn): Use debug hook.
* integrate.c (output_inline_function): Use debug hook.
* sdbout.c (sdbout_toplevel_data, sdbout_label): Make static.
(sdb_debug_hooks): Update.
* sdbout.h (sdbout_label, sdbout_toplevel_data): Remove.
* toplev.c: Don't include xcoffout.h.
(note_outlining_of_inline_function, debug_ignore_block): Remove.
* toplev.h (note_outlining_of_inline_function, debug_ignore_block):
Remove.
* tree.h (dwarf2out_do_frame): Remove.
From-SVN: r44163
2001-07-19 23:17:09 +02:00
|
|
|
|
static void
|
1991-12-23 23:45:25 +01:00
|
|
|
|
sdbout_toplevel_data (decl)
|
|
|
|
|
tree decl;
|
|
|
|
|
{
|
|
|
|
|
tree type = TREE_TYPE (decl);
|
|
|
|
|
|
1992-05-27 23:54:51 +02:00
|
|
|
|
if (DECL_IGNORED_P (decl))
|
|
|
|
|
return;
|
|
|
|
|
|
1991-12-23 23:45:25 +01:00
|
|
|
|
if (! (TREE_CODE (decl) == VAR_DECL
|
|
|
|
|
&& GET_CODE (DECL_RTL (decl)) == MEM
|
|
|
|
|
&& DECL_INITIAL (decl)))
|
|
|
|
|
abort ();
|
|
|
|
|
|
|
|
|
|
PUT_SDB_DEF (IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)));
|
|
|
|
|
PUT_SDB_VAL (XEXP (DECL_RTL (decl), 0));
|
|
|
|
|
if (TREE_PUBLIC (decl))
|
|
|
|
|
{
|
|
|
|
|
PUT_SDB_SCL (C_EXT);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
PUT_SDB_SCL (C_STAT);
|
|
|
|
|
}
|
|
|
|
|
PUT_SDB_TYPE (plain_type (type));
|
|
|
|
|
PUT_SDB_ENDEF;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#ifdef SDB_ALLOW_FORWARD_REFERENCES
|
|
|
|
|
|
1996-07-04 00:07:53 +02:00
|
|
|
|
/* Machinery to record and output anonymous types. */
|
1991-12-23 23:45:25 +01:00
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
sdbout_queue_anonymous_type (type)
|
|
|
|
|
tree type;
|
|
|
|
|
{
|
2000-10-13 08:26:46 +02:00
|
|
|
|
anonymous_types = tree_cons (NULL_TREE, type, anonymous_types);
|
1991-12-23 23:45:25 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
sdbout_dequeue_anonymous_types ()
|
|
|
|
|
{
|
2001-10-11 05:16:15 +02:00
|
|
|
|
tree types, link;
|
1991-12-23 23:45:25 +01:00
|
|
|
|
|
|
|
|
|
while (anonymous_types)
|
|
|
|
|
{
|
|
|
|
|
types = nreverse (anonymous_types);
|
|
|
|
|
anonymous_types = NULL_TREE;
|
|
|
|
|
|
|
|
|
|
for (link = types; link; link = TREE_CHAIN (link))
|
|
|
|
|
{
|
2001-10-11 05:16:15 +02:00
|
|
|
|
tree type = TREE_VALUE (link);
|
1991-12-23 23:45:25 +01:00
|
|
|
|
|
1992-03-22 00:23:49 +01:00
|
|
|
|
if (type && ! TREE_ASM_WRITTEN (type))
|
1991-12-23 23:45:25 +01:00
|
|
|
|
sdbout_one_type (type);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
/* Given a chain of ..._TYPE nodes, all of which have names,
|
|
|
|
|
output definitions of those names, as typedefs. */
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
sdbout_types (types)
|
2001-10-11 05:16:15 +02:00
|
|
|
|
tree types;
|
1991-12-23 23:45:25 +01:00
|
|
|
|
{
|
2001-10-11 05:16:15 +02:00
|
|
|
|
tree link;
|
1991-12-23 23:45:25 +01:00
|
|
|
|
|
|
|
|
|
for (link = types; link; link = TREE_CHAIN (link))
|
|
|
|
|
sdbout_one_type (link);
|
|
|
|
|
|
|
|
|
|
#ifdef SDB_ALLOW_FORWARD_REFERENCES
|
|
|
|
|
sdbout_dequeue_anonymous_types ();
|
|
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
sdbout_type (type)
|
|
|
|
|
tree type;
|
|
|
|
|
{
|
|
|
|
|
if (type == error_mark_node)
|
|
|
|
|
type = integer_type_node;
|
|
|
|
|
PUT_SDB_TYPE (plain_type (type));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Output types of the fields of type TYPE, if they are structs.
|
|
|
|
|
|
|
|
|
|
Formerly did not chase through pointer types, since that could be circular.
|
|
|
|
|
They must come before TYPE, since forward refs are not allowed.
|
|
|
|
|
Now james@bigtex.cactus.org says to try them. */
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
sdbout_field_types (type)
|
|
|
|
|
tree type;
|
|
|
|
|
{
|
|
|
|
|
tree tail;
|
1998-04-04 15:32:39 +02:00
|
|
|
|
|
1991-12-23 23:45:25 +01:00
|
|
|
|
for (tail = TYPE_FIELDS (type); tail; tail = TREE_CHAIN (tail))
|
2001-01-30 02:26:25 +01:00
|
|
|
|
/* This condition should match the one for emitting the actual
|
|
|
|
|
members below. */
|
1998-09-24 20:54:38 +02:00
|
|
|
|
if (TREE_CODE (tail) == FIELD_DECL
|
2001-01-30 02:26:25 +01:00
|
|
|
|
&& DECL_NAME (tail)
|
|
|
|
|
&& DECL_SIZE (tail)
|
|
|
|
|
&& host_integerp (DECL_SIZE (tail), 1)
|
|
|
|
|
&& host_integerp (bit_position (tail), 0))
|
1998-09-24 20:54:38 +02:00
|
|
|
|
{
|
|
|
|
|
if (POINTER_TYPE_P (TREE_TYPE (tail)))
|
|
|
|
|
sdbout_one_type (TREE_TYPE (TREE_TYPE (tail)));
|
|
|
|
|
else
|
|
|
|
|
sdbout_one_type (TREE_TYPE (tail));
|
|
|
|
|
}
|
1991-12-23 23:45:25 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Use this to put out the top level defined record and union types
|
|
|
|
|
for later reference. If this is a struct with a name, then put that
|
|
|
|
|
name out. Other unnamed structs will have .xxfake labels generated so
|
|
|
|
|
that they may be referred to later.
|
|
|
|
|
The label will be stored in the KNOWN_TYPE_TAG slot of a type.
|
|
|
|
|
It may NOT be called recursively. */
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
sdbout_one_type (type)
|
|
|
|
|
tree type;
|
|
|
|
|
{
|
1995-05-02 01:50:11 +02:00
|
|
|
|
if (current_function_decl != NULL_TREE
|
|
|
|
|
&& DECL_SECTION_NAME (current_function_decl) != NULL_TREE)
|
|
|
|
|
; /* Don't change section amid function. */
|
|
|
|
|
else
|
|
|
|
|
text_section ();
|
1991-12-23 23:45:25 +01:00
|
|
|
|
|
|
|
|
|
switch (TREE_CODE (type))
|
|
|
|
|
{
|
|
|
|
|
case RECORD_TYPE:
|
|
|
|
|
case UNION_TYPE:
|
1993-04-13 12:47:33 +02:00
|
|
|
|
case QUAL_UNION_TYPE:
|
1991-12-23 23:45:25 +01:00
|
|
|
|
case ENUMERAL_TYPE:
|
|
|
|
|
type = TYPE_MAIN_VARIANT (type);
|
|
|
|
|
/* Don't output a type twice. */
|
|
|
|
|
if (TREE_ASM_WRITTEN (type))
|
|
|
|
|
/* James said test TREE_ASM_BEING_WRITTEN here. */
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
/* Output nothing if type is not yet defined. */
|
tree.h (COMPLETE_TYPE_P): New macro.
gcc
* tree.h (COMPLETE_TYPE_P): New macro.
(COMPLETE_OR_VOID_TYPE_P): New macro.
(COMPLETE_OR_UNBOUND_ARRAY_TYPE_P): New macro.
* stor-layout.c (layout_type, case VOID_TYPE): Don't set TYPE_SIZE.
* c-aux-info.c (gen_type): Use them.
* c-common.c (c_expand_expr_stmt): Likewise.
* c-decl.c (poplevel, pushdecl, start_decl, finish_decl,
grokdeclarator, grokparms, finish_struct, start_function,
store_parm_decls, combine_parm_decls): Likewise.
* c-parse.y (cast_expr): Likewise.
* c-typeck.c (require_complete_type, c_sizeof, c_sizeof_nowarn,
c_size_in_bytes, c_alignof, build_component_ref,
build_indirect_ref, build_array_ref, convert_arguments,
build_binary_op, pointer_diff, build_unary_op, digest_init: Likewise.
* calls.c (initialize_argument_information): Likewise.
* convert.c (convert_to_integer): Likewise.
* dbxout.c (dbxout_typedefs, dbxout_type, dbxout_symbol): Likewise.
* dwarfout.c (location_or_const_value_attribute,
output_enumeration_type_die, output_structure_type_die,
output_union_type_die, output_type): Likewise.
* expr.c (safe_from_p, expand_expr): Likewise.
* function.c (assign_parms): Likewise.
* sdbout.c (sdbout_symbol, sdbout_one_type): Likewise.
* tree.c (build_array_type, build_function_type,
build_method_type, build_offset_type, build_complex_type): Likewise.
* c-parse.c, c-parse.h: Regenerated.
gcc/cp
* typeck.c (require_complete_type, complete_type,
complete_type_or_else, c_sizeof, c_sizeof_nowarn,
build_array_ref, convert_arguments, pointer_diff,
build_x_unary_op, build_unary_op, build_c_cast,
build_modify_expr): Use COMPLETE_TYPE_P etc.
* call.c (is_complete, convert_like_real,
build_new_method_call): Likewise.
* class.c (build_vbase_pointer_fields, check_bases,
build_base_field, finish_struct_1, pushclass): Likewise.
* cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
* decl.c (maybe_process_template_type_declaration, pushtag,
pushdecl, redeclaration_error_message, start_decl, start_decl_1,
layout_var_decl, check_initializer, cp_finish_decl,
grokdeclarator, require_complete_types_for_parms,
grok_op_properties, xref_tag, xref_basetypes,
check_function_type): Likewise.
* decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
* friend.c (do_friend): Likewise.
* init.c (build_offset_ref): Likewise.
* parse.y (structsp): Likewise.
* pt.c (maybe_process_partial_specialization,
tsubst_friend_function, instantiate_class_template, tsubst,
do_type_instantiation, instantiate_pending_templates): Likewise.
* repo.c (repo_get_id): Likewise.
* rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
synthesize_tinfo_var, emit_support_tinfos): Likewise.
* search.c (lookup_fnfields_1, lookup_conversions): Likewise.
* semantics.c (begin_class_definition): Likewise.
* tree.c (build_cplus_method_type): Likewise.
* typeck2.c (digest_init, build_functional_cast,
add_exception_specifier): Likewise.
* parse.h, parse.c: Regenerated.
From-SVN: r32671
2000-03-21 19:10:48 +01:00
|
|
|
|
if (!COMPLETE_TYPE_P (type))
|
1991-12-23 23:45:25 +01:00
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
TREE_ASM_WRITTEN (type) = 1;
|
|
|
|
|
#if 1
|
|
|
|
|
/* This is reputed to cause trouble with the following case,
|
1992-07-20 05:26:54 +02:00
|
|
|
|
but perhaps checking TYPE_SIZE above will fix it. */
|
1991-12-23 23:45:25 +01:00
|
|
|
|
|
|
|
|
|
/* Here is a test case:
|
|
|
|
|
|
|
|
|
|
struct foo {
|
|
|
|
|
struct badstr *bbb;
|
|
|
|
|
} forwardref;
|
|
|
|
|
|
|
|
|
|
typedef struct intermediate {
|
|
|
|
|
int aaaa;
|
|
|
|
|
} intermediate_ref;
|
|
|
|
|
|
|
|
|
|
typedef struct badstr {
|
|
|
|
|
int ccccc;
|
|
|
|
|
} badtype; */
|
|
|
|
|
|
|
|
|
|
#if 0
|
|
|
|
|
TREE_ASM_BEING_WRITTEN (type) = 1;
|
|
|
|
|
#endif
|
|
|
|
|
/* This change, which ought to make better output,
|
|
|
|
|
used to make the COFF assembler unhappy.
|
|
|
|
|
Changes involving KNOWN_TYPE_TAG may fix the problem. */
|
|
|
|
|
/* Before really doing anything, output types we want to refer to. */
|
|
|
|
|
/* Note that in version 1 the following two lines
|
|
|
|
|
are not used if forward references are in use. */
|
|
|
|
|
if (TREE_CODE (type) != ENUMERAL_TYPE)
|
|
|
|
|
sdbout_field_types (type);
|
|
|
|
|
#if 0
|
|
|
|
|
TREE_ASM_WRITTEN (type) = 1;
|
|
|
|
|
#endif
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
/* Output a structure type. */
|
|
|
|
|
{
|
|
|
|
|
int size = int_size_in_bytes (type);
|
2000-01-04 17:29:41 +01:00
|
|
|
|
int member_scl = 0;
|
1991-12-23 23:45:25 +01:00
|
|
|
|
tree tem;
|
1992-03-11 05:52:53 +01:00
|
|
|
|
int i, n_baseclasses = 0;
|
1991-12-23 23:45:25 +01:00
|
|
|
|
|
|
|
|
|
/* Record the type tag, but not in its permanent place just yet. */
|
|
|
|
|
sdbout_record_type_name (type);
|
|
|
|
|
|
|
|
|
|
PUT_SDB_DEF (KNOWN_TYPE_TAG (type));
|
|
|
|
|
|
|
|
|
|
switch (TREE_CODE (type))
|
|
|
|
|
{
|
|
|
|
|
case UNION_TYPE:
|
1993-04-13 12:47:33 +02:00
|
|
|
|
case QUAL_UNION_TYPE:
|
1991-12-23 23:45:25 +01:00
|
|
|
|
PUT_SDB_SCL (C_UNTAG);
|
|
|
|
|
PUT_SDB_TYPE (T_UNION);
|
|
|
|
|
member_scl = C_MOU;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case RECORD_TYPE:
|
|
|
|
|
PUT_SDB_SCL (C_STRTAG);
|
|
|
|
|
PUT_SDB_TYPE (T_STRUCT);
|
|
|
|
|
member_scl = C_MOS;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case ENUMERAL_TYPE:
|
|
|
|
|
PUT_SDB_SCL (C_ENTAG);
|
|
|
|
|
PUT_SDB_TYPE (T_ENUM);
|
|
|
|
|
member_scl = C_MOE;
|
|
|
|
|
break;
|
1997-12-20 12:31:54 +01:00
|
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
break;
|
1991-12-23 23:45:25 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
PUT_SDB_SIZE (size);
|
|
|
|
|
PUT_SDB_ENDEF;
|
|
|
|
|
|
1992-03-11 05:52:53 +01:00
|
|
|
|
/* Print out the base class information with fields
|
|
|
|
|
named after the types they hold. */
|
ChangeLog.2, [...]: Fix spelling errors and typos.
* ChangeLog.2, ChangeLog.3, ChangeLog.4, FSFChangeLog.10,
FSFChangeLog.11, c-common.c, c-common.def, c-common.h, c-decl.c,
c-dump.c, c-typeck.c, except.c, sdbout.c, simplify-rtx.c,
timevar.h, tree.h, varasm.c: Fix spelling errors and typos.
From-SVN: r46621
2001-10-30 00:01:45 +01:00
|
|
|
|
/* This is only relevant to aggregate types. TYPE_BINFO is used
|
1998-09-25 16:37:13 +02:00
|
|
|
|
for other purposes in an ENUMERAL_TYPE, so we must exclude that
|
|
|
|
|
case. */
|
|
|
|
|
if (TREE_CODE (type) != ENUMERAL_TYPE)
|
1992-03-11 05:52:53 +01:00
|
|
|
|
{
|
1998-09-25 16:37:13 +02:00
|
|
|
|
if (TYPE_BINFO (type)
|
|
|
|
|
&& TYPE_BINFO_BASETYPES (type))
|
|
|
|
|
n_baseclasses = TREE_VEC_LENGTH (TYPE_BINFO_BASETYPES (type));
|
|
|
|
|
for (i = 0; i < n_baseclasses; i++)
|
1994-06-18 22:48:02 +02:00
|
|
|
|
{
|
1998-09-25 16:37:13 +02:00
|
|
|
|
tree child = TREE_VEC_ELT (BINFO_BASETYPES (TYPE_BINFO (type)),
|
|
|
|
|
i);
|
|
|
|
|
tree child_type = BINFO_TYPE (child);
|
|
|
|
|
tree child_type_name;
|
|
|
|
|
if (TYPE_NAME (child_type) == 0)
|
|
|
|
|
continue;
|
|
|
|
|
if (TREE_CODE (TYPE_NAME (child_type)) == IDENTIFIER_NODE)
|
|
|
|
|
child_type_name = TYPE_NAME (child_type);
|
|
|
|
|
else if (TREE_CODE (TYPE_NAME (child_type)) == TYPE_DECL)
|
|
|
|
|
{
|
|
|
|
|
child_type_name = DECL_NAME (TYPE_NAME (child_type));
|
|
|
|
|
if (child_type_name && template_name_p (child_type_name))
|
|
|
|
|
child_type_name
|
|
|
|
|
= DECL_ASSEMBLER_NAME (TYPE_NAME (child_type));
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
|
|
CONTIN;
|
|
|
|
|
PUT_SDB_DEF (IDENTIFIER_POINTER (child_type_name));
|
* Clean up usages of TREE_INT_CST_LOW.
* c-parse.in (RESTORE_WARN_FLAGS): Use tree_low_cst.
* c-parse.y, c-parse.c, objc/objc-parse.y, objc/objc-parse.c:
Regenerated.
* c-tree.h (min_precision): Move declaration to here.
* c-typeck.c (build_binary_op): Use host_integerp and tree_low_cst.
(build_unary_op, add_pending_init): Use bit_position.
(pending_init_member, process_init_element): Likewise.
(really_start_incremental_init, push_init_level, pop_init_level):
Don't make copies of nodes or modify them in place, use consistent
types when tracking positions, and use tree routines computations.
(set_init_index, output_init_element): Likewise.
(output_pending_init_elements, process_init_element): Likewise.
* dbxout.c (dbxout_type_fields): Use bit_position, host_integerp,
tree_low_cst and int_bit_position; also minor cleanup.
(dbxout_type_method_1, dbxout_range_type, dbxout_type): Likewise.
(print_cst_octal): Precision is unsigned.
(dbxout_symbol): Ensure DECL_INITIAL is in-range and use tree_low_cst.
* dwarf2out.c (ceiling): Input and output are unsigned HOST_WIDE_INT.
(simple_type_align_in_bits): Result is unsigned int.
Use tree_int_low_cst and host_integerp.
(simple_type_size_in_bits): Result is unsigned HOST_WIDE_INT.
(field_byte_offset): Result is HOST_WIDE_INT.
Change types of internal variables so alignments are unsigned int,
offsets are HOST_WIDE_INT and sizes are unsigned HOST_WIDE_INT.
Use host_integerp, tree_low_cst, and int_bit_position.
(add_bit_offset_attribute): Likewise.
(add_data_member_location_attribute): Use tree_cst_low.
(add_bound_info): Use host_integerp, integer_zerop, and integer_onep.
(add_bit_size_attribute): Use tree_low_cst.
(add_pure_or_virtual_attribute, gen_enumeration_type_die): Likewise.
* dwarfout.c: Similar changes to dwarf2out.c.
* expr.c (expand_expr, case ARRAY_REF): Remove redundant code.
* genoutput.c (n_occurences): Return -1 for null string.
(strip_whitespace): Accept null string and make into function.
(scan_operands): Reflect above changes.
* sdbout.c (plain_type_1): Use host_integerp and tree_low_cst.
(sdbout_field_types, sdbout_one_type): Likewise; also use bit_position.
* ssa.c (rename_registers): Add missing cast of arg to bzero.
* tree.c (int_size_in_bytes): Check for too big to represent.
(bit_position, int_bit_position, host_integerp, tree_low_cst): New fns.
* tree.h (host_integerp, tree_low_cst, bit_position, int_bit_position):
New declarations.
(min_precision): Delete from here.
* varasm.c (decode_addr_const): Use host_integerp, bit_position,
and int_bit_position.
* objc/objc-act.c (encode_method_prototype): Sizes are HOST_WIDE_INT.
(encode_method_def): Likewise.
(build_ivar_list_initializer): Use int_bit_position.
(generate_shared_structures): Convert size.
(encode_type, encode_complete_bitfield): Use integer_zerop.
(encode_bitfield): Use tree_low_cst and int_bit_position.
* ch/typeck.c (min_precision): New function.
(build_chill_slice): Use host_integerp and tree_low_cst.
(expand_constant_to_buffer): Likewise and also int_bit_position.
LO is unsigned HOST_WIDE_INT
(build_chill_array_ref_1): Make `i' be HOST_WIDE_INT; use tree_low_cst.
(extract_constant_from_buffer): Sizes are now HOST_WIDE_INT.
Use host_integerp and tree_low_cst.
(build_chill_bin_type): Use host_integerp and tree_low_cst.
(layout_chill_range_type): Use tree_int_cst_sgn, compare_tree_int,
tree_low_cst, and min_precision.
(apply_chill_array_layout): Cleanups for types of variables
and use tree_int_cst_sgn, compare_tree_int, and tree_low_cst.
(apply_chill_field_layout): Likewise.
* cp/class.c (build_vbase_path): Use integer_zerop.
(build_vtable_entry): Use tree_low_cst.
(get_vfield_offset): Use bit_position.
(dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
Use tree_low_cst.
(check_bitfield_decl): Set DECL_SIZE using convert.
(build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
(layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
Use tree_low_cst.
(finish_struct_1): Use bit_position.
(dump_class_hierarchy): Use tree_low_cst.
* cp/cp-tree.h (min_precision): Add declaration.
* cp/decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
* cp/error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
(dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
* cp/expr.c (cplus_expand_constant): Use bit_position.
* cp/init.c (build_vec_init): Use host_integerp and tree_low_cst.
* cp/rtti.c (get_base_offset): Use bit_position.
* cp/typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
host_integerp, and tree_low_cst.
(pointer_int_sum): Use integer_zerop.
(build_component_addr): Use bit_position.
* java/class.c (make_field_value): Properly handle sizes.
(get_dispatch_vector): Use tree_low_cst and host_integerp.
(layout_class_method): Count using trees.
* java/decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with
copy_node.
* java/expr.c (java_array_data_offset): Use int_bit_position.
(build_newarray, build_anewarray): Use host_integerp and tree_low_cst.
(build_invokevirtual): Use tree_low_cst and do computations with trees.
From-SVN: r32607
2000-03-17 18:31:58 +01:00
|
|
|
|
PUT_SDB_INT_VAL (tree_low_cst (BINFO_OFFSET (child), 0));
|
1998-09-25 16:37:13 +02:00
|
|
|
|
PUT_SDB_SCL (member_scl);
|
|
|
|
|
sdbout_type (BINFO_TYPE (child));
|
|
|
|
|
PUT_SDB_ENDEF;
|
1994-06-18 22:48:02 +02:00
|
|
|
|
}
|
1992-03-11 05:52:53 +01:00
|
|
|
|
}
|
|
|
|
|
|
1991-12-23 23:45:25 +01:00
|
|
|
|
/* output the individual fields */
|
|
|
|
|
|
|
|
|
|
if (TREE_CODE (type) == ENUMERAL_TYPE)
|
2000-03-21 00:42:47 +01:00
|
|
|
|
{
|
|
|
|
|
for (tem = TYPE_FIELDS (type); tem; tem = TREE_CHAIN (tem))
|
|
|
|
|
if (host_integerp (TREE_VALUE (tem), 0))
|
|
|
|
|
{
|
|
|
|
|
PUT_SDB_DEF (IDENTIFIER_POINTER (TREE_PURPOSE (tem)));
|
|
|
|
|
PUT_SDB_INT_VAL (tree_low_cst (TREE_VALUE (tem), 0));
|
|
|
|
|
PUT_SDB_SCL (C_MOE);
|
|
|
|
|
PUT_SDB_TYPE (T_MOE);
|
|
|
|
|
PUT_SDB_ENDEF;
|
|
|
|
|
}
|
|
|
|
|
}
|
1991-12-23 23:45:25 +01:00
|
|
|
|
else /* record or union type */
|
|
|
|
|
for (tem = TYPE_FIELDS (type); tem; tem = TREE_CHAIN (tem))
|
|
|
|
|
/* Output the name, type, position (in bits), size (in bits)
|
|
|
|
|
of each field. */
|
|
|
|
|
|
|
|
|
|
/* Omit here the nameless fields that are used to skip bits.
|
|
|
|
|
Also omit fields with variable size or position.
|
|
|
|
|
Also omit non FIELD_DECL nodes that GNU C++ may put here. */
|
|
|
|
|
if (TREE_CODE (tem) == FIELD_DECL
|
2001-01-30 02:26:25 +01:00
|
|
|
|
&& DECL_NAME (tem)
|
|
|
|
|
&& DECL_SIZE (tem)
|
* Clean up usages of TREE_INT_CST_LOW.
* c-parse.in (RESTORE_WARN_FLAGS): Use tree_low_cst.
* c-parse.y, c-parse.c, objc/objc-parse.y, objc/objc-parse.c:
Regenerated.
* c-tree.h (min_precision): Move declaration to here.
* c-typeck.c (build_binary_op): Use host_integerp and tree_low_cst.
(build_unary_op, add_pending_init): Use bit_position.
(pending_init_member, process_init_element): Likewise.
(really_start_incremental_init, push_init_level, pop_init_level):
Don't make copies of nodes or modify them in place, use consistent
types when tracking positions, and use tree routines computations.
(set_init_index, output_init_element): Likewise.
(output_pending_init_elements, process_init_element): Likewise.
* dbxout.c (dbxout_type_fields): Use bit_position, host_integerp,
tree_low_cst and int_bit_position; also minor cleanup.
(dbxout_type_method_1, dbxout_range_type, dbxout_type): Likewise.
(print_cst_octal): Precision is unsigned.
(dbxout_symbol): Ensure DECL_INITIAL is in-range and use tree_low_cst.
* dwarf2out.c (ceiling): Input and output are unsigned HOST_WIDE_INT.
(simple_type_align_in_bits): Result is unsigned int.
Use tree_int_low_cst and host_integerp.
(simple_type_size_in_bits): Result is unsigned HOST_WIDE_INT.
(field_byte_offset): Result is HOST_WIDE_INT.
Change types of internal variables so alignments are unsigned int,
offsets are HOST_WIDE_INT and sizes are unsigned HOST_WIDE_INT.
Use host_integerp, tree_low_cst, and int_bit_position.
(add_bit_offset_attribute): Likewise.
(add_data_member_location_attribute): Use tree_cst_low.
(add_bound_info): Use host_integerp, integer_zerop, and integer_onep.
(add_bit_size_attribute): Use tree_low_cst.
(add_pure_or_virtual_attribute, gen_enumeration_type_die): Likewise.
* dwarfout.c: Similar changes to dwarf2out.c.
* expr.c (expand_expr, case ARRAY_REF): Remove redundant code.
* genoutput.c (n_occurences): Return -1 for null string.
(strip_whitespace): Accept null string and make into function.
(scan_operands): Reflect above changes.
* sdbout.c (plain_type_1): Use host_integerp and tree_low_cst.
(sdbout_field_types, sdbout_one_type): Likewise; also use bit_position.
* ssa.c (rename_registers): Add missing cast of arg to bzero.
* tree.c (int_size_in_bytes): Check for too big to represent.
(bit_position, int_bit_position, host_integerp, tree_low_cst): New fns.
* tree.h (host_integerp, tree_low_cst, bit_position, int_bit_position):
New declarations.
(min_precision): Delete from here.
* varasm.c (decode_addr_const): Use host_integerp, bit_position,
and int_bit_position.
* objc/objc-act.c (encode_method_prototype): Sizes are HOST_WIDE_INT.
(encode_method_def): Likewise.
(build_ivar_list_initializer): Use int_bit_position.
(generate_shared_structures): Convert size.
(encode_type, encode_complete_bitfield): Use integer_zerop.
(encode_bitfield): Use tree_low_cst and int_bit_position.
* ch/typeck.c (min_precision): New function.
(build_chill_slice): Use host_integerp and tree_low_cst.
(expand_constant_to_buffer): Likewise and also int_bit_position.
LO is unsigned HOST_WIDE_INT
(build_chill_array_ref_1): Make `i' be HOST_WIDE_INT; use tree_low_cst.
(extract_constant_from_buffer): Sizes are now HOST_WIDE_INT.
Use host_integerp and tree_low_cst.
(build_chill_bin_type): Use host_integerp and tree_low_cst.
(layout_chill_range_type): Use tree_int_cst_sgn, compare_tree_int,
tree_low_cst, and min_precision.
(apply_chill_array_layout): Cleanups for types of variables
and use tree_int_cst_sgn, compare_tree_int, and tree_low_cst.
(apply_chill_field_layout): Likewise.
* cp/class.c (build_vbase_path): Use integer_zerop.
(build_vtable_entry): Use tree_low_cst.
(get_vfield_offset): Use bit_position.
(dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
Use tree_low_cst.
(check_bitfield_decl): Set DECL_SIZE using convert.
(build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
(layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
Use tree_low_cst.
(finish_struct_1): Use bit_position.
(dump_class_hierarchy): Use tree_low_cst.
* cp/cp-tree.h (min_precision): Add declaration.
* cp/decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
* cp/error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
(dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
* cp/expr.c (cplus_expand_constant): Use bit_position.
* cp/init.c (build_vec_init): Use host_integerp and tree_low_cst.
* cp/rtti.c (get_base_offset): Use bit_position.
* cp/typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
host_integerp, and tree_low_cst.
(pointer_int_sum): Use integer_zerop.
(build_component_addr): Use bit_position.
* java/class.c (make_field_value): Properly handle sizes.
(get_dispatch_vector): Use tree_low_cst and host_integerp.
(layout_class_method): Count using trees.
* java/decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with
copy_node.
* java/expr.c (java_array_data_offset): Use int_bit_position.
(build_newarray, build_anewarray): Use host_integerp and tree_low_cst.
(build_invokevirtual): Use tree_low_cst and do computations with trees.
From-SVN: r32607
2000-03-17 18:31:58 +01:00
|
|
|
|
&& host_integerp (DECL_SIZE (tem), 1)
|
|
|
|
|
&& host_integerp (bit_position (tem), 0))
|
1991-12-23 23:45:25 +01:00
|
|
|
|
{
|
2000-10-20 21:17:41 +02:00
|
|
|
|
const char *name;
|
1994-06-18 22:42:18 +02:00
|
|
|
|
|
1991-12-23 23:45:25 +01:00
|
|
|
|
CONTIN;
|
2001-03-21 20:43:36 +01:00
|
|
|
|
name = IDENTIFIER_POINTER (DECL_NAME (tem));
|
1994-06-18 22:42:18 +02:00
|
|
|
|
PUT_SDB_DEF (name);
|
1991-12-23 23:45:25 +01:00
|
|
|
|
if (DECL_BIT_FIELD_TYPE (tem))
|
|
|
|
|
{
|
* Clean up usages of TREE_INT_CST_LOW.
* c-parse.in (RESTORE_WARN_FLAGS): Use tree_low_cst.
* c-parse.y, c-parse.c, objc/objc-parse.y, objc/objc-parse.c:
Regenerated.
* c-tree.h (min_precision): Move declaration to here.
* c-typeck.c (build_binary_op): Use host_integerp and tree_low_cst.
(build_unary_op, add_pending_init): Use bit_position.
(pending_init_member, process_init_element): Likewise.
(really_start_incremental_init, push_init_level, pop_init_level):
Don't make copies of nodes or modify them in place, use consistent
types when tracking positions, and use tree routines computations.
(set_init_index, output_init_element): Likewise.
(output_pending_init_elements, process_init_element): Likewise.
* dbxout.c (dbxout_type_fields): Use bit_position, host_integerp,
tree_low_cst and int_bit_position; also minor cleanup.
(dbxout_type_method_1, dbxout_range_type, dbxout_type): Likewise.
(print_cst_octal): Precision is unsigned.
(dbxout_symbol): Ensure DECL_INITIAL is in-range and use tree_low_cst.
* dwarf2out.c (ceiling): Input and output are unsigned HOST_WIDE_INT.
(simple_type_align_in_bits): Result is unsigned int.
Use tree_int_low_cst and host_integerp.
(simple_type_size_in_bits): Result is unsigned HOST_WIDE_INT.
(field_byte_offset): Result is HOST_WIDE_INT.
Change types of internal variables so alignments are unsigned int,
offsets are HOST_WIDE_INT and sizes are unsigned HOST_WIDE_INT.
Use host_integerp, tree_low_cst, and int_bit_position.
(add_bit_offset_attribute): Likewise.
(add_data_member_location_attribute): Use tree_cst_low.
(add_bound_info): Use host_integerp, integer_zerop, and integer_onep.
(add_bit_size_attribute): Use tree_low_cst.
(add_pure_or_virtual_attribute, gen_enumeration_type_die): Likewise.
* dwarfout.c: Similar changes to dwarf2out.c.
* expr.c (expand_expr, case ARRAY_REF): Remove redundant code.
* genoutput.c (n_occurences): Return -1 for null string.
(strip_whitespace): Accept null string and make into function.
(scan_operands): Reflect above changes.
* sdbout.c (plain_type_1): Use host_integerp and tree_low_cst.
(sdbout_field_types, sdbout_one_type): Likewise; also use bit_position.
* ssa.c (rename_registers): Add missing cast of arg to bzero.
* tree.c (int_size_in_bytes): Check for too big to represent.
(bit_position, int_bit_position, host_integerp, tree_low_cst): New fns.
* tree.h (host_integerp, tree_low_cst, bit_position, int_bit_position):
New declarations.
(min_precision): Delete from here.
* varasm.c (decode_addr_const): Use host_integerp, bit_position,
and int_bit_position.
* objc/objc-act.c (encode_method_prototype): Sizes are HOST_WIDE_INT.
(encode_method_def): Likewise.
(build_ivar_list_initializer): Use int_bit_position.
(generate_shared_structures): Convert size.
(encode_type, encode_complete_bitfield): Use integer_zerop.
(encode_bitfield): Use tree_low_cst and int_bit_position.
* ch/typeck.c (min_precision): New function.
(build_chill_slice): Use host_integerp and tree_low_cst.
(expand_constant_to_buffer): Likewise and also int_bit_position.
LO is unsigned HOST_WIDE_INT
(build_chill_array_ref_1): Make `i' be HOST_WIDE_INT; use tree_low_cst.
(extract_constant_from_buffer): Sizes are now HOST_WIDE_INT.
Use host_integerp and tree_low_cst.
(build_chill_bin_type): Use host_integerp and tree_low_cst.
(layout_chill_range_type): Use tree_int_cst_sgn, compare_tree_int,
tree_low_cst, and min_precision.
(apply_chill_array_layout): Cleanups for types of variables
and use tree_int_cst_sgn, compare_tree_int, and tree_low_cst.
(apply_chill_field_layout): Likewise.
* cp/class.c (build_vbase_path): Use integer_zerop.
(build_vtable_entry): Use tree_low_cst.
(get_vfield_offset): Use bit_position.
(dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
Use tree_low_cst.
(check_bitfield_decl): Set DECL_SIZE using convert.
(build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
(layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
Use tree_low_cst.
(finish_struct_1): Use bit_position.
(dump_class_hierarchy): Use tree_low_cst.
* cp/cp-tree.h (min_precision): Add declaration.
* cp/decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
* cp/error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
(dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
* cp/expr.c (cplus_expand_constant): Use bit_position.
* cp/init.c (build_vec_init): Use host_integerp and tree_low_cst.
* cp/rtti.c (get_base_offset): Use bit_position.
* cp/typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
host_integerp, and tree_low_cst.
(pointer_int_sum): Use integer_zerop.
(build_component_addr): Use bit_position.
* java/class.c (make_field_value): Properly handle sizes.
(get_dispatch_vector): Use tree_low_cst and host_integerp.
(layout_class_method): Count using trees.
* java/decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with
copy_node.
* java/expr.c (java_array_data_offset): Use int_bit_position.
(build_newarray, build_anewarray): Use host_integerp and tree_low_cst.
(build_invokevirtual): Use tree_low_cst and do computations with trees.
From-SVN: r32607
2000-03-17 18:31:58 +01:00
|
|
|
|
PUT_SDB_INT_VAL (int_bit_position (tem));
|
1991-12-23 23:45:25 +01:00
|
|
|
|
PUT_SDB_SCL (C_FIELD);
|
|
|
|
|
sdbout_type (DECL_BIT_FIELD_TYPE (tem));
|
* Clean up usages of TREE_INT_CST_LOW.
* c-parse.in (RESTORE_WARN_FLAGS): Use tree_low_cst.
* c-parse.y, c-parse.c, objc/objc-parse.y, objc/objc-parse.c:
Regenerated.
* c-tree.h (min_precision): Move declaration to here.
* c-typeck.c (build_binary_op): Use host_integerp and tree_low_cst.
(build_unary_op, add_pending_init): Use bit_position.
(pending_init_member, process_init_element): Likewise.
(really_start_incremental_init, push_init_level, pop_init_level):
Don't make copies of nodes or modify them in place, use consistent
types when tracking positions, and use tree routines computations.
(set_init_index, output_init_element): Likewise.
(output_pending_init_elements, process_init_element): Likewise.
* dbxout.c (dbxout_type_fields): Use bit_position, host_integerp,
tree_low_cst and int_bit_position; also minor cleanup.
(dbxout_type_method_1, dbxout_range_type, dbxout_type): Likewise.
(print_cst_octal): Precision is unsigned.
(dbxout_symbol): Ensure DECL_INITIAL is in-range and use tree_low_cst.
* dwarf2out.c (ceiling): Input and output are unsigned HOST_WIDE_INT.
(simple_type_align_in_bits): Result is unsigned int.
Use tree_int_low_cst and host_integerp.
(simple_type_size_in_bits): Result is unsigned HOST_WIDE_INT.
(field_byte_offset): Result is HOST_WIDE_INT.
Change types of internal variables so alignments are unsigned int,
offsets are HOST_WIDE_INT and sizes are unsigned HOST_WIDE_INT.
Use host_integerp, tree_low_cst, and int_bit_position.
(add_bit_offset_attribute): Likewise.
(add_data_member_location_attribute): Use tree_cst_low.
(add_bound_info): Use host_integerp, integer_zerop, and integer_onep.
(add_bit_size_attribute): Use tree_low_cst.
(add_pure_or_virtual_attribute, gen_enumeration_type_die): Likewise.
* dwarfout.c: Similar changes to dwarf2out.c.
* expr.c (expand_expr, case ARRAY_REF): Remove redundant code.
* genoutput.c (n_occurences): Return -1 for null string.
(strip_whitespace): Accept null string and make into function.
(scan_operands): Reflect above changes.
* sdbout.c (plain_type_1): Use host_integerp and tree_low_cst.
(sdbout_field_types, sdbout_one_type): Likewise; also use bit_position.
* ssa.c (rename_registers): Add missing cast of arg to bzero.
* tree.c (int_size_in_bytes): Check for too big to represent.
(bit_position, int_bit_position, host_integerp, tree_low_cst): New fns.
* tree.h (host_integerp, tree_low_cst, bit_position, int_bit_position):
New declarations.
(min_precision): Delete from here.
* varasm.c (decode_addr_const): Use host_integerp, bit_position,
and int_bit_position.
* objc/objc-act.c (encode_method_prototype): Sizes are HOST_WIDE_INT.
(encode_method_def): Likewise.
(build_ivar_list_initializer): Use int_bit_position.
(generate_shared_structures): Convert size.
(encode_type, encode_complete_bitfield): Use integer_zerop.
(encode_bitfield): Use tree_low_cst and int_bit_position.
* ch/typeck.c (min_precision): New function.
(build_chill_slice): Use host_integerp and tree_low_cst.
(expand_constant_to_buffer): Likewise and also int_bit_position.
LO is unsigned HOST_WIDE_INT
(build_chill_array_ref_1): Make `i' be HOST_WIDE_INT; use tree_low_cst.
(extract_constant_from_buffer): Sizes are now HOST_WIDE_INT.
Use host_integerp and tree_low_cst.
(build_chill_bin_type): Use host_integerp and tree_low_cst.
(layout_chill_range_type): Use tree_int_cst_sgn, compare_tree_int,
tree_low_cst, and min_precision.
(apply_chill_array_layout): Cleanups for types of variables
and use tree_int_cst_sgn, compare_tree_int, and tree_low_cst.
(apply_chill_field_layout): Likewise.
* cp/class.c (build_vbase_path): Use integer_zerop.
(build_vtable_entry): Use tree_low_cst.
(get_vfield_offset): Use bit_position.
(dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
Use tree_low_cst.
(check_bitfield_decl): Set DECL_SIZE using convert.
(build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
(layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
Use tree_low_cst.
(finish_struct_1): Use bit_position.
(dump_class_hierarchy): Use tree_low_cst.
* cp/cp-tree.h (min_precision): Add declaration.
* cp/decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
* cp/error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
(dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
* cp/expr.c (cplus_expand_constant): Use bit_position.
* cp/init.c (build_vec_init): Use host_integerp and tree_low_cst.
* cp/rtti.c (get_base_offset): Use bit_position.
* cp/typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
host_integerp, and tree_low_cst.
(pointer_int_sum): Use integer_zerop.
(build_component_addr): Use bit_position.
* java/class.c (make_field_value): Properly handle sizes.
(get_dispatch_vector): Use tree_low_cst and host_integerp.
(layout_class_method): Count using trees.
* java/decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with
copy_node.
* java/expr.c (java_array_data_offset): Use int_bit_position.
(build_newarray, build_anewarray): Use host_integerp and tree_low_cst.
(build_invokevirtual): Use tree_low_cst and do computations with trees.
From-SVN: r32607
2000-03-17 18:31:58 +01:00
|
|
|
|
PUT_SDB_SIZE (tree_low_cst (DECL_SIZE (tem), 1));
|
1991-12-23 23:45:25 +01:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
* Clean up usages of TREE_INT_CST_LOW.
* c-parse.in (RESTORE_WARN_FLAGS): Use tree_low_cst.
* c-parse.y, c-parse.c, objc/objc-parse.y, objc/objc-parse.c:
Regenerated.
* c-tree.h (min_precision): Move declaration to here.
* c-typeck.c (build_binary_op): Use host_integerp and tree_low_cst.
(build_unary_op, add_pending_init): Use bit_position.
(pending_init_member, process_init_element): Likewise.
(really_start_incremental_init, push_init_level, pop_init_level):
Don't make copies of nodes or modify them in place, use consistent
types when tracking positions, and use tree routines computations.
(set_init_index, output_init_element): Likewise.
(output_pending_init_elements, process_init_element): Likewise.
* dbxout.c (dbxout_type_fields): Use bit_position, host_integerp,
tree_low_cst and int_bit_position; also minor cleanup.
(dbxout_type_method_1, dbxout_range_type, dbxout_type): Likewise.
(print_cst_octal): Precision is unsigned.
(dbxout_symbol): Ensure DECL_INITIAL is in-range and use tree_low_cst.
* dwarf2out.c (ceiling): Input and output are unsigned HOST_WIDE_INT.
(simple_type_align_in_bits): Result is unsigned int.
Use tree_int_low_cst and host_integerp.
(simple_type_size_in_bits): Result is unsigned HOST_WIDE_INT.
(field_byte_offset): Result is HOST_WIDE_INT.
Change types of internal variables so alignments are unsigned int,
offsets are HOST_WIDE_INT and sizes are unsigned HOST_WIDE_INT.
Use host_integerp, tree_low_cst, and int_bit_position.
(add_bit_offset_attribute): Likewise.
(add_data_member_location_attribute): Use tree_cst_low.
(add_bound_info): Use host_integerp, integer_zerop, and integer_onep.
(add_bit_size_attribute): Use tree_low_cst.
(add_pure_or_virtual_attribute, gen_enumeration_type_die): Likewise.
* dwarfout.c: Similar changes to dwarf2out.c.
* expr.c (expand_expr, case ARRAY_REF): Remove redundant code.
* genoutput.c (n_occurences): Return -1 for null string.
(strip_whitespace): Accept null string and make into function.
(scan_operands): Reflect above changes.
* sdbout.c (plain_type_1): Use host_integerp and tree_low_cst.
(sdbout_field_types, sdbout_one_type): Likewise; also use bit_position.
* ssa.c (rename_registers): Add missing cast of arg to bzero.
* tree.c (int_size_in_bytes): Check for too big to represent.
(bit_position, int_bit_position, host_integerp, tree_low_cst): New fns.
* tree.h (host_integerp, tree_low_cst, bit_position, int_bit_position):
New declarations.
(min_precision): Delete from here.
* varasm.c (decode_addr_const): Use host_integerp, bit_position,
and int_bit_position.
* objc/objc-act.c (encode_method_prototype): Sizes are HOST_WIDE_INT.
(encode_method_def): Likewise.
(build_ivar_list_initializer): Use int_bit_position.
(generate_shared_structures): Convert size.
(encode_type, encode_complete_bitfield): Use integer_zerop.
(encode_bitfield): Use tree_low_cst and int_bit_position.
* ch/typeck.c (min_precision): New function.
(build_chill_slice): Use host_integerp and tree_low_cst.
(expand_constant_to_buffer): Likewise and also int_bit_position.
LO is unsigned HOST_WIDE_INT
(build_chill_array_ref_1): Make `i' be HOST_WIDE_INT; use tree_low_cst.
(extract_constant_from_buffer): Sizes are now HOST_WIDE_INT.
Use host_integerp and tree_low_cst.
(build_chill_bin_type): Use host_integerp and tree_low_cst.
(layout_chill_range_type): Use tree_int_cst_sgn, compare_tree_int,
tree_low_cst, and min_precision.
(apply_chill_array_layout): Cleanups for types of variables
and use tree_int_cst_sgn, compare_tree_int, and tree_low_cst.
(apply_chill_field_layout): Likewise.
* cp/class.c (build_vbase_path): Use integer_zerop.
(build_vtable_entry): Use tree_low_cst.
(get_vfield_offset): Use bit_position.
(dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
Use tree_low_cst.
(check_bitfield_decl): Set DECL_SIZE using convert.
(build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
(layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
Use tree_low_cst.
(finish_struct_1): Use bit_position.
(dump_class_hierarchy): Use tree_low_cst.
* cp/cp-tree.h (min_precision): Add declaration.
* cp/decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
* cp/error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
(dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
* cp/expr.c (cplus_expand_constant): Use bit_position.
* cp/init.c (build_vec_init): Use host_integerp and tree_low_cst.
* cp/rtti.c (get_base_offset): Use bit_position.
* cp/typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
host_integerp, and tree_low_cst.
(pointer_int_sum): Use integer_zerop.
(build_component_addr): Use bit_position.
* java/class.c (make_field_value): Properly handle sizes.
(get_dispatch_vector): Use tree_low_cst and host_integerp.
(layout_class_method): Count using trees.
* java/decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with
copy_node.
* java/expr.c (java_array_data_offset): Use int_bit_position.
(build_newarray, build_anewarray): Use host_integerp and tree_low_cst.
(build_invokevirtual): Use tree_low_cst and do computations with trees.
From-SVN: r32607
2000-03-17 18:31:58 +01:00
|
|
|
|
PUT_SDB_INT_VAL (int_bit_position (tem) / BITS_PER_UNIT);
|
1991-12-23 23:45:25 +01:00
|
|
|
|
PUT_SDB_SCL (member_scl);
|
|
|
|
|
sdbout_type (TREE_TYPE (tem));
|
|
|
|
|
}
|
|
|
|
|
PUT_SDB_ENDEF;
|
|
|
|
|
}
|
|
|
|
|
/* output end of a structure,union, or enumeral definition */
|
|
|
|
|
|
|
|
|
|
PUT_SDB_PLAIN_DEF ("eos");
|
|
|
|
|
PUT_SDB_INT_VAL (size);
|
|
|
|
|
PUT_SDB_SCL (C_EOS);
|
|
|
|
|
PUT_SDB_TAG (KNOWN_TYPE_TAG (type));
|
|
|
|
|
PUT_SDB_SIZE (size);
|
|
|
|
|
PUT_SDB_ENDEF;
|
|
|
|
|
break;
|
1997-12-20 12:31:54 +01:00
|
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
break;
|
1991-12-23 23:45:25 +01:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* The following two functions output definitions of function parameters.
|
|
|
|
|
Each parameter gets a definition locating it in the parameter list.
|
|
|
|
|
Each parameter that is a register variable gets a second definition
|
|
|
|
|
locating it in the register.
|
|
|
|
|
|
|
|
|
|
Printing or argument lists in gdb uses the definitions that
|
|
|
|
|
locate in the parameter list. But reference to the variable in
|
|
|
|
|
expressions uses preferentially the definition as a register. */
|
|
|
|
|
|
|
|
|
|
/* Output definitions, referring to storage in the parmlist,
|
|
|
|
|
of all the parms in PARMS, which is a chain of PARM_DECL nodes. */
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
sdbout_parms (parms)
|
|
|
|
|
tree parms;
|
|
|
|
|
{
|
|
|
|
|
for (; parms; parms = TREE_CHAIN (parms))
|
|
|
|
|
if (DECL_NAME (parms))
|
|
|
|
|
{
|
|
|
|
|
int current_sym_value = 0;
|
2000-10-20 21:17:41 +02:00
|
|
|
|
const char *name = IDENTIFIER_POINTER (DECL_NAME (parms));
|
1991-12-23 23:45:25 +01:00
|
|
|
|
|
|
|
|
|
if (name == 0 || *name == 0)
|
|
|
|
|
name = gen_fake_label ();
|
|
|
|
|
|
|
|
|
|
/* Perform any necessary register eliminations on the parameter's rtl,
|
|
|
|
|
so that the debugging output will be accurate. */
|
1997-05-07 01:05:54 +02:00
|
|
|
|
DECL_INCOMING_RTL (parms)
|
reload.h, [...]: Revert March 15 change.
* reload.h, reload1.c (eliminate_regs), caller-save.c, dbxout.c,
dwarfout.c, dwarf2out.c, reload.c, sdbout.c: Revert March 15 change.
* reload.c (push_reload): If WORD_REGISTER_OPERATIONS, reload the
SUBREG_REG if the word count is unchanged.
* reload1.c (eliminate_regs) [case SET]: If W_R_O, preserve
subregs of identical word size for push_reload.
From-SVN: r17105
1997-12-15 18:55:58 +01:00
|
|
|
|
= eliminate_regs (DECL_INCOMING_RTL (parms), 0, NULL_RTX);
|
2001-03-15 21:48:48 +01:00
|
|
|
|
SET_DECL_RTL (parms,
|
|
|
|
|
eliminate_regs (DECL_RTL (parms), 0, NULL_RTX));
|
1991-12-23 23:45:25 +01:00
|
|
|
|
|
|
|
|
|
if (PARM_PASSED_IN_MEMORY (parms))
|
|
|
|
|
{
|
|
|
|
|
rtx addr = XEXP (DECL_INCOMING_RTL (parms), 0);
|
|
|
|
|
tree type;
|
|
|
|
|
|
|
|
|
|
/* ??? Here we assume that the parm address is indexed
|
|
|
|
|
off the frame pointer or arg pointer.
|
|
|
|
|
If that is not true, we produce meaningless results,
|
|
|
|
|
but do not crash. */
|
|
|
|
|
if (GET_CODE (addr) == PLUS
|
|
|
|
|
&& GET_CODE (XEXP (addr, 1)) == CONST_INT)
|
|
|
|
|
current_sym_value = INTVAL (XEXP (addr, 1));
|
|
|
|
|
else
|
|
|
|
|
current_sym_value = 0;
|
|
|
|
|
|
|
|
|
|
if (GET_CODE (DECL_RTL (parms)) == REG
|
|
|
|
|
&& REGNO (DECL_RTL (parms)) < FIRST_PSEUDO_REGISTER)
|
|
|
|
|
type = DECL_ARG_TYPE (parms);
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
int original_sym_value = current_sym_value;
|
|
|
|
|
|
|
|
|
|
/* This is the case where the parm is passed as an int or
|
|
|
|
|
double and it is converted to a char, short or float
|
|
|
|
|
and stored back in the parmlist. In this case, describe
|
|
|
|
|
the parm with the variable's declared type, and adjust
|
|
|
|
|
the address if the least significant bytes (which we are
|
|
|
|
|
using) are not the first ones. */
|
1994-11-16 22:10:09 +01:00
|
|
|
|
if (BYTES_BIG_ENDIAN
|
|
|
|
|
&& TREE_TYPE (parms) != DECL_ARG_TYPE (parms))
|
1991-12-23 23:45:25 +01:00
|
|
|
|
current_sym_value +=
|
|
|
|
|
(GET_MODE_SIZE (TYPE_MODE (DECL_ARG_TYPE (parms)))
|
|
|
|
|
- GET_MODE_SIZE (GET_MODE (DECL_RTL (parms))));
|
1994-11-16 22:10:09 +01:00
|
|
|
|
|
1991-12-23 23:45:25 +01:00
|
|
|
|
if (GET_CODE (DECL_RTL (parms)) == MEM
|
|
|
|
|
&& GET_CODE (XEXP (DECL_RTL (parms), 0)) == PLUS
|
|
|
|
|
&& (GET_CODE (XEXP (XEXP (DECL_RTL (parms), 0), 1))
|
|
|
|
|
== CONST_INT)
|
|
|
|
|
&& (INTVAL (XEXP (XEXP (DECL_RTL (parms), 0), 1))
|
|
|
|
|
== current_sym_value))
|
|
|
|
|
type = TREE_TYPE (parms);
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
current_sym_value = original_sym_value;
|
|
|
|
|
type = DECL_ARG_TYPE (parms);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
PUT_SDB_DEF (name);
|
|
|
|
|
PUT_SDB_INT_VAL (DEBUGGER_ARG_OFFSET (current_sym_value, addr));
|
|
|
|
|
PUT_SDB_SCL (C_ARG);
|
|
|
|
|
PUT_SDB_TYPE (plain_type (type));
|
|
|
|
|
PUT_SDB_ENDEF;
|
|
|
|
|
}
|
|
|
|
|
else if (GET_CODE (DECL_RTL (parms)) == REG)
|
|
|
|
|
{
|
|
|
|
|
rtx best_rtl;
|
|
|
|
|
/* Parm passed in registers and lives in registers or nowhere. */
|
|
|
|
|
|
|
|
|
|
/* If parm lives in a register, use that register;
|
|
|
|
|
pretend the parm was passed there. It would be more consistent
|
|
|
|
|
to describe the register where the parm was passed,
|
|
|
|
|
but in practice that register usually holds something else. */
|
* Rework fields used to describe positions of bitfields and
modify sizes to be unsigned and use HOST_WIDE_INT.
* alias.c (reg_known_value_size): Now unsigned.
* c-typeck.c (build_unary_op, case ADDR_EXPR): Use byte_position.
(really_start_incremental_init): Use bitsize_zero_node.
(push_init_level, pop_init_level, output_init_element): Likewise.
Use bitsize_unit_node and bitsize_one_node.
(output_pending_init_elements, process_init_element): Likewise.
* combine.c (combine_max_regno, reg_sign_bit_copies): Now unsigned.
(make_extraction): Position and length HOST_WIDE_INT and unsigned
HOST_WIDE_INT, respectively.
(get_pos_from_mask): Passed in value is unsigned HOST_WIDE_INT.
(num_sign_bit_copies): Returns unsigned.
BITWIDTH now unsigned; rework arithmetic.
Remove recursive call from arg to MAX.
(combine_instructions, init_reg_last_arrays): NREGS now unsigned.
(setup_incoming_promotions, can_combine_p, try_combine, simplify_set):
REGNO now unsigned.
(set_nonzero_bit_and_sign_copies): NUM now unsigned.
(find_split_point, expand_compound_operation, make_extraction): LEN
now unsigned HOST_WIDE_INT, POS now HOST_WIDE_INT.
(make_field_assignment): Likewise.
(combine_simplify_rtx): Add cast.
(expand_compound_operation): MODEWIDTH now unsigned; rework arithmetic.
(force_to_mode): WIDTH now unsigned; add cast.
(if_then_else_cond): SIZE now unsigned.
(nonzero_bits): MODE_WIDTH, RESULT_WIDTH, and WIDTH now unsigned.
(extended_count): Now returns unsigned.
(simplify_shift_const): COUNT unsigned; arg is now INPUT_COUNT.
Add SIGNED_COUNT variable; MODE_WORDS and FIRST_COUNT now unsigned.
(simplify_comparison): MODE_WIDTH now unsigned.
(update_table_tick): REGNO and ENDREGNO now unsigned; new var R.
(mark_used_regs_combine): Likewise; rework arithmetic.
(record_value_for_reg): REGNO, ENDREGNO, and I now unsigned.
(record_dead_and_set_regs, reg_dead_at_p, distribute_notes): Likewise.
(record_promoted_value): REGNO now unsigned.
(get_last_value_validate): REGNO, ENDREGNO, and J now unsigned.
(get_last_value): REGNO now unsigned.
(use_crosses_set_p): REGNO and ENDREGNO now unsigned.
(reg_dead_regno, reg_dead_endregno): Now unsigned.
(remove_death): Arg REGNO now unsigned.
(move_deaths): REGNO, DEADREGNO, DEADEND, OUREND, and I now unsigned.
(reg_bitfield_target_p): REGNO, REGNO, ENDREGNO, and ENDTREGNO
now unsigned.
* convert.c (convert_to_integer): INPREC and OUTPREC now unsigned.
* cse.c (struct qty_table_elem): FIRST_REG and LAST_REG now unsigned.
(struct cse_reg_info): REGNO now unsigned.
(cached_regno): Now unsigned.
(REGNO_QTY_VALID_P): Add cast.
(make_new_qty, make_regs_eqv, delete_reg_eqiv): Regno args unsigned.
(remove_invalid_regs): Likewise.
(remove_invalid_subreg_refs): Likewise; arg WORD also unsigned
as are variables END and I.
(get_cse_reg_info, insert): Likewise.
(mention_regs, invalidate_for_call): REGNO, ENDREGNO, and I unsigned.
(canon_hash): Likewise.
(insert_regs, lookup_for_remove): REGNO now unsigned.
(invalidate): REGNO, ENDREGNO, TREGNO, and TENDREGNO now unsigned.
New variable RN.
* dbxout.c (dbxout_parms, dbxout_reg_parms): Don't check for REGNO < 0.
* dwarf2out.c (dwarf2ou_frame_debug_expr): Remove cast.
* emit-rtl.c (subreg_realpart_p): Add cast.
(operand_subword): Arg I is now unsigned as is var PARTWORDS.
(operand_subword_force): Arg I is now unsigned.
* except.c (eh_regs): Variable I is now unsigned.
* explow.c (hard_function_value): BYTES is unsigned HOST_WIDE_INT.
* expmed.c (store_fixed_bit_field): Position is HOST_WIDE_INT;
length is unsigned HOST_WIDE_INT; likewise for internal variables.
(store_split_bit_field, extract_fixed_bit_field): Likewise.
(extract_split_bit_field, store_bit_field, extract_bit_field):
Likewise.
* expr.c (store_constructor_fields, store_constructor, store_field):
Positions are HOST_WIDE_INT and lengths are unsigned HOST_WIDE_INT.
(expand_assignment, expand_expr, expand_expr_unaligned): Likewise.
(do_jump): Likewise.
(move_by_pieces, move_by_pieces_ninsns, clear_by_pieces):
MAX_SIZE is now unsigned.
(emit_group_load): BYTEPOS is HOST_WIDE_INT; BYTELEN is unsigned.
(emit_group_store): Likewise.
(emit_move_insn): I now unsigned.
(store_constructor): Use host_integerp, tree_low_cst, and
bitsize_unit_node.
(get_inner_reference): Return bitpos and bitsize as HOST_WIDE_INT.
Rework all calculations to use trees and new fields.
* expr.h (promoted_input_arg): Regno now unsigned.
(store_bit_field, extract_bit_field): Adjust types of pos and size.
(mark_seen_cases): Arg is HOST_WIDE_INT.
* flow.c (verify_wide_reg_1): REGNO now unsigned.
* fold-const.c (decode_field_reference): Size and pos HOST_WIDE_INT;
precisions and alignments are unsigned.
(optimize_bit_field_compare, fold_truthop): Likewise.
(int_const_binop): Adjust threshold for size_int_type_wide call.
(fold_convert): Likewise.
(size_int_type_wide): Make table larger and fix thinko that only
had half of table used.
(all_ones_mask_p, fold): Precisions are unsigned.
* function.c (put_reg_info_stack): REGNO is unsigned.
(instantiate_decl): Size is HOST_WIDE_INT.
(instantiate_virtual_regs): I is unsigned.
(assign_parms): REGNO, REGNOI, and REGNOR are unsigned.
(promoted_input_arg): REGNO is unsigned.
* function.h (struct function): x_max_parm_reg is now unsigned.
* gcse.c (max_gcse_regno): Now unsigned.
(struct null_pointer_info): min_reg and max_reg now unsigned.
(lookup_set, next_set): REGNO arg now unsigned.
(compute_hash_table): REGNO and I now unsigned.
(handle_avail_expr): regnum_for_replacing now unsigned.
(cprop_insn): REGNO now unsigned.
(delete_null_pointer_checks_1): BLOCK_REG now pointer to unsigned.
* ggc-common.c (ggc_mark_tree_children, case FIELD_DECL): New case.
* global.c (set_preference): SRC_REGNO, DEST_REGNO, and I now unsigned.
* hard-reg-set.h (reg_class_size): Now unsigned.
* integrate.c (mark_stores): LAST_REG and I now unsigned; new UREGNO.
* jump.c (mark_modified_reg): I now unsigned; add cast.
(rtx_equal_for_thread_p): Add cast.
* loop.c (max_reg_before_loop): Now unsigned.
(struct_movable): REGNO now unsigned.
(try_copy_prop): REGNO arg unsigned.
(regs_match_p): XN and YN now unsigned.
(consec_sets_invariant_p, maybe_eliminate_biv): REGNO now unsigned.
(strength_reduce): Likewise; NREGS also unsigned.
(first_increment_giv, last_increment_giv unsigned): Now unsigned.
* loop.h (struct iv_class): REGNO now unsigned.
(max_reg_before_loop, first_increment_giv, last_increment_giv):
Now unsigned.
* machmode.h (mode_size, mode_unit_size): Now unsigned.
(mode_for_size, smallest_mode_for_size): Pass size as unsigned.
* optabs.c (expand_binop): I and NWORDS now unsigned.
(expand_unop): I now unsigned.
* print-tree.c (print_node): Don't print DECL_FIELD_BITPOS, but do
print DECL_FIELD_OFFSET and DECL_FIELD_BIT_OFFSET.
* real.c (significand_size): Now returns unsigned.
* real.h (significand_size): Likewise.
* regclass.c (reg_class_size): Now unsigned.
(choose_hard_reg_mode): Both operands now unsigned.
(record_reg_classes): REGNO and NR now unsigned.
(reg_scan): NREGS now unsigned.
(reg_scan_update): old_max_regno now unsigned.
(reg_scan_mark_refs): Arg MIN_REGNO and var REGNO now unsigned.
* reload.c (find_valid_class): BEST_SIZE now unsigned.
(find_dummy_reload): REGNO, NWORDS, and I now unsigned.
(hard_reg_set_here_p): Args BEG_REGNO and END_REGNO now unsigned.
Likewise for variable R.
(refers_to_regno_for_reload_p): Args REGNO and END_REGNO now unsigned,
as are variables INNER_REGNO and INNER_ENDREGNO; add new variable R.
(find_equiv_reg): Add casts.
(regno_clobbered_p): Arg REGNO now unsigned.
* reload.h (struct reload): NREGS now unsigned.
(refers_to_regno_for_reload_p): Regno args are unsigned.
(regno_clobbered_p): Likewise.
* reload1.c (reg_max_ref_width, spill_stack_slot_width): Now unsigned.
(compute_use_by_pseudos): REGNO now unsigned.
(find_reg): I and J now unsigned, new variable K, and change loop
variables accordingly; THIS_NREGS now unsigned.
(alter_reg): INHERENT_SIZE and TOTAL_SIZE now unsigned.
(spill_hard_reg): REGNO arg now unsigned; add casts.
(forget_old_reloads_1): REGNO, NR, and I now unsigned.
(mark_reload_reg_in_use): Arg REGNO and vars NREGS and I now unsigned.
(clear_reload_reg_in_use): Arg REGNO and vars NREGS, START_REGNO,
END_REGNO, CONFLICT_START, and CONFLICT_END now unsigned.
(reload_reg_free_p, reload_reg_reaches_end_p): Arg REGNO now unsigned.
(choose_reload_regs): MAX_GROUP_SIZE now unsigned.
(emit_reload_insns): REGNO now unsigned.
(reload_cse_move2add): Add cast.
(move2add_note_store): REGNO and I now unsigned; new variable ENDREGNO
and rework loop.
* resource.c (mark_referenced_resources, mark_set_resources): New
variable R; REGNO and LAST_REGNO now unsigned.
(mark_target_live_regs): J and REGNO now unsigned.
* rtl.c (mode_size, mode_unit_size): Now unsigned.
* rtl.h (union rtunion_def): New field rtuint.
(XCUINT): New macro.
(ADDRESSOF_REGNO, REGNO, SUBREG_WORD): New XCUINT.
(operand_subword, operand_subword_force): Word number is unsigned.
(choose_hard_reg_mode): Operands are unsigned.
(refers_to-regno_p, dead_or_set_regno_p): Regno arg is unsigned.
(find_regno_note, find_regno_fusage, replace_regs): Likewise.
(regno_use_in, combine_instructions, remove_death): Likewise.
(reg_scan, reg_scan_update): Likewise.
(extended_count): Return is unsigned.
* rtlanal.c (refers_to_regno_p): Args REGNO and ENDREGNO and vars I,
INNER_REGNO, and INNER_ENDREGNO now unsigned; new variable X_REGNO.
(reg_overlap_mentioned_p): REGNO and ENDREGNO now unsigned.
(reg_set_last_first_regno, reg_set_last_last_regno): Now unsigned.
(reg_reg_last_1): FIRS and LAST now unsigned.
(dead_or_set_p): REGNO, LAST_REGNO, and I now unsigned.
(dead_or_set_regno_p): Arg TEST_REGNO and vars REGNO and ENDREGNO
now unsigned.
(find_regno_note, regno_use_in): Arg REGNO now unsigned.
(find_regno_fusage): Likewise; also var REGNOTE now unsigned.
(find_reg_fusage): Variables REGNO, END_REGNO, and I now unsigned.
(replace_regs): Arg NREGS now unsigned.
* sdbout.c (sdbout_parms, sdbout_reg_parms): Don't check REGNO < 0.
* simplify-rtx.c (simplify_unary_operation): WIDTH now unsigned.
(simplify_binary_operation): Likewise.
(cselib_invalidate_regno): Arg REGNO and variables ENDREGNO, I, and
THIS_LAST now unsigned.
(cselib_record_set): Add cast.
* ssa.c (ssa_max_reg_num): Now unsigned.
(rename_block): REGNO now unsigned.
* stmt.c (expand_return): Bit positions unsigned HOST_WIDE_INT;
sizes now unsigned.
(all_cases_count): Just return -1 not -2.
COUNT, MINVAL, and LASTVAL now HOST_WIDE_INT.
Rework tests to use trees whenever possible.
Use host_integerp and tree_low_cst.
(mark_seen_cases): COUNT arg now HOST_WIDE_INT;
Likewise variable NEXT_NODE_OFFSET; XLO now unsigned.
(check_for_full_enumeration_handing): BYTES_NEEDED, I to HOST_WIDE_INT.
* stor-layout.c (mode_for_size): SIZE arg now unsigned.
(smallest_mode_for_size): Likewise.
(layout_decl): Simplify handing of a specified DECL_SIZE_UNIT.
KNOWN_ALIGN is now an alignment, so simplify code.
Don't turn off DECL_BIT_FIELD if field is BLKmode, but not type.
(start_record_layout): Renamed from new_record_layout_info.
Update to new fields.
(debug_rli, normalize_rli, rli_size_unit_so_far, rli_size_so_far):
New functions.
(place_union_field): Renamed from layout_union_field.
Update to use new fields in rli.
(place_field): Renamed from layout_field.
Major rewrite to use new fields in rli; pass alignment to layout_decl.
(finalize_record_size): Rework to use new fields in rli and handle
union.
(compute_record_mode): Rework to simplify and to use new DECL fields.
(finalize_type_size): Make rounding more consistent.
(finish_union_layout): Deleted.
(layout_type, case VOID_TYPE): Don't set TYPE_SIZE_UNIT either.
(layout_type, case RECORD_TYPE): Call new function names.
(initialize_sizetypes): Set TYPE_IS_SIZETYPE.
(set_sizetype): Set TYPE_IS_SIZETYPE earlier.
(get_best_mode): UNIT is now unsigned; remove casts.
* tree.c (bit_position): Compute from new fields.
(byte_position, int_byte_position): New functions.
(print_type_hash_statistics): Cast to remove warning.
(build_range_type): Use host_integerp and tree_low_cst to try to hash.
(build_index_type): Likewise; make subtype of sizetype.
(build_index_2_type): Pass sizetype to build_range_type.
(build_common_tree_nodes): Use size_int and bitsize_int to
initialize nodes; add bitsize_{zero,one,unit}_node.
* tree.h (DECL_FIELD_CONTEXT): Use FIELD_DECL_CHECK.
(DECL_BIT_FIELD_TYPE, DECL_QUALIFIER, DECL_FCONTEXT): Likewise.
(DECL_PACKED, DECL_BIT_FIELD): Likewise.
(DECL_FIELD_BITPOS): Deleted.
(DECL_FIELD_OFFSET, DECL_FIELD_BIT_OFFSET): New fields.
(DECL_RESULT, DECL_SAVED_INSNS): Use FUNCTION_DECL_CHECK.
(DECL_FRAME_SIZE, DECL_FUNCTION_CODE, DECL_NO_STATIC_CHAIN): Likewise.
(DECL_INLINE, DECL_BUILT_IN_NONANSI, DECL_IS_MALLOC): Likewise.
(DECL_BUILT_IN_CLASS, DECL_STATIC_CONSTRUCTOR): Likewise.
(DECL_STATIC_DESTRUCTOR, DECL_NO_CHECK_MEMORY_USAGE): Likewise.
(DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT, DECL_NO_LIMIT_STACK) Likewise.
(DECL_ORIGINAL_TYPE, TYPE_DECL_SUPPRESS_DEBUG): Use TYPE_DECL_CHECK.
(DECL_ARG_TYPE_AS_WRITEN, DECL_ARG_TYPE): Use PARM_DECL_CHECK.
(DECL_INCOMING_RTL, DECL_TRANSPARENT_UNION): Likewise.
(DECL_ALIGN): Adjust to new field in union.
(DECL_OFFSET_ALIGN): New field.
(DECL_ERROR_ISSUED, DECL_TOO_LATE): Use LABEL_DECL_CHECK.
(DECL_IN_TEXT_SECTION): Use VAR_DECL_CHECK.
(union tree_decl): Add struct for both aligns.
(enum tree_index): Add TI_BITSIZE_{ZERO,ONE,UNIT}.
(bitsize_zero_node, bitsize_one_node, bitsize_unit_node): Added.
(struct record_layout_info): Rework fields to have offset
alignment and byte and bit position.
(start_record_layout, place_field): Renamed from old names.
(rli_size_so_far, rli_size_unit_so_far, normalize_rli): New decls.
(byte_position, int_byte_position): Likewise.
(get_inner_reference): Change types of position and length.
* unroll.c (unroll_loop): New variable R; use for some loops.
MAX_LOCAL_REGNUM and MAXREGNUM now unsigned.
(calculate_giv_inc): Arg REGNO now unsigned.
(copy_loop_body): REGNO and SRC_REGNO now unsigned.
* varasm.c (assemble_variable): Clean up handling of size using
host_integerp and tree_low_cst.
(decode_addr_const): Use byte, not bit, position.
(output_constructor): bitpos and offsets are HOST_WIDE_INT;
use tree_low_cst and int_bit_position.
* objc/objc-act.c (build_ivar_list_initializer): Use byte_position.
* ch/actions.c (check_missing_cases): BYTES_NEEDED is HOST_WIDE_INT.
* ch/typeck.c (expand_constant_to_buffer): Use int_byte_position.
(extract_constant_from_buffer): Likewise.
* cp/class.c (build_vbase_pointer_fields): layout_field now
place_field.
(get_vfield_offset): Use byte_position.
(set_rtti_entry): Set OFFSET to ssizetype zero.
(get_binfo_offset_as_int): Deleted.
(dfs_record_base_offsets): Use tree_low_cst.
(dfs_search_base_offsets): Likewise.
(layout_nonempty_base_or_field): Reflect changes in RLI format
and call byte_position.
(layout_empty_base): Convert offset to ssizetype.
(build_base_field): use rli_size_unit_so_far.
(dfs_propagate_binfo_offsets): Do computation in proper type.
(layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
(layout_class_type): Reflect changes in RLI names and fields.
(finish_struct_1): Set DECL_FIELD_OFFSET.
* cp/dump.c (dequeue_and_dump): Call bit_position.
* cp/expr.c (cplus_expand_constant): Use byte_position.
* cp/rtti.c (expand_class_desc): Use bitsize_one_node.
* cp/typeck.c (build_component_addr): Use byte_position and don't
special case for zero offset.
* f/com.c (ffecom_tree_canonize_ptr_): Use bitsize_zero_node.
(ffecom_tree_canonize_ref_): Likewise.
* java/class.c (make_field_value): Use byte_position.
* java/expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
(java_array_data_offset): Likewise.
* java/java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
bzero call.
From-SVN: r32742
2000-03-25 19:34:13 +01:00
|
|
|
|
if (REGNO (DECL_RTL (parms)) < FIRST_PSEUDO_REGISTER)
|
1991-12-23 23:45:25 +01:00
|
|
|
|
best_rtl = DECL_RTL (parms);
|
|
|
|
|
/* If the parm lives nowhere,
|
|
|
|
|
use the register where it was passed. */
|
|
|
|
|
else
|
|
|
|
|
best_rtl = DECL_INCOMING_RTL (parms);
|
|
|
|
|
|
|
|
|
|
PUT_SDB_DEF (name);
|
|
|
|
|
PUT_SDB_INT_VAL (DBX_REGISTER_NUMBER (REGNO (best_rtl)));
|
|
|
|
|
PUT_SDB_SCL (C_REGPARM);
|
1996-05-19 18:25:37 +02:00
|
|
|
|
PUT_SDB_TYPE (plain_type (TREE_TYPE (parms)));
|
1991-12-23 23:45:25 +01:00
|
|
|
|
PUT_SDB_ENDEF;
|
|
|
|
|
}
|
|
|
|
|
else if (GET_CODE (DECL_RTL (parms)) == MEM
|
|
|
|
|
&& XEXP (DECL_RTL (parms), 0) != const0_rtx)
|
|
|
|
|
{
|
|
|
|
|
/* Parm was passed in registers but lives on the stack. */
|
|
|
|
|
|
|
|
|
|
/* DECL_RTL looks like (MEM (PLUS (REG...) (CONST_INT...))),
|
|
|
|
|
in which case we want the value of that CONST_INT,
|
|
|
|
|
or (MEM (REG ...)) or (MEM (MEM ...)),
|
|
|
|
|
in which case we use a value of zero. */
|
|
|
|
|
if (GET_CODE (XEXP (DECL_RTL (parms), 0)) == REG
|
|
|
|
|
|| GET_CODE (XEXP (DECL_RTL (parms), 0)) == MEM)
|
|
|
|
|
current_sym_value = 0;
|
|
|
|
|
else
|
|
|
|
|
current_sym_value = INTVAL (XEXP (XEXP (DECL_RTL (parms), 0), 1));
|
|
|
|
|
|
|
|
|
|
/* Again, this assumes the offset is based on the arg pointer. */
|
|
|
|
|
PUT_SDB_DEF (name);
|
|
|
|
|
PUT_SDB_INT_VAL (DEBUGGER_ARG_OFFSET (current_sym_value,
|
|
|
|
|
XEXP (DECL_RTL (parms), 0)));
|
|
|
|
|
PUT_SDB_SCL (C_ARG);
|
1996-05-19 18:25:37 +02:00
|
|
|
|
PUT_SDB_TYPE (plain_type (TREE_TYPE (parms)));
|
1991-12-23 23:45:25 +01:00
|
|
|
|
PUT_SDB_ENDEF;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Output definitions for the places where parms live during the function,
|
|
|
|
|
when different from where they were passed, when the parms were passed
|
|
|
|
|
in memory.
|
|
|
|
|
|
|
|
|
|
It is not useful to do this for parms passed in registers
|
|
|
|
|
that live during the function in different registers, because it is
|
|
|
|
|
impossible to look in the passed register for the passed value,
|
|
|
|
|
so we use the within-the-function register to begin with.
|
|
|
|
|
|
|
|
|
|
PARMS is a chain of PARM_DECL nodes. */
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
sdbout_reg_parms (parms)
|
|
|
|
|
tree parms;
|
|
|
|
|
{
|
|
|
|
|
for (; parms; parms = TREE_CHAIN (parms))
|
|
|
|
|
if (DECL_NAME (parms))
|
|
|
|
|
{
|
2000-10-20 21:17:41 +02:00
|
|
|
|
const char *name = IDENTIFIER_POINTER (DECL_NAME (parms));
|
1991-12-23 23:45:25 +01:00
|
|
|
|
|
|
|
|
|
/* Report parms that live in registers during the function
|
|
|
|
|
but were passed in memory. */
|
|
|
|
|
if (GET_CODE (DECL_RTL (parms)) == REG
|
|
|
|
|
&& REGNO (DECL_RTL (parms)) < FIRST_PSEUDO_REGISTER
|
|
|
|
|
&& PARM_PASSED_IN_MEMORY (parms))
|
|
|
|
|
{
|
|
|
|
|
if (name == 0 || *name == 0)
|
|
|
|
|
name = gen_fake_label ();
|
|
|
|
|
PUT_SDB_DEF (name);
|
|
|
|
|
PUT_SDB_INT_VAL (DBX_REGISTER_NUMBER (REGNO (DECL_RTL (parms))));
|
|
|
|
|
PUT_SDB_SCL (C_REG);
|
1996-05-19 18:25:37 +02:00
|
|
|
|
PUT_SDB_TYPE (plain_type (TREE_TYPE (parms)));
|
1991-12-23 23:45:25 +01:00
|
|
|
|
PUT_SDB_ENDEF;
|
|
|
|
|
}
|
|
|
|
|
/* Report parms that live in memory but not where they were passed. */
|
|
|
|
|
else if (GET_CODE (DECL_RTL (parms)) == MEM
|
|
|
|
|
&& GET_CODE (XEXP (DECL_RTL (parms), 0)) == PLUS
|
|
|
|
|
&& GET_CODE (XEXP (XEXP (DECL_RTL (parms), 0), 1)) == CONST_INT
|
|
|
|
|
&& PARM_PASSED_IN_MEMORY (parms)
|
|
|
|
|
&& ! rtx_equal_p (DECL_RTL (parms), DECL_INCOMING_RTL (parms)))
|
|
|
|
|
{
|
|
|
|
|
#if 0 /* ??? It is not clear yet what should replace this. */
|
|
|
|
|
int offset = DECL_OFFSET (parms) / BITS_PER_UNIT;
|
|
|
|
|
/* A parm declared char is really passed as an int,
|
|
|
|
|
so it occupies the least significant bytes.
|
|
|
|
|
On a big-endian machine those are not the low-numbered ones. */
|
1994-11-16 22:10:09 +01:00
|
|
|
|
if (BYTES_BIG_ENDIAN
|
|
|
|
|
&& offset != -1
|
|
|
|
|
&& TREE_TYPE (parms) != DECL_ARG_TYPE (parms))
|
1991-12-23 23:45:25 +01:00
|
|
|
|
offset += (GET_MODE_SIZE (TYPE_MODE (DECL_ARG_TYPE (parms)))
|
|
|
|
|
- GET_MODE_SIZE (GET_MODE (DECL_RTL (parms))));
|
|
|
|
|
if (INTVAL (XEXP (XEXP (DECL_RTL (parms), 0), 1)) != offset) {...}
|
|
|
|
|
#endif
|
|
|
|
|
{
|
|
|
|
|
if (name == 0 || *name == 0)
|
|
|
|
|
name = gen_fake_label ();
|
|
|
|
|
PUT_SDB_DEF (name);
|
|
|
|
|
PUT_SDB_INT_VAL (DEBUGGER_AUTO_OFFSET
|
|
|
|
|
(XEXP (DECL_RTL (parms), 0)));
|
|
|
|
|
PUT_SDB_SCL (C_AUTO);
|
|
|
|
|
PUT_SDB_TYPE (plain_type (TREE_TYPE (parms)));
|
|
|
|
|
PUT_SDB_ENDEF;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
Makefile.in (toplev.o, [...]): Don't depend on dwarfout.h.
* Makefile.in (toplev.o, dwarfout.o, final.o): Don't depend on
dwarfout.h.
* dbxout.c (dbxout_function): Rename dbxout_funciton_decl, move
to conditionally compiled block.
(dbx_debug_hooks, xcoff_debug_hooks): Update.
* dbxout.h (dbxout_function): Remove.
* debug.c (do_nothing_debug_hooks): Update.
* debug.h (struct gcc_debug_hooks): New hooks function_decl,
global_decl, deferred_inline_function.
* dwarf2out.c (dwarf2_debug_hooks): Update.
(dwarf2out_global_decl): New.
* dwarfout.c: Don't include dwarfout.h.
(dwarfout_global_decl, dwarfout_function_decl,
dwarfout_deferred_inline_function): New.
(dwarf_debug_hooks): Update.
* dwarfout.h: Remove.
* final.c: Don't include dwarfout.h.
* sdbout.c (sdbout_global_decl): New.
(sdbout_debug_hooks): Update.
* toplev.c: Don't include dwarfout.h.
(check_global_declarations, rest_of_compilation): Use new debug hooks.
(note_deferral_of_defined_inline_function): Remove.
* toplev.h (note_deferral_of_defined_inline_function): Remove.
* ch/Makefile.in (lex.o): No dependence on dwarfout.h.
* ch/lex.c: Don't include dwarfout.h.
* cp/Make-lang.in (decl2.o): No dependence on dwarfout.h, dwarf2out.h.
(semantics.o, optimize.o): Depend on debug.h not dwarfout.h.
* cp/decl2.c: Don't include dwarfout.h and dwarf2out.h.
* cp/optimize.c: Include debug.h.
(maybe_clone_body): Use debug hook.
* cp/semantics.c: Include debug.h.
(expand_body): Use debug hook.
* po/POTFILES.in: Remove dwarfout.h.
From-SVN: r44145
2001-07-19 08:22:04 +02:00
|
|
|
|
/* Output debug information for a global DECL. Called from toplev.c
|
|
|
|
|
after compilation proper has finished. */
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
sdbout_global_decl (decl)
|
|
|
|
|
tree decl;
|
|
|
|
|
{
|
|
|
|
|
if (TREE_CODE (decl) == VAR_DECL
|
2001-07-22 19:02:53 +02:00
|
|
|
|
&& !DECL_EXTERNAL (decl)
|
|
|
|
|
&& DECL_RTL_SET_P (decl))
|
Makefile.in (toplev.o, [...]): Don't depend on dwarfout.h.
* Makefile.in (toplev.o, dwarfout.o, final.o): Don't depend on
dwarfout.h.
* dbxout.c (dbxout_function): Rename dbxout_funciton_decl, move
to conditionally compiled block.
(dbx_debug_hooks, xcoff_debug_hooks): Update.
* dbxout.h (dbxout_function): Remove.
* debug.c (do_nothing_debug_hooks): Update.
* debug.h (struct gcc_debug_hooks): New hooks function_decl,
global_decl, deferred_inline_function.
* dwarf2out.c (dwarf2_debug_hooks): Update.
(dwarf2out_global_decl): New.
* dwarfout.c: Don't include dwarfout.h.
(dwarfout_global_decl, dwarfout_function_decl,
dwarfout_deferred_inline_function): New.
(dwarf_debug_hooks): Update.
* dwarfout.h: Remove.
* final.c: Don't include dwarfout.h.
* sdbout.c (sdbout_global_decl): New.
(sdbout_debug_hooks): Update.
* toplev.c: Don't include dwarfout.h.
(check_global_declarations, rest_of_compilation): Use new debug hooks.
(note_deferral_of_defined_inline_function): Remove.
* toplev.h (note_deferral_of_defined_inline_function): Remove.
* ch/Makefile.in (lex.o): No dependence on dwarfout.h.
* ch/lex.c: Don't include dwarfout.h.
* cp/Make-lang.in (decl2.o): No dependence on dwarfout.h, dwarf2out.h.
(semantics.o, optimize.o): Depend on debug.h not dwarfout.h.
* cp/decl2.c: Don't include dwarfout.h and dwarf2out.h.
* cp/optimize.c: Include debug.h.
(maybe_clone_body): Use debug hook.
* cp/semantics.c: Include debug.h.
(expand_body): Use debug hook.
* po/POTFILES.in: Remove dwarfout.h.
From-SVN: r44145
2001-07-19 08:22:04 +02:00
|
|
|
|
{
|
|
|
|
|
/* The COFF linker can move initialized global vars to the end.
|
2001-07-22 19:02:53 +02:00
|
|
|
|
And that can screw up the symbol ordering. Defer those for
|
|
|
|
|
sdbout_finish (). */
|
|
|
|
|
if (!DECL_INITIAL (decl) || !TREE_PUBLIC (decl))
|
Makefile.in (toplev.o, [...]): Don't depend on dwarfout.h.
* Makefile.in (toplev.o, dwarfout.o, final.o): Don't depend on
dwarfout.h.
* dbxout.c (dbxout_function): Rename dbxout_funciton_decl, move
to conditionally compiled block.
(dbx_debug_hooks, xcoff_debug_hooks): Update.
* dbxout.h (dbxout_function): Remove.
* debug.c (do_nothing_debug_hooks): Update.
* debug.h (struct gcc_debug_hooks): New hooks function_decl,
global_decl, deferred_inline_function.
* dwarf2out.c (dwarf2_debug_hooks): Update.
(dwarf2out_global_decl): New.
* dwarfout.c: Don't include dwarfout.h.
(dwarfout_global_decl, dwarfout_function_decl,
dwarfout_deferred_inline_function): New.
(dwarf_debug_hooks): Update.
* dwarfout.h: Remove.
* final.c: Don't include dwarfout.h.
* sdbout.c (sdbout_global_decl): New.
(sdbout_debug_hooks): Update.
* toplev.c: Don't include dwarfout.h.
(check_global_declarations, rest_of_compilation): Use new debug hooks.
(note_deferral_of_defined_inline_function): Remove.
* toplev.h (note_deferral_of_defined_inline_function): Remove.
* ch/Makefile.in (lex.o): No dependence on dwarfout.h.
* ch/lex.c: Don't include dwarfout.h.
* cp/Make-lang.in (decl2.o): No dependence on dwarfout.h, dwarf2out.h.
(semantics.o, optimize.o): Depend on debug.h not dwarfout.h.
* cp/decl2.c: Don't include dwarfout.h and dwarf2out.h.
* cp/optimize.c: Include debug.h.
(maybe_clone_body): Use debug hook.
* cp/semantics.c: Include debug.h.
(expand_body): Use debug hook.
* po/POTFILES.in: Remove dwarfout.h.
From-SVN: r44145
2001-07-19 08:22:04 +02:00
|
|
|
|
sdbout_symbol (decl, 0);
|
|
|
|
|
|
|
|
|
|
/* Output COFF information for non-global file-scope initialized
|
|
|
|
|
variables. */
|
2001-07-22 19:02:53 +02:00
|
|
|
|
if (DECL_INITIAL (decl) && GET_CODE (DECL_RTL (decl)) == MEM)
|
Makefile.in (toplev.o, [...]): Don't depend on dwarfout.h.
* Makefile.in (toplev.o, dwarfout.o, final.o): Don't depend on
dwarfout.h.
* dbxout.c (dbxout_function): Rename dbxout_funciton_decl, move
to conditionally compiled block.
(dbx_debug_hooks, xcoff_debug_hooks): Update.
* dbxout.h (dbxout_function): Remove.
* debug.c (do_nothing_debug_hooks): Update.
* debug.h (struct gcc_debug_hooks): New hooks function_decl,
global_decl, deferred_inline_function.
* dwarf2out.c (dwarf2_debug_hooks): Update.
(dwarf2out_global_decl): New.
* dwarfout.c: Don't include dwarfout.h.
(dwarfout_global_decl, dwarfout_function_decl,
dwarfout_deferred_inline_function): New.
(dwarf_debug_hooks): Update.
* dwarfout.h: Remove.
* final.c: Don't include dwarfout.h.
* sdbout.c (sdbout_global_decl): New.
(sdbout_debug_hooks): Update.
* toplev.c: Don't include dwarfout.h.
(check_global_declarations, rest_of_compilation): Use new debug hooks.
(note_deferral_of_defined_inline_function): Remove.
* toplev.h (note_deferral_of_defined_inline_function): Remove.
* ch/Makefile.in (lex.o): No dependence on dwarfout.h.
* ch/lex.c: Don't include dwarfout.h.
* cp/Make-lang.in (decl2.o): No dependence on dwarfout.h, dwarf2out.h.
(semantics.o, optimize.o): Depend on debug.h not dwarfout.h.
* cp/decl2.c: Don't include dwarfout.h and dwarf2out.h.
* cp/optimize.c: Include debug.h.
(maybe_clone_body): Use debug hook.
* cp/semantics.c: Include debug.h.
(expand_body): Use debug hook.
* po/POTFILES.in: Remove dwarfout.h.
From-SVN: r44145
2001-07-19 08:22:04 +02:00
|
|
|
|
sdbout_toplevel_data (decl);
|
|
|
|
|
}
|
|
|
|
|
}
|
2001-07-22 19:02:53 +02:00
|
|
|
|
|
|
|
|
|
/* Output initialized global vars at the end, in the order of
|
|
|
|
|
definition. See comment in sdbout_global_decl. */
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
sdbout_finish (main_filename)
|
|
|
|
|
const char *main_filename ATTRIBUTE_UNUSED;
|
|
|
|
|
{
|
Makefile.in (fold-const.o, [...]): Update.
* Makefile.in (fold-const.o, stor-layout.o, stmt.o,
sdbout.o, profile.o): Update.
* c-common.c (c_common_nodes_and_builtins): Use pushdecl
langhook.
* c-common.h (gettags): Move here from tree.h.
* c-tree.h (pushdecl, pushlevel, poplevel, set_block,
insert_block, getdecls, kept_level_p, global_bindings_p): New.
* dbxout.c (dbxout_init): Use getdecls langhook.
* expr.c (expand_expr): Use insert_block langhook.
* fold-const.c: Include langhooks.h.
(fold_range_test, fold_binary_op_with_conditional_arg,
fold): Use global_bindings_p langhook.
* integrate.c (expand_inline_function): Use insert_block langhook.
* langhooks-def.h (LANG_HOOKS_DECLS, LANG_HOOKS_PUSHLEVEL,
LANG_HOOKS_POPLEVEL, LANG_HOOKS_GLOBAL_BINDINGS_P,
LANG_HOOKS_INSERT_BLOCK, LANG_HOOKS_SET_BLOCK, LANG_HOOKS_PUSHDECL,
LANG_HOOKS_GETDECLS): New.
(LANG_HOOKS_INITIALIZER): Update.
* langhooks.c (lhd_clear_binding_stack): Use global_bindings_p
langhook.
* langhooks.h (struct lang_hooks_for_decls): New.
(struct lang_hooks): Update.
* profile.c: Include langhooks.h.
(output_func_start_profiler): Use new langhooks.
* sdbout.c: Include langhooks.h.
(sdbout_init, sdbout_finish): Use getdecls langhook.
* stmt.c: Include langhooks.h.
(expand_fixup, fixup_gotos): Use new langhooks.
* stor-layout.c: Include langhooks.h.
(variable_size): Use global_bindings_p langhook.
* toplev.c (compile_file): Use getdecls langhook.
* tree-inline.c (remap_block): Use insert_block langhook.
* tree.h (pushdecl, pushlevel, poplevel, set_block, gettags,
insert_block, getdecls, kept_level_p, global_bindings_p): Remove.
cp:
* cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
insert_block, getdecls, global_bindings_p): New.
java:
* cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
insert_block, getdecls, kept_level_p, global_bindings_p): New.
f:
* cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
insert_block, getdecls, global_bindings_p): New.
From-SVN: r51136
2002-03-21 19:39:29 +01:00
|
|
|
|
tree decl = (*lang_hooks.decls.getdecls) ();
|
2001-07-22 19:02:53 +02:00
|
|
|
|
unsigned int len = list_length (decl);
|
|
|
|
|
tree *vec = (tree *) xmalloc (sizeof (tree) * len);
|
|
|
|
|
unsigned int i;
|
|
|
|
|
|
|
|
|
|
/* Process the decls in reverse order--earliest first. Put them
|
|
|
|
|
into VEC from back to front, then take out from front. */
|
|
|
|
|
|
|
|
|
|
for (i = 0; i < len; i++, decl = TREE_CHAIN (decl))
|
|
|
|
|
vec[len - i - 1] = decl;
|
|
|
|
|
|
|
|
|
|
for (i = 0; i < len; i++)
|
|
|
|
|
{
|
|
|
|
|
decl = vec[i];
|
|
|
|
|
if (TREE_CODE (decl) == VAR_DECL
|
|
|
|
|
&& ! DECL_EXTERNAL (decl)
|
|
|
|
|
&& DECL_INITIAL (decl)
|
|
|
|
|
&& TREE_PUBLIC (decl)
|
|
|
|
|
&& DECL_RTL_SET_P (decl))
|
|
|
|
|
sdbout_symbol (decl, 0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
free (vec);
|
|
|
|
|
}
|
Makefile.in (toplev.o, [...]): Don't depend on dwarfout.h.
* Makefile.in (toplev.o, dwarfout.o, final.o): Don't depend on
dwarfout.h.
* dbxout.c (dbxout_function): Rename dbxout_funciton_decl, move
to conditionally compiled block.
(dbx_debug_hooks, xcoff_debug_hooks): Update.
* dbxout.h (dbxout_function): Remove.
* debug.c (do_nothing_debug_hooks): Update.
* debug.h (struct gcc_debug_hooks): New hooks function_decl,
global_decl, deferred_inline_function.
* dwarf2out.c (dwarf2_debug_hooks): Update.
(dwarf2out_global_decl): New.
* dwarfout.c: Don't include dwarfout.h.
(dwarfout_global_decl, dwarfout_function_decl,
dwarfout_deferred_inline_function): New.
(dwarf_debug_hooks): Update.
* dwarfout.h: Remove.
* final.c: Don't include dwarfout.h.
* sdbout.c (sdbout_global_decl): New.
(sdbout_debug_hooks): Update.
* toplev.c: Don't include dwarfout.h.
(check_global_declarations, rest_of_compilation): Use new debug hooks.
(note_deferral_of_defined_inline_function): Remove.
* toplev.h (note_deferral_of_defined_inline_function): Remove.
* ch/Makefile.in (lex.o): No dependence on dwarfout.h.
* ch/lex.c: Don't include dwarfout.h.
* cp/Make-lang.in (decl2.o): No dependence on dwarfout.h, dwarf2out.h.
(semantics.o, optimize.o): Depend on debug.h not dwarfout.h.
* cp/decl2.c: Don't include dwarfout.h and dwarf2out.h.
* cp/optimize.c: Include debug.h.
(maybe_clone_body): Use debug hook.
* cp/semantics.c: Include debug.h.
(expand_body): Use debug hook.
* po/POTFILES.in: Remove dwarfout.h.
From-SVN: r44145
2001-07-19 08:22:04 +02:00
|
|
|
|
|
1991-12-23 23:45:25 +01:00
|
|
|
|
/* 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. */
|
|
|
|
|
|
Makefile.in (final.o): Depend on debug.h.
* Makefile.in (final.o): Depend on debug.h.
* dbxout.c (dbxout_begin_block, dbxout_end_block): New.
(dbx_debug_hooks): Add new hooks.
(xcoff_debug_hooks): New.
* debug.c (debug_nothing_file_int_int): New.
(do_nothing_debug_hooks): Update.
* debug.h (gcc_debug_hooks): New hooks begin_block and end_block.
(debug_nothing_file_int_int): New.
* dwarf2out.c (dwarf2out_begin_block, dwarf2out_end_block): Make
static, update prototype.
(dwarf2_debug_hooks): Update.
* dwarf2out.h (dwarf2out_begin_block, dwarf2out_end_block): Remove.
* dwarfout.c (dwarfout_begin_block, dwarfout_end_block): Make
static, update prototype.
(dwarf_debug_hooks): Update.
* dwarfout.h (dwarfout_begin_block, dwarfout_end_block): Remove.
* final.c: Include debug.h.
(final_scan_insn): Use debug hooks when beginning and ending blocks.
* sdbout.c (sdbout_begin_block, sdbout_end_block): Make
static, update prototype.
(sdb_debug_hooks): Update.
* sdbout.h (sdbout_begin_block, sdbout_end_block): Remove.
* toplev.c: Distinguish between xcoff and dbx.
* f/lex.c (ffelex_file_pop_, ffelex_file_push_, ffelex_hash_):
Call all debug hooks, not just dwarf ones.
From-SVN: r43959
2001-07-12 07:56:27 +02:00
|
|
|
|
static void
|
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
|
|
|
|
sdbout_begin_block (line, n)
|
Makefile.in (final.o): Depend on debug.h.
* Makefile.in (final.o): Depend on debug.h.
* dbxout.c (dbxout_begin_block, dbxout_end_block): New.
(dbx_debug_hooks): Add new hooks.
(xcoff_debug_hooks): New.
* debug.c (debug_nothing_file_int_int): New.
(do_nothing_debug_hooks): Update.
* debug.h (gcc_debug_hooks): New hooks begin_block and end_block.
(debug_nothing_file_int_int): New.
* dwarf2out.c (dwarf2out_begin_block, dwarf2out_end_block): Make
static, update prototype.
(dwarf2_debug_hooks): Update.
* dwarf2out.h (dwarf2out_begin_block, dwarf2out_end_block): Remove.
* dwarfout.c (dwarfout_begin_block, dwarfout_end_block): Make
static, update prototype.
(dwarf_debug_hooks): Update.
* dwarfout.h (dwarfout_begin_block, dwarfout_end_block): Remove.
* final.c: Include debug.h.
(final_scan_insn): Use debug hooks when beginning and ending blocks.
* sdbout.c (sdbout_begin_block, sdbout_end_block): Make
static, update prototype.
(sdb_debug_hooks): Update.
* sdbout.h (sdbout_begin_block, sdbout_end_block): Remove.
* toplev.c: Distinguish between xcoff and dbx.
* f/lex.c (ffelex_file_pop_, ffelex_file_push_, ffelex_hash_):
Call all debug hooks, not just dwarf ones.
From-SVN: r43959
2001-07-12 07:56:27 +02:00
|
|
|
|
unsigned int line;
|
|
|
|
|
unsigned int n;
|
1991-12-23 23:45:25 +01:00
|
|
|
|
{
|
|
|
|
|
tree decl = current_function_decl;
|
|
|
|
|
MAKE_LINE_SAFE (line);
|
1994-04-04 23:39:19 +02:00
|
|
|
|
|
|
|
|
|
/* The SCO compiler does not emit a separate block for the function level
|
|
|
|
|
scope, so we avoid it here also. However, mips ECOFF compilers do emit
|
|
|
|
|
a separate block, so we retain it when MIPS_DEBUGGING_INFO is defined. */
|
|
|
|
|
#ifndef MIPS_DEBUGGING_INFO
|
|
|
|
|
if (n != 1)
|
|
|
|
|
#endif
|
|
|
|
|
PUT_SDB_BLOCK_START (line - sdb_begin_function_line);
|
|
|
|
|
|
1991-12-23 23:45:25 +01:00
|
|
|
|
if (n == 1)
|
|
|
|
|
{
|
|
|
|
|
/* Include the outermost BLOCK's variables in block 1. */
|
2000-02-28 10:51:42 +01:00
|
|
|
|
do_block = BLOCK_NUMBER (DECL_INITIAL (decl));
|
1991-12-23 23:45:25 +01:00
|
|
|
|
sdbout_block (DECL_INITIAL (decl));
|
|
|
|
|
}
|
|
|
|
|
/* If -g1, suppress all the internal symbols of functions
|
|
|
|
|
except for arguments. */
|
|
|
|
|
if (debug_info_level != DINFO_LEVEL_TERSE)
|
|
|
|
|
{
|
|
|
|
|
do_block = n;
|
|
|
|
|
sdbout_block (DECL_INITIAL (decl));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#ifdef SDB_ALLOW_FORWARD_REFERENCES
|
|
|
|
|
sdbout_dequeue_anonymous_types ();
|
|
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Describe the end line-number of an internal block within a function. */
|
|
|
|
|
|
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
|
|
|
|
static void
|
|
|
|
|
sdbout_end_block (line, n)
|
Makefile.in (final.o): Depend on debug.h.
* Makefile.in (final.o): Depend on debug.h.
* dbxout.c (dbxout_begin_block, dbxout_end_block): New.
(dbx_debug_hooks): Add new hooks.
(xcoff_debug_hooks): New.
* debug.c (debug_nothing_file_int_int): New.
(do_nothing_debug_hooks): Update.
* debug.h (gcc_debug_hooks): New hooks begin_block and end_block.
(debug_nothing_file_int_int): New.
* dwarf2out.c (dwarf2out_begin_block, dwarf2out_end_block): Make
static, update prototype.
(dwarf2_debug_hooks): Update.
* dwarf2out.h (dwarf2out_begin_block, dwarf2out_end_block): Remove.
* dwarfout.c (dwarfout_begin_block, dwarfout_end_block): Make
static, update prototype.
(dwarf_debug_hooks): Update.
* dwarfout.h (dwarfout_begin_block, dwarfout_end_block): Remove.
* final.c: Include debug.h.
(final_scan_insn): Use debug hooks when beginning and ending blocks.
* sdbout.c (sdbout_begin_block, sdbout_end_block): Make
static, update prototype.
(sdb_debug_hooks): Update.
* sdbout.h (sdbout_begin_block, sdbout_end_block): Remove.
* toplev.c: Distinguish between xcoff and dbx.
* f/lex.c (ffelex_file_pop_, ffelex_file_push_, ffelex_hash_):
Call all debug hooks, not just dwarf ones.
From-SVN: r43959
2001-07-12 07:56:27 +02:00
|
|
|
|
unsigned int line;
|
|
|
|
|
unsigned int n ATTRIBUTE_UNUSED;
|
1991-12-23 23:45:25 +01:00
|
|
|
|
{
|
|
|
|
|
MAKE_LINE_SAFE (line);
|
1994-04-04 23:39:19 +02:00
|
|
|
|
|
|
|
|
|
/* The SCO compiler does not emit a separate block for the function level
|
|
|
|
|
scope, so we avoid it here also. However, mips ECOFF compilers do emit
|
|
|
|
|
a separate block, so we retain it when MIPS_DEBUGGING_INFO is defined. */
|
|
|
|
|
#ifndef MIPS_DEBUGGING_INFO
|
|
|
|
|
if (n != 1)
|
|
|
|
|
#endif
|
1991-12-23 23:45:25 +01:00
|
|
|
|
PUT_SDB_BLOCK_END (line - sdb_begin_function_line);
|
|
|
|
|
}
|
|
|
|
|
|
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
|
|
|
|
static void
|
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
|
|
|
|
sdbout_source_line (line, filename)
|
|
|
|
|
unsigned int line;
|
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
|
|
|
|
const char *filename ATTRIBUTE_UNUSED;
|
|
|
|
|
{
|
|
|
|
|
/* COFF relative line numbers must be positive. */
|
2001-09-10 12:55:20 +02:00
|
|
|
|
if ((int) line > sdb_begin_function_line)
|
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
|
|
|
|
{
|
|
|
|
|
#ifdef ASM_OUTPUT_SOURCE_LINE
|
|
|
|
|
ASM_OUTPUT_SOURCE_LINE (asm_out_file, line);
|
|
|
|
|
#else
|
|
|
|
|
fprintf (asm_out_file, "\t.ln\t%d\n",
|
|
|
|
|
((sdb_begin_function_line > -1)
|
|
|
|
|
? line - sdb_begin_function_line : 1));
|
|
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
1991-12-23 23:45:25 +01:00
|
|
|
|
/* Output sdb info for the current function name.
|
|
|
|
|
Called from assemble_start_function. */
|
|
|
|
|
|
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
|
|
|
|
static void
|
|
|
|
|
sdbout_begin_function (decl)
|
|
|
|
|
tree decl ATTRIBUTE_UNUSED;
|
1991-12-23 23:45:25 +01:00
|
|
|
|
{
|
|
|
|
|
sdbout_symbol (current_function_decl, 0);
|
|
|
|
|
}
|
|
|
|
|
|
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 (before or after prologue,
|
|
|
|
|
depending on MIPS_DEBUGGING_INFO). Record the function's starting
|
|
|
|
|
line number, so we can output relative line numbers for the other
|
|
|
|
|
lines. Describe beginning of outermost block. Also describe the
|
|
|
|
|
parameter list. */
|
1991-12-23 23:45:25 +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
|
|
|
|
#ifndef MIPS_DEBUGGING_INFO
|
|
|
|
|
static void
|
|
|
|
|
sdbout_begin_prologue (line, file)
|
|
|
|
|
unsigned int line;
|
|
|
|
|
const char *file ATTRIBUTE_UNUSED;
|
|
|
|
|
{
|
2002-08-15 21:59:29 +02:00
|
|
|
|
sdbout_end_prologue (line, file);
|
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
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
static void
|
2002-08-15 21:59:29 +02:00
|
|
|
|
sdbout_end_prologue (line, file)
|
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
|
|
|
|
unsigned int line;
|
2002-08-15 21:59:29 +02:00
|
|
|
|
const char *file ATTRIBUTE_UNUSED;
|
1991-12-23 23:45:25 +01:00
|
|
|
|
{
|
|
|
|
|
sdb_begin_function_line = line - 1;
|
|
|
|
|
PUT_SDB_FUNCTION_START (line);
|
|
|
|
|
sdbout_parms (DECL_ARGUMENTS (current_function_decl));
|
|
|
|
|
sdbout_reg_parms (DECL_ARGUMENTS (current_function_decl));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Called at end of function (before epilogue).
|
|
|
|
|
Describe end of outermost block. */
|
|
|
|
|
|
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
|
|
|
|
static void
|
1991-12-23 23:45:25 +01:00
|
|
|
|
sdbout_end_function (line)
|
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
|
|
|
|
unsigned int line;
|
1991-12-23 23:45:25 +01:00
|
|
|
|
{
|
|
|
|
|
#ifdef SDB_ALLOW_FORWARD_REFERENCES
|
|
|
|
|
sdbout_dequeue_anonymous_types ();
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
MAKE_LINE_SAFE (line);
|
|
|
|
|
PUT_SDB_FUNCTION_END (line - sdb_begin_function_line);
|
|
|
|
|
|
|
|
|
|
/* Indicate we are between functions, for line-number output. */
|
|
|
|
|
sdb_begin_function_line = -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Output sdb info for the absolute end of a function.
|
|
|
|
|
Called after the epilogue is output. */
|
|
|
|
|
|
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
|
|
|
|
static void
|
2002-08-15 21:59:29 +02:00
|
|
|
|
sdbout_end_epilogue (line, file)
|
|
|
|
|
unsigned int line ATTRIBUTE_UNUSED;
|
|
|
|
|
const char *file ATTRIBUTE_UNUSED;
|
1991-12-23 23:45:25 +01:00
|
|
|
|
{
|
unicosmk.h (ASM_OUTPUT_DOUBLE, [...]): Fix format specifier warning.
* alpha/unicosmk.h (ASM_OUTPUT_DOUBLE, ASM_OUTPUT_FLOAT): Fix
format specifier warning.
* convex.h (ASM_OUTPUT_BYTE): Likewise.
* elfos.h (ALIGN_ASM_OP): Undef before defining.
* i386/att.h (ASM_GENERATE_INTERNAL_LABEL): Fix format specifier
warning.
* i386/bsd.h (ASM_GENERATE_INTERNAL_LABEL): Likewise.
* i386/gas.h (ASM_GENERATE_INTERNAL_LABEL): Likewise.
* i386-interix.h (gen_stdcall_suffix): Prototype.
* i386.h (ASM_OUTPUT_BYTE): Fix format specifier warning.
* i386elf.h (ASM_OUTPUT_FLOAT, ASM_OUTPUT_DOUBLE,
ASM_OUTPUT_LONG_DOUBLE): Likewise.
* i386/interix.c (gen_stdcall_suffix): Const-ify.
* i386/next.h (ASM_OUTPUT_LONG_DOUBLE, ASM_OUTPUT_DOUBLE,
ASM_OUTPUT_FLOAT, ASM_GENERATE_INTERNAL_LABEL): Fix format
specifier warnings.
* i386/osfrose.h (ASM_GENERATE_INTERNAL_LABEL): Likewise.
* i386/ptx4-i.h (ASM_OUTPUT_FLOAT, ASM_OUTPUT_DOUBLE,
ASM_OUTPUT_LONG_DOUBLE): Likewise.
* i386/sco5.h (ASM_GENERATE_INTERNAL_LABEL): Likewise.
* i386/sequent.h (ASM_GENERATE_INTERNAL_LABEL): Likewise.
* i386/sun386.h (ASM_GENERATE_INTERNAL_LABEL): Likewise.
* i386/svr3dbx.h (ASM_GENERATE_INTERNAL_LABEL): Likewise.
* m68k/3b1.h (ASM_OUTPUT_DOUBLE, ASM_OUTPUT_LONG_DOUBLE,
ASM_OUTPUT_FLOAT, ASM_GENERATE_INTERNAL_LABEL): Likewise.
* m68k/altos3068.h (ASM_OUTPUT_FLOAT_OPERAND): Likewise.
* m68k/amix.h (ASM_OUTPUT_ASCII, ASM_GENERATE_INTERNAL_LABEL):
Likewise.
* m68k/atari.h (ASM_OUTPUT_ASCII, ASM_GENERATE_INTERNAL_LABEL):
Likewise.
* m68k/crds.h (ASM_OUTPUT_DOUBLE, PRINT_OPERAND): Likewise.
* m68k/dpx2.h (ASM_OUTPUT_LONG_DOUBLE, ASM_OUTPUT_DOUBLE,
ASM_OUTPUT_FLOAT, ASM_OUTPUT_BYTE, ASM_OUTPUT_FLOAT_OPERAND):
Likewise.
* m68k/hp320.h (ASM_OUTPUT_LONG_DOUBLE, ASM_OUTPUT_BYTE):
Likewise.
* m68k.h (ASM_GENERATE_INTERNAL_LABEL, ASM_OUTPUT_BYTE):
Likewise.
* m68k/m68kv4.h (ASM_OUTPUT_ASCII): Delete unused variable.
* m68k/mot3300.h (ASM_OUTPUT_BYTE): Fix format specifier warning.
* m68k/news.h (PRINT_OPERAND): Likewise.
* m68k/next.h (ASM_OUTPUT_DOUBLE, ASM_OUTPUT_FLOAT,
ASM_OUTPUT_FLOAT_OPERAND, ASM_OUTPUT_DOUBLE_OPERAND): Likewise.
* m68k/next21.h (ASM_OUTPUT_FLOAT_OPERAND): Likewise.
* m68k/plexus.h (ASM_SPEC): Insert space between macro name and
definition.
* m68k/sgs.h (ASM_OUTPUT_LONG_DOUBLE, ASM_OUTPUT_DOUBLE,
ASM_OUTPUT_FLOAT, ASM_OUTPUT_ASCII, ASM_OUTPUT_FLOAT_OPERAND,
ASM_OUTPUT_DOUBLE_OPERAND): Fix format specifier warnings.
* m68k/sun3.h (ASM_OUTPUT_FLOAT_OPERAND): Likewise.
* m68k/tower-as.h (ASM_GENERATE_INTERNAL_LABEL, ASM_OUTPUT_DOUBLE,
ASM_OUTPUT_LONG_DOUBLE, ASM_OUTPUT_FLOAT, ASM_OUTPUT_BYTE,
PRINT_OPERAND): Likewise.
* m88k/m88k.h (ASM_GENERATE_INTERNAL_LABEL, ASM_OUTPUT_BYTE):
Likewise.
* mips/elf.h (PUT_SDB_SIZE, ASM_DECLARE_OBJECT_NAME): Likewise.
* mips/elf64.h (PUT_SDB_SIZE, ASM_DECLARE_OBJECT_NAME): Likewise.
* mips/iris5gas.h (PUT_SDB_SIZE): Likewise.
* mips/linux.h (ASM_DECLARE_OBJECT_NAME): Likewise.
* mips.c (mips_output_external_libcall): Mark parameter with
ATTRIBUTE_UNUSED.
(mips_asm_file_start): Move variable into the scope where it's
used.
* mips.h (PUT_SDB_INT_VAL, PUT_SDB_SIZE): Likewise.
* mips/netbsd.h (ASM_DECLARE_OBJECT_NAME): Likewise.
* mips/sni-gas.h (PUT_SDB_SIZE): Likewise.
* ns32k/encore.h (ASM_GENERATE_INTERNAL_LABEL): Likewise.
* ns32k.c (print_operand): Likewise.
* pa.c (print_operand, output_div_insn): Likewise.
* pa.h (ASM_OUTPUT_MI_THUNK, ASM_GENERATE_INTERNAL_LABEL,
ASM_OUTPUT_BYTE, PRINT_OPERAND_ADDRESS): Likewise.
* pa/pa64-hpux.h (UNIQUE_SECTION): Const-ify.
* sparc/linux.h (ASM_GENERATE_INTERNAL_LABEL): Fix format
specifier warnings.
* sparc/linux64.h (ASM_GENERATE_INTERNAL_LABEL): Likewise.
* sparc/pbd.h (ASM_GENERATE_INTERNAL_LABEL): Likewise.
(ASM_OUTPUT_SOURCE_LINE): Don't list macro arguments in undef.
* sparc/vxsim.h (ASM_GENERATE_INTERNAL_LABEL): Fix format
specifier warnings.
* svr3.h (ASM_GENERATE_INTERNAL_LABEL): Likewise.
* sdbout.c (sdbout_end_epilogue): Mark parameter with
ATTRIBUTE_UNUSED.
* varasm.c (assemble_global): Likewise.
From-SVN: r46922
2001-11-11 06:56:47 +01:00
|
|
|
|
const char *const name ATTRIBUTE_UNUSED
|
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
|
|
|
|
= IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (current_function_decl));
|
|
|
|
|
|
|
|
|
|
#ifdef PUT_SDB_EPILOGUE_END
|
|
|
|
|
PUT_SDB_EPILOGUE_END (name);
|
|
|
|
|
#else
|
|
|
|
|
fprintf (asm_out_file, "\t.def\t");
|
|
|
|
|
assemble_name (asm_out_file, name);
|
|
|
|
|
fprintf (asm_out_file, "%s\t.val\t.%s\t.scl\t-1%s\t.endef\n",
|
|
|
|
|
SDB_DELIM, SDB_DELIM, SDB_DELIM);
|
|
|
|
|
#endif
|
1991-12-23 23:45:25 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Output sdb info for the given label. Called only if LABEL_NAME (insn)
|
|
|
|
|
is present. */
|
|
|
|
|
|
Makefile.in (emit-rtl.o, c-decl.o): Depend on debug.h.
* Makefile.in (emit-rtl.o, c-decl.o): Depend on debug.h.
(final.o): Don't depend on xcoffout.h, dbxout.h or sdbout.h.
(toplev.o): Don't depend on xcoffout.h.
* c-decl.c: Include debug.h
(duplicate_decls): Use debug hook.
* dbxout.c (dbxout_source_file, dbxout_args): Make static.
(dbx_debug_hooks, xcoff_debug_hooks): Update.
(dbxout_types): Remove.
* dbxout.h (dbxout_source_file, dbxout_types, dbxout_args): Remove.
* debug.c (do_nothing_debug_hooks): Update.
(debug_true_tree, debug_nothing_rtx): New.
* debug.h (struct rtx_def): New.
(struct gcc_debug_hooks): New hooks ignore_block,
outlining_inline_function and label.
(debug_true_tree, debug_nothing_rtx, dwarf2out_frame_init,
dwarf2out_frame_finish): New.
* dwarf2out.c (dwarf2out_ignore_block, dwarf2out_abstract_function):
Make static, update prototype.
(dwarf2_debug_hooks): Update.
* dwarf2out.h (dwarf2out_ignore_block, dwarf2out_abstract_function,
dwarf2out_frame_init, dwarf2out_frame_finish): Remove.
* dwarfout.c (dwarf_debug_hooks): Update.
* emit-rtl.c: Include debug.h.
(remove_unnecessary_notes): Use debug hook.
* final.c: Don't include dbxout.h, xcoffout.h or sdbout.h.
(final_scan_insn): Use debug hook.
* integrate.c (output_inline_function): Use debug hook.
* sdbout.c (sdbout_toplevel_data, sdbout_label): Make static.
(sdb_debug_hooks): Update.
* sdbout.h (sdbout_label, sdbout_toplevel_data): Remove.
* toplev.c: Don't include xcoffout.h.
(note_outlining_of_inline_function, debug_ignore_block): Remove.
* toplev.h (note_outlining_of_inline_function, debug_ignore_block):
Remove.
* tree.h (dwarf2out_do_frame): Remove.
From-SVN: r44163
2001-07-19 23:17:09 +02:00
|
|
|
|
static void
|
1991-12-23 23:45:25 +01:00
|
|
|
|
sdbout_label (insn)
|
2001-10-11 05:16:15 +02:00
|
|
|
|
rtx insn;
|
1991-12-23 23:45:25 +01:00
|
|
|
|
{
|
|
|
|
|
PUT_SDB_DEF (LABEL_NAME (insn));
|
|
|
|
|
PUT_SDB_VAL (insn);
|
|
|
|
|
PUT_SDB_SCL (C_LABEL);
|
|
|
|
|
PUT_SDB_TYPE (T_NULL);
|
|
|
|
|
PUT_SDB_ENDEF;
|
|
|
|
|
}
|
|
|
|
|
|
1996-11-15 23:37:40 +01:00
|
|
|
|
/* Change to reading from a new source file. */
|
|
|
|
|
|
Makefile.in (c-lex.o): Wrap long lines.
* Makefile.in (c-lex.o): Wrap long lines. Depend on debug.h.
* c-lex.c (cb_file_change, cb_define, cb_undef): Use debug
hooks directly.
* dbxout.c (dbx_debug_hooks): Add new hooks.
(dbxout_start_new_source_file): Rename dbxout_start_source_file,
make static.
(dbxout_resume_previous_source_file): Rename dbxout_end_source_file,
make static.
* dbxout.h (dbxout_start_new_source_file,
dbxout_resume_previous_source_file): Delete.
* debug.c (do_nothing_debug_hooks): Add new hooks.
(debug_nothing_init_finish): Rename debug_nothing_file_charstar.
(debug_nothing_int_charstar, debug_nothing_int): New.
* debug.h (gcc_debug_hooks): New hooks define, undef,
start_source_file and end_source_file.
(debug_nothing_init_finish): Rename debug_nothing_file_charstar.
(debug_nothing_int_charstar, debug_nothing_int): New.
* dwarf2out.c (dwarf2_debug_hooks): Add new hooks.
(dwarf2out_start_source_file, dwarf2out_end_source_file,
dwarf2out_define, dwarf2out_undef): Make static.
* dwarf2out.h (dwarf2out_start_source_file, dwarf2out_end_source_file,
dwarf2out_define, dwarf2out_undef): Remove.
* dwarfout.c (dwarf_debug_hooks): Add new hooks.
(dwarfout_start_source_file, dwarfout_end_source_file,
dwarfout_define, dwarfout_undef): Make static.
(dwarfout_start_source_file_check,
dwarfout_end_source_file_check): New.
(dwarfout_define, dwarfout_finish): Update.
* dwarfout.h (dwarfout_start_new_source_file,
dwarfout_resume_previous_source_file, dwarfout_define,
dwarfout_undef): Remove.
* sdbout.c (sdb_debug_hooks): Add new hooks.
(sdbout_start_new_source_file): Rename sdbout_start_source_file,
make static.
(sdbout_resume_previous_source_file): Rename sdbout_end_source_file,
make static, take an arg.
* sdbout.h (sdbout_start_new_source_file,
sdbout_resume_previous_source_file): Delete.
* toplev.c (debug_start_source_file, debug_end_source_file,
debug_define, debug_undef): Delete.
* toplev.h (debug_start_source_file, debug_end_source_file,
debug_define, debug_undef): Delete.
* java/jcf-parse.c: Include debug.h.
(parse_class_file): Update to use debug hooks directly.
* java/Make-lang.in (jcf-parse.o): Depend on debug.h.
From-SVN: r43952
2001-07-11 22:51:46 +02:00
|
|
|
|
static void
|
|
|
|
|
sdbout_start_source_file (line, filename)
|
|
|
|
|
unsigned int line ATTRIBUTE_UNUSED;
|
2000-06-06 14:08:44 +02:00
|
|
|
|
const char *filename ATTRIBUTE_UNUSED;
|
1996-11-15 23:37:40 +01:00
|
|
|
|
{
|
|
|
|
|
#ifdef MIPS_DEBUGGING_INFO
|
|
|
|
|
struct sdb_file *n = (struct sdb_file *) xmalloc (sizeof *n);
|
|
|
|
|
|
|
|
|
|
n->next = current_file;
|
|
|
|
|
n->name = filename;
|
|
|
|
|
current_file = n;
|
|
|
|
|
PUT_SDB_SRC_FILE (filename);
|
|
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Revert to reading a previous source file. */
|
|
|
|
|
|
Makefile.in (c-lex.o): Wrap long lines.
* Makefile.in (c-lex.o): Wrap long lines. Depend on debug.h.
* c-lex.c (cb_file_change, cb_define, cb_undef): Use debug
hooks directly.
* dbxout.c (dbx_debug_hooks): Add new hooks.
(dbxout_start_new_source_file): Rename dbxout_start_source_file,
make static.
(dbxout_resume_previous_source_file): Rename dbxout_end_source_file,
make static.
* dbxout.h (dbxout_start_new_source_file,
dbxout_resume_previous_source_file): Delete.
* debug.c (do_nothing_debug_hooks): Add new hooks.
(debug_nothing_init_finish): Rename debug_nothing_file_charstar.
(debug_nothing_int_charstar, debug_nothing_int): New.
* debug.h (gcc_debug_hooks): New hooks define, undef,
start_source_file and end_source_file.
(debug_nothing_init_finish): Rename debug_nothing_file_charstar.
(debug_nothing_int_charstar, debug_nothing_int): New.
* dwarf2out.c (dwarf2_debug_hooks): Add new hooks.
(dwarf2out_start_source_file, dwarf2out_end_source_file,
dwarf2out_define, dwarf2out_undef): Make static.
* dwarf2out.h (dwarf2out_start_source_file, dwarf2out_end_source_file,
dwarf2out_define, dwarf2out_undef): Remove.
* dwarfout.c (dwarf_debug_hooks): Add new hooks.
(dwarfout_start_source_file, dwarfout_end_source_file,
dwarfout_define, dwarfout_undef): Make static.
(dwarfout_start_source_file_check,
dwarfout_end_source_file_check): New.
(dwarfout_define, dwarfout_finish): Update.
* dwarfout.h (dwarfout_start_new_source_file,
dwarfout_resume_previous_source_file, dwarfout_define,
dwarfout_undef): Remove.
* sdbout.c (sdb_debug_hooks): Add new hooks.
(sdbout_start_new_source_file): Rename sdbout_start_source_file,
make static.
(sdbout_resume_previous_source_file): Rename sdbout_end_source_file,
make static, take an arg.
* sdbout.h (sdbout_start_new_source_file,
sdbout_resume_previous_source_file): Delete.
* toplev.c (debug_start_source_file, debug_end_source_file,
debug_define, debug_undef): Delete.
* toplev.h (debug_start_source_file, debug_end_source_file,
debug_define, debug_undef): Delete.
* java/jcf-parse.c: Include debug.h.
(parse_class_file): Update to use debug hooks directly.
* java/Make-lang.in (jcf-parse.o): Depend on debug.h.
From-SVN: r43952
2001-07-11 22:51:46 +02:00
|
|
|
|
static void
|
|
|
|
|
sdbout_end_source_file (line)
|
|
|
|
|
unsigned int line ATTRIBUTE_UNUSED;
|
1996-11-15 23:37:40 +01:00
|
|
|
|
{
|
|
|
|
|
#ifdef MIPS_DEBUGGING_INFO
|
|
|
|
|
struct sdb_file *next;
|
|
|
|
|
|
|
|
|
|
next = current_file->next;
|
|
|
|
|
free (current_file);
|
|
|
|
|
current_file = next;
|
|
|
|
|
PUT_SDB_SRC_FILE (current_file->name);
|
|
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
|
|
2001-03-21 20:43:36 +01:00
|
|
|
|
/* Set up for SDB output at the start of compilation. */
|
|
|
|
|
|
Makefile.in (toplev.o, [...]): Depend on debug.h, wrap long lines.
* Makefile.in (toplev.o, sdbout.o, dbxout.o, dwarfout.o,
dwarf2out.o): Depend on debug.h, wrap long lines.
* dbxout.c: Include debug.h.
(dbx_debug_hooks): New.
(dbxout_init): Make static, take just 2 args.
(dbxout_finish): Make static.
* dbxout.h (dbxout_init, dbxout_finish): Delete.
* debug.c: New file.
* debug.h: New file.
* dwarf2out.c: Include debug.h.
(dwarf2_debug_hooks): New.
(dwarf2out_init): Make static.
(dwarf2out_finish): Make static, take 2 args.
* dwarf2out.h (dwarf2out_init, dwarf2out_finish): Delete.
* dwarfout.c: Include debug.h.
(dwarf_debug_hooks): New.
(dwarfout_init): Make static.
(dwarfout_finish): Make static, take 2 args.
* dwarfout.h (dwarfout_init, dwarfout_finish): Delete.
* sdbout.c: Include debug.h.
(sdb_debug_hooks): New.
(sdbout_init): Make static, take 2 args.
* sdbout.h (sdbout_init): Delete.
* toplev.c: Include debug.h.
(debug_hooks): New.
(compile_file): Set deubg_hooks based on command line options.
Use the hooks unconditionally rather than conditional compilation.
From-SVN: r43908
2001-07-10 20:44:34 +02:00
|
|
|
|
static void
|
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
|
|
|
|
sdbout_init (input_file_name)
|
2001-03-21 20:43:36 +01:00
|
|
|
|
const char *input_file_name ATTRIBUTE_UNUSED;
|
|
|
|
|
{
|
|
|
|
|
#ifdef MIPS_DEBUGGING_INFO
|
|
|
|
|
current_file = (struct sdb_file *) xmalloc (sizeof *current_file);
|
|
|
|
|
current_file->next = NULL;
|
|
|
|
|
current_file->name = input_file_name;
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifdef RMS_QUICK_HACK_1
|
|
|
|
|
tree t;
|
Makefile.in (fold-const.o, [...]): Update.
* Makefile.in (fold-const.o, stor-layout.o, stmt.o,
sdbout.o, profile.o): Update.
* c-common.c (c_common_nodes_and_builtins): Use pushdecl
langhook.
* c-common.h (gettags): Move here from tree.h.
* c-tree.h (pushdecl, pushlevel, poplevel, set_block,
insert_block, getdecls, kept_level_p, global_bindings_p): New.
* dbxout.c (dbxout_init): Use getdecls langhook.
* expr.c (expand_expr): Use insert_block langhook.
* fold-const.c: Include langhooks.h.
(fold_range_test, fold_binary_op_with_conditional_arg,
fold): Use global_bindings_p langhook.
* integrate.c (expand_inline_function): Use insert_block langhook.
* langhooks-def.h (LANG_HOOKS_DECLS, LANG_HOOKS_PUSHLEVEL,
LANG_HOOKS_POPLEVEL, LANG_HOOKS_GLOBAL_BINDINGS_P,
LANG_HOOKS_INSERT_BLOCK, LANG_HOOKS_SET_BLOCK, LANG_HOOKS_PUSHDECL,
LANG_HOOKS_GETDECLS): New.
(LANG_HOOKS_INITIALIZER): Update.
* langhooks.c (lhd_clear_binding_stack): Use global_bindings_p
langhook.
* langhooks.h (struct lang_hooks_for_decls): New.
(struct lang_hooks): Update.
* profile.c: Include langhooks.h.
(output_func_start_profiler): Use new langhooks.
* sdbout.c: Include langhooks.h.
(sdbout_init, sdbout_finish): Use getdecls langhook.
* stmt.c: Include langhooks.h.
(expand_fixup, fixup_gotos): Use new langhooks.
* stor-layout.c: Include langhooks.h.
(variable_size): Use global_bindings_p langhook.
* toplev.c (compile_file): Use getdecls langhook.
* tree-inline.c (remap_block): Use insert_block langhook.
* tree.h (pushdecl, pushlevel, poplevel, set_block, gettags,
insert_block, getdecls, kept_level_p, global_bindings_p): Remove.
cp:
* cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
insert_block, getdecls, global_bindings_p): New.
java:
* cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
insert_block, getdecls, kept_level_p, global_bindings_p): New.
f:
* cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
insert_block, getdecls, global_bindings_p): New.
From-SVN: r51136
2002-03-21 19:39:29 +01:00
|
|
|
|
for (t = (*lang_hooks.decls.getdecls) (); t; t = TREE_CHAIN (t))
|
2001-03-21 20:43:36 +01:00
|
|
|
|
if (DECL_NAME (t) && IDENTIFIER_POINTER (DECL_NAME (t)) != 0
|
|
|
|
|
&& !strcmp (IDENTIFIER_POINTER (DECL_NAME (t)), "__vtbl_ptr_type"))
|
|
|
|
|
sdbout_symbol (t, 0);
|
2002-06-04 09:11:05 +02:00
|
|
|
|
#endif
|
2001-03-21 20:43:36 +01:00
|
|
|
|
}
|
|
|
|
|
|
2002-06-04 09:11:05 +02:00
|
|
|
|
#else /* SDB_DEBUGGING_INFO */
|
|
|
|
|
|
|
|
|
|
/* This should never be used, but its address is needed for comparisons. */
|
|
|
|
|
const struct gcc_debug_hooks sdb_debug_hooks;
|
|
|
|
|
|
1991-12-23 23:45:25 +01:00
|
|
|
|
#endif /* SDB_DEBUGGING_INFO */
|
2002-06-04 09:11:05 +02:00
|
|
|
|
|
|
|
|
|
#include "gt-sdbout.h"
|