gcc/gcc/defaults.h

846 lines
26 KiB
C
Raw Normal View History

/* Definitions of various defaults for tm.h macros.
Copyright (C) 1992, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
2005
Free Software Foundation, Inc.
Contributed by Ron Guilmette (rfg@monkeys.com)
1992-04-25 03:51:02 +02:00
Makefile.in, [...]: replace "GNU CC" with "GCC". * Makefile.in, alias.c, basic-block.h, bb-reorder.c, bitmap.c, bitmap.h, builtin-types.def, builtins.c, builtins.def, c-aux-info.c, c-common.c, c-common.def, c-common.h, c-convert.c, c-decl.c, c-dump.c, c-dump.h, c-errors.c, c-format.c, c-lang.c, c-lex.c, c-lex.h, c-parse.in, c-pragma.c, c-pragma.h, c-semantics.c, c-tree.h, c-typeck.c, caller-save.c, calls.c, collect2.c, collect2.h, combine.c, conditions.h, config.gcc, configure.frag, configure.in, conflict.c, convert.c, convert.h, cppspec.c, crtstuff.c, cse.c, cselib.c, cselib.h, dbxout.c, dbxout.h, defaults.h, dependence.c, df.c, df.h, diagnostic.c, diagnostic.h, doloop.c, dominance.c, dwarf.h, dwarf2.h, dwarf2asm.c, dwarf2asm.h, dwarf2out.c, dwarf2out.h, dwarfout.c, emit-rtl.c, errors.c, errors.h, except.c, except.h, exgettext, explow.c, expmed.c, expr.c, expr.h, final.c, fixproto, flags.h, flow.c, fold-const.c, fp-test.c, function.c, function.h, gbl-ctors.h, gcc.c, gcc.h, gcc.hlp, gccspec.c, gcov-io.h, gcse.c, genattr.c, genattrtab.c, gencheck.c, gencodes.c, genconfig.c, genemit.c, genextract.c, genflags.c, gengenrtl.c, genmultilib, genopinit.c, genoutput.c, genpeep.c, genrecog.c, gensupport.c, gensupport.h, ggc-callbacks.c, ggc-common.c, ggc-none.c, ggc-page.c, ggc-simple.c, ggc.h, global.c, graph.c, graph.h, gthr-aix.h, gthr-dce.h, gthr-posix.h, gthr-rtems.h, gthr-single.h, gthr-solaris.h, gthr-vxworks.h, gthr-win32.h, gthr.h, haifa-sched.c, halfpic.c, halfpic.h, hard-reg-set.h, hwint.h, ifcvt.c, input.h, insn-addr.h, integrate.c, integrate.h, jump.c, lcm.c, libgcc2.c, libgcc2.h, lists.c, local-alloc.c, loop.c, loop.h, machmode.def, machmode.h, main.c, mbchar.c, mbchar.h, mips-tdump.c, mips-tfile.c, mklibgcc.in, mkmap-flat.awk, mkmap-symver.awk, optabs.c, output.h, params.c, params.def, params.h, predict.c, predict.def, predict.h, prefix.c, prefix.h, print-rtl.c, print-tree.c, profile.c, protoize.c, read-rtl.c, real.c, real.h, recog.c, recog.h, reg-stack.c, regclass.c, regmove.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, reorg.c, resource.c, resource.h, rtl.c, rtl.def, rtl.h, rtlanal.c, sbitmap.c, sbitmap.h, sched-deps.c, sched-ebb.c, sched-int.h, sched-rgn.c, sched-vis.c, sdbout.c, sdbout.h, sibcall.c, simplify-rtx.c, ssa-ccp.c, ssa-dce.c, ssa.c, ssa.h, stmt.c, stor-layout.c, stringpool.c, system.h, timevar.c, timevar.def, timevar.h, tlink.c, toplev.c, toplev.h, tree.c, tree.def, tree.h, tsystem.h, unroll.c, unwind-dw2-fde.c, unwind-dw2-fde.h, unwind-dw2.c, unwind-pe.h, unwind-sjlj.c, unwind.h, unwind.inc, varasm.c, varray.c, varray.h, xcoffout.c, xcoffout.h: replace "GNU CC" with "GCC". From-SVN: r45105
2001-08-22 16:35:51 +02:00
This file is part of GCC.
1992-04-25 03:51:02 +02:00
Makefile.in, [...]: replace "GNU CC" with "GCC". * Makefile.in, alias.c, basic-block.h, bb-reorder.c, bitmap.c, bitmap.h, builtin-types.def, builtins.c, builtins.def, c-aux-info.c, c-common.c, c-common.def, c-common.h, c-convert.c, c-decl.c, c-dump.c, c-dump.h, c-errors.c, c-format.c, c-lang.c, c-lex.c, c-lex.h, c-parse.in, c-pragma.c, c-pragma.h, c-semantics.c, c-tree.h, c-typeck.c, caller-save.c, calls.c, collect2.c, collect2.h, combine.c, conditions.h, config.gcc, configure.frag, configure.in, conflict.c, convert.c, convert.h, cppspec.c, crtstuff.c, cse.c, cselib.c, cselib.h, dbxout.c, dbxout.h, defaults.h, dependence.c, df.c, df.h, diagnostic.c, diagnostic.h, doloop.c, dominance.c, dwarf.h, dwarf2.h, dwarf2asm.c, dwarf2asm.h, dwarf2out.c, dwarf2out.h, dwarfout.c, emit-rtl.c, errors.c, errors.h, except.c, except.h, exgettext, explow.c, expmed.c, expr.c, expr.h, final.c, fixproto, flags.h, flow.c, fold-const.c, fp-test.c, function.c, function.h, gbl-ctors.h, gcc.c, gcc.h, gcc.hlp, gccspec.c, gcov-io.h, gcse.c, genattr.c, genattrtab.c, gencheck.c, gencodes.c, genconfig.c, genemit.c, genextract.c, genflags.c, gengenrtl.c, genmultilib, genopinit.c, genoutput.c, genpeep.c, genrecog.c, gensupport.c, gensupport.h, ggc-callbacks.c, ggc-common.c, ggc-none.c, ggc-page.c, ggc-simple.c, ggc.h, global.c, graph.c, graph.h, gthr-aix.h, gthr-dce.h, gthr-posix.h, gthr-rtems.h, gthr-single.h, gthr-solaris.h, gthr-vxworks.h, gthr-win32.h, gthr.h, haifa-sched.c, halfpic.c, halfpic.h, hard-reg-set.h, hwint.h, ifcvt.c, input.h, insn-addr.h, integrate.c, integrate.h, jump.c, lcm.c, libgcc2.c, libgcc2.h, lists.c, local-alloc.c, loop.c, loop.h, machmode.def, machmode.h, main.c, mbchar.c, mbchar.h, mips-tdump.c, mips-tfile.c, mklibgcc.in, mkmap-flat.awk, mkmap-symver.awk, optabs.c, output.h, params.c, params.def, params.h, predict.c, predict.def, predict.h, prefix.c, prefix.h, print-rtl.c, print-tree.c, profile.c, protoize.c, read-rtl.c, real.c, real.h, recog.c, recog.h, reg-stack.c, regclass.c, regmove.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, reorg.c, resource.c, resource.h, rtl.c, rtl.def, rtl.h, rtlanal.c, sbitmap.c, sbitmap.h, sched-deps.c, sched-ebb.c, sched-int.h, sched-rgn.c, sched-vis.c, sdbout.c, sdbout.h, sibcall.c, simplify-rtx.c, ssa-ccp.c, ssa-dce.c, ssa.c, ssa.h, stmt.c, stor-layout.c, stringpool.c, system.h, timevar.c, timevar.def, timevar.h, tlink.c, toplev.c, toplev.h, tree.c, tree.def, tree.h, tsystem.h, unroll.c, unwind-dw2-fde.c, unwind-dw2-fde.h, unwind-dw2.c, unwind-pe.h, unwind-sjlj.c, unwind.h, unwind.inc, varasm.c, varray.c, varray.h, xcoffout.c, xcoffout.h: replace "GNU CC" with "GCC". From-SVN: r45105
2001-08-22 16:35:51 +02:00
GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2, or (at your option) any later
version.
1992-04-25 03:51:02 +02:00
Makefile.in, [...]: replace "GNU CC" with "GCC". * Makefile.in, alias.c, basic-block.h, bb-reorder.c, bitmap.c, bitmap.h, builtin-types.def, builtins.c, builtins.def, c-aux-info.c, c-common.c, c-common.def, c-common.h, c-convert.c, c-decl.c, c-dump.c, c-dump.h, c-errors.c, c-format.c, c-lang.c, c-lex.c, c-lex.h, c-parse.in, c-pragma.c, c-pragma.h, c-semantics.c, c-tree.h, c-typeck.c, caller-save.c, calls.c, collect2.c, collect2.h, combine.c, conditions.h, config.gcc, configure.frag, configure.in, conflict.c, convert.c, convert.h, cppspec.c, crtstuff.c, cse.c, cselib.c, cselib.h, dbxout.c, dbxout.h, defaults.h, dependence.c, df.c, df.h, diagnostic.c, diagnostic.h, doloop.c, dominance.c, dwarf.h, dwarf2.h, dwarf2asm.c, dwarf2asm.h, dwarf2out.c, dwarf2out.h, dwarfout.c, emit-rtl.c, errors.c, errors.h, except.c, except.h, exgettext, explow.c, expmed.c, expr.c, expr.h, final.c, fixproto, flags.h, flow.c, fold-const.c, fp-test.c, function.c, function.h, gbl-ctors.h, gcc.c, gcc.h, gcc.hlp, gccspec.c, gcov-io.h, gcse.c, genattr.c, genattrtab.c, gencheck.c, gencodes.c, genconfig.c, genemit.c, genextract.c, genflags.c, gengenrtl.c, genmultilib, genopinit.c, genoutput.c, genpeep.c, genrecog.c, gensupport.c, gensupport.h, ggc-callbacks.c, ggc-common.c, ggc-none.c, ggc-page.c, ggc-simple.c, ggc.h, global.c, graph.c, graph.h, gthr-aix.h, gthr-dce.h, gthr-posix.h, gthr-rtems.h, gthr-single.h, gthr-solaris.h, gthr-vxworks.h, gthr-win32.h, gthr.h, haifa-sched.c, halfpic.c, halfpic.h, hard-reg-set.h, hwint.h, ifcvt.c, input.h, insn-addr.h, integrate.c, integrate.h, jump.c, lcm.c, libgcc2.c, libgcc2.h, lists.c, local-alloc.c, loop.c, loop.h, machmode.def, machmode.h, main.c, mbchar.c, mbchar.h, mips-tdump.c, mips-tfile.c, mklibgcc.in, mkmap-flat.awk, mkmap-symver.awk, optabs.c, output.h, params.c, params.def, params.h, predict.c, predict.def, predict.h, prefix.c, prefix.h, print-rtl.c, print-tree.c, profile.c, protoize.c, read-rtl.c, real.c, real.h, recog.c, recog.h, reg-stack.c, regclass.c, regmove.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, reorg.c, resource.c, resource.h, rtl.c, rtl.def, rtl.h, rtlanal.c, sbitmap.c, sbitmap.h, sched-deps.c, sched-ebb.c, sched-int.h, sched-rgn.c, sched-vis.c, sdbout.c, sdbout.h, sibcall.c, simplify-rtx.c, ssa-ccp.c, ssa-dce.c, ssa.c, ssa.h, stmt.c, stor-layout.c, stringpool.c, system.h, timevar.c, timevar.def, timevar.h, tlink.c, toplev.c, toplev.h, tree.c, tree.def, tree.h, tsystem.h, unroll.c, unwind-dw2-fde.c, unwind-dw2-fde.h, unwind-dw2.c, unwind-pe.h, unwind-sjlj.c, unwind.h, unwind.inc, varasm.c, varray.c, varray.h, xcoffout.c, xcoffout.h: replace "GNU CC" with "GCC". From-SVN: r45105
2001-08-22 16:35:51 +02:00
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
1992-04-25 03:51:02 +02:00
You should have received a copy of the GNU General Public License
Makefile.in, [...]: replace "GNU CC" with "GCC". * Makefile.in, alias.c, basic-block.h, bb-reorder.c, bitmap.c, bitmap.h, builtin-types.def, builtins.c, builtins.def, c-aux-info.c, c-common.c, c-common.def, c-common.h, c-convert.c, c-decl.c, c-dump.c, c-dump.h, c-errors.c, c-format.c, c-lang.c, c-lex.c, c-lex.h, c-parse.in, c-pragma.c, c-pragma.h, c-semantics.c, c-tree.h, c-typeck.c, caller-save.c, calls.c, collect2.c, collect2.h, combine.c, conditions.h, config.gcc, configure.frag, configure.in, conflict.c, convert.c, convert.h, cppspec.c, crtstuff.c, cse.c, cselib.c, cselib.h, dbxout.c, dbxout.h, defaults.h, dependence.c, df.c, df.h, diagnostic.c, diagnostic.h, doloop.c, dominance.c, dwarf.h, dwarf2.h, dwarf2asm.c, dwarf2asm.h, dwarf2out.c, dwarf2out.h, dwarfout.c, emit-rtl.c, errors.c, errors.h, except.c, except.h, exgettext, explow.c, expmed.c, expr.c, expr.h, final.c, fixproto, flags.h, flow.c, fold-const.c, fp-test.c, function.c, function.h, gbl-ctors.h, gcc.c, gcc.h, gcc.hlp, gccspec.c, gcov-io.h, gcse.c, genattr.c, genattrtab.c, gencheck.c, gencodes.c, genconfig.c, genemit.c, genextract.c, genflags.c, gengenrtl.c, genmultilib, genopinit.c, genoutput.c, genpeep.c, genrecog.c, gensupport.c, gensupport.h, ggc-callbacks.c, ggc-common.c, ggc-none.c, ggc-page.c, ggc-simple.c, ggc.h, global.c, graph.c, graph.h, gthr-aix.h, gthr-dce.h, gthr-posix.h, gthr-rtems.h, gthr-single.h, gthr-solaris.h, gthr-vxworks.h, gthr-win32.h, gthr.h, haifa-sched.c, halfpic.c, halfpic.h, hard-reg-set.h, hwint.h, ifcvt.c, input.h, insn-addr.h, integrate.c, integrate.h, jump.c, lcm.c, libgcc2.c, libgcc2.h, lists.c, local-alloc.c, loop.c, loop.h, machmode.def, machmode.h, main.c, mbchar.c, mbchar.h, mips-tdump.c, mips-tfile.c, mklibgcc.in, mkmap-flat.awk, mkmap-symver.awk, optabs.c, output.h, params.c, params.def, params.h, predict.c, predict.def, predict.h, prefix.c, prefix.h, print-rtl.c, print-tree.c, profile.c, protoize.c, read-rtl.c, real.c, real.h, recog.c, recog.h, reg-stack.c, regclass.c, regmove.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, reorg.c, resource.c, resource.h, rtl.c, rtl.def, rtl.h, rtlanal.c, sbitmap.c, sbitmap.h, sched-deps.c, sched-ebb.c, sched-int.h, sched-rgn.c, sched-vis.c, sdbout.c, sdbout.h, sibcall.c, simplify-rtx.c, ssa-ccp.c, ssa-dce.c, ssa.c, ssa.h, stmt.c, stor-layout.c, stringpool.c, system.h, timevar.c, timevar.def, timevar.h, tlink.c, toplev.c, toplev.h, tree.c, tree.def, tree.h, tsystem.h, unroll.c, unwind-dw2-fde.c, unwind-dw2-fde.h, unwind-dw2.c, unwind-pe.h, unwind-sjlj.c, unwind.h, unwind.inc, varasm.c, varray.c, varray.h, xcoffout.c, xcoffout.h: replace "GNU CC" with "GCC". From-SVN: r45105
2001-08-22 16:35:51 +02:00
along with GCC; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
1992-04-25 03:51:02 +02:00
#ifndef GCC_DEFAULTS_H
#define GCC_DEFAULTS_H
#ifndef GET_ENVIRONMENT
#define GET_ENVIRONMENT(VALUE, NAME) do { (VALUE) = getenv (NAME); } while (0)
#endif
#define obstack_chunk_alloc ((void *(*) (long)) xmalloc)
#define obstack_chunk_free ((void (*) (void *)) free)
#define OBSTACK_CHUNK_SIZE 0
#define gcc_obstack_init(OBSTACK) \
_obstack_begin ((OBSTACK), OBSTACK_CHUNK_SIZE, 0, \
obstack_chunk_alloc, \
obstack_chunk_free)
/* Store in OUTPUT a string (made with alloca) containing an
assembler-name for a local static variable or function named NAME.
1992-07-04 05:16:03 +02:00
LABELNO is an integer which is different for each call. */
#ifndef ASM_PN_FORMAT
# ifndef NO_DOT_IN_LABEL
# define ASM_PN_FORMAT "%s.%lu"
# else
# ifndef NO_DOLLAR_IN_LABEL
# define ASM_PN_FORMAT "%s$%lu"
# else
# define ASM_PN_FORMAT "__%s_%lu"
# endif
# endif
#endif /* ! ASM_PN_FORMAT */
1992-07-04 05:16:03 +02:00
#ifndef ASM_FORMAT_PRIVATE_NAME
# define ASM_FORMAT_PRIVATE_NAME(OUTPUT, NAME, LABELNO) \
do { const char *const name_ = (NAME); \
char *const output_ = (OUTPUT) = \
(char *) alloca (strlen (name_) + 32); \
sprintf (output_, ASM_PN_FORMAT, name_, (unsigned long)(LABELNO)); \
1992-07-04 05:16:03 +02:00
} while (0)
#endif
/* This is how to output an element of a case-vector that is absolute.
Some targets don't use this, but we have to define it anyway. */
#ifndef ASM_OUTPUT_ADDR_VEC_ELT
#define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \
do { fputs (integer_asm_op (POINTER_SIZE / BITS_PER_UNIT, TRUE), FILE); \
(*targetm.asm_out.internal_label) (FILE, "L", (VALUE)); \
1992-07-04 05:16:03 +02:00
fputc ('\n', FILE); \
} while (0)
#endif
/* Choose a reasonable default for ASM_OUTPUT_ASCII. */
1992-04-25 03:51:02 +02:00
#ifndef ASM_OUTPUT_ASCII
#define ASM_OUTPUT_ASCII(MYFILE, MYSTRING, MYLENGTH) \
do { \
FILE *_hide_asm_out_file = (MYFILE); \
const unsigned char *_hide_p = (const unsigned char *) (MYSTRING); \
1992-04-25 03:51:02 +02:00
int _hide_thissize = (MYLENGTH); \
{ \
FILE *asm_out_file = _hide_asm_out_file; \
const unsigned char *p = _hide_p; \
1992-04-25 03:51:02 +02:00
int thissize = _hide_thissize; \
int i; \
fprintf (asm_out_file, "\t.ascii \""); \
\
for (i = 0; i < thissize; i++) \
{ \
alias.c: Remove uses of "register" specifier in declarations of arguments and local... 2001-10-10 Stan Shebs <shebs@apple.com> * alias.c: Remove uses of "register" specifier in declarations of arguments and local variables. * c-common.c: Ditto. * c-convert.c: Ditto. * c-decl.c: Ditto. * c-format.c: Ditto. * c-semantics.c: Ditto. * c-typeck.c: Ditto. * caller-save.c: Ditto. * calls.c: Ditto. * cfg.c: Ditto. * cfgbuild.c: Ditto. * cfgrtl.c: Ditto. * collect2.c: Ditto. * combine.c: Ditto. * convert.c: Ditto. * cppexp.c: Ditto. * cppfiles.c: Ditto. * cse.c: Ditto. * dbxout.c: Ditto. * defaults.h: Ditto. * df.c: Ditto. * dwarf2out.c: Ditto. * dwarfout.c: Ditto. * emit-rtl.c: Ditto. * explow.c: Ditto. * expmed.c: Ditto. * expr.c: Ditto. * final.c: Ditto. * fix-header.c: Ditto. * floatlib.c: Ditto. * flow.c: Ditto. * fold-const.c: Ditto. * function.c: Ditto. * gcc.c: Ditto. * gcse.c: Ditto. * gen-protos.c: Ditto. * genattrtab.c: Ditto. * gencheck.c: Ditto. * genconfig.c: Ditto. * genemit.c: Ditto. * genextract.c: Ditto. * genflags.c: Ditto. * gengenrtl.c: Ditto. * genoutput.c: Ditto. * genpeep.c: Ditto. * genrecog.c: Ditto. * gensupport.c: Ditto. * global.c: Ditto. * gmon.c: Ditto. * graph.c: Ditto. * haifa-sched.c: Ditto. * hard-reg-set.h: Ditto. * hash.c: Ditto. * integrate.c: Ditto. * jump.c: Ditto. * lists.c: Ditto. * local-alloc.c: Ditto. * loop.c: Ditto. * mips-tdump.c: Ditto. * mips-tfile.c: Ditto. * optabs.c: Ditto. * prefix.c: Ditto. * print-rtl.c: Ditto. * read-rtl.c: Ditto. * real.c: Ditto. * recog.c: Ditto. * reg-stack.c: Ditto. * regclass.c: Ditto. * regmove.c: Ditto. * reload.c: Ditto. * reload1.c: Ditto. * reorg.c: Ditto. * resource.c: Ditto. * rtl.c: Ditto. * rtlanal.c: Ditto. * scan.c: Ditto. * sched-deps.c: Ditto. * sched-rgn.c: Ditto. * sdbout.c: Ditto. * simplify-rtx.c: Ditto. * stmt.c: Ditto. * stor-layout.c: Ditto. * toplev.c: Ditto. * tradcif.y: Ditto. * tradcpp.c: Ditto. * tree.c: Ditto. * unroll.c: Ditto. * varasm.c: Ditto. * xcoffout.c: Ditto. From-SVN: r46173
2001-10-11 05:16:15 +02:00
int c = p[i]; \
1992-04-25 03:51:02 +02:00
if (c == '\"' || c == '\\') \
putc ('\\', asm_out_file); \
if (ISPRINT(c)) \
1992-04-25 03:51:02 +02:00
putc (c, asm_out_file); \
else \
{ \
fprintf (asm_out_file, "\\%o", c); \
/* After an octal-escape, if a digit follows, \
terminate one string constant and start another. \
The VAX assembler fails to stop reading the escape \
1992-04-25 03:51:02 +02:00
after three digits, so this is the only way we \
can get it to parse the data properly. */ \
if (i < thissize - 1 && ISDIGIT(p[i + 1])) \
1992-04-25 03:51:02 +02:00
fprintf (asm_out_file, "\"\n\t.ascii \""); \
} \
} \
fprintf (asm_out_file, "\"\n"); \
} \
} \
while (0)
#endif
/* This is how we tell the assembler to equate two values. */
#ifdef SET_ASM_OP
#ifndef ASM_OUTPUT_DEF
#define ASM_OUTPUT_DEF(FILE,LABEL1,LABEL2) \
do { fprintf ((FILE), "%s", SET_ASM_OP); \
assemble_name (FILE, LABEL1); \
fprintf (FILE, ","); \
assemble_name (FILE, LABEL2); \
fprintf (FILE, "\n"); \
} while (0)
#endif
#endif
/* Decide whether to defer emitting the assembler output for an equate
of two values. The default is to not defer output. */
#ifndef TARGET_DEFERRED_OUTPUT_DEFS
#define TARGET_DEFERRED_OUTPUT_DEFS(DECL,TARGET) false
#endif
/* This is how to output the definition of a user-level label named
NAME, such as the label on a static function or variable NAME. */
#ifndef ASM_OUTPUT_LABEL
#define ASM_OUTPUT_LABEL(FILE,NAME) \
do { assemble_name ((FILE), (NAME)); fputs (":\n", (FILE)); } while (0)
#endif
/* Output the definition of a compiler-generated label named NAME. */
#ifndef ASM_OUTPUT_INTERNAL_LABEL
#define ASM_OUTPUT_INTERNAL_LABEL(FILE,NAME) \
do { \
assemble_name_raw ((FILE), (NAME)); \
fputs (":\n", (FILE)); \
} while (0)
#endif
/* This is how to output a reference to a user-level label named NAME. */
#ifndef ASM_OUTPUT_LABELREF
#define ASM_OUTPUT_LABELREF(FILE,NAME) asm_fprintf ((FILE), "%U%s", (NAME))
#endif
/* Allow target to print debug info labels specially. This is useful for
VLIW targets, since debug info labels should go into the middle of
instruction bundles instead of breaking them. */
#ifndef ASM_OUTPUT_DEBUG_LABEL
#define ASM_OUTPUT_DEBUG_LABEL(FILE, PREFIX, NUM) \
(*targetm.asm_out.internal_label) (FILE, PREFIX, NUM)
#endif
/* This is how we tell the assembler that a symbol is weak. */
#ifndef ASM_OUTPUT_WEAK_ALIAS
#if defined (ASM_WEAKEN_LABEL) && defined (ASM_OUTPUT_DEF)
#define ASM_OUTPUT_WEAK_ALIAS(STREAM, NAME, VALUE) \
do \
{ \
ASM_WEAKEN_LABEL (STREAM, NAME); \
if (VALUE) \
ASM_OUTPUT_DEF (STREAM, NAME, VALUE); \
} \
while (0)
#endif
#endif
/* How to emit a .type directive. */
#ifndef ASM_OUTPUT_TYPE_DIRECTIVE
#if defined TYPE_ASM_OP && defined TYPE_OPERAND_FMT
#define ASM_OUTPUT_TYPE_DIRECTIVE(STREAM, NAME, TYPE) \
do \
{ \
fputs (TYPE_ASM_OP, STREAM); \
assemble_name (STREAM, NAME); \
fputs (", ", STREAM); \
fprintf (STREAM, TYPE_OPERAND_FMT, TYPE); \
putc ('\n', STREAM); \
} \
while (0)
#endif
#endif
/* How to emit a .size directive. */
#ifndef ASM_OUTPUT_SIZE_DIRECTIVE
#ifdef SIZE_ASM_OP
#define ASM_OUTPUT_SIZE_DIRECTIVE(STREAM, NAME, SIZE) \
do \
{ \
HOST_WIDE_INT size_ = (SIZE); \
fputs (SIZE_ASM_OP, STREAM); \
assemble_name (STREAM, NAME); \
fprintf (STREAM, ", " HOST_WIDE_INT_PRINT_DEC "\n", size_); \
} \
while (0)
#define ASM_OUTPUT_MEASURED_SIZE(STREAM, NAME) \
do \
{ \
fputs (SIZE_ASM_OP, STREAM); \
assemble_name (STREAM, NAME); \
fputs (", .-", STREAM); \
assemble_name (STREAM, NAME); \
putc ('\n', STREAM); \
} \
while (0)
#endif
#endif
/* This determines whether or not we support weak symbols. */
#ifndef SUPPORTS_WEAK
#if defined (ASM_WEAKEN_LABEL) || defined (ASM_WEAKEN_DECL)
#define SUPPORTS_WEAK 1
#else
#define SUPPORTS_WEAK 0
#endif
#endif
1997-07-04 20:49:39 +02:00
/* This determines whether or not we support link-once semantics. */
#ifndef SUPPORTS_ONE_ONLY
#ifdef MAKE_DECL_ONE_ONLY
#define SUPPORTS_ONE_ONLY 1
#else
#define SUPPORTS_ONE_ONLY 0
#endif
#endif
/* This determines whether weak symbols must be left out of a static
archive's table of contents. Defining this macro to be nonzero has
the consequence that certain symbols will not be made weak that
otherwise would be. The C++ ABI requires this macro to be zero;
see the documentation. */
#ifndef TARGET_WEAK_NOT_IN_ARCHIVE_TOC
#define TARGET_WEAK_NOT_IN_ARCHIVE_TOC 0
Enabled linkonce support for Darwin. * target.h (struct gcc_target): New target hook, unwind_label. * target-def.h (TARGET_ASM_EMIT_UNWIND_LABEL): New hook. * output.h (default_emit_unwind_label): New function. * default.h (TARGET_EXPLICIT_INSTANTIATIONS_ONE_ONLY): New macro. (TARGET_USES_WEAK_UNWIND_INFO): New target macro. (TARGET_SUPPORTS_HIDDEN): New target macro. * dwarf2out.c (struct dw_fde_struct): Add field for function decl that corresponds to this FDE. (FRAME_BEGIN_LABEL): Allow target to override default label. (output_call_frame_info): If FDEs are linknonce, then use extra indirection for FDE encoding, output a label for each FDE, and output an empty label for each function without an FDE. (dwarf2out_begin_prologue): Set up decl field when creating an FDE. * varasm.c (globalize_decl): Call ASM_MAKE_LABEL_LINKONCE for decls with DECL_ONE_ONLY set, if that macro is defined. (make_decl_one_only): Don't use DECL_COMMON if we're compiling for a SUPPORTS_ONE_ONLY target. * config/darwin-protos.h (darwin_unique_section): Declare. (darwin_asm_named_section): Likewise. (darwin_section_type_flags): Likewise. (darwin_non_lazy_pcrel): Likewise. (darwin_emit_unwind_label): Likewise. (darwin_make_decl_one_only): Likewise. * config/darwin.c (machopic_finish): Get rid of tweak that eliminate stubs for symbols that are defined. (darwin_encode_section_info): Don't treat weak functions as defined. (darwin_make_decl_one_only): Define. (darwin_asm_named_section): Likewise. (darwin_section_type_flags): Likewise. (darwin_unique_section): Likewise. (darwin_emit_unwind_label): Likewise. (darwin_non_lazy_pcrel): Likewise. (darwin_asm_output_dwarf_delta): Difference between two labels is local only if both labels are local. * config/darwin.h (MAKE_DECL_ONE_ONLY): Define. (ASM_MAKE_LABEL_LINKONCE): Likewise. (TARGET_SUPPORTS_HIDDEN): Likewise. (TARGET_USES_WEAK_UNWIND_INFO): Likewise. (TARGET_EXPLICIT_INSTANTIATIONS_ONE_ONLY): Likewise. (FRAME_BEGIN_LABEL): Likewise. (ASM_DECLARE_OBJECT_NAME): Make references to weak symbols indirect. (ASM_DECLARE_FUNCTION_NAME): Likewise. (darwin_eh_frame_section): Give __eh_frame section the coalesced flag. (TARGET_ASM_UNIQUE_SECTION): Define. (EH_FRAME_SECTION_NAME): Define. (EH_FRAME_SECTION_ATTR): Likewise. (ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX): Likewise. (TARGET_ASM_NAMED_SECTION): Likewise. (TARGET_SECTION_TYPE_FLAGS): Likewise. * doc/tm.texi: Document TARGET_USES_WEAK_UNWIND_INFO, TARGET_EXPLICIT_INSTANTIATIONS_ONE_ONLY, TARGET_SUPPORTS_HIDDEN, TARGET_ASM_EMIT_UNWIND_LABEL. * cp/decl2.c (maybe_make_one_only): Look at TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether to make an explicit instantiation weak. * cp/method.c (use_thunk): Make sure we call comdat_linkage when appropriate. * cp/pt.c (do_type_instantiation): On systems where weak symbols don't go in a static archive's TOC, explicit instantiation of a class must imply *explicit* instantiation of its memeber. From-SVN: r79394
2004-03-12 18:09:03 +01:00
#endif
/* This determines whether or not we need linkonce unwind information. */
Enabled linkonce support for Darwin. * target.h (struct gcc_target): New target hook, unwind_label. * target-def.h (TARGET_ASM_EMIT_UNWIND_LABEL): New hook. * output.h (default_emit_unwind_label): New function. * default.h (TARGET_EXPLICIT_INSTANTIATIONS_ONE_ONLY): New macro. (TARGET_USES_WEAK_UNWIND_INFO): New target macro. (TARGET_SUPPORTS_HIDDEN): New target macro. * dwarf2out.c (struct dw_fde_struct): Add field for function decl that corresponds to this FDE. (FRAME_BEGIN_LABEL): Allow target to override default label. (output_call_frame_info): If FDEs are linknonce, then use extra indirection for FDE encoding, output a label for each FDE, and output an empty label for each function without an FDE. (dwarf2out_begin_prologue): Set up decl field when creating an FDE. * varasm.c (globalize_decl): Call ASM_MAKE_LABEL_LINKONCE for decls with DECL_ONE_ONLY set, if that macro is defined. (make_decl_one_only): Don't use DECL_COMMON if we're compiling for a SUPPORTS_ONE_ONLY target. * config/darwin-protos.h (darwin_unique_section): Declare. (darwin_asm_named_section): Likewise. (darwin_section_type_flags): Likewise. (darwin_non_lazy_pcrel): Likewise. (darwin_emit_unwind_label): Likewise. (darwin_make_decl_one_only): Likewise. * config/darwin.c (machopic_finish): Get rid of tweak that eliminate stubs for symbols that are defined. (darwin_encode_section_info): Don't treat weak functions as defined. (darwin_make_decl_one_only): Define. (darwin_asm_named_section): Likewise. (darwin_section_type_flags): Likewise. (darwin_unique_section): Likewise. (darwin_emit_unwind_label): Likewise. (darwin_non_lazy_pcrel): Likewise. (darwin_asm_output_dwarf_delta): Difference between two labels is local only if both labels are local. * config/darwin.h (MAKE_DECL_ONE_ONLY): Define. (ASM_MAKE_LABEL_LINKONCE): Likewise. (TARGET_SUPPORTS_HIDDEN): Likewise. (TARGET_USES_WEAK_UNWIND_INFO): Likewise. (TARGET_EXPLICIT_INSTANTIATIONS_ONE_ONLY): Likewise. (FRAME_BEGIN_LABEL): Likewise. (ASM_DECLARE_OBJECT_NAME): Make references to weak symbols indirect. (ASM_DECLARE_FUNCTION_NAME): Likewise. (darwin_eh_frame_section): Give __eh_frame section the coalesced flag. (TARGET_ASM_UNIQUE_SECTION): Define. (EH_FRAME_SECTION_NAME): Define. (EH_FRAME_SECTION_ATTR): Likewise. (ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX): Likewise. (TARGET_ASM_NAMED_SECTION): Likewise. (TARGET_SECTION_TYPE_FLAGS): Likewise. * doc/tm.texi: Document TARGET_USES_WEAK_UNWIND_INFO, TARGET_EXPLICIT_INSTANTIATIONS_ONE_ONLY, TARGET_SUPPORTS_HIDDEN, TARGET_ASM_EMIT_UNWIND_LABEL. * cp/decl2.c (maybe_make_one_only): Look at TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether to make an explicit instantiation weak. * cp/method.c (use_thunk): Make sure we call comdat_linkage when appropriate. * cp/pt.c (do_type_instantiation): On systems where weak symbols don't go in a static archive's TOC, explicit instantiation of a class must imply *explicit* instantiation of its memeber. From-SVN: r79394
2004-03-12 18:09:03 +01:00
#ifndef TARGET_USES_WEAK_UNWIND_INFO
#define TARGET_USES_WEAK_UNWIND_INFO 0
#endif
/* By default, there is no prefix on user-defined symbols. */
#ifndef USER_LABEL_PREFIX
#define USER_LABEL_PREFIX ""
#endif
/* If the target supports weak symbols, define TARGET_ATTRIBUTE_WEAK to
provide a weak attribute. Else define it to nothing.
This would normally belong in ansidecl.h, but SUPPORTS_WEAK is
not available at that time.
Note, this is only for use by target files which we know are to be
compiled by GCC. */
#ifndef TARGET_ATTRIBUTE_WEAK
# if SUPPORTS_WEAK
# define TARGET_ATTRIBUTE_WEAK __attribute__ ((weak))
# else
# define TARGET_ATTRIBUTE_WEAK
# endif
#endif
Enabled linkonce support for Darwin. * target.h (struct gcc_target): New target hook, unwind_label. * target-def.h (TARGET_ASM_EMIT_UNWIND_LABEL): New hook. * output.h (default_emit_unwind_label): New function. * default.h (TARGET_EXPLICIT_INSTANTIATIONS_ONE_ONLY): New macro. (TARGET_USES_WEAK_UNWIND_INFO): New target macro. (TARGET_SUPPORTS_HIDDEN): New target macro. * dwarf2out.c (struct dw_fde_struct): Add field for function decl that corresponds to this FDE. (FRAME_BEGIN_LABEL): Allow target to override default label. (output_call_frame_info): If FDEs are linknonce, then use extra indirection for FDE encoding, output a label for each FDE, and output an empty label for each function without an FDE. (dwarf2out_begin_prologue): Set up decl field when creating an FDE. * varasm.c (globalize_decl): Call ASM_MAKE_LABEL_LINKONCE for decls with DECL_ONE_ONLY set, if that macro is defined. (make_decl_one_only): Don't use DECL_COMMON if we're compiling for a SUPPORTS_ONE_ONLY target. * config/darwin-protos.h (darwin_unique_section): Declare. (darwin_asm_named_section): Likewise. (darwin_section_type_flags): Likewise. (darwin_non_lazy_pcrel): Likewise. (darwin_emit_unwind_label): Likewise. (darwin_make_decl_one_only): Likewise. * config/darwin.c (machopic_finish): Get rid of tweak that eliminate stubs for symbols that are defined. (darwin_encode_section_info): Don't treat weak functions as defined. (darwin_make_decl_one_only): Define. (darwin_asm_named_section): Likewise. (darwin_section_type_flags): Likewise. (darwin_unique_section): Likewise. (darwin_emit_unwind_label): Likewise. (darwin_non_lazy_pcrel): Likewise. (darwin_asm_output_dwarf_delta): Difference between two labels is local only if both labels are local. * config/darwin.h (MAKE_DECL_ONE_ONLY): Define. (ASM_MAKE_LABEL_LINKONCE): Likewise. (TARGET_SUPPORTS_HIDDEN): Likewise. (TARGET_USES_WEAK_UNWIND_INFO): Likewise. (TARGET_EXPLICIT_INSTANTIATIONS_ONE_ONLY): Likewise. (FRAME_BEGIN_LABEL): Likewise. (ASM_DECLARE_OBJECT_NAME): Make references to weak symbols indirect. (ASM_DECLARE_FUNCTION_NAME): Likewise. (darwin_eh_frame_section): Give __eh_frame section the coalesced flag. (TARGET_ASM_UNIQUE_SECTION): Define. (EH_FRAME_SECTION_NAME): Define. (EH_FRAME_SECTION_ATTR): Likewise. (ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX): Likewise. (TARGET_ASM_NAMED_SECTION): Likewise. (TARGET_SECTION_TYPE_FLAGS): Likewise. * doc/tm.texi: Document TARGET_USES_WEAK_UNWIND_INFO, TARGET_EXPLICIT_INSTANTIATIONS_ONE_ONLY, TARGET_SUPPORTS_HIDDEN, TARGET_ASM_EMIT_UNWIND_LABEL. * cp/decl2.c (maybe_make_one_only): Look at TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether to make an explicit instantiation weak. * cp/method.c (use_thunk): Make sure we call comdat_linkage when appropriate. * cp/pt.c (do_type_instantiation): On systems where weak symbols don't go in a static archive's TOC, explicit instantiation of a class must imply *explicit* instantiation of its memeber. From-SVN: r79394
2004-03-12 18:09:03 +01:00
/* Determines whether we may use common symbols to represent one-only
semantics (a.k.a. "vague linkage"). */
Enabled linkonce support for Darwin. * target.h (struct gcc_target): New target hook, unwind_label. * target-def.h (TARGET_ASM_EMIT_UNWIND_LABEL): New hook. * output.h (default_emit_unwind_label): New function. * default.h (TARGET_EXPLICIT_INSTANTIATIONS_ONE_ONLY): New macro. (TARGET_USES_WEAK_UNWIND_INFO): New target macro. (TARGET_SUPPORTS_HIDDEN): New target macro. * dwarf2out.c (struct dw_fde_struct): Add field for function decl that corresponds to this FDE. (FRAME_BEGIN_LABEL): Allow target to override default label. (output_call_frame_info): If FDEs are linknonce, then use extra indirection for FDE encoding, output a label for each FDE, and output an empty label for each function without an FDE. (dwarf2out_begin_prologue): Set up decl field when creating an FDE. * varasm.c (globalize_decl): Call ASM_MAKE_LABEL_LINKONCE for decls with DECL_ONE_ONLY set, if that macro is defined. (make_decl_one_only): Don't use DECL_COMMON if we're compiling for a SUPPORTS_ONE_ONLY target. * config/darwin-protos.h (darwin_unique_section): Declare. (darwin_asm_named_section): Likewise. (darwin_section_type_flags): Likewise. (darwin_non_lazy_pcrel): Likewise. (darwin_emit_unwind_label): Likewise. (darwin_make_decl_one_only): Likewise. * config/darwin.c (machopic_finish): Get rid of tweak that eliminate stubs for symbols that are defined. (darwin_encode_section_info): Don't treat weak functions as defined. (darwin_make_decl_one_only): Define. (darwin_asm_named_section): Likewise. (darwin_section_type_flags): Likewise. (darwin_unique_section): Likewise. (darwin_emit_unwind_label): Likewise. (darwin_non_lazy_pcrel): Likewise. (darwin_asm_output_dwarf_delta): Difference between two labels is local only if both labels are local. * config/darwin.h (MAKE_DECL_ONE_ONLY): Define. (ASM_MAKE_LABEL_LINKONCE): Likewise. (TARGET_SUPPORTS_HIDDEN): Likewise. (TARGET_USES_WEAK_UNWIND_INFO): Likewise. (TARGET_EXPLICIT_INSTANTIATIONS_ONE_ONLY): Likewise. (FRAME_BEGIN_LABEL): Likewise. (ASM_DECLARE_OBJECT_NAME): Make references to weak symbols indirect. (ASM_DECLARE_FUNCTION_NAME): Likewise. (darwin_eh_frame_section): Give __eh_frame section the coalesced flag. (TARGET_ASM_UNIQUE_SECTION): Define. (EH_FRAME_SECTION_NAME): Define. (EH_FRAME_SECTION_ATTR): Likewise. (ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX): Likewise. (TARGET_ASM_NAMED_SECTION): Likewise. (TARGET_SECTION_TYPE_FLAGS): Likewise. * doc/tm.texi: Document TARGET_USES_WEAK_UNWIND_INFO, TARGET_EXPLICIT_INSTANTIATIONS_ONE_ONLY, TARGET_SUPPORTS_HIDDEN, TARGET_ASM_EMIT_UNWIND_LABEL. * cp/decl2.c (maybe_make_one_only): Look at TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether to make an explicit instantiation weak. * cp/method.c (use_thunk): Make sure we call comdat_linkage when appropriate. * cp/pt.c (do_type_instantiation): On systems where weak symbols don't go in a static archive's TOC, explicit instantiation of a class must imply *explicit* instantiation of its memeber. From-SVN: r79394
2004-03-12 18:09:03 +01:00
#ifndef USE_COMMON_FOR_ONE_ONLY
# define USE_COMMON_FOR_ONE_ONLY 1
#endif
/* By default we can assume that all global symbols are in one namespace,
across all shared libraries. */
#ifndef MULTIPLE_SYMBOL_SPACES
# define MULTIPLE_SYMBOL_SPACES 0
#endif
Enabled linkonce support for Darwin. * target.h (struct gcc_target): New target hook, unwind_label. * target-def.h (TARGET_ASM_EMIT_UNWIND_LABEL): New hook. * output.h (default_emit_unwind_label): New function. * default.h (TARGET_EXPLICIT_INSTANTIATIONS_ONE_ONLY): New macro. (TARGET_USES_WEAK_UNWIND_INFO): New target macro. (TARGET_SUPPORTS_HIDDEN): New target macro. * dwarf2out.c (struct dw_fde_struct): Add field for function decl that corresponds to this FDE. (FRAME_BEGIN_LABEL): Allow target to override default label. (output_call_frame_info): If FDEs are linknonce, then use extra indirection for FDE encoding, output a label for each FDE, and output an empty label for each function without an FDE. (dwarf2out_begin_prologue): Set up decl field when creating an FDE. * varasm.c (globalize_decl): Call ASM_MAKE_LABEL_LINKONCE for decls with DECL_ONE_ONLY set, if that macro is defined. (make_decl_one_only): Don't use DECL_COMMON if we're compiling for a SUPPORTS_ONE_ONLY target. * config/darwin-protos.h (darwin_unique_section): Declare. (darwin_asm_named_section): Likewise. (darwin_section_type_flags): Likewise. (darwin_non_lazy_pcrel): Likewise. (darwin_emit_unwind_label): Likewise. (darwin_make_decl_one_only): Likewise. * config/darwin.c (machopic_finish): Get rid of tweak that eliminate stubs for symbols that are defined. (darwin_encode_section_info): Don't treat weak functions as defined. (darwin_make_decl_one_only): Define. (darwin_asm_named_section): Likewise. (darwin_section_type_flags): Likewise. (darwin_unique_section): Likewise. (darwin_emit_unwind_label): Likewise. (darwin_non_lazy_pcrel): Likewise. (darwin_asm_output_dwarf_delta): Difference between two labels is local only if both labels are local. * config/darwin.h (MAKE_DECL_ONE_ONLY): Define. (ASM_MAKE_LABEL_LINKONCE): Likewise. (TARGET_SUPPORTS_HIDDEN): Likewise. (TARGET_USES_WEAK_UNWIND_INFO): Likewise. (TARGET_EXPLICIT_INSTANTIATIONS_ONE_ONLY): Likewise. (FRAME_BEGIN_LABEL): Likewise. (ASM_DECLARE_OBJECT_NAME): Make references to weak symbols indirect. (ASM_DECLARE_FUNCTION_NAME): Likewise. (darwin_eh_frame_section): Give __eh_frame section the coalesced flag. (TARGET_ASM_UNIQUE_SECTION): Define. (EH_FRAME_SECTION_NAME): Define. (EH_FRAME_SECTION_ATTR): Likewise. (ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX): Likewise. (TARGET_ASM_NAMED_SECTION): Likewise. (TARGET_SECTION_TYPE_FLAGS): Likewise. * doc/tm.texi: Document TARGET_USES_WEAK_UNWIND_INFO, TARGET_EXPLICIT_INSTANTIATIONS_ONE_ONLY, TARGET_SUPPORTS_HIDDEN, TARGET_ASM_EMIT_UNWIND_LABEL. * cp/decl2.c (maybe_make_one_only): Look at TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether to make an explicit instantiation weak. * cp/method.c (use_thunk): Make sure we call comdat_linkage when appropriate. * cp/pt.c (do_type_instantiation): On systems where weak symbols don't go in a static archive's TOC, explicit instantiation of a class must imply *explicit* instantiation of its memeber. From-SVN: r79394
2004-03-12 18:09:03 +01:00
/* If the target supports init_priority C++ attribute, give
SUPPORTS_INIT_PRIORITY a nonzero value. */
#ifndef SUPPORTS_INIT_PRIORITY
#define SUPPORTS_INIT_PRIORITY 1
#endif /* SUPPORTS_INIT_PRIORITY */
/* If duplicate library search directories can be removed from a
linker command without changing the linker's semantics, give this
symbol a nonzero. */
#ifndef LINK_ELIMINATE_DUPLICATE_LDIRECTORIES
#define LINK_ELIMINATE_DUPLICATE_LDIRECTORIES 0
#endif /* LINK_ELIMINATE_DUPLICATE_LDIRECTORIES */
1997-07-04 20:49:39 +02:00
/* If we have a definition of INCOMING_RETURN_ADDR_RTX, assume that
the rest of the DWARF 2 frame unwind support is also provided. */
1997-09-10 20:00:28 +02:00
#if !defined (DWARF2_UNWIND_INFO) && defined (INCOMING_RETURN_ADDR_RTX)
#define DWARF2_UNWIND_INFO 1
1997-07-04 20:49:39 +02:00
#endif
/* If we have named sections, and we're using crtstuff to run ctors,
use them for registering eh frame information. */
#if defined (TARGET_ASM_NAMED_SECTION) && DWARF2_UNWIND_INFO \
&& !defined(EH_FRAME_IN_DATA_SECTION)
target.h (gcc_target): Add asm_out.named_section, section_type_flags, have_named_sections. * target.h (gcc_target): Add asm_out.named_section, section_type_flags, have_named_sections. * target-def.h (TARGET_ASM_NAMED_SECTION): New. (TARGET_HAVE_NAMED_SECTIONS): New. (TARGET_SECTION_TYPE_FLAGS): New. * Makefile.in (toplev.o): Depend on TARGET_H. (varasm.o, dbxout.o): Likewise. * c-common.c (decl_attributes): Check targetm.have_named_sections instead of ifdef ASM_OUTPUT_SECTION_NAME. * dbxout.c (dbxout_function_decl): Likewise. (dbxout_function_end): Likewise. * toplev.c (compile_file): Likewise. * varasm.c (exception_section): Likewise. * cp/decl2.c (finish_objects): Likewise. * defaults.h (EH_FRAME_SECTION): Remove. (EH_FRAME_SECTION_ASM_OP): Remove. (EH_FRAME_SECTION_NAME): New. (UNIQUE_SECTION): Don't depend on ASM_OUTPUT_SECTION_NAME. (UNIQUE_SECTION_P): Remove. * dwarf2out.c (SECTION_FORMAT): Remove. (ASM_OUTPUT_SECTION): Remove. (output_call_frame_info): Use named_section_flags. (output_comp_unit, dwarf2out_start_source_file): Likewise. (dwarf2out_end_source_file, dwarf2out_define): Likewise. (dwarf2out_undef, dwarf2out_init, dwarf2out_finish): Likewise. * varasm.c (in_eh_frame, eh_frame_section): Remove. (named_section_flags): New. (named_section): Use it and targetm.section_type_flags. (resolve_unique_section): New. (assemble_start_function): Use it. (asm_emit_uninitialised, assemble_variable): Likewise. (default_section_type_flags): New. (default_no_named_section, default_elf_asm_named_section): New. (default_coff_asm_named_section, default_pe_asm_named_section): New. * output.h: Update varasm.c decls. (SECTION_*): New flags. * crtstuff.c: Check EH_FRAME_SECTION_NAME not EH_FRAME_SECTION_ASM_OP. (__EH_FRAME_BEGIN__, __FRAME_END__): Use attribute section. * config/elfos.h (UNIQUE_SECTION_P): Remove. * config/alpha/elf.h, config/arm/linux-elf.h: Likewise. * config/arm/pe.h, config/arm/unknown-elf.h: Likewise. * config/i386/cygwin.h, config/i386/djgpp.h: Likewise. * config/i386/i386-interix.h, config/i386/win32.h: Likewise. * config/ia64/sysv4.h, config/mcore/mcore-pe.h: Likewise. * config/mips/elf.h, config/mips/elf64.h: Likewise. * config/mips/iris6gld.h, config/mips/mips.h: Likewise. * config/pa/pa64-hpux.h, * config/elfos.h (ASM_OUTPUT_SECTION_NAME): Remove. (TARGET_ASM_NAMED_SECTION): New. * config/psos.h, config/a29k/a29k.h, config/alpha/elf.h: Likewise. * config/alpha/vms.h, config/arm/coff.h: Likewise. * config/arm/conix-elf.h, config/arm/elf.h: Likewise. * config/arm/linux-elf.h, config/arm/pe.h: Likewise. * config/arm/unknown-elf.h, config/avr/avr.h: Likewise. * config/c4x/c4x.h, config/h8300/h8300.h: Likewise. * config/i386/cygwin.h, config/i386/djgpp.h: Likewise. * config/i386/i386-interix.h, config/i386/i386elf.h : Likewise. * config/i386/sco5.h, config/i386/win32.h: Likewise. * config/m68k/coff.h, config/mcore/mcore-pe.h: Likewise. * config/mcore/mcore.h, config/mips/elf.h: Likewise. * config/mips/elf64.h, config/mips/iris6.h: Likewise. * config/mips/netbsd.h, config/mips/openbsd.h: Likewise. * config/pa/pa64-hpux.h, config/rs6000/sysv4.h: Likewise. * config/rs6000/xcoff.h, config/sh/sh.h: Likewise. * config/sparc/sysv4.h: Likewise. * config/nextstep.h: Error until named sections implemented. * config/a29k/a29k.c (a29k_asm_named_section): New. * config/alpha/alpha.c (SECTION_VMS_OVERLAY): New. (vms_section_type_flags, vms_asm_named_section): New. * config/arm/arm.c (arm_elf_asm_named_section): New. * config/avr/avr.c (asm_output_section_name): Remove. * config/avr/avr-protos.h: Update. * config/c4x/c4x.c (c4x_asm_named_section): New. * config/h8300/h8300.c (h8300_asm_named_section): New. * config/i386/i386.c (sco_asm_named_section): New. * config/i386/winnt.c (SECTION_PE_SHARED): New. (i386_pe_section_type_flags): New. (i386_pe_asm_named_section): New. * config/i386/i386-protos.h: Update. * config/m68k/m68k.c (m68k_coff_asm_named_section): New. * config/mcore/mcore.c (mcore_asm_named_section): New. * config/mips/mips.c (iris6_asm_named_section): New. * config/mips/mips.h (ENCODE_SECTION_INFO): Use DECL_ONE_ONLY instead of UNIQUE_SECTION_P. * config/rs6000/rs6000.c (rs6000_elf_section_type_flags): New. (xcoff_asm_named_section): New. * config/sh/sh.c (sh_asm_named_section): New. * config/sparc/sparc.c (sparc_elf_asm_named_section): New. * config/i386/djgpp.h (EH_FRAME_SECTION_ASM_OP): Remove. * config/i386/sco5.h (EH_FRAME_SECTION_ASM_OP*): Remove. (EH_FRAME_SECTION_NAME): New. (EXCEPTION_SECTION): New. * config/ia64/ia64.h (EH_FRAME_SECTION_ASM_OP): Remove. (DEBUG_*_SECTION): Remove. * config/m68k/rtemself.h (EH_FRAME_SECTION_ASM_OP): Remove. * config/mips/iris6.h (DEBUG_*_SECTION): Remove. (EH_FRAME_SECTION_ASM_OP): Remove. * doc/tm.texi (UNIQUE_SECTION_P): Remove. (ASM_OUTPUT_SECTION_NAME): Remove. (TARGET_ASM_NAMED_SECTION): New. (TARGET_HAVE_NAMED_SECTIONS): New. (TARGET_SECTION_TYPE_FLAGS): New. (EH_FRAME_SECTION_ASM_OP): Remove. (EH_FRAME_SECTION_NAME): New. From-SVN: r44623
2001-08-04 03:31:41 +02:00
#ifndef EH_FRAME_SECTION_NAME
#define EH_FRAME_SECTION_NAME ".eh_frame"
#endif
#endif
/* On many systems, different EH table encodings are used under
difference circumstances. Some will require runtime relocations;
some will not. For those that do not require runtime relocations,
we would like to make the table read-only. However, since the
read-only tables may need to be combined with read-write tables
that do require runtime relocation, it is not safe to make the
tables read-only unless the linker will merge read-only and
read-write sections into a single read-write section. If your
linker does not have this ability, but your system is such that no
encoding used with non-PIC code will ever require a runtime
relocation, then you can define EH_TABLES_CAN_BE_READ_ONLY to 1 in
your target configuration file. */
#ifndef EH_TABLES_CAN_BE_READ_ONLY
#ifdef HAVE_LD_RO_RW_SECTION_MIXING
#define EH_TABLES_CAN_BE_READ_ONLY 1
#else
#define EH_TABLES_CAN_BE_READ_ONLY 0
#endif
#endif
/* If we have named section and we support weak symbols, then use the
.jcr section for recording java classes which need to be registered
at program start-up time. */
#if defined (TARGET_ASM_NAMED_SECTION) && SUPPORTS_WEAK
#ifndef JCR_SECTION_NAME
#define JCR_SECTION_NAME ".jcr"
#endif
#endif
/* This decision to use a .jcr section can be overridden by defining
USE_JCR_SECTION to 0 in target file. This is necessary if target
can define JCR_SECTION_NAME but does not have crtstuff or
linker support for .jcr section. */
#ifndef TARGET_USE_JCR_SECTION
#ifdef JCR_SECTION_NAME
#define TARGET_USE_JCR_SECTION 1
#else
#define TARGET_USE_JCR_SECTION 0
#endif
#endif
/* Number of hardware registers that go into the DWARF-2 unwind info.
If not defined, equals FIRST_PSEUDO_REGISTER */
#ifndef DWARF_FRAME_REGISTERS
#define DWARF_FRAME_REGISTERS FIRST_PSEUDO_REGISTER
#endif
1750a.h (DBX_REGISTER_NUMBER): Don't define. * 1750a.h (DBX_REGISTER_NUMBER): Don't define. * alpha.h (DBX_REGISTER_NUMBER): Likewise. * arc.h (DBX_REGISTER_NUMBER): Likewise. * arm/aout.h (DBX_REGISTER_NUMBER): Likewise. * avr.h (DBX_REGISTER_NUMBER): Likewise. * c4x.h (DBX_REGISTER_NUMBER): Likewise. * clipper.h (DBX_REGISTER_NUMBER): Likewise. * convex.h (DBX_REGISTER_NUMBER): Likewise. * cris.h (DBX_REGISTER_NUMBER): Likewise. * dsp16xx.h (DBX_REGISTER_NUMBER): Likewise. * elxsi.h (DBX_REGISTER_NUMBER): Likewise. * fr30.h (DBX_REGISTER_NUMBER): Likewise. * h8300.h (DBX_REGISTER_NUMBER): Likewise. * i370.h (DBX_REGISTER_NUMBER): Likewise. * i860.h (DBX_REGISTER_NUMBER): Likewise. * i860/paragon.h (DBX_REGISTER_NUMBER): Likewise. * i860/sysv3.h (DBX_REGISTER_NUMBER): Likewise. * i860/sysv4.h (DBX_REGISTER_NUMBER): Likewise. * m32r.h (DBX_REGISTER_NUMBER): Likewise. * m68hc11.h (DBX_REGISTER_NUMBER): Likewise. * m88k.h (DBX_REGISTER_NUMBER): Likewise. * mcore/mcore-elf.h (DBX_REGISTER_NUMBER): Likewise. * mcore.h (DBX_REGISTER_NUMBER): Likewise. * mn10200.h (DBX_REGISTER_NUMBER): Likewise. * mn10300.h (DBX_REGISTER_NUMBER): Likewise. * pdp11.h (DBX_REGISTER_NUMBER): Likewise. * romp.h (DBX_REGISTER_NUMBER): Likewise. * rs6000.h (DBX_REGISTER_NUMBER): Likewise. * rs6000/sysv4.h (DBX_REGISTER_NUMBER): Likewise. * s390/linux.h (DBX_REGISTER_NUMBER): Likewise. * stormy16.h (DBX_REGISTER_NUMBER): Likewise. * v850.h (DBX_REGISTER_NUMBER): Likewise. * vax.h (DBX_REGISTER_NUMBER): Likewise. * we32k.h (DBX_REGISTER_NUMBER): Likewise. * defaults.h (DBX_REGISTER_NUMBER): Provide a default. * doc/tm.texi (DBX_REGISTER_NUMBER): Update. From-SVN: r47256
2001-11-22 03:19:58 +01:00
/* How to renumber registers for dbx and gdb. If not defined, assume
no renumbering is necessary. */
#ifndef DBX_REGISTER_NUMBER
#define DBX_REGISTER_NUMBER(REGNO) (REGNO)
#endif
/* Default sizes for base C types. If the sizes are different for
your target, you should override these values by defining the
appropriate symbols in your tm.h file. */
#ifndef BITS_PER_UNIT
#define BITS_PER_UNIT 8
#endif
#ifndef BITS_PER_WORD
#define BITS_PER_WORD (BITS_PER_UNIT * UNITS_PER_WORD)
#endif
#ifndef CHAR_TYPE_SIZE
#define CHAR_TYPE_SIZE BITS_PER_UNIT
#endif
#ifndef BOOL_TYPE_SIZE
/* `bool' has size and alignment `1', on almost all platforms. */
#define BOOL_TYPE_SIZE CHAR_TYPE_SIZE
#endif
#ifndef SHORT_TYPE_SIZE
#define SHORT_TYPE_SIZE (BITS_PER_UNIT * MIN ((UNITS_PER_WORD + 1) / 2, 2))
#endif
#ifndef INT_TYPE_SIZE
#define INT_TYPE_SIZE BITS_PER_WORD
#endif
#ifndef LONG_TYPE_SIZE
#define LONG_TYPE_SIZE BITS_PER_WORD
#endif
#ifndef LONG_LONG_TYPE_SIZE
#define LONG_LONG_TYPE_SIZE (BITS_PER_WORD * 2)
#endif
#ifndef WCHAR_TYPE_SIZE
#define WCHAR_TYPE_SIZE INT_TYPE_SIZE
#endif
#ifndef FLOAT_TYPE_SIZE
#define FLOAT_TYPE_SIZE BITS_PER_WORD
#endif
#ifndef DOUBLE_TYPE_SIZE
#define DOUBLE_TYPE_SIZE (BITS_PER_WORD * 2)
#endif
#ifndef LONG_DOUBLE_TYPE_SIZE
#define LONG_DOUBLE_TYPE_SIZE (BITS_PER_WORD * 2)
#endif
/* Width in bits of a pointer. Mind the value of the macro `Pmode'. */
#ifndef POINTER_SIZE
#define POINTER_SIZE BITS_PER_WORD
#endif
#ifndef PIC_OFFSET_TABLE_REGNUM
#define PIC_OFFSET_TABLE_REGNUM INVALID_REGNUM
#endif
tree.c (handle_dll_attribute): Move here from i383/winnt.c. * tree.c (handle_dll_attribute): Move here from i383/winnt.c. Replace use of DECL_INLINE with DECL_DECLARED_INLINE_P. Set DECL_VISIBLITY. Test TARGET_DLLIMPORT_DECL_ATTRIBUTES with #if. * tree.h (handle_dll_attribute): Declare. Test TARGET_DLLIMPORT_DECL_ATTRIBUTES with #if. * c-common.h (c_determine_visibility): Declare. * c-common.c (c_determine_visibility): New function. * c-decl.c (finish_decl): Use it. (finish_function): Likewise. * defaults.h (TARGET_DLLIMPORT_DECL_ATTRIBUTES): Define it to zero, by default. Use #if, not #ifdef, to test it. * config/arm/arm.c (arm_attribute_table): Use handle_dll_attribute. Test TARGET_DLLIMPORT_DECL_ATTRIBUTES with #if. * config/arm/pe.h (TARGET_DLLIMPORT_DECL_ATTRIBUTES): Define to 1. * config/i386/cygming.h (TARGET_DLLIMPORT_DECL_ATTRIBUTES): Define to 1. * config/i386/i386-protos.h (ix86_handle_dll_attribute): Remove. * config/i386/i386.c (ix86_attribute_table): Use handle_dll_attribute for dllimport/dllexport. Test TARGET_DLLIMPORT_DECL_ATTRIBUTES with #if. * config/i386/winnt.c (ix86_handle_dll_attribute): Remove. * config/mcore/mcore.h (TARGET_DLLIMPORT_DECL_ATTRIBUTES): Define it to 1. * config/mcore/mcore.c (TARGET_DLLIMPORT_DECL_ATTRIBUTES): Test it with #if. * config/sh/symbian-pre.h (TARGET_DLLIMPORT_DECL_ATTRIBUTES): Define it to 1. * doc/extend.texi (dllexport): Clarify and correct documentation. (dllimport): Likewise. * doc/tm.texi (TARGET_DLLIMPORT_DECL_ATTRIBUTES): Mention handle_dll_attribute. * decl.c (start_preparsed_function): Move determine_visibility call. * decl2.c (determine_visibility): Incorporate dllexport testing. * g++.dg/ext/visibility/assign1.C: Use scan-hidden and dg-require-visiblity. * g++.dg/ext/visibility/fvisibility-inlines-hidden.C: Likewise. * g++.dg/ext/visibility/fvisibility.C: Likewise. * g++.dg/ext/visibility/memfuncts.C: Likewise. * g++.dg/ext/visibility/new1.C: Likewise. * g++.dg/ext/visibility/pragma.C: Likewise. * g++.dg/ext/visibility/staticmemfuncts.C: Likewise. * g++.dg/ext/visibility/virtual.C: Likewise. * g++/dg/ext/visibility/visibility-1.C: Likewise. * g++/dg/ext/visibility/visibility-2.C: Likewise. * g++/dg/ext/visibility/visibility-3.C: Likewise. * g++/dg/ext/visibility/visibility-4.C: Likewise. * g++/dg/ext/visibility/visibility-5.C: Likewise. * g++/dg/ext/visibility/visibility-6.C: Likewise. * g++/dg/ext/visibility/visibility-7.C: Likewise. * g++/dg/ext/visibility/visibility-8.C: New test. * gcc.c-torture/compile/dll.x: Remove. * gcc.dg/dll-2.c: Use dg-require-dll * gcc.dg/visibility-10.c: New test. * lib/gcc-dg.exp (dg-require-dll): Add Symbian to list of targets supporting DLLs. * testsuite/lib/scanasm.exp (scan_hidden): New function. (scan_not_hidden): Likewise. From-SVN: r85621
2004-08-06 04:03:29 +02:00
#ifndef TARGET_DLLIMPORT_DECL_ATTRIBUTES
#define TARGET_DLLIMPORT_DECL_ATTRIBUTES 0
#endif
#ifndef TARGET_DECLSPEC
tree.c (handle_dll_attribute): Move here from i383/winnt.c. * tree.c (handle_dll_attribute): Move here from i383/winnt.c. Replace use of DECL_INLINE with DECL_DECLARED_INLINE_P. Set DECL_VISIBLITY. Test TARGET_DLLIMPORT_DECL_ATTRIBUTES with #if. * tree.h (handle_dll_attribute): Declare. Test TARGET_DLLIMPORT_DECL_ATTRIBUTES with #if. * c-common.h (c_determine_visibility): Declare. * c-common.c (c_determine_visibility): New function. * c-decl.c (finish_decl): Use it. (finish_function): Likewise. * defaults.h (TARGET_DLLIMPORT_DECL_ATTRIBUTES): Define it to zero, by default. Use #if, not #ifdef, to test it. * config/arm/arm.c (arm_attribute_table): Use handle_dll_attribute. Test TARGET_DLLIMPORT_DECL_ATTRIBUTES with #if. * config/arm/pe.h (TARGET_DLLIMPORT_DECL_ATTRIBUTES): Define to 1. * config/i386/cygming.h (TARGET_DLLIMPORT_DECL_ATTRIBUTES): Define to 1. * config/i386/i386-protos.h (ix86_handle_dll_attribute): Remove. * config/i386/i386.c (ix86_attribute_table): Use handle_dll_attribute for dllimport/dllexport. Test TARGET_DLLIMPORT_DECL_ATTRIBUTES with #if. * config/i386/winnt.c (ix86_handle_dll_attribute): Remove. * config/mcore/mcore.h (TARGET_DLLIMPORT_DECL_ATTRIBUTES): Define it to 1. * config/mcore/mcore.c (TARGET_DLLIMPORT_DECL_ATTRIBUTES): Test it with #if. * config/sh/symbian-pre.h (TARGET_DLLIMPORT_DECL_ATTRIBUTES): Define it to 1. * doc/extend.texi (dllexport): Clarify and correct documentation. (dllimport): Likewise. * doc/tm.texi (TARGET_DLLIMPORT_DECL_ATTRIBUTES): Mention handle_dll_attribute. * decl.c (start_preparsed_function): Move determine_visibility call. * decl2.c (determine_visibility): Incorporate dllexport testing. * g++.dg/ext/visibility/assign1.C: Use scan-hidden and dg-require-visiblity. * g++.dg/ext/visibility/fvisibility-inlines-hidden.C: Likewise. * g++.dg/ext/visibility/fvisibility.C: Likewise. * g++.dg/ext/visibility/memfuncts.C: Likewise. * g++.dg/ext/visibility/new1.C: Likewise. * g++.dg/ext/visibility/pragma.C: Likewise. * g++.dg/ext/visibility/staticmemfuncts.C: Likewise. * g++.dg/ext/visibility/virtual.C: Likewise. * g++/dg/ext/visibility/visibility-1.C: Likewise. * g++/dg/ext/visibility/visibility-2.C: Likewise. * g++/dg/ext/visibility/visibility-3.C: Likewise. * g++/dg/ext/visibility/visibility-4.C: Likewise. * g++/dg/ext/visibility/visibility-5.C: Likewise. * g++/dg/ext/visibility/visibility-6.C: Likewise. * g++/dg/ext/visibility/visibility-7.C: Likewise. * g++/dg/ext/visibility/visibility-8.C: New test. * gcc.c-torture/compile/dll.x: Remove. * gcc.dg/dll-2.c: Use dg-require-dll * gcc.dg/visibility-10.c: New test. * lib/gcc-dg.exp (dg-require-dll): Add Symbian to list of targets supporting DLLs. * testsuite/lib/scanasm.exp (scan_hidden): New function. (scan_not_hidden): Likewise. From-SVN: r85621
2004-08-06 04:03:29 +02:00
#if TARGET_DLLIMPORT_DECL_ATTRIBUTES
/* If the target supports the "dllimport" attribute, users are
probably used to the "__declspec" syntax. */
#define TARGET_DECLSPEC 1
#else
#define TARGET_DECLSPEC 0
#endif
#endif
/* By default, the preprocessor should be invoked the same way in C++
as in C. */
#ifndef CPLUSPLUS_CPP_SPEC
#ifdef CPP_SPEC
#define CPLUSPLUS_CPP_SPEC CPP_SPEC
#endif
#endif
#ifndef ACCUMULATE_OUTGOING_ARGS
#define ACCUMULATE_OUTGOING_ARGS 0
#endif
/* Supply a default definition for PUSH_ARGS. */
#ifndef PUSH_ARGS
#ifdef PUSH_ROUNDING
#define PUSH_ARGS !ACCUMULATE_OUTGOING_ARGS
#else
#define PUSH_ARGS 0
#endif
#endif
/* Decide whether a function's arguments should be processed
from first to last or from last to first.
They should if the stack and args grow in opposite directions, but
only if we have push insns. */
#ifdef PUSH_ROUNDING
#ifndef PUSH_ARGS_REVERSED
#if defined (STACK_GROWS_DOWNWARD) != defined (ARGS_GROW_DOWNWARD)
#define PUSH_ARGS_REVERSED PUSH_ARGS
#endif
#endif
#endif
#ifndef PUSH_ARGS_REVERSED
#define PUSH_ARGS_REVERSED 0
#endif
/* If PREFERRED_STACK_BOUNDARY is not defined, set it to STACK_BOUNDARY.
STACK_BOUNDARY is required. */
#ifndef PREFERRED_STACK_BOUNDARY
#define PREFERRED_STACK_BOUNDARY STACK_BOUNDARY
#endif
#ifndef TARGET_DEFAULT_PACK_STRUCT
#define TARGET_DEFAULT_PACK_STRUCT 0
#endif
/* By default, the C++ compiler will use function addresses in the
vtable entries. Setting this nonzero tells the compiler to use
function descriptors instead. The value of this macro says how
many words wide the descriptor is (normally 2). It is assumed
that the address of a function descriptor may be treated as a
pointer to a function. */
#ifndef TARGET_VTABLE_USES_DESCRIPTORS
#define TARGET_VTABLE_USES_DESCRIPTORS 0
#endif
/* By default, the vtable entries are void pointers, the so the alignment
is the same as pointer alignment. The value of this macro specifies
the alignment of the vtable entry in bits. It should be defined only
when special alignment is necessary. */
#ifndef TARGET_VTABLE_ENTRY_ALIGN
#define TARGET_VTABLE_ENTRY_ALIGN POINTER_SIZE
#endif
/* There are a few non-descriptor entries in the vtable at offsets below
zero. If these entries must be padded (say, to preserve the alignment
specified by TARGET_VTABLE_ENTRY_ALIGN), set this to the number of
words in each data entry. */
#ifndef TARGET_VTABLE_DATA_ENTRY_DISTANCE
#define TARGET_VTABLE_DATA_ENTRY_DISTANCE 1
#endif
/* Decide whether it is safe to use a local alias for a virtual function
when constructing thunks. */
#ifndef TARGET_USE_LOCAL_THUNK_ALIAS_P
#ifdef ASM_OUTPUT_DEF
#define TARGET_USE_LOCAL_THUNK_ALIAS_P(DECL) 1
#else
#define TARGET_USE_LOCAL_THUNK_ALIAS_P(DECL) 0
#endif
#endif
defaults.h (ASM_PREFERRED_EH_DATA_FORMAT): New. * defaults.h (ASM_PREFERRED_EH_DATA_FORMAT): New. * dwarf2asm.c (dw2_force_const_mem, dw2_output_indirect_constant_1, dw2_output_indirect_constants, dw2_asm_output_encoded_addr_rtx): New. * dwarf2asm.h (dw2_asm_output_encoded_addr_rtx): Prototype. (dw2_output_indirect_constants): Prototype. * dwarf2out.c (dwarf2out_begin_prologue): Generate current_function_func_begin_label if we'll need it for EH. Exit early for IA64_UNWIND_INFO. * except.c: Get DW_EH_PE_* defines from dwarf2.h. (eh_data_format_name): Update for indirect references. (output_function_exception_table): Care for IA64_UNWIND_INFO. Handle ASM_PREFERRED_EH_DATA_FORMAT. * except.h (MUST_USE_SJLJ_EXCEPTIONS): IA64_UNWIND_INFO needn't define HAVE_eh_return etc. * final.c (final_start_function): Always call dwarf2out_begin_prologue. (final_end_function): Don't call output_function_exception_table. * toplev.c (compile_file): Call dw2_output_indirect_constants. (rest_of_compilation): Invoke output_function_exception_table for ia64 before assemble_end_function. * tm.texi (ASM_PREFERRED_EH_DATA_FORMAT): Document. (ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX): Document. * unwind-dw2.c (_Unwind_GetTextRelBase, _Unwind_GetDataRelBase): New. * unwind.h: Declare them. * libgcc-std.ver: Export them. * unwind-pe.h: New file. * config/alpha/elf.h (ASM_PREFERRED_EH_DATA_FORMAT): New. * config/ia64/fde-glibc.c: Use "struct unw_table_entry" instead of "fde". (find_fde_for_dso): Extract DT_PLTGOT. (_Unwind_FindTableEntry): Rename from __ia64_find_fde; return the segment and gp as well. * config/ia64/frame-ia64.c: Remove file. * config/ia64/frame-ia64.h: Remove file. * config/ia64/unwind-ia64.c: New file. * config/ia64/unwind-ia64.h: New file. * config/ia64/ia64.h (ASM_OUTPUT_EH_CHAR): Remove. (ASM_OUTPUT_EH_SHORT, ASM_OUTPUT_EH_INT): Remove. (ASM_OUTPUT_EH_DOUBLE_INT): Remove. (ASM_PREFERRED_EH_DATA_FORMAT): New. (ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX): New. (IA64_UNWIND_INFO): Re-enable. (HANDLER_SECTION): Remove. (EH_RETURN_DATA_REGNO): New. * config/ia64/ia64.md (exception_receiver): Remove. * config/ia64/t-glibc (LIB2ADDEH): Re-enable. * config/ia64/t-ia64 (LIB2ADDEH): Re-enable. From-SVN: r41981
2001-05-12 08:03:20 +02:00
/* Select a format to encode pointers in exception handling data. We
prefer those that result in fewer dynamic relocations. Assume no
special support here and encode direct references. */
#ifndef ASM_PREFERRED_EH_DATA_FORMAT
#define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) DW_EH_PE_absptr
#endif
/* By default, the C++ compiler will use the lowest bit of the pointer
to function to indicate a pointer-to-member-function points to a
virtual member function. However, if FUNCTION_BOUNDARY indicates
function addresses aren't always even, the lowest bit of the delta
field will be used. */
#ifndef TARGET_PTRMEMFUNC_VBIT_LOCATION
#define TARGET_PTRMEMFUNC_VBIT_LOCATION \
(FUNCTION_BOUNDARY >= 2 * BITS_PER_UNIT \
? ptrmemfunc_vbit_in_pfn : ptrmemfunc_vbit_in_delta)
#endif
#ifndef DEFAULT_GDB_EXTENSIONS
#define DEFAULT_GDB_EXTENSIONS 1
#endif
/* If more than one debugging type is supported, you must define
PREFERRED_DEBUGGING_TYPE to choose the default. */
#if 1 < (defined (DBX_DEBUGGING_INFO) + defined (SDB_DEBUGGING_INFO) \
+ defined (DWARF2_DEBUGGING_INFO) + defined (XCOFF_DEBUGGING_INFO) \
+ defined (VMS_DEBUGGING_INFO))
#ifndef PREFERRED_DEBUGGING_TYPE
#error You must define PREFERRED_DEBUGGING_TYPE
#endif /* no PREFERRED_DEBUGGING_TYPE */
/* If only one debugging format is supported, define PREFERRED_DEBUGGING_TYPE
here so other code needn't care. */
#elif defined DBX_DEBUGGING_INFO
#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
#elif defined SDB_DEBUGGING_INFO
#define PREFERRED_DEBUGGING_TYPE SDB_DEBUG
#elif defined DWARF2_DEBUGGING_INFO
#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
#elif defined VMS_DEBUGGING_INFO
vms.h (VMS_DEBUGGING_INFO): New macro. * config/alpha/vms.h (VMS_DEBUGGING_INFO): New macro. (PREFERRED_DEBUGGING_TYPE): Define as VMS_AND_DWARF2_DEBUG. (ASM_SPEC): Don't redefine. (OPTIMIZATION_OPTIONS, OVERRIDE_OPTIONS, LINK_SPEC): Define. * config/alpha/t-vms (EXTRA_PARTS): Use; add rule for vms-dwarf2.asm. * config/alpha/vms-dwarf2.asm: New file. * Makefile.in (OBJS): Add vmsdbgout.c and its rule. * c-lex.c (init_c_lex): Test for VMS_AND_DWARF2_DEBUG. * debug.h (gcc_debug_hooks): Add vmsdbg_debug_hooks. (vmsdbgout_after_prologue): New declaration. * defaults.h (VMS_DEBUGGING_INFO): Add to PREFERRED_DEBUGGING_TYPE. * dwarf2.h (dwarf_attribute): New DW_AT_VMS_rtnbeg_pd_address. * dwarf2out.c (dwarf2out_do_frame): Test for VMS_AND_DWARF2_DEBUG. (dwarf2out_frame_finish): Test for VMS_AND_DWARF2_DEBUG. (dwarf_attr_name): Use DW_AT_VMS_rtnbeg_pd_address. (add_name_and_src_coords_attributes): Test VMS_DEBUGGING_INFO * final.c (final_start_function): Test for VMS_AND_DWARF2_DEBUG. Test VMS_DEBUGGING_INFO. (final_end_function): Test for VMS_AND_DWARF2_DEBUG. (final_scan_insn): Test for VMS_AND_DWARF2_DEBUG and VMS_DEBUG. * flags.h (debug_info_type): Add VMS_DEBUG and VMS_AND_DWARF2_DEBUG. * toplev.c (compile_file): Test VMS_DEBUGGING_INFO, VMS_DEBUG, and VMS_AND_DWARF2_DEBUG. (rest_of_type_compilation): Test for VMS_AND_DWARF2_DEBUG. (decode_g_option): Add "vms" to debug_type_names. (process_options): Set vmsdbg_debug_hooks if -gvms. (lang_independent_init): Emit line number for VMS unless -g0. * tree.c: (build_complex_type): Test for VMS_AND_DWARF2_DEBUG. * vmsdbg.h, vmsdbgout.c: New files. From-SVN: r47532
2001-12-02 15:38:07 +01:00
#define PREFERRED_DEBUGGING_TYPE VMS_AND_DWARF2_DEBUG
#elif defined XCOFF_DEBUGGING_INFO
#define PREFERRED_DEBUGGING_TYPE XCOFF_DEBUG
#else
/* No debugging format is supported by this target. */
#define PREFERRED_DEBUGGING_TYPE NO_DEBUG
#endif
/* Define codes for all the float formats that we know of. */
#define UNKNOWN_FLOAT_FORMAT 0
#define IEEE_FLOAT_FORMAT 1
#define VAX_FLOAT_FORMAT 2
#define IBM_FLOAT_FORMAT 3
#define C4X_FLOAT_FORMAT 4
/* Default to IEEE float if not specified. Nearly all machines use it. */
#ifndef TARGET_FLOAT_FORMAT
#define TARGET_FLOAT_FORMAT IEEE_FLOAT_FORMAT
#endif
/* Some macros can be defined by the backend in either a mode-dependent
or mode-independent form. The compiler proper should only use the
mode-dependent form, providing VOIDmode when the mode is unknown.
We can't poison the macros because the backend may reference them. */
#ifndef REGNO_MODE_OK_FOR_BASE_P
#define REGNO_MODE_OK_FOR_BASE_P(REGNO, MODE) REGNO_OK_FOR_BASE_P (REGNO)
#endif
#ifndef REG_MODE_OK_FOR_BASE_P
#define REG_MODE_OK_FOR_BASE_P(REG, MODE) REG_OK_FOR_BASE_P (REG)
#endif
/* Determine the register class for registers suitable to be the base
address register in a MEM. Allow the choice to be dependent upon
the mode of the memory access. */
#ifndef MODE_BASE_REG_CLASS
#define MODE_BASE_REG_CLASS(MODE) BASE_REG_CLASS
#endif
/* Some machines require a different base register class if the index
is a register. By default, assume that a base register is acceptable. */
#ifndef MODE_BASE_REG_REG_CLASS
#define MODE_BASE_REG_REG_CLASS(MODE) MODE_BASE_REG_CLASS(MODE)
#endif
#ifndef REGNO_MODE_OK_FOR_REG_BASE_P
#define REGNO_MODE_OK_FOR_REG_BASE_P(REGNO, MODE) REGNO_MODE_OK_FOR_BASE_P (REGNO, MODE)
#endif
#ifndef REG_MODE_OK_FOR_REG_BASE_P
#define REG_MODE_OK_FOR_REG_BASE_P(REGNO, MODE) REG_MODE_OK_FOR_BASE_P (REGNO, MODE)
#endif
#ifndef LARGEST_EXPONENT_IS_NORMAL
#define LARGEST_EXPONENT_IS_NORMAL(SIZE) 0
#endif
#ifndef ROUND_TOWARDS_ZERO
#define ROUND_TOWARDS_ZERO 0
#endif
defaults.h (MODE_HAS_NANS, [...]): New. * defaults.h (MODE_HAS_NANS, MODE_HAS_INFINITIES): New. (MODE_HAS_SIGNED_ZEROS, MODE_HAS_SIGN_DEPENDENT_ROUNDING): New. * flags.h (HONOR_NANS, HONOR_INFINITIES, HONOR_SIGNED_ZEROS): New. (HONOR_SIGN_DEPENDENT_ROUNDING): New. * builtins.c (expand_builtin_mathfn): Use HONOR_NANS. * c-common.c (truthvalue_conversion): Reduce x - y != 0 to x != y unless x and y could be infinite. (expand_unordered_cmp): New, mostly split from expand_tree_builtin. Check that the common type of both arguments is a real, even for targets without unordered comparisons. Allow an integer argument to be compared against a real. (expand_tree_builtin): Use expand_unordered_cmp. * combine.c (combine_simplify_rtx): Use the new HONOR_... macros. * cse.c (fold_rtx): Likewise. Fix indentation. * fold-const.c (fold_real_zero_addition_p): New. (fold): Use it, and the new HONOR_... macros. * ifcvt.c (noce_try_minmax): Use the new HONOR_... macros. * jump.c (reversed_comparison_code_parts): After searching for the true comparison mode, use HONOR_NANS to decide whether it can be safely reversed. (reverse_condition_maybe_unordered): Remove IEEE check. * simplify-rtx.c (simplify_binary_operation): Use the new macros to decide which simplifications are valid. Allow the following simplifications for IEEE: (-a + b) to (b - a), (a + -b) to (a - b), and (a - -b) to (a + b). (simplify_relational_operation): Use HONOR_NANS. * doc/tm.texi: Document the MODE_HAS_... macros. From-SVN: r50401
2002-03-07 12:37:16 +01:00
#ifndef MODE_HAS_NANS
#define MODE_HAS_NANS(MODE) \
(FLOAT_MODE_P (MODE) \
&& TARGET_FLOAT_FORMAT == IEEE_FLOAT_FORMAT \
&& !LARGEST_EXPONENT_IS_NORMAL (GET_MODE_BITSIZE (MODE)))
defaults.h (MODE_HAS_NANS, [...]): New. * defaults.h (MODE_HAS_NANS, MODE_HAS_INFINITIES): New. (MODE_HAS_SIGNED_ZEROS, MODE_HAS_SIGN_DEPENDENT_ROUNDING): New. * flags.h (HONOR_NANS, HONOR_INFINITIES, HONOR_SIGNED_ZEROS): New. (HONOR_SIGN_DEPENDENT_ROUNDING): New. * builtins.c (expand_builtin_mathfn): Use HONOR_NANS. * c-common.c (truthvalue_conversion): Reduce x - y != 0 to x != y unless x and y could be infinite. (expand_unordered_cmp): New, mostly split from expand_tree_builtin. Check that the common type of both arguments is a real, even for targets without unordered comparisons. Allow an integer argument to be compared against a real. (expand_tree_builtin): Use expand_unordered_cmp. * combine.c (combine_simplify_rtx): Use the new HONOR_... macros. * cse.c (fold_rtx): Likewise. Fix indentation. * fold-const.c (fold_real_zero_addition_p): New. (fold): Use it, and the new HONOR_... macros. * ifcvt.c (noce_try_minmax): Use the new HONOR_... macros. * jump.c (reversed_comparison_code_parts): After searching for the true comparison mode, use HONOR_NANS to decide whether it can be safely reversed. (reverse_condition_maybe_unordered): Remove IEEE check. * simplify-rtx.c (simplify_binary_operation): Use the new macros to decide which simplifications are valid. Allow the following simplifications for IEEE: (-a + b) to (b - a), (a + -b) to (a - b), and (a - -b) to (a + b). (simplify_relational_operation): Use HONOR_NANS. * doc/tm.texi: Document the MODE_HAS_... macros. From-SVN: r50401
2002-03-07 12:37:16 +01:00
#endif
#ifndef MODE_HAS_INFINITIES
#define MODE_HAS_INFINITIES(MODE) \
(FLOAT_MODE_P (MODE) \
&& TARGET_FLOAT_FORMAT == IEEE_FLOAT_FORMAT \
&& !LARGEST_EXPONENT_IS_NORMAL (GET_MODE_BITSIZE (MODE)))
defaults.h (MODE_HAS_NANS, [...]): New. * defaults.h (MODE_HAS_NANS, MODE_HAS_INFINITIES): New. (MODE_HAS_SIGNED_ZEROS, MODE_HAS_SIGN_DEPENDENT_ROUNDING): New. * flags.h (HONOR_NANS, HONOR_INFINITIES, HONOR_SIGNED_ZEROS): New. (HONOR_SIGN_DEPENDENT_ROUNDING): New. * builtins.c (expand_builtin_mathfn): Use HONOR_NANS. * c-common.c (truthvalue_conversion): Reduce x - y != 0 to x != y unless x and y could be infinite. (expand_unordered_cmp): New, mostly split from expand_tree_builtin. Check that the common type of both arguments is a real, even for targets without unordered comparisons. Allow an integer argument to be compared against a real. (expand_tree_builtin): Use expand_unordered_cmp. * combine.c (combine_simplify_rtx): Use the new HONOR_... macros. * cse.c (fold_rtx): Likewise. Fix indentation. * fold-const.c (fold_real_zero_addition_p): New. (fold): Use it, and the new HONOR_... macros. * ifcvt.c (noce_try_minmax): Use the new HONOR_... macros. * jump.c (reversed_comparison_code_parts): After searching for the true comparison mode, use HONOR_NANS to decide whether it can be safely reversed. (reverse_condition_maybe_unordered): Remove IEEE check. * simplify-rtx.c (simplify_binary_operation): Use the new macros to decide which simplifications are valid. Allow the following simplifications for IEEE: (-a + b) to (b - a), (a + -b) to (a - b), and (a - -b) to (a + b). (simplify_relational_operation): Use HONOR_NANS. * doc/tm.texi: Document the MODE_HAS_... macros. From-SVN: r50401
2002-03-07 12:37:16 +01:00
#endif
#ifndef MODE_HAS_SIGNED_ZEROS
#define MODE_HAS_SIGNED_ZEROS(MODE) \
(FLOAT_MODE_P (MODE) && TARGET_FLOAT_FORMAT == IEEE_FLOAT_FORMAT)
#endif
#ifndef MODE_HAS_SIGN_DEPENDENT_ROUNDING
#define MODE_HAS_SIGN_DEPENDENT_ROUNDING(MODE) \
(FLOAT_MODE_P (MODE) \
&& TARGET_FLOAT_FORMAT == IEEE_FLOAT_FORMAT \
&& !ROUND_TOWARDS_ZERO)
defaults.h (MODE_HAS_NANS, [...]): New. * defaults.h (MODE_HAS_NANS, MODE_HAS_INFINITIES): New. (MODE_HAS_SIGNED_ZEROS, MODE_HAS_SIGN_DEPENDENT_ROUNDING): New. * flags.h (HONOR_NANS, HONOR_INFINITIES, HONOR_SIGNED_ZEROS): New. (HONOR_SIGN_DEPENDENT_ROUNDING): New. * builtins.c (expand_builtin_mathfn): Use HONOR_NANS. * c-common.c (truthvalue_conversion): Reduce x - y != 0 to x != y unless x and y could be infinite. (expand_unordered_cmp): New, mostly split from expand_tree_builtin. Check that the common type of both arguments is a real, even for targets without unordered comparisons. Allow an integer argument to be compared against a real. (expand_tree_builtin): Use expand_unordered_cmp. * combine.c (combine_simplify_rtx): Use the new HONOR_... macros. * cse.c (fold_rtx): Likewise. Fix indentation. * fold-const.c (fold_real_zero_addition_p): New. (fold): Use it, and the new HONOR_... macros. * ifcvt.c (noce_try_minmax): Use the new HONOR_... macros. * jump.c (reversed_comparison_code_parts): After searching for the true comparison mode, use HONOR_NANS to decide whether it can be safely reversed. (reverse_condition_maybe_unordered): Remove IEEE check. * simplify-rtx.c (simplify_binary_operation): Use the new macros to decide which simplifications are valid. Allow the following simplifications for IEEE: (-a + b) to (b - a), (a + -b) to (a - b), and (a - -b) to (a + b). (simplify_relational_operation): Use HONOR_NANS. * doc/tm.texi: Document the MODE_HAS_... macros. From-SVN: r50401
2002-03-07 12:37:16 +01:00
#endif
target.h (init_libfuncs): New hook. * target.h (init_libfuncs): New hook. * target-def.h: Default TARGET_INIT_BUILTINS and TARGET_INIT_LIBFUNCS to hook_void_void. Add TARGET_INIT_LIBFUNCS to TARGET_INITIALIZER. * builtins.c (default_init_builtins): Delete. * expr.h (default_init_builtins): Delete prototype. * doc/tm.texi: Document TARGET_INIT_LIBFUNCS and US_SOFTWARE_GOFAST. Tweak documentation of TARGET_FLOAT_LIB_COMPARE_RETURNS_BOOL. Remove documentation of INIT_TARGET_OPTABS, MULSI3_LIBCALL, DIVSI3_LIBCALL, UDIVSI3_LIBCALL, MODSI3_LIBCALL, UMODSI3_LIBCALL, MULDI3_LIBCALL, DIVDI3_LIBCALL, UDIVDI3_LIBCALL, MODDI3_LIBCALL, and UMODDI3_LIBCALL, * Makefile.in (optabs.o): Depends on target.h. * defaults.h: Provide default for FLOAT_LIB_COMPARE_RETURNS_BOOL. * optabs.c: Include target.h. (prepare_float_lib_cmp): No need for #ifdef around use of FLOAT_LIB_COMPARE_RETURNS_BOOL. (set_optab_libfunc): New function. (init_optabs): Delete use of all *_LIBCALL defines. Call targetm.init_libfuncs not INIT_TARGET_OPTABS. * optabs.h: Prototype set_optab_libfunc. * config.gcc: Remove all references to pa/long_double.h, ia64/hpux_longdouble.h, and gofast.h. (mips-*-*): When --enable-gofast, just add US_SOFTWARE_GOFAST to tm_defines; don't set INIT_SUBTARGET_OPTABS or change tm_file. * config/alpha/alpha.c, config/c4x/c4x.c, config/cris/cris.c * config/frv/frv.c, config/h8300/h8300.c, config/i860/i860.c * config/ia64/ia64.c, config/ip2k/ip2k.c, config/m68hc11/m68hc11.c * config/mips/mips.c, config/pa/pa.c, config/rs6000/rs6000.c * config/sparc/sparc.c, config/vax/vax.c: Provide a definition for TARGET_INIT_LIBFUNCS. Where necessary, include optabs.h, libfuncs.h, and/or config/gofast.h. * config/alpha/unicosmk.h, config/alpha/vms.h, config/c4x/c4x.h * config/avr/avr.h, config/cris/cris.h, config/frv/frv.h * config/h8300/h8300.h, config/i860/i860.h, config/ip2k/ip2k.h * config/iq2000/iq2000.h, config/m68hc11/m68hc11.h, config/mips/mips.h * config/rs6000/aix.h, config/rs6000/sysv4.h, config/sparc/elf.h * config/sparc/lite.h, config/sparc/netbsd-elf.h, config/sparc/sol2.h * config/sparc/sparc.h, config/v850/v850.h, config/vax/vax.h * config/vax/elf.h: Don't define or use INIT_TARGET_OPTABS, INIT_SUBTARGET_OPTABS, or any *_LIBCALL macros. * config/ia64/hpux.h: Redefine INTEL_EXTENDED_IEEE_FORMAT to 0. Set TARGET_INIT_LIBFUNCS and FLOAT_LIB_COMPARE_RETURNS_BOOL here. * config/pa/pa-hpux.h: Define LONG_DOUBLE_TYPE_SIZE, HPUX_LONG_DOUBLE_LIBRARY, and FLOAT_LIB_COMPARE_RETURNS_BOOL here. * config/ia64/hpux_longdouble.h, config/pa/long_double.h: Delete. * config/rs6000/xcoff.h: Don't define RS6000_ITRUNC nor RS6000_UITRUNC. * config/sparc/sparc.h: Default SUN_CONVERSION_LIBFUNCS and SUN_INTEGER_MULTIPLY_64 to 0. * config/sparc/sol2.h: Redefine SUN_CONVERSION_LIBFUNCS and SUN_INTEGER_MULTIPLY_64 to 1. * config/sparc/elf.h: Redefine SUN_CONVERSION_LIBFUNCS and SUN_INTEGER_MULTIPLY_64 to 0. * config/sparc/lite.h, config/sparc/liteelf.h, config/sparc/sp86x-elf.h: Define US_SOFTWARE_GOFAST. * config/vax/vax.h: Default TARGET_ELF to 0. * config/vax/elf.h: Redefine TARGET_ELF to 1. * config/gofast.h: Don't define any macros here. Provide one static function, gofast_maybe_init_libfuncs, which does what INIT_GOFAST_LIBFUNCS used to do but only if US_SOFTWARE_GOFAST is already defined. Do not clear negation libfuncs. Do not mess with HFmode, XFmode, or TFmode libfuncs. * config/avr/avr.c (avr_init_once): #if 0 out; mark FIXME. From-SVN: r72009
2003-10-02 02:44:29 +02:00
#ifndef FLOAT_LIB_COMPARE_RETURNS_BOOL
#define FLOAT_LIB_COMPARE_RETURNS_BOOL(MODE, COMPARISON) false
#endif
/* True if the targets integer-comparison functions return { 0, 1, 2
configure.in (arm*-*-eabi*): New target. * configure.in (arm*-*-eabi*): New target. * configure: Regenerate. * configure.ac (arm*-*-eabi*): New target. (arm*-*-symbianelf*): Likewise. * configure: Regenerated. * config.gcc (arm*-*-eabi*): New target. * defaults.h (TARGET_LIBGCC_FUNCS): New macro. (TARGET_LIB_INT_CMP_BIASED): Likewise. * expmed.c (expand_divmod): Try a two-valued divmod function as a last resort. * gthr.h: Remove bogus tokens at end of #pragma. * optabs.c (expand_twoval_binop_libfunc): New function. (prepare_cmp_insn): Handle the !TARGET_LIB_INT_CMP_BIASED case. (prepare_float_lib_cmp): Try reversing the condition. (debug_optab_libfuncs): New function. * optabs.h (expand_twoval_binop_libfunc): Declare. * config/arm/arm.c (arm_init_libfuncs): New function. (arm_compute_initial_eliminatino_offset): Return HOST_WIDE_INT. (TARGET_INIT_LIBFUNCS): Define it. * config/arm/arm.h (TARGET_BPABI): New macro. * config/arm/arm-protos.h (arm_compute_initial_elimination_offset): Return HOST_WIDE_INT. * config/arm/bpabi.S: New file. * config/arm/bpabi.c: Likewise. * config/arm/bpabi.h: Likewise. * config/arm/ieee754-df.S (__aeabi_dneg): New function or alias. (__aeabi_drsub): Likewise. (__aeabi_dsub): Likewise. (__aeabi_dadd): Likewise. (__aeabi_ui2d): Likewise. (__aeabi_i2d): Likewise. (__aeabi_f2d): Likewise. (__aeabi_dmul): Likewise. (__aeabi_ddiv): Likewise. (__aeabi_cdrcmple): Likewise. (__aeabi_cdcmpeq): Likewise. (__aeabi_cdcmple): Likewise. (__aeabi_dcmpeq): Likewise. (__aeabi_dcmplt): Likewise. (__aeabi_dcmple): Likewise. (__aeabi_dcmpge): Likewise. (__aeabi_dcmpgt): Likewise. (__aeabi_dcmpun): Likewise. (__aeabi_d2iz): Likewise. (__aeabi_d2uiz): Likewise. (__aeabi_d2f): Likewise. * config/arm/ieee754-sf.S (__aeabi_fneg): New function or alias. (__aeabi_frsub): Likewise. (__aeabi_fsub): Likewise. (__aeabi_fadd): Likewise. (__aeabi_ui2f): Likewise. (__aeabi_i2f): Likewise. (__aeabi_fmul): Likewise. (__aeabi_fdiv): Likewise. (__aeabi_cfrcmple): Likewise. (__aeabi_cfcmpeq): Likewise. (__aeabi_cfcmple): Likewise. (__aeabi_fcmpeq): Likewise. (__aeabi_fcmplt): Likewise. (__aeabi_fcmple): Likewise. (__aeabi_fcmpge): Likewise. (__aeabi_fcmpgt): Likewise. (__aeabi_fcmpun): Likewise. (__aeabi_f2iz): Likewise. (__aeabi_f2uiz): Likewise. * config/arm/lib1funcs.asm (ARM_CALL): New macro. (__aeabi_uidivmod): New function or alias. (__aeabi_idivmod): Likewise. (__aeabi_idiv0): Likewise. (__aeabi_ldiv0): Likewise. (__aeabi_llsr): Likewise. (__aeabi_lasr): Likewise. (__aeabi_llsl): Likewise. (bpabi.S): Include it. * config/arm/libgcc-bpabi.ver: New file. * config/arm/symbian.h (ARM_DEFAULT_ABI): Remove. (LINK_SPEC): Remove. * config/arm/t-arm-elf (LIB1ASMFUNCS): Add __aeabi_lcmp and __aeabi_ulcmp. * config/arm/t-bpabi: New file. * doc/tm.texi (TARGET_LIBGCC_FUNCS): New entry. (TARGET_LIB_INT_CMP_BIASED): Likewise. * gcc.dg/testsuite/gcc.dg/arm-eabi1.c: New test. * gcc.dg/dll-2.c: Fix dg-require syntax. * gcc.misc-tests/arm-isr.c (abort): Declare. (exit): Likewise. From-SVN: r85788
2004-08-11 04:50:14 +02:00
} to indicate { <, ==, > }. False if { -1, 0, 1 } is used
instead. The libgcc routines are biased. */
#ifndef TARGET_LIB_INT_CMP_BIASED
#define TARGET_LIB_INT_CMP_BIASED (true)
#endif
/* If FLOAT_WORDS_BIG_ENDIAN is not defined in the header files,
then the word-endianness is the same as for integers. */
real.c, real.h: Rewrite from scratch. gcc/ * real.c, real.h: Rewrite from scratch. * Makefile.in (simplify-rtx.o): Depend on TREE_H. (paranoia): New target. * builtins.c (fold_builtin_inf): Use new real.h interface. * c-common.c (builtin_define_with_hex_fp_value): Likewise. * c-lex.c (interpret_float): Likewise. * emit-rtl.c (gen_lowpart_common): Likewise. * optabs.c (expand_float): Use real_2expN. * config/ia64/ia64.md (divsi3, udivsi3): Likewise. * defaults.h (INTEL_EXTENDED_IEEE_FORMAT): New. (FLOAT_WORDS_BIG_ENDIAN): New. * cse.c (find_comparison_args): Don't pass FLOAT_STORE_FLAG_VALUE directly to REAL_VALUE_NEGATIVE. * loop.c (canonicalize_condition): Likewise. * simplify-rtx.c: Include tree.h. (simplify_unary_operation): Don't handle FIX and UNSIGNED_FIX with floating-point result modes. * toplev.c (backend_init): Call init_real_once. * fold-const.c (force_fit_type): Don't call CHECK_FLOAT_VALUE. * tree.c (build_real): Likewise. * config/alpha/alpha.c, config/vax/vax.c (float_strings, float_values, inited_float_values, check_float_value): Remove. * config/alpha/alpha.h, config/m68hc11/m68hc11.h, config/m88k/m88k.h, config/vax/vax.h (CHECK_FLOAT_VALUE): Remove. * doc/tm.texi (CHECK_FLOAT_VALUE): Remove. gcc/f/ * target.c (ffetarget_real1): Don't pass FFETARGET_ATOF_ directly to ffetarget_make_real1. (ffetarget_real2): Similarly. * target.h (ffetarget_cvt_r1_to_rv_, ffetarget_cvt_rv_to_r2_, ffetarget_cvt_r2_to_rv_): Use new real.h interface and simplify. gcc/java/ * jcf-parse.c (get_constant): Runtime check for IEEE format; use new real.h interface. * jcf-write.c (find_constant_index): Use new real.h interface. * lex.c (IS_ZERO): Use REAL_VALUES_EQUAL. contrib/ * paranoia.cc: New file. From-SVN: r57198
2002-09-16 18:36:39 +02:00
#ifndef FLOAT_WORDS_BIG_ENDIAN
#define FLOAT_WORDS_BIG_ENDIAN WORDS_BIG_ENDIAN
#endif
#ifndef TARGET_FLT_EVAL_METHOD
#define TARGET_FLT_EVAL_METHOD 0
#endif
invoke.texi (-malign-double): Re-add lost warning. * invoke.texi (-malign-double): Re-add lost warning. * i386-protos.h (x86_output_mi_thunk): Declare. * unix.h (ASM_OUTPUT_MI_THUNK): Move offline to ... * i386.c (x86_output_mi_thunk): ... here; handle 64bits. * dwarf2out.c (output_call_frame_info): Do not skip unwind info when flag_asynchronous_unwind_tables is set. * flags.h (flag_reorder_functions): Declare. * function.c (prepare_function_start): Initialize frequnecy. * params.def (HOT_BB_COUNT_FRACTION, HOT_BB_FREQUENCY_FRACTION): New paramters. * Makefile.in (predict.o): Add dependency on target.h and params.h * defaults.h (HOT_TEXT_SECTION_NAME, UNLIKELY_EXECUTED_TEXT_SECTION_NAME): New macros. * predict.c (choose_function_section): New function. (estimate_bb_frequencies): Use it. * toplev.c (flag_reorder_functions): New global variable. (lang_independent_options): New. (parse_options_and_default_flags): Set. * varasm.c (assemble_start_function): Bypass functdion alignment for never executed functions. * invoke.texi (-freorder-blocks, -freorder-functions): Document. (param hot-bb-count-fraction, hot-bb-frequency-fraction): New. * tm.texi (HOT_TEXT_SECTION_NAME, UNLIKELY_EXECUTED_TEXT_SECTION_NAME): Document. Thu Jan 3 21:52:09 CET 2002 Jan Hubicka <jh@suse.cz> * predict.c: Inlude profile.h (MIN_COUNT): Rename to MIN_COUNT_FRACTION (maybe_hot_bb_p, probably_cold_bb_p, probably_never_executed_bb_p): Use the information about maximal counter in the program. Thu Dec 20 22:14:00 CET 2001 Jan Hubicka <jh@suse.cz> * basic-block.h (maybe_hot_bb_p, probably_cold_bb_p, probably_never_executed_bb_p): New functions. * cfgcleanup.c (outgoing_edges_match): Use them. * predict.c (MIN_COUNT, MIN_FREQUENCY): New macros. (maybe_hot_bb_p, probably_cold_bb_p, probably_never_executed_bb_p): New functions. * function.h (function): Add new field function_frequency. * predict.c (compute_function_frequency): New function. (estimate_probability): Call it. From-SVN: r53478
2002-05-15 11:00:30 +02:00
#ifndef HOT_TEXT_SECTION_NAME
#define HOT_TEXT_SECTION_NAME ".text.hot"
invoke.texi (-malign-double): Re-add lost warning. * invoke.texi (-malign-double): Re-add lost warning. * i386-protos.h (x86_output_mi_thunk): Declare. * unix.h (ASM_OUTPUT_MI_THUNK): Move offline to ... * i386.c (x86_output_mi_thunk): ... here; handle 64bits. * dwarf2out.c (output_call_frame_info): Do not skip unwind info when flag_asynchronous_unwind_tables is set. * flags.h (flag_reorder_functions): Declare. * function.c (prepare_function_start): Initialize frequnecy. * params.def (HOT_BB_COUNT_FRACTION, HOT_BB_FREQUENCY_FRACTION): New paramters. * Makefile.in (predict.o): Add dependency on target.h and params.h * defaults.h (HOT_TEXT_SECTION_NAME, UNLIKELY_EXECUTED_TEXT_SECTION_NAME): New macros. * predict.c (choose_function_section): New function. (estimate_bb_frequencies): Use it. * toplev.c (flag_reorder_functions): New global variable. (lang_independent_options): New. (parse_options_and_default_flags): Set. * varasm.c (assemble_start_function): Bypass functdion alignment for never executed functions. * invoke.texi (-freorder-blocks, -freorder-functions): Document. (param hot-bb-count-fraction, hot-bb-frequency-fraction): New. * tm.texi (HOT_TEXT_SECTION_NAME, UNLIKELY_EXECUTED_TEXT_SECTION_NAME): Document. Thu Jan 3 21:52:09 CET 2002 Jan Hubicka <jh@suse.cz> * predict.c: Inlude profile.h (MIN_COUNT): Rename to MIN_COUNT_FRACTION (maybe_hot_bb_p, probably_cold_bb_p, probably_never_executed_bb_p): Use the information about maximal counter in the program. Thu Dec 20 22:14:00 CET 2001 Jan Hubicka <jh@suse.cz> * basic-block.h (maybe_hot_bb_p, probably_cold_bb_p, probably_never_executed_bb_p): New functions. * cfgcleanup.c (outgoing_edges_match): Use them. * predict.c (MIN_COUNT, MIN_FREQUENCY): New macros. (maybe_hot_bb_p, probably_cold_bb_p, probably_never_executed_bb_p): New functions. * function.h (function): Add new field function_frequency. * predict.c (compute_function_frequency): New function. (estimate_probability): Call it. From-SVN: r53478
2002-05-15 11:00:30 +02:00
#endif
#ifndef UNLIKELY_EXECUTED_TEXT_SECTION_NAME
#define UNLIKELY_EXECUTED_TEXT_SECTION_NAME ".text.unlikely"
invoke.texi (-malign-double): Re-add lost warning. * invoke.texi (-malign-double): Re-add lost warning. * i386-protos.h (x86_output_mi_thunk): Declare. * unix.h (ASM_OUTPUT_MI_THUNK): Move offline to ... * i386.c (x86_output_mi_thunk): ... here; handle 64bits. * dwarf2out.c (output_call_frame_info): Do not skip unwind info when flag_asynchronous_unwind_tables is set. * flags.h (flag_reorder_functions): Declare. * function.c (prepare_function_start): Initialize frequnecy. * params.def (HOT_BB_COUNT_FRACTION, HOT_BB_FREQUENCY_FRACTION): New paramters. * Makefile.in (predict.o): Add dependency on target.h and params.h * defaults.h (HOT_TEXT_SECTION_NAME, UNLIKELY_EXECUTED_TEXT_SECTION_NAME): New macros. * predict.c (choose_function_section): New function. (estimate_bb_frequencies): Use it. * toplev.c (flag_reorder_functions): New global variable. (lang_independent_options): New. (parse_options_and_default_flags): Set. * varasm.c (assemble_start_function): Bypass functdion alignment for never executed functions. * invoke.texi (-freorder-blocks, -freorder-functions): Document. (param hot-bb-count-fraction, hot-bb-frequency-fraction): New. * tm.texi (HOT_TEXT_SECTION_NAME, UNLIKELY_EXECUTED_TEXT_SECTION_NAME): Document. Thu Jan 3 21:52:09 CET 2002 Jan Hubicka <jh@suse.cz> * predict.c: Inlude profile.h (MIN_COUNT): Rename to MIN_COUNT_FRACTION (maybe_hot_bb_p, probably_cold_bb_p, probably_never_executed_bb_p): Use the information about maximal counter in the program. Thu Dec 20 22:14:00 CET 2001 Jan Hubicka <jh@suse.cz> * basic-block.h (maybe_hot_bb_p, probably_cold_bb_p, probably_never_executed_bb_p): New functions. * cfgcleanup.c (outgoing_edges_match): Use them. * predict.c (MIN_COUNT, MIN_FREQUENCY): New macros. (maybe_hot_bb_p, probably_cold_bb_p, probably_never_executed_bb_p): New functions. * function.h (function): Add new field function_frequency. * predict.c (compute_function_frequency): New function. (estimate_probability): Call it. From-SVN: r53478
2002-05-15 11:00:30 +02:00
#endif
basic-block.h (struct edge_def): Add new field, crossing_edge. 2004-04-09 Caroline Tice <ctice@apple.com> * basic-block.h (struct edge_def): Add new field, crossing_edge. (struct basic_block_def): Add new field, partition. (UNPARTITIONED, HOT_PARTITION, COLD_PARTITION): New constant macro definitions. (partition_hot_cold_basic_blocks): Add extern function declaration. * bb-reorder.c (function.h, obstack.h, expr.h, regs.h): Add four new include statements. (N_ROUNDS): Increase the maximum number of rounds by 1. (branch_threshold): Add array value for new round. (exec_threshold): Add array value for new round. (push_to_next_round_p): New function. (add_unlikely_executed_notes): New function. (find_rarely_executed_basic_blocks_and_crossing_edges): New function. (mark_bb_for_unlikely_executed_section): New function. (add_labels_and_missing_jumps): New function. (add_reg_crossing_jump_notes): New function. (fix_up_fall_thru_edges): New function. (find_jump_block): New function. (fix_crossing_conditional_branches): New function. (fix_crossing_unconditional_branches): New function. (fix_edges_for_rarely_executed_code): New function. (partition_hot_cold_basic_blocks): New function. (find_traces): Add an extra round for partitioning hot/cold basic blocks. (find_traces_1_round): Add a parameter. Modify to push all cold blocks, and only cold blocks, into the last (extra) round of collecting traces. (better_edge_p): Add a parameter. Modify to favor non-crossing edges over crossing edges. (bb_to_key): Add code to correctly identify cold blocks when doing partitioning. (connect_traces): Modify to connect all the non-cold traces first, then go back and connect up all the cold traces. (reorder_basic_blocks): Add call to add_unlikely_executed_notes. * cfg.c (entry_exit_blocks): Add initialization for partition field in entry and exit blocks. * cfgbuild.c (make_edges): Update current_function_has_computed_jump if we are doing hot/cold partitioning. * cfgcleanup.c (cfglayout.h): Add new include statement. (try_simplify_condjump): Modify to not attempt on blocks with jumps that cross section boundaries. (try_forward_edges): Likewise. (merge_blocks_move_predecessor_nojumps): Likewise. (merge_blocks_move_successor_nojumps): Likewise. (merge_blocks_move): Likewise. (try_crossjump_to_edge): Modify to not attempt after we have done the block partitioning. (try_crossjump_bb): Modify to not attempt on blocks with jumps that cross section boundaries. (try_optimize_cfg): Likewise. * cfghooks.c (tidy_fallthru_edges): Modify to not remove indirect jumps that cross section boundaries. * cfglayout.c (flags.h): Add new include statement. (update_unlikely_executed_notes): New function. (fixup_reorder_chain): Add code so when a new jumping basic block is added, it's UNLIKELY_EXECUTED_CODE and REG_CROSSING_JUMP notes are updated appropriately. (duplicate_insn_chain): Add code to duplicate the new NOTE insn introduced by this optimization. * cfglayout.h (scan_ahead_for_unlikely_executed_note): Add new extern function declaration. * cfgrtl.c (can_delete_note_p): Add NOTE_INSN_UNLIKELY_EXECUTED_CODE to list of notes that can be deleted. (create_basic_block_structure): Add initialization for partition field. (rtl_can_merge_blocks): Modify to test blocks for jumps that cross section boundaries. (try_redirect_by_replacing_jump): Modify to not attempt on jumps that cross section boundaries. (commit_one_edge_insertion): Add code so newly created basic block ends up in correct (hot or cold) section. Modify to disallow insertions before NOTE_INSN_UNLIKELY_EXECUTED_CODE notes. (rtl_verify_flow_info_1): Add code to verify that no fall_thru edge crosses section boundaries. (cfg_layout_can_merge_blocks_p): Modify to test blocks for jumps that cross section boundaries. (force_nonfallthru_and_redirect): Modify to make sure new basic block ends up in correct section, with correct notes attached. * common.opt (freorder-blocks-and-partition): Add new flag for this optimization. * dbxout.c (dbx_function_end): Add code to make sure scope labels at the end of functions are written into the correct (hot or cold) section. (dbx_source_file): Add code so writing debug file information doesn't incorrectly change sections. * defaults.h (NORMAL_TEXT_SECTION_NAME): New constant macro, for use in partitioning hot/cold basic blocks into separate sections. (SECTION_FORMAT_STRING): New constant macro, for linux/i386 hot/cold section partitioning. (HAS_LONG_COND_BRANCH): New constant macro, indicating whether or not conditional branches can span all of memory. (HAS_LONG_UNCOND_BRANCH): New constant macro, indicationg whether or not unconditional branches can span all of memory. * final.c (scan_ahead_for_unlikely_executed_note): New function. (final_scan_insn): Add code to check for NOTE instruction indicating whether basic block belongs in hot or cold section, and to make sure the current basic block is being written to the appropriate section. Also added code to ensure that jump table basic blocks end up in the correct section. * flags.h (flag_reorder_blocks_and_partition): New flag. * ifcvt.c (find_if_case_1): Modify to not attempt if conversion if one of the branches has a jump that crosses between sections. (find_if_case_2): Likewise. (ifcvt): Modify to not attempt to mark loop exit edges after hot/cold partitioning has occurred. * opts.c (decode_options): Code to handle new flag, flag_reorder_blocks_and_partition; also to turn it off if flag_exceptions is on. (common_handle_option): Code to handle new flag, flag_reorder_blocks_and_partition. * output.h (unlikely_text_section): New extern function declaration. (in_unlikely_text_section): New extern function declaration. * passes.c (rest_of_handle_stack_regs): Add flag_reorder_blocks_and_partition as an 'or' condition for calling reorder_basic_blocks. (rest_of_handle_reorder_blocks): Add flag_reorder_blocks_and_partition as an 'or' condition for calling reorder_basic_blocks. (rest_of_compilation): Add call to partition_hot_cold_basic_blocks. * print-rtl.c (print_rtx): Add code for handling new note, NOTE_INSN_UNLIKELY_EXECUTED_CODE * rtl.c (NOTE_INSN_UNLIKELY_EXECUTED_CODE): New note insn (see below). (REG_CROSSING_JUMP): New kind of reg_note, to mark jumps that cross between section boundaries. * rtl.h (NOTE_INSN_UNLIKELY_EXECUTED_CODE): New note instruction, indicating the basic block containing it belongs in the cold section. (REG_CROSSING_JUMP): New type of reg_note, to mark jumps that cross between hot and cold sections. * toplev.c (flag_reorder_blocks_and_partition): Add code to initialize this flag, and to tie it to the command-line option freorder-blocks-and-partition. * varasm.c (cfglayout.h): Add new include statement. (unlikely_section_label_printed): New global variable, used for determining when to output section name labels for cold sections. (in_section): Add in_unlikely_executed_text to enum data structure. (text_section): Modify code to use SECTION_FORMAT_STRING and NORMAL_TEXT_SECTION_NAME macros. (unlikely_text_section): New function. (in_unlikely_text_section): New function. (function_section): Add code to make sure beginning of function is written into correct section (hot or cold). (assemble_start_function): Add code to make sure stuff is written to the correct section. (assemble_zeros): Add in_unlikely_text_section as an 'or' condition to an if statement that was checking 'in_text_section'. (assemble_variable): Add 'in_unlikely_text_section' as an 'or' condition to an if statement that was checking 'in_text_section'. (default_section_type_flags_1): Add check: if in cold section flags = SECTION_CODE. * config/darwin.c (darwin_asm_named_section): Modify to use SECTION_FORMAT_STRING if we are partitioning hot/cold blocks. * config/i386/i386.h (HAS_LONG_COND_BRANCH): Defined this macro specifically for the i386. (HAS_LONG_UNCOND_BRANCH): Defined this macro specifically for the i386. * config/rs6000/darwin.h (UNLIKELY_EXECUTED_TEXT_SECTION_NAME): Change text string to something more informative. (NORMAL_TEXT_SECTION_NAME): Add new definition. (SECTION_FORMAT_STRING): Add new definition. * config/rs6000/rs6000.c (rs6000_assemble_integer): Add '!in_unlikely_text_section' as an 'and' condition to an if statement that was already checking '!in_text_section'. * config/rs6000/sysv4.h (HOT_TEXT_SECTION_NAME,NORMAL_TEXT_SECTION_NAME, UNLIKELY_EXECUTED_TEXT_SECTION_NAME,SECTION_FORMAT_STRING): Make sure these are properly defined for linux on ppc. * doc/invoke.texi (freorder-blocks-and-partition): Add documentation for this new flag. * doc/rtl.texi (REG_CROSSING_JUMP): Add documentation for new reg_note. * doc/tm.texi (NORMAL_TEXT_SECTION_NAME, SECTION_FORMAT_STRING, HAS_LONG_COND_BRANCH, HAS_LONG_UNCOND_BRANCH): Add documentation for these new macros. From-SVN: r80564
2004-04-09 21:57:47 +02:00
#ifndef HAS_LONG_COND_BRANCH
#define HAS_LONG_COND_BRANCH 0
#endif
#ifndef HAS_LONG_UNCOND_BRANCH
#define HAS_LONG_UNCOND_BRANCH 0
#endif
tree-complex.c (expand_vector_operation): New, extracted from expand_vector_operations_1. gcc: 2004-04-27 Paolo Bonzini <bonzini@gnu.org> * tree-complex.c (expand_vector_operation): New, extracted from expand_vector_operations_1. (tree_vec_extract): Build a NOP_EXPR. (expand_vec_parallel): Do not care about returning the correct type. (expand_vector_operations_1): Call expand_vector_operation. Build the VIEW_CONVERT_EXPR on the left side of MODIFY_EXPRs. * tree-complex.c (gate_expand_vector_operations): New. (pass_lower_vector_ssa): Use it. * tree-optimize.c (init_tree_optimization_passes): Include pass_lower_vector_ssa. * tree-vect-transform.c (vect_min_worthwhile_factor): New. (vectorizable_operation): Use it. * tree-vectorizer.c (get_vectype_for_scalar_type): Accept integer modes for the vector type. * defaults.h (UNITS_PER_SIMD_WORD): Default to UNITS_PER_WORD. * tree-vect-analyze.c (vect_enhance_data_refs_alignment): Do not cope with UNITS_PER_SIMD_WORD == 0. * tree-vectorizer.c (get_vectype_for_scalar_type): Check if the scalar type is not bigger than UNITS_PER_SIMD_WORD. (vectorize_loops): Do not check that UNITS_PER_SIMD_WORD > 0. * config/i386/i386.h (UNITS_PER_SIMD_WORD): Default to UNITS_PER_WORD. * config/mips/mips.h (UNITS_PER_SIMD_WORD): Likewise. * config/rs6000/rs6000.h (UNITS_PER_SIMD_WORD): Likewise. * config/sparc/sparc.h (UNITS_PER_SIMD_WORD): Likewise. * config/alpha/alpha.h (UNITS_PER_SIMD_WORD): Remove. * config/bfin/bfin.h (UNITS_PER_SIMD_WORD): Remove. * config/ia64/ia64.h (UNITS_PER_SIMD_WORD): Remove. * doc/tm.texi (UNITS_PER_WORD): Rephrase more accurately. (UNITS_PER_SIMD_WORD): New. gcc/testsuite: 2004-04-27 Paolo Bonzini <bonzini@gnu.org> * gcc.dg/tree-ssa/gen-vect-11.c, gcc.dg/tree-ssa/gen-vect-11a.c, gcc.dg/tree-ssa/gen-vect-11b.c, gcc.dg/tree-ssa/gen-vect-11c.c, gcc.dg/tree-ssa/gen-vect-2.c, gcc.dg/tree-ssa/gen-vect-25.c, gcc.dg/tree-ssa/gen-vect-26.c, gcc.dg/tree-ssa/gen-vect-28.c, gcc.dg/tree-ssa/gen-vect-32.c: New. * gcc.dg/vect/vect-82.c, gcc.dg/vect/vect-83.c: Fix dg-final. * gcc.dg/vect/vect-82_64.c, gcc.dg/vect/vect-83_64.c: Remove xfail, don't run on PPC32. CVS: Enter Log. Lines beginning with `CVS:' are removed automatically CVS: CVS: Committing in . CVS: CVS: Modified Files: CVS: tree-complex.c tree-optimize.c tree-vect-analyze.c defaults.h CVS: tree-vect-transform.c tree-vectorizer.c ChangeLog CVS: testsuite/ChangeLog config/alpha/alpha.h config/bfin/bfin.h CVS: config/i386/i386.h config/ia64/ia64.h config/mips/mips.h CVS: config/rs6000/rs6000.h CVS: config/sparc/sparc.h doc/tm.texi CVS: testsuite/gcc.dg/vect/vect-82.c CVS: testsuite/gcc.dg/vect/vect-82_64.c CVS: testsuite/gcc.dg/vect/vect-83.c CVS: testsuite/gcc.dg/vect/vect-83_64.c CVS: Added Files: CVS: testsuite/gcc.dg/tree-ssa/gen-vect-11.c CVS: testsuite/gcc.dg/tree-ssa/gen-vect-11a.c CVS: testsuite/gcc.dg/tree-ssa/gen-vect-11b.c CVS: testsuite/gcc.dg/tree-ssa/gen-vect-11c.c CVS: testsuite/gcc.dg/tree-ssa/gen-vect-2.c CVS: testsuite/gcc.dg/tree-ssa/gen-vect-25.c CVS: testsuite/gcc.dg/tree-ssa/gen-vect-26.c CVS: testsuite/gcc.dg/tree-ssa/gen-vect-28.c CVS: testsuite/gcc.dg/tree-ssa/gen-vect-32.c CVS: ---------------------------------------------------------------------- From-SVN: r98818
2005-04-27 11:12:05 +02:00
/* By default, only attempt to parallelize bitwise operations, and
possibly adds/subtracts using bit-twiddling. */
tree-vectorizer.c: New File: loop vectorization on SSAed GIMPLE trees. * tree-vectorizer.c: New File: loop vectorization on SSAed GIMPLE trees. * tree-vectorizer.h: New File: Same. * Makefile.in (tree-vectorizer.c, tree-vectorizer.h): Add new files. * common.opt (ftree-vectorize): New flag to enable vectorization. * timevar.def (TV_TREE_VECTORIZATION): New dump file for vectorization pass. * tree-data-ref.h (init_data_ref): Additional argument. (array_base_name_differ_p): Moved to tree-data-ref.c. * tree-data-ref.c (array_base_name_differ_p): Revised. (initialize_data_dependence_relation): Call array_base_name_differ_p with an extra argument. (analyze_all_data_dependences): Same. (init_data_ref): Additional argument is_read to set DR_IS_READ. * tree-ssa-phiopt.c (empty_block_p): Expose for usage out of this file. * tree-flow.h (vectorize_loops, empty_block_p): Add declaration. * tree-optimize.c (pass_vectorize): Schedule the vectorization pass. * tree-pass.h (tree_opt_pass pass_vectorize): Declare the new vectorization pass. * tree-ssa-loop.c (tree_ssa_loop_init): Call scev_initialize. (tree_ssa_loop_done): Call scev_finalize. (tree_vectorize): Define the new vectorization pass. * defaults.h (UNITS_PER_SIMD_WORD): Allow targets to specify the size of the vector they support (until support for multiple vector sizes is added to the vectorizer). * config/i386/i386.h (UNITS_PER_SIMD_WORD): Define. * config/rs6000/rs6000.h (UNITS_PER_SIMD_WORD): Define. * invoke.texi (fdump-tree-vect, ftree-vectorize): Add documentation. From-SVN: r86131
2004-08-17 18:17:14 +02:00
#ifndef UNITS_PER_SIMD_WORD
tree-complex.c (expand_vector_operation): New, extracted from expand_vector_operations_1. gcc: 2004-04-27 Paolo Bonzini <bonzini@gnu.org> * tree-complex.c (expand_vector_operation): New, extracted from expand_vector_operations_1. (tree_vec_extract): Build a NOP_EXPR. (expand_vec_parallel): Do not care about returning the correct type. (expand_vector_operations_1): Call expand_vector_operation. Build the VIEW_CONVERT_EXPR on the left side of MODIFY_EXPRs. * tree-complex.c (gate_expand_vector_operations): New. (pass_lower_vector_ssa): Use it. * tree-optimize.c (init_tree_optimization_passes): Include pass_lower_vector_ssa. * tree-vect-transform.c (vect_min_worthwhile_factor): New. (vectorizable_operation): Use it. * tree-vectorizer.c (get_vectype_for_scalar_type): Accept integer modes for the vector type. * defaults.h (UNITS_PER_SIMD_WORD): Default to UNITS_PER_WORD. * tree-vect-analyze.c (vect_enhance_data_refs_alignment): Do not cope with UNITS_PER_SIMD_WORD == 0. * tree-vectorizer.c (get_vectype_for_scalar_type): Check if the scalar type is not bigger than UNITS_PER_SIMD_WORD. (vectorize_loops): Do not check that UNITS_PER_SIMD_WORD > 0. * config/i386/i386.h (UNITS_PER_SIMD_WORD): Default to UNITS_PER_WORD. * config/mips/mips.h (UNITS_PER_SIMD_WORD): Likewise. * config/rs6000/rs6000.h (UNITS_PER_SIMD_WORD): Likewise. * config/sparc/sparc.h (UNITS_PER_SIMD_WORD): Likewise. * config/alpha/alpha.h (UNITS_PER_SIMD_WORD): Remove. * config/bfin/bfin.h (UNITS_PER_SIMD_WORD): Remove. * config/ia64/ia64.h (UNITS_PER_SIMD_WORD): Remove. * doc/tm.texi (UNITS_PER_WORD): Rephrase more accurately. (UNITS_PER_SIMD_WORD): New. gcc/testsuite: 2004-04-27 Paolo Bonzini <bonzini@gnu.org> * gcc.dg/tree-ssa/gen-vect-11.c, gcc.dg/tree-ssa/gen-vect-11a.c, gcc.dg/tree-ssa/gen-vect-11b.c, gcc.dg/tree-ssa/gen-vect-11c.c, gcc.dg/tree-ssa/gen-vect-2.c, gcc.dg/tree-ssa/gen-vect-25.c, gcc.dg/tree-ssa/gen-vect-26.c, gcc.dg/tree-ssa/gen-vect-28.c, gcc.dg/tree-ssa/gen-vect-32.c: New. * gcc.dg/vect/vect-82.c, gcc.dg/vect/vect-83.c: Fix dg-final. * gcc.dg/vect/vect-82_64.c, gcc.dg/vect/vect-83_64.c: Remove xfail, don't run on PPC32. CVS: Enter Log. Lines beginning with `CVS:' are removed automatically CVS: CVS: Committing in . CVS: CVS: Modified Files: CVS: tree-complex.c tree-optimize.c tree-vect-analyze.c defaults.h CVS: tree-vect-transform.c tree-vectorizer.c ChangeLog CVS: testsuite/ChangeLog config/alpha/alpha.h config/bfin/bfin.h CVS: config/i386/i386.h config/ia64/ia64.h config/mips/mips.h CVS: config/rs6000/rs6000.h CVS: config/sparc/sparc.h doc/tm.texi CVS: testsuite/gcc.dg/vect/vect-82.c CVS: testsuite/gcc.dg/vect/vect-82_64.c CVS: testsuite/gcc.dg/vect/vect-83.c CVS: testsuite/gcc.dg/vect/vect-83_64.c CVS: Added Files: CVS: testsuite/gcc.dg/tree-ssa/gen-vect-11.c CVS: testsuite/gcc.dg/tree-ssa/gen-vect-11a.c CVS: testsuite/gcc.dg/tree-ssa/gen-vect-11b.c CVS: testsuite/gcc.dg/tree-ssa/gen-vect-11c.c CVS: testsuite/gcc.dg/tree-ssa/gen-vect-2.c CVS: testsuite/gcc.dg/tree-ssa/gen-vect-25.c CVS: testsuite/gcc.dg/tree-ssa/gen-vect-26.c CVS: testsuite/gcc.dg/tree-ssa/gen-vect-28.c CVS: testsuite/gcc.dg/tree-ssa/gen-vect-32.c CVS: ---------------------------------------------------------------------- From-SVN: r98818
2005-04-27 11:12:05 +02:00
#define UNITS_PER_SIMD_WORD UNITS_PER_WORD
tree-vectorizer.c: New File: loop vectorization on SSAed GIMPLE trees. * tree-vectorizer.c: New File: loop vectorization on SSAed GIMPLE trees. * tree-vectorizer.h: New File: Same. * Makefile.in (tree-vectorizer.c, tree-vectorizer.h): Add new files. * common.opt (ftree-vectorize): New flag to enable vectorization. * timevar.def (TV_TREE_VECTORIZATION): New dump file for vectorization pass. * tree-data-ref.h (init_data_ref): Additional argument. (array_base_name_differ_p): Moved to tree-data-ref.c. * tree-data-ref.c (array_base_name_differ_p): Revised. (initialize_data_dependence_relation): Call array_base_name_differ_p with an extra argument. (analyze_all_data_dependences): Same. (init_data_ref): Additional argument is_read to set DR_IS_READ. * tree-ssa-phiopt.c (empty_block_p): Expose for usage out of this file. * tree-flow.h (vectorize_loops, empty_block_p): Add declaration. * tree-optimize.c (pass_vectorize): Schedule the vectorization pass. * tree-pass.h (tree_opt_pass pass_vectorize): Declare the new vectorization pass. * tree-ssa-loop.c (tree_ssa_loop_init): Call scev_initialize. (tree_ssa_loop_done): Call scev_finalize. (tree_vectorize): Define the new vectorization pass. * defaults.h (UNITS_PER_SIMD_WORD): Allow targets to specify the size of the vector they support (until support for multiple vector sizes is added to the vectorizer). * config/i386/i386.h (UNITS_PER_SIMD_WORD): Define. * config/rs6000/rs6000.h (UNITS_PER_SIMD_WORD): Define. * invoke.texi (fdump-tree-vect, ftree-vectorize): Add documentation. From-SVN: r86131
2004-08-17 18:17:14 +02:00
#endif
/* Determine whether __cxa_atexit, rather than atexit, is used to
register C++ destructors for local statics and global objects. */
#ifndef DEFAULT_USE_CXA_ATEXIT
#define DEFAULT_USE_CXA_ATEXIT 0
#endif
/* Determine whether extra constraint letter should be handled
via address reload (like 'o'). */
#ifndef EXTRA_MEMORY_CONSTRAINT
defaults.h (EXTRA_MEMORY_CONSTRAINT): Add STR argument. * defaults.h (EXTRA_MEMORY_CONSTRAINT): Add STR argument. (EXTRA_ADDRESS_CONSTRAINT): Likewise. (CONSTRAINT_LEN): Provide default definition. (CONST_OK_FOR_CONSTRAINT_P): Likewise. (CONST_DOUBLE_OK_FOR_CONSTRAINT_P): Likewise. (EXTRA_CONSTRAINT_STR): Likewise. (REG_CLASS_FROM_CONSTRAINT): Define. * genoutput.c (check_constraint_len, constraint_len): New functions. (validate_insn_alternatives): Check CONSTRAINT_LEN for each constraint / modifier. (gen_insn): Call check_constraint_len. * local-alloc.c (block_alloc): Update to use new macros / pass second argument to EXTRA_{MEMORY,ADDRESS}_CONSTRAINT. * ra-build.c (handle_asm_insn): Likewise. * recog.c (asm_operand_ok, preprocess_constraints): Likewise. (constrain_operands, peep2_find_free_register): Likewise. * regclass.c (record_operand_costs, record_reg_classes): Likewise. * regmove.c (find_matches): Likewise. * reload.c (push_secondary_reload, find_reloads): Likewise. (alternative_allows_memconst): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. (reload_cse_simplify_operands): Likewise. * stmt.c (parse_output_constraint, parse_input_constraint): Likewise. * doc/tm.texi (CONSTRAINT_LEN, REG_CLASS_FROM_CONSTRAINT): Document. (CONST_OK_FOR_CONSTRAINT_P): Likewise. (CONST_DOUBLE_OK_FOR_CONSTRAINT_P, EXTRA_CONSTRAINT_STR): Likewise. (EXTRA_MEMORY_CONSTRAINT, EXTRA_ADDRESS_CONSTRAINT): Add STR argument. * config/s390/s390.h (EXTRA_MEMORY_CONSTRAINT): Likewise. From-SVN: r61119
2003-01-09 18:28:49 +01:00
#define EXTRA_MEMORY_CONSTRAINT(C,STR) 0
#endif
/* Determine whether extra constraint letter should be handled
as an address (like 'p'). */
#ifndef EXTRA_ADDRESS_CONSTRAINT
defaults.h (EXTRA_MEMORY_CONSTRAINT): Add STR argument. * defaults.h (EXTRA_MEMORY_CONSTRAINT): Add STR argument. (EXTRA_ADDRESS_CONSTRAINT): Likewise. (CONSTRAINT_LEN): Provide default definition. (CONST_OK_FOR_CONSTRAINT_P): Likewise. (CONST_DOUBLE_OK_FOR_CONSTRAINT_P): Likewise. (EXTRA_CONSTRAINT_STR): Likewise. (REG_CLASS_FROM_CONSTRAINT): Define. * genoutput.c (check_constraint_len, constraint_len): New functions. (validate_insn_alternatives): Check CONSTRAINT_LEN for each constraint / modifier. (gen_insn): Call check_constraint_len. * local-alloc.c (block_alloc): Update to use new macros / pass second argument to EXTRA_{MEMORY,ADDRESS}_CONSTRAINT. * ra-build.c (handle_asm_insn): Likewise. * recog.c (asm_operand_ok, preprocess_constraints): Likewise. (constrain_operands, peep2_find_free_register): Likewise. * regclass.c (record_operand_costs, record_reg_classes): Likewise. * regmove.c (find_matches): Likewise. * reload.c (push_secondary_reload, find_reloads): Likewise. (alternative_allows_memconst): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. (reload_cse_simplify_operands): Likewise. * stmt.c (parse_output_constraint, parse_input_constraint): Likewise. * doc/tm.texi (CONSTRAINT_LEN, REG_CLASS_FROM_CONSTRAINT): Document. (CONST_OK_FOR_CONSTRAINT_P): Likewise. (CONST_DOUBLE_OK_FOR_CONSTRAINT_P, EXTRA_CONSTRAINT_STR): Likewise. (EXTRA_MEMORY_CONSTRAINT, EXTRA_ADDRESS_CONSTRAINT): Add STR argument. * config/s390/s390.h (EXTRA_MEMORY_CONSTRAINT): Likewise. From-SVN: r61119
2003-01-09 18:28:49 +01:00
#define EXTRA_ADDRESS_CONSTRAINT(C,STR) 0
#endif
/* When a port defines CONSTRAINT_LEN, it should use DEFAULT_CONSTRAINT_LEN
for all the characters that it does not want to change, so things like the
'length' of a digit in a matching constraint is an implementation detail,
and not part of the interface. */
#define DEFAULT_CONSTRAINT_LEN(C,STR) 1
#ifndef CONSTRAINT_LEN
#define CONSTRAINT_LEN(C,STR) DEFAULT_CONSTRAINT_LEN (C, STR)
#endif
#if defined (CONST_OK_FOR_LETTER_P) && ! defined (CONST_OK_FOR_CONSTRAINT_P)
#define CONST_OK_FOR_CONSTRAINT_P(VAL,C,STR) CONST_OK_FOR_LETTER_P (VAL, C)
#endif
#if defined (CONST_DOUBLE_OK_FOR_LETTER_P) && ! defined (CONST_DOUBLE_OK_FOR_CONSTRAINT_P)
#define CONST_DOUBLE_OK_FOR_CONSTRAINT_P(OP,C,STR) \
CONST_DOUBLE_OK_FOR_LETTER_P (OP, C)
#endif
#ifndef REG_CLASS_FROM_CONSTRAINT
defaults.h (EXTRA_MEMORY_CONSTRAINT): Add STR argument. * defaults.h (EXTRA_MEMORY_CONSTRAINT): Add STR argument. (EXTRA_ADDRESS_CONSTRAINT): Likewise. (CONSTRAINT_LEN): Provide default definition. (CONST_OK_FOR_CONSTRAINT_P): Likewise. (CONST_DOUBLE_OK_FOR_CONSTRAINT_P): Likewise. (EXTRA_CONSTRAINT_STR): Likewise. (REG_CLASS_FROM_CONSTRAINT): Define. * genoutput.c (check_constraint_len, constraint_len): New functions. (validate_insn_alternatives): Check CONSTRAINT_LEN for each constraint / modifier. (gen_insn): Call check_constraint_len. * local-alloc.c (block_alloc): Update to use new macros / pass second argument to EXTRA_{MEMORY,ADDRESS}_CONSTRAINT. * ra-build.c (handle_asm_insn): Likewise. * recog.c (asm_operand_ok, preprocess_constraints): Likewise. (constrain_operands, peep2_find_free_register): Likewise. * regclass.c (record_operand_costs, record_reg_classes): Likewise. * regmove.c (find_matches): Likewise. * reload.c (push_secondary_reload, find_reloads): Likewise. (alternative_allows_memconst): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. (reload_cse_simplify_operands): Likewise. * stmt.c (parse_output_constraint, parse_input_constraint): Likewise. * doc/tm.texi (CONSTRAINT_LEN, REG_CLASS_FROM_CONSTRAINT): Document. (CONST_OK_FOR_CONSTRAINT_P): Likewise. (CONST_DOUBLE_OK_FOR_CONSTRAINT_P, EXTRA_CONSTRAINT_STR): Likewise. (EXTRA_MEMORY_CONSTRAINT, EXTRA_ADDRESS_CONSTRAINT): Add STR argument. * config/s390/s390.h (EXTRA_MEMORY_CONSTRAINT): Likewise. From-SVN: r61119
2003-01-09 18:28:49 +01:00
#define REG_CLASS_FROM_CONSTRAINT(C,STR) REG_CLASS_FROM_LETTER (C)
#endif
defaults.h (EXTRA_MEMORY_CONSTRAINT): Add STR argument. * defaults.h (EXTRA_MEMORY_CONSTRAINT): Add STR argument. (EXTRA_ADDRESS_CONSTRAINT): Likewise. (CONSTRAINT_LEN): Provide default definition. (CONST_OK_FOR_CONSTRAINT_P): Likewise. (CONST_DOUBLE_OK_FOR_CONSTRAINT_P): Likewise. (EXTRA_CONSTRAINT_STR): Likewise. (REG_CLASS_FROM_CONSTRAINT): Define. * genoutput.c (check_constraint_len, constraint_len): New functions. (validate_insn_alternatives): Check CONSTRAINT_LEN for each constraint / modifier. (gen_insn): Call check_constraint_len. * local-alloc.c (block_alloc): Update to use new macros / pass second argument to EXTRA_{MEMORY,ADDRESS}_CONSTRAINT. * ra-build.c (handle_asm_insn): Likewise. * recog.c (asm_operand_ok, preprocess_constraints): Likewise. (constrain_operands, peep2_find_free_register): Likewise. * regclass.c (record_operand_costs, record_reg_classes): Likewise. * regmove.c (find_matches): Likewise. * reload.c (push_secondary_reload, find_reloads): Likewise. (alternative_allows_memconst): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. (reload_cse_simplify_operands): Likewise. * stmt.c (parse_output_constraint, parse_input_constraint): Likewise. * doc/tm.texi (CONSTRAINT_LEN, REG_CLASS_FROM_CONSTRAINT): Document. (CONST_OK_FOR_CONSTRAINT_P): Likewise. (CONST_DOUBLE_OK_FOR_CONSTRAINT_P, EXTRA_CONSTRAINT_STR): Likewise. (EXTRA_MEMORY_CONSTRAINT, EXTRA_ADDRESS_CONSTRAINT): Add STR argument. * config/s390/s390.h (EXTRA_MEMORY_CONSTRAINT): Likewise. From-SVN: r61119
2003-01-09 18:28:49 +01:00
#if defined (EXTRA_CONSTRAINT) && ! defined (EXTRA_CONSTRAINT_STR)
#define EXTRA_CONSTRAINT_STR(OP, C,STR) EXTRA_CONSTRAINT (OP, C)
#endif
#ifndef REGISTER_MOVE_COST
#define REGISTER_MOVE_COST(m, x, y) 2
#endif
/* Determine whether the entire c99 runtime
is present in the runtime library. */
#ifndef TARGET_C99_FUNCTIONS
#define TARGET_C99_FUNCTIONS 0
#endif
/* Indicate that CLZ and CTZ are undefined at zero. */
#ifndef CLZ_DEFINED_VALUE_AT_ZERO
#define CLZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) 0
#endif
#ifndef CTZ_DEFINED_VALUE_AT_ZERO
#define CTZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) 0
#endif
/* Provide a default value for STORE_FLAG_VALUE. */
#ifndef STORE_FLAG_VALUE
#define STORE_FLAG_VALUE 1
#endif
/* This macro is used to determine what the largest unit size that
move_by_pieces can use is. */
/* MOVE_MAX_PIECES is the number of bytes at a time which we can
move efficiently, as opposed to MOVE_MAX which is the maximum
number of bytes we can move with a single instruction. */
#ifndef MOVE_MAX_PIECES
#define MOVE_MAX_PIECES MOVE_MAX
#endif
#ifndef STACK_POINTER_OFFSET
#define STACK_POINTER_OFFSET 0
#endif
#ifndef LOCAL_REGNO
#define LOCAL_REGNO(REGNO) 0
#endif
/* EXIT_IGNORE_STACK should be nonzero if, when returning from a function,
the stack pointer does not matter. The value is tested only in
functions that have frame pointers. */
#ifndef EXIT_IGNORE_STACK
#define EXIT_IGNORE_STACK 0
#endif
/* Assume that case vectors are not pc-relative. */
#ifndef CASE_VECTOR_PC_RELATIVE
#define CASE_VECTOR_PC_RELATIVE 0
#endif
/* Assume that trampolines need function alignment. */
#ifndef TRAMPOLINE_ALIGNMENT
#define TRAMPOLINE_ALIGNMENT FUNCTION_BOUNDARY
#endif
/* Register mappings for target machines without register windows. */
#ifndef INCOMING_REGNO
#define INCOMING_REGNO(N) (N)
#endif
#ifndef OUTGOING_REGNO
#define OUTGOING_REGNO(N) (N)
#endif
#ifndef SHIFT_COUNT_TRUNCATED
#define SHIFT_COUNT_TRUNCATED 0
#endif
#ifndef LEGITIMIZE_ADDRESS
#define LEGITIMIZE_ADDRESS(X, OLDX, MODE, WIN)
#endif
#ifndef LEGITIMATE_PIC_OPERAND_P
#define LEGITIMATE_PIC_OPERAND_P(X) 1
#endif
#ifndef REVERSIBLE_CC_MODE
#define REVERSIBLE_CC_MODE(MODE) 0
#endif
/* Biggest alignment supported by the object file format of this machine. */
#ifndef MAX_OFILE_ALIGNMENT
#define MAX_OFILE_ALIGNMENT BIGGEST_ALIGNMENT
#endif
#endif /* ! GCC_DEFAULTS_H */