2003-01-01 13:27:02 +01:00
|
|
|
@c Copyright (C) 1988,1989,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,
|
2005-01-30 16:36:13 +01:00
|
|
|
@c 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
|
1996-09-25 01:21:45 +02:00
|
|
|
@c This is part of the GCC manual.
|
|
|
|
@c For copying conditions, see the file gcc.texi.
|
|
|
|
|
|
|
|
@node Target Macros
|
Makefile.in (TARGET_H, [...]): New.
* Makefile.in (TARGET_H, TARGET_DEF_H): New.
(c-decl.o, tree.o, c-typeck.o, $(out_object_file)): Update.
* c-decl.c (duplicate_decls): Use function pointer.
* c-typeck.c (common_type): Similarly.
* tree.c (valid_machine_attribute): Similarly.
(merge_machine_type_attributes): Rename merge_type_attributes.
(merge_machine_decl_attributes): Rename merge_decl_attributes.
(merge_dllimport_decl_attributes): New function.
* tree.h (merge_machine_type_attributes): Rename merge_type_attributes.
(merge_machine_decl_attributes): Rename merge_decl_attributes.
(merge_dllimport_decl_attributes): New prototype.
* target.h: New.
* target-def.h: New.
doc: (Joseph Myers)
* doc/gcc.texi, doc/tm.texi: Update documentation.
cp: Make-lang.in: Update dependencies.
* spew.c: Include target.h.
(duplicate_decls): Call target function.
* decl2.c: include target.h
(import_export_class): Use existence of target function pointer.
* typeck.c: Include target.h.
(qualify_type_recursive): Rename variable. Call target function.
(type_after_usual_arithmetic_conversions): Similarly.
(common_type): Similarly.
config: * 1750a/1750a.c, a29k/29k.c, alpha/alpha.c, arc/arc.c, arm/arm.c,
avr/avr.c, c4x/c4x.c, clipper/clipper.c, convex/convex.c,
d30v/d30v.c, dsp16xx/dsp16xx.c, elxsi/elxsi.c, fr30/fr30.c,
i370/i370.c, i386/i386.c, i860/i860.c, i960/i960.c, ia64/ia64.c,
m32r/m32r.c, m68hc11/m68hc11.c, m68k/m68k.c, m88k/m88k.c,
mips/mips.c, mn10200/mn10200.c, mn10300/mn10300.c, ns32k/ns32k.c,
pa/pa.c, pdp11/pdp11.c, pj/pj.c, romp/romp.c, rs6000/rs6000.c,
sh/sh.c, sparc/sparc.c, v850/v850.c, vax/vax.c, we32k/we32k.c)
: Include target.h and target-def.h. Define target.
* arc/arc-protos.h (arc_valid_machine_decl_attribute): Remove.
* arc/arc.c (arc_valid_machine_decl_attribute): Rename
arc_valid_decl_attribute, make static.
* arc/arc.h (VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* arm/arm-protos.h (arm_valid_machine_decl_attribute,
arm_valid_type_attribute_p, arm_pe_valid_machine_decl_attribute,
arm_pe_merge_machine_decl_attributes): Remove.
* arm/arm.c (arm_valid_machine_decl_attribute_p): Rename
arm_valid_decl_attribute_p, make static.
(arm_pe_valid_decl_attribute_p): Move from pe.c.
* arm/pe.c (arm_pe_valid_machine_decl_attribute_p): Move to arm.c.
(arm_pe_merge_machine_decl_attributes): Move to tree.c.
* arm/arm.h (VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* arm/coff.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove.
* arm/elf.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove.
* arm/pe.h (TARGET_DLLIMPORT_DECL_ATTRIBUTES): New.
(VALID_MACHINE_TYPE_ATTRIBUTE, VALID_MACHINE_DECL_ATTRIBUTE): Remove.
* avr/avr-protos.h (valid_machine_type_attribute,
valid_machine_decl_attribute): Remove.
* avr/avr.c (valid_machine_type_attribute,
valid_machine_decl_attribute): Rename and make static.
* avr/avr.h (VALID_MACHINE_TYPE_ATTRIBUTE,
VALID_MACHINE_DECL_ATTRIBUTE): Remove.
* c4x/c4x-protos.h (c4x_valid_type_attribute_p): Remove.
* c4x/c4x.c (c4x_valid_type_attribute_p): Make static.
* c4x/c4x.h (VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* d30v/d30v.h: Remove obsolete comments.
* h8300/h8300-protos.h (h8300_valid_machine_decl_attribute): Remove.
* h8300/h8300.c (h8300_valid_machine_decl_attribute): Rename, make
static.
* h8300/h8300.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove.
* i386/cygwin.h (TARGET_DLLIMPORT_DECL_ATTRIBUTES): Define.
(i386_pe_merge_decl_attributes, MERGE_MACHINE_DECL_ATTRIBUTES,
i386_pe_valid_type_attributes_p): Remove.
* i386/i386-protos.h (ix86_valid_decl_attribute_p,
ix86_valid_type_attribute_p): Remove.
* i386/i386.c (ix86_valid_decl_attribute_p): Remove.
(ix86_valid_type_attribute_p): Make static.
* i386/i386.h (VALID_MACHINE_DECL_ATTRIBUTE,
VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* i386/winnt.c (i386_pe_merge_decl_attributes): Move to tree.c.
* ia64/ia64-protos.h (ia64_valid_type_attribute): Remove.
* ia64/ia64.c (ia64_valid_type_attribute): Make static.
* ia64/ia64.h (VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* m32r/m32r-protos.h (m32r_valid_machine_decl_attribute): Remove.
* m32r/m32r.c (m32r_valid_decl_attribute): Make static.
* m32r/m32r.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove.
* m68hc11/m68hc11-protos.h (m68hc11_valid_decl_attribute_p,
m68hc11_valid_type_attribute_p): Remove.
* m68hc11/m68hc11.c (m68hc11_valid_decl_attribute_p): Remove.
(m68hc11_valid_type_attribute_p): Make static.
* m68hc11/m68hc11.h (VALID_MACHINE_DECL_ATTRIBUTE,
VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* mcore/mcore-protos.h (mcore_valid_machine_decl_attribute,
mcore_merge_machine_decl_attribute): Remove.
* mcore/mcore.c (mcore_valid_machine_decl_attribute): Rename,
make static.
(mcore_merge_machine_decl_attributes): Move to tree.c.
* mcore/mcore.h (VALID_MACHINE_DECL_ATTRIBUTE,
VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
(TARGET_DLLIMPORT_DECL_ATTRIBUTES): Define.
* ns32k/ns32k-protos.h (ns32k_valid_decl_attribute_p,
ns32k_valid_type_attribute_p): Remove.
* ns32k/ns32k.c (ns32k_valid_decl_attribute_p): Remove.
(ns32k_valid_type_attribute_p): Make static.
* ns32k/ns32k.h (VALID_MACHINE_DECL_ATTRIBUTE,
VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* rs6000/rs6000-protos.h (rs6000_valid_decl_attribute_p,
rs6000_valid_type_attribute_p): Remove.
* rs6000/rs6000.c (rs6000_valid_decl_attribute_p): Remove.
(rs6000_valid_type_attribute_p): Make static.
* rs6000/rs6000.h (VALID_MACHINE_DECL_ATTRIBUTE,
VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* sh/sh-protos.h (sh_valid_machine_decl_attribute): Remove.
* sh/sh.c (sh_valid_machine_decl_attribute): Rename, make static.
* sh/sh.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove.
* v850/v850-protos.h (v850_valid_machine_decl_attribute): Remove.
* v850/v850.c (v850_valid_machine_decl_attribute): Rename, make static.
* v850/v850.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove.
From-SVN: r43585
2001-06-26 20:09:27 +02:00
|
|
|
@chapter Target Description Macros and Functions
|
1996-09-25 01:21:45 +02:00
|
|
|
@cindex machine description macros
|
|
|
|
@cindex target description macros
|
|
|
|
@cindex macros, target description
|
|
|
|
@cindex @file{tm.h} macros
|
|
|
|
|
|
|
|
In addition to the file @file{@var{machine}.md}, a machine description
|
|
|
|
includes a C header file conventionally given the name
|
Makefile.in (TARGET_H, [...]): New.
* Makefile.in (TARGET_H, TARGET_DEF_H): New.
(c-decl.o, tree.o, c-typeck.o, $(out_object_file)): Update.
* c-decl.c (duplicate_decls): Use function pointer.
* c-typeck.c (common_type): Similarly.
* tree.c (valid_machine_attribute): Similarly.
(merge_machine_type_attributes): Rename merge_type_attributes.
(merge_machine_decl_attributes): Rename merge_decl_attributes.
(merge_dllimport_decl_attributes): New function.
* tree.h (merge_machine_type_attributes): Rename merge_type_attributes.
(merge_machine_decl_attributes): Rename merge_decl_attributes.
(merge_dllimport_decl_attributes): New prototype.
* target.h: New.
* target-def.h: New.
doc: (Joseph Myers)
* doc/gcc.texi, doc/tm.texi: Update documentation.
cp: Make-lang.in: Update dependencies.
* spew.c: Include target.h.
(duplicate_decls): Call target function.
* decl2.c: include target.h
(import_export_class): Use existence of target function pointer.
* typeck.c: Include target.h.
(qualify_type_recursive): Rename variable. Call target function.
(type_after_usual_arithmetic_conversions): Similarly.
(common_type): Similarly.
config: * 1750a/1750a.c, a29k/29k.c, alpha/alpha.c, arc/arc.c, arm/arm.c,
avr/avr.c, c4x/c4x.c, clipper/clipper.c, convex/convex.c,
d30v/d30v.c, dsp16xx/dsp16xx.c, elxsi/elxsi.c, fr30/fr30.c,
i370/i370.c, i386/i386.c, i860/i860.c, i960/i960.c, ia64/ia64.c,
m32r/m32r.c, m68hc11/m68hc11.c, m68k/m68k.c, m88k/m88k.c,
mips/mips.c, mn10200/mn10200.c, mn10300/mn10300.c, ns32k/ns32k.c,
pa/pa.c, pdp11/pdp11.c, pj/pj.c, romp/romp.c, rs6000/rs6000.c,
sh/sh.c, sparc/sparc.c, v850/v850.c, vax/vax.c, we32k/we32k.c)
: Include target.h and target-def.h. Define target.
* arc/arc-protos.h (arc_valid_machine_decl_attribute): Remove.
* arc/arc.c (arc_valid_machine_decl_attribute): Rename
arc_valid_decl_attribute, make static.
* arc/arc.h (VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* arm/arm-protos.h (arm_valid_machine_decl_attribute,
arm_valid_type_attribute_p, arm_pe_valid_machine_decl_attribute,
arm_pe_merge_machine_decl_attributes): Remove.
* arm/arm.c (arm_valid_machine_decl_attribute_p): Rename
arm_valid_decl_attribute_p, make static.
(arm_pe_valid_decl_attribute_p): Move from pe.c.
* arm/pe.c (arm_pe_valid_machine_decl_attribute_p): Move to arm.c.
(arm_pe_merge_machine_decl_attributes): Move to tree.c.
* arm/arm.h (VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* arm/coff.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove.
* arm/elf.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove.
* arm/pe.h (TARGET_DLLIMPORT_DECL_ATTRIBUTES): New.
(VALID_MACHINE_TYPE_ATTRIBUTE, VALID_MACHINE_DECL_ATTRIBUTE): Remove.
* avr/avr-protos.h (valid_machine_type_attribute,
valid_machine_decl_attribute): Remove.
* avr/avr.c (valid_machine_type_attribute,
valid_machine_decl_attribute): Rename and make static.
* avr/avr.h (VALID_MACHINE_TYPE_ATTRIBUTE,
VALID_MACHINE_DECL_ATTRIBUTE): Remove.
* c4x/c4x-protos.h (c4x_valid_type_attribute_p): Remove.
* c4x/c4x.c (c4x_valid_type_attribute_p): Make static.
* c4x/c4x.h (VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* d30v/d30v.h: Remove obsolete comments.
* h8300/h8300-protos.h (h8300_valid_machine_decl_attribute): Remove.
* h8300/h8300.c (h8300_valid_machine_decl_attribute): Rename, make
static.
* h8300/h8300.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove.
* i386/cygwin.h (TARGET_DLLIMPORT_DECL_ATTRIBUTES): Define.
(i386_pe_merge_decl_attributes, MERGE_MACHINE_DECL_ATTRIBUTES,
i386_pe_valid_type_attributes_p): Remove.
* i386/i386-protos.h (ix86_valid_decl_attribute_p,
ix86_valid_type_attribute_p): Remove.
* i386/i386.c (ix86_valid_decl_attribute_p): Remove.
(ix86_valid_type_attribute_p): Make static.
* i386/i386.h (VALID_MACHINE_DECL_ATTRIBUTE,
VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* i386/winnt.c (i386_pe_merge_decl_attributes): Move to tree.c.
* ia64/ia64-protos.h (ia64_valid_type_attribute): Remove.
* ia64/ia64.c (ia64_valid_type_attribute): Make static.
* ia64/ia64.h (VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* m32r/m32r-protos.h (m32r_valid_machine_decl_attribute): Remove.
* m32r/m32r.c (m32r_valid_decl_attribute): Make static.
* m32r/m32r.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove.
* m68hc11/m68hc11-protos.h (m68hc11_valid_decl_attribute_p,
m68hc11_valid_type_attribute_p): Remove.
* m68hc11/m68hc11.c (m68hc11_valid_decl_attribute_p): Remove.
(m68hc11_valid_type_attribute_p): Make static.
* m68hc11/m68hc11.h (VALID_MACHINE_DECL_ATTRIBUTE,
VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* mcore/mcore-protos.h (mcore_valid_machine_decl_attribute,
mcore_merge_machine_decl_attribute): Remove.
* mcore/mcore.c (mcore_valid_machine_decl_attribute): Rename,
make static.
(mcore_merge_machine_decl_attributes): Move to tree.c.
* mcore/mcore.h (VALID_MACHINE_DECL_ATTRIBUTE,
VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
(TARGET_DLLIMPORT_DECL_ATTRIBUTES): Define.
* ns32k/ns32k-protos.h (ns32k_valid_decl_attribute_p,
ns32k_valid_type_attribute_p): Remove.
* ns32k/ns32k.c (ns32k_valid_decl_attribute_p): Remove.
(ns32k_valid_type_attribute_p): Make static.
* ns32k/ns32k.h (VALID_MACHINE_DECL_ATTRIBUTE,
VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* rs6000/rs6000-protos.h (rs6000_valid_decl_attribute_p,
rs6000_valid_type_attribute_p): Remove.
* rs6000/rs6000.c (rs6000_valid_decl_attribute_p): Remove.
(rs6000_valid_type_attribute_p): Make static.
* rs6000/rs6000.h (VALID_MACHINE_DECL_ATTRIBUTE,
VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* sh/sh-protos.h (sh_valid_machine_decl_attribute): Remove.
* sh/sh.c (sh_valid_machine_decl_attribute): Rename, make static.
* sh/sh.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove.
* v850/v850-protos.h (v850_valid_machine_decl_attribute): Remove.
* v850/v850.c (v850_valid_machine_decl_attribute): Rename, make static.
* v850/v850.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove.
From-SVN: r43585
2001-06-26 20:09:27 +02:00
|
|
|
@file{@var{machine}.h} and a C source file named @file{@var{machine}.c}.
|
|
|
|
The header file defines numerous macros that convey the information
|
|
|
|
about the target machine that does not fit into the scheme of the
|
|
|
|
@file{.md} file. The file @file{tm.h} should be a link to
|
|
|
|
@file{@var{machine}.h}. The header file @file{config.h} includes
|
|
|
|
@file{tm.h} and most compiler source files include @file{config.h}. The
|
2001-07-09 00:39:06 +02:00
|
|
|
source file defines a variable @code{targetm}, which is a structure
|
Makefile.in (TARGET_H, [...]): New.
* Makefile.in (TARGET_H, TARGET_DEF_H): New.
(c-decl.o, tree.o, c-typeck.o, $(out_object_file)): Update.
* c-decl.c (duplicate_decls): Use function pointer.
* c-typeck.c (common_type): Similarly.
* tree.c (valid_machine_attribute): Similarly.
(merge_machine_type_attributes): Rename merge_type_attributes.
(merge_machine_decl_attributes): Rename merge_decl_attributes.
(merge_dllimport_decl_attributes): New function.
* tree.h (merge_machine_type_attributes): Rename merge_type_attributes.
(merge_machine_decl_attributes): Rename merge_decl_attributes.
(merge_dllimport_decl_attributes): New prototype.
* target.h: New.
* target-def.h: New.
doc: (Joseph Myers)
* doc/gcc.texi, doc/tm.texi: Update documentation.
cp: Make-lang.in: Update dependencies.
* spew.c: Include target.h.
(duplicate_decls): Call target function.
* decl2.c: include target.h
(import_export_class): Use existence of target function pointer.
* typeck.c: Include target.h.
(qualify_type_recursive): Rename variable. Call target function.
(type_after_usual_arithmetic_conversions): Similarly.
(common_type): Similarly.
config: * 1750a/1750a.c, a29k/29k.c, alpha/alpha.c, arc/arc.c, arm/arm.c,
avr/avr.c, c4x/c4x.c, clipper/clipper.c, convex/convex.c,
d30v/d30v.c, dsp16xx/dsp16xx.c, elxsi/elxsi.c, fr30/fr30.c,
i370/i370.c, i386/i386.c, i860/i860.c, i960/i960.c, ia64/ia64.c,
m32r/m32r.c, m68hc11/m68hc11.c, m68k/m68k.c, m88k/m88k.c,
mips/mips.c, mn10200/mn10200.c, mn10300/mn10300.c, ns32k/ns32k.c,
pa/pa.c, pdp11/pdp11.c, pj/pj.c, romp/romp.c, rs6000/rs6000.c,
sh/sh.c, sparc/sparc.c, v850/v850.c, vax/vax.c, we32k/we32k.c)
: Include target.h and target-def.h. Define target.
* arc/arc-protos.h (arc_valid_machine_decl_attribute): Remove.
* arc/arc.c (arc_valid_machine_decl_attribute): Rename
arc_valid_decl_attribute, make static.
* arc/arc.h (VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* arm/arm-protos.h (arm_valid_machine_decl_attribute,
arm_valid_type_attribute_p, arm_pe_valid_machine_decl_attribute,
arm_pe_merge_machine_decl_attributes): Remove.
* arm/arm.c (arm_valid_machine_decl_attribute_p): Rename
arm_valid_decl_attribute_p, make static.
(arm_pe_valid_decl_attribute_p): Move from pe.c.
* arm/pe.c (arm_pe_valid_machine_decl_attribute_p): Move to arm.c.
(arm_pe_merge_machine_decl_attributes): Move to tree.c.
* arm/arm.h (VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* arm/coff.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove.
* arm/elf.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove.
* arm/pe.h (TARGET_DLLIMPORT_DECL_ATTRIBUTES): New.
(VALID_MACHINE_TYPE_ATTRIBUTE, VALID_MACHINE_DECL_ATTRIBUTE): Remove.
* avr/avr-protos.h (valid_machine_type_attribute,
valid_machine_decl_attribute): Remove.
* avr/avr.c (valid_machine_type_attribute,
valid_machine_decl_attribute): Rename and make static.
* avr/avr.h (VALID_MACHINE_TYPE_ATTRIBUTE,
VALID_MACHINE_DECL_ATTRIBUTE): Remove.
* c4x/c4x-protos.h (c4x_valid_type_attribute_p): Remove.
* c4x/c4x.c (c4x_valid_type_attribute_p): Make static.
* c4x/c4x.h (VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* d30v/d30v.h: Remove obsolete comments.
* h8300/h8300-protos.h (h8300_valid_machine_decl_attribute): Remove.
* h8300/h8300.c (h8300_valid_machine_decl_attribute): Rename, make
static.
* h8300/h8300.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove.
* i386/cygwin.h (TARGET_DLLIMPORT_DECL_ATTRIBUTES): Define.
(i386_pe_merge_decl_attributes, MERGE_MACHINE_DECL_ATTRIBUTES,
i386_pe_valid_type_attributes_p): Remove.
* i386/i386-protos.h (ix86_valid_decl_attribute_p,
ix86_valid_type_attribute_p): Remove.
* i386/i386.c (ix86_valid_decl_attribute_p): Remove.
(ix86_valid_type_attribute_p): Make static.
* i386/i386.h (VALID_MACHINE_DECL_ATTRIBUTE,
VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* i386/winnt.c (i386_pe_merge_decl_attributes): Move to tree.c.
* ia64/ia64-protos.h (ia64_valid_type_attribute): Remove.
* ia64/ia64.c (ia64_valid_type_attribute): Make static.
* ia64/ia64.h (VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* m32r/m32r-protos.h (m32r_valid_machine_decl_attribute): Remove.
* m32r/m32r.c (m32r_valid_decl_attribute): Make static.
* m32r/m32r.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove.
* m68hc11/m68hc11-protos.h (m68hc11_valid_decl_attribute_p,
m68hc11_valid_type_attribute_p): Remove.
* m68hc11/m68hc11.c (m68hc11_valid_decl_attribute_p): Remove.
(m68hc11_valid_type_attribute_p): Make static.
* m68hc11/m68hc11.h (VALID_MACHINE_DECL_ATTRIBUTE,
VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* mcore/mcore-protos.h (mcore_valid_machine_decl_attribute,
mcore_merge_machine_decl_attribute): Remove.
* mcore/mcore.c (mcore_valid_machine_decl_attribute): Rename,
make static.
(mcore_merge_machine_decl_attributes): Move to tree.c.
* mcore/mcore.h (VALID_MACHINE_DECL_ATTRIBUTE,
VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
(TARGET_DLLIMPORT_DECL_ATTRIBUTES): Define.
* ns32k/ns32k-protos.h (ns32k_valid_decl_attribute_p,
ns32k_valid_type_attribute_p): Remove.
* ns32k/ns32k.c (ns32k_valid_decl_attribute_p): Remove.
(ns32k_valid_type_attribute_p): Make static.
* ns32k/ns32k.h (VALID_MACHINE_DECL_ATTRIBUTE,
VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* rs6000/rs6000-protos.h (rs6000_valid_decl_attribute_p,
rs6000_valid_type_attribute_p): Remove.
* rs6000/rs6000.c (rs6000_valid_decl_attribute_p): Remove.
(rs6000_valid_type_attribute_p): Make static.
* rs6000/rs6000.h (VALID_MACHINE_DECL_ATTRIBUTE,
VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* sh/sh-protos.h (sh_valid_machine_decl_attribute): Remove.
* sh/sh.c (sh_valid_machine_decl_attribute): Rename, make static.
* sh/sh.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove.
* v850/v850-protos.h (v850_valid_machine_decl_attribute): Remove.
* v850/v850.c (v850_valid_machine_decl_attribute): Rename, make static.
* v850/v850.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove.
From-SVN: r43585
2001-06-26 20:09:27 +02:00
|
|
|
containing pointers to functions and data relating to the target
|
|
|
|
machine. @file{@var{machine}.c} should also contain their definitions,
|
|
|
|
if they are not defined elsewhere in GCC, and other functions called
|
|
|
|
through the macros defined in the @file{.h} file.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
@menu
|
2001-07-09 00:39:06 +02:00
|
|
|
* Target Structure:: The @code{targetm} variable.
|
1996-09-25 01:21:45 +02:00
|
|
|
* Driver:: Controlling how the driver runs the compilation passes.
|
c-tree.texi, [...]: Use more logical markup.
* doc/c-tree.texi, doc/contrib.texi, doc/extend.texi,
doc/gcc.texi, doc/gcov.texi, doc/install-old.texi,
doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: Use more
logical markup. Use TeX quotes and dashes. Use @dots{} and
@minus{}. Avoid spaces inside @var. Update last modification
date in gcc.texi.
* doc/gcc.1, doc/gcov.1: Regenerate.
From-SVN: r43369
2001-06-14 13:08:04 +02:00
|
|
|
* Run-time Target:: Defining @samp{-m} options like @option{-m68000} and @option{-m68020}.
|
2001-01-10 22:40:14 +01:00
|
|
|
* Per-Function Data:: Defining data structures for per-function information.
|
1996-09-25 01:21:45 +02:00
|
|
|
* Storage Layout:: Defining sizes and alignments of data.
|
|
|
|
* Type Layout:: Defining sizes and properties of basic user data types.
|
2001-06-26 08:36:44 +02:00
|
|
|
* Escape Sequences:: Defining the value of target character escape sequences
|
1996-09-25 01:21:45 +02:00
|
|
|
* Registers:: Naming and describing the hardware registers.
|
|
|
|
* Register Classes:: Defining the classes of hardware registers.
|
|
|
|
* Stack and Calling:: Defining which way the stack grows and by how much.
|
|
|
|
* Varargs:: Defining the varargs macros.
|
|
|
|
* Trampolines:: Code set up at run time to enter a nested function.
|
|
|
|
* Library Calls:: Controlling how library routines are implicitly called.
|
|
|
|
* Addressing Modes:: Defining addressing modes valid for memory operands.
|
|
|
|
* Condition Code:: Defining how insns update the condition code.
|
|
|
|
* Costs:: Defining relative costs of different operations.
|
haifa-sched.c: Convert to target hooks.
* haifa-sched.c: Convert to target hooks. Macros replaced
are ISSUE_RATE, ADJUST_COST, ADJUST_PRIORITY, MD_SCHED_INIT,
MD_SCHED_REORDER, MD_SCHED_REORDER2, MD_SCHED_VARIABLE_ISSUE,
MD_SCHED_FINISH, and HAVE_cycle_display.
* target-def.h (TARGET_SCHED_ADJUST_COST,
TARGET_SCHED_ADJUST_PRIORITY, TARGET_SCHED_ISSUE_RATE,
TARGET_SCHED_VARIABLE_ISSUE, TARGET_SCHED_INIT,
TARGET_SCHED_FINISH, TARGET_SCHED_REORDER,
TARGET_SCHED_REORDER2, TARGET_SCHED_CYCLE_DISPLAY):
New hook #defines to be overridden.
(TARGET_SCHED): Bring them all together.
(TARGET_INITIALIZER): Update.
* target.h: Don't forward declare struct rtx_def. Use 'rtx'
instead of 'struct rtx_def *' throughout.
(struct sched): New set of hooks for the scheduler.
* Makefile.in (haifa-sched.o): Depend on target.h.
* doc/tm.texi: Document the new scheduler hooks, together in
their own section, instead of scattered around.
Fix a bunch of underfull/overfull hboxes.
* a29k.h, alpha.h, arm.h, c4x.h, convex.h, d30v.h, i386.h,
ia64.h, m32r.h, m88k.h, mips.h, pa.h, rs6000.h, s390.h, sh.h,
sparc.h: Don't define any of the old scheduler macros.
* a29k.c, alpha.c, arm.c, c4x.c, convex.c, d30v.c, i386.c,
ia64.c, m32r.c, m88k.c, mips.c, pa.c, rs6000.c, s390.c, sh.c,
sparc.c: Create hook functions from code extracted from
corresponding target header, or make existing hooks static, as
appropriate. Set the appropriate entries in targetm.
* alpha-protos.h, arm-protos.h, c4x-protos.h, d30v-protos.h,
i386-protos.h, ia64-protos.h, m32r-protos.h, pa-protos.h,
rs6000-protos.h, s390-protos.h, sparc-protos.h:
Remove prototypes for functions which are now static.
* d30v.h, d30v.c, m32r.h, m32r.c: Remove #ifdef HAIFA and
related gunk; the Haifa scheduler is now the only choice.
From-SVN: r45009
2001-08-18 22:25:54 +02:00
|
|
|
* Scheduling:: Adjusting the behavior of the instruction scheduler.
|
1996-09-25 01:21:45 +02:00
|
|
|
* Sections:: Dividing storage into text, data, and other sections.
|
|
|
|
* PIC:: Macros for position independent code.
|
|
|
|
* Assembler Format:: Defining how to write insns and pseudo-ops to output.
|
|
|
|
* Debugging Info:: Defining the format of debugging output.
|
real.h: Don't define REAL_INFINITY or REAL_IS_NOT_DOUBLE.
* real.h: Don't define REAL_INFINITY or REAL_IS_NOT_DOUBLE.
Always make REAL_VALUE_TYPE a struct containing an array of
HOST_WIDE_INT, not a double. Tidy up the code deciding how
big it is. Don't declare or use union real_extract.
* emit-rtl.c (init_emit_once), varasm.c (immed_real_const_1,
decode_rtx_const, output_constant_pool), config/a29k/a29k.c
(print_operand), config/arm/arm.c (output_move_double),
config/arm/arm.md (consttable_4, consttable_8),
config/romp/romp.c (output_fpops), config/s390/s390.h
(ASM_OUTPUT_SPECIAL_POOL_ENTRY), config/xtensa/xtensa.c
(xtensa_output_literal): Don't use union real_extract.
* config/dsp16xx/dsp16xx.c (print_operand), config/i860/i860.c
(sfmode_constant_to_ulong), config/ns32k/merlin.h
(PRINT_OPERAND), config/ns32k/ns32k.c (print_operand),
config/pdp11/pdp11.h (PRINT_OPERAND), config/we32k/we32k.h
(PRINT_OPERAND): Don't use local version of union
real_extract.
* config/convex/convex.c (check_float_value), config/vax/vax.c
(vax_float_literal), config/m88k/m88k.md (divdf3),
config/dsp16xx/dsp16xx.md (fixuns_trunchfhi2),
config/pdp11/pdp11.c (output_move_quad): Don't do host
arithmetic on target floating point quantities.
* config/a29k/a29k.md, config/dsp16xx/dsp16xx.c
(output_dsp16xx_float_const): Don't test HOST_FLOAT_FORMAT.
* fold-const.c (fold), simplify-rtx.c (simplify_binary_real):
Use MODE_HAS_INFINITIES rather than #ifdef REAL_INFINITY.
* real.c (earith): Test INFINITY rather than REAL_INFINITY;
NANS implies INFINITY, so can drop #ifdef NANS inside #ifndef
INFINITY.
* print-rtl.c (print_rtx): Disable code which needs
floating-point emulator.
* libgcc2.c: Include float.h and use DBL_MANT_DIG,
FLT_MANT_DIG, to define DF_SIZE and SF_SIZE, rather than
depending on HOST_FLOAT_FORMAT to be defined properly.
* ch/grant.c, cp/error.c: Always use REAL_VALUE_TO_DECIMAL;
don't test REAL_IS_NOT_DOUBLE.
* config/1750a/1750a.c (get_double, float_label): Delete.
(print_operand): Delete huge commented-out chunk. Use
REAL_VALUE_TO_DECIMAL.
* config/1750a/1750a-protos.h: Delete prototypes of deleted
functions.
* config/convex/convex.h: Always set TARGET_FLOAT_FORMAT to
IEEE_FLOAT_FORMAT.
* config/i370/i370.h (PRINT_OPERAND [TARGET_HLASM version]):
Use REAL_VALUE_TO_DECIMAL as ELF version does.
* config/m88k/m88k.c (real_power_of_2_operand,
legitimize_operand): Take the REAL_VALUE_TYPE and/or union
real_extract out of the union; run the input through
REAL_VALUE_TO_TARGET_DOUBLE, then plug the pair of longwords
from that into the union.
* config/pdp11/pdp11.c (output_move_double): Rearrange
parentheses to make automatic indenter happy.
* doc/tm.texi (Cross-compilation): Rename node to "Floating
Point" and rewrite to describe current situation. Also adjust
documentation of REAL_VALUE_TO_TARGET_SINGLE and friends to
match code.
* doc/rtl.texi: Adjust cross reference.
From-SVN: r51210
2002-03-23 02:10:56 +01:00
|
|
|
* Floating Point:: Handling floating point for cross-compilers.
|
Makefile.in (lcm.o): Depend on insn-attr.h.
* Makefile.in (lcm.o): Depend on insn-attr.h.
* basic-block.h (optimize_mode_switching): Declare.
* lcm.c (tm_p.h, insn-attr.h): #include.
(seginfo, bb_info): New structs.
(antic, transp, comp, delete, insert) : New file-scope static variables.
(new_seginfo, add_seginfo, make_preds_opaque, reg_dies): New functions.
(reg_becomes_live, optimize_mode_switching): Likewise.
* tm.texi: Add description of mode switching macros.
* toplev.c (rest_of_compilation): Call optimize_mode_switching.
* sh-protos.h (remove_dead_before_cse): Remove prototype.
(fldi_ok, fpscr_set_from_mem): New prototypes.
* sh.h (OPTIMIZATION_OPTION): Remove sh_flag_remove_dead_before_cse set.
(CONST_DOUBLE_OK_FOR_LETTER_P, SECONDARY_INPUT_RELOAD_CLASS):
Disable fldi for (TARGET_SH4 && ! TARGET_FMOVD).
(sh_flag_remove_dead_before_cse): Remove declaration.
(NUM_MODES_FOR_MODE_SWITCHING, OPTIMIZE_MODE_SWITCHING): New macros.
(MODE_USES_IN_EXIT_BLOCK, MODE_NEEDED, MODE_AT_ENTRY): Likewise.
(MODE_PRIORITY_TO_MODE, EMIT_MODE_SET): Likewise.
* sh.c (broken_move): Disable fldi for (TARGET_SH4 && ! TARGET_FMOVD).
(barrier_align): Allow for JUMP_INSNS containing a parallel.
(machine_dependent_reorg): Remove sh_flag_remove_dead_before_cse set.
(fldi_ok): New function.
(get_fpscr_rtx): Add fpscr_rtx as GC root.
(emit_sf_insn): Only generate fpu switches when optimize < 1.
(emit_df_insn): Likewise.
(expand_fp_branch, emit_fpscr_use, remove_dead_before_cse): Delete.
(sh_flag_remove_dead_before_cse): Delete.
(get_free_reg, fpscr_set_from_mem): New functions.
* sh.md (movdf, movsf): Remove no_new_pseudos code.
(return): Remove emit_fpscr_use / remove_dead_before_cse calls.
Co-Authored-By: Andrew MacLeod <amacleod@cygnus.com>
From-SVN: r31990
2000-02-15 23:34:33 +01:00
|
|
|
* Mode Switching:: Insertion of mode-switching instructions.
|
Table-driven attributes.
* c-decl.c, config/alpha/alpha.c, config/arc/arc.c,
config/arm/arm.c, config/arm/pe.c, config/avr/avr.c,
config/avr/avr.h, config/d30v/d30v.h, config/fr30/fr30.h,
config/h8300/h8300.c, config/i386/cygwin.h, config/i386/winnt.c,
config/m32r/m32r.c, config/mcore/mcore.c, config/sh/sh.c,
config/stormy16/stormy16.h, config/v850/v850.c, doc/c-tree.texi,
doc/tm.texi, ggc-common.c, integrate.c, print-tree.c, tree.c,
tree.h: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
* tree.h (struct tree_decl): Change machine_attributes to
attributes.
* doc/c-tree.texi: Document that all attributes are now attached
to decls and types.
* c-common.c (add_attribute, attrtab, attrtab_idx,
default_valid_lang_attribute, valid_lang_attribute): Remove.
(attribute_tables, attributes_initialized,
c_common_attribute_table, default_lang_attribute_table): New
variables.
(handle_packed_attribute, handle_nocommon_attribute,
handle_common_attribute, handle_noreturn_attribute,
handle_unused_attribute, handle_const_attribute,
handle_transparent_union_attribute, handle_constructor_attribute,
handle_destructor_attribute, handle_mode_attribute,
handle_section_attribute, handle_aligned_attribute,
handle_weak_attribute, handle_alias_attribute,
handle_no_instrument_function_attribute,
handle_no_check_memory_usage_attribute, handle_malloc_attribute,
handle_no_limit_stack_attribute, handle_pure_attribute): New
functions.
(init_attributes, decl_attributes): Rewrite to implement
table-driven attributes.
* c-common.h (enum attribute_flags): Move to tree.h.
* c-format.c (decl_handle_format_attribute,
decl_handle_format_arg_attribute): Rename to
handle_format_attribute and handle_format_arg_attribute. Update
for table-driven attributes.
* c-common.h (decl_handle_format_attribute,
decl_handle_format_arg_attribute): Remove prototypes.
(handle_format_attribute, handle_format_arg_attribute): Add
prototypes.
* c-decl.c (grokdeclarator): Handle attributes nested inside
declarators.
* c-parse.in (setattrs, maybe_setattrs): Remove.
(maybe_type_quals_setattrs): Rename to maybe_type_quals_attrs.
Update to handle nested attributes properly.
(maybe_resetattrs, after_type_declarator,
parm_declarator_nostarttypename, notype_declarator, absdcl1_noea,
absdcl1_ea, direct_absdcl1): Update to handle nested attributes
properly.
(make_pointer_declarator): Update to handle nested attributes
properly.
* doc/extend.texi: Update documentation of limits of attributes
syntax. Warn about problems with attribute semantics in C++.
* target.h (struct target): Remove valid_decl_attribute and
valid_type_attribute. Add attribute_table and
function_attribute_inlinable_p.
* target-def.h (TARGET_VALID_DECL_ATTRIBUTE,
TARGET_VALID_TYPE_ATTRIBUTE): Remove.
(TARGET_ATTRIBUTE_TABLE, TARGET_FUNCTION_ATTRIBUTE_INLINABLE_P):
Add.
(TARGET_INITIALIZER): Update.
* integrate.c (FUNCTION_ATTRIBUTE_INLINABLE_P): Remove default
definition.
(function_attribute_inlinable_p): New function. Check for the
presence of any machine attributes before using
targetm.function_attribute_inlinable_p.
(function_cannot_inline_p): Update.
* Makefile.in (integrate.o): Update dependencies.
* doc/tm.texi: Update documentation of target attributes and
example definition of TARGET_VALID_TYPE_ATTRIBUTE.
* tree.c (default_valid_attribute_p, valid_machine_attribute):
Remove.
(default_target_attribute_table,
default_function_attribute_inlinable_p): New.
(lookup_attribute): Update comment to clarify handling of multiple
attributes with the same name.
(merge_attributes, attribute_list_contained): Allow multiple
attributes with the same name but different arguments to appear in
the same attribute list.
* tree.h (default_valid_attribute_p): Remove prototype.
(struct attribute_spec): New.
(default_target_attribute_table): Declare.
(enum attribute_flags): Move from c-common.h. Add
ATTR_FLAG_TYPE_IN_PLACE.
(default_function_attribute_inlinable_p): Declare.
* config/alpha/alpha.c (vms_valid_decl_attribute_p): Remove.
(TARGET_VALID_DECL_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(vms_attribute_table): New.
* config/arc/arc.c (arc_valid_decl_attribute): Remove.
(TARGET_VALID_DECL_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(arc_attribute_table, arc_handle_interrupt_attribute): New.
* config/arm/arm.c (arm_valid_type_attribute_p,
arm_valid_decl_attribute_p, arm_pe_valid_decl_attribute_p):
Remove.
(TARGET_VALID_TYPE_ATTRIBUTE, TARGET_VALID_DECL_ATTRIBUTE): Don't
define.
(TARGET_ATTRIBUTE_TABLE): Define.
(arm_attribute_table, arm_handle_fndecl_attribute,
arm_handle_isr_attribute): New.
* config/avr/avr.c (avr_valid_type_attribute,
avr_valid_decl_attribute): Remove.
(TARGET_VALID_DECL_ATTRIBUTE, TARGET_VALID_TYPE_ATTRIBUTE): Don't
define.
(TARGET_ATTRIBUTE_TABLE): Define.
(avr_attribute_table, avr_handle_progmem_attribute,
avr_handle_fndecl_attribute): New.
* config/c4x/c4x.c (c4x_valid_type_attribute_p): Remove.
(TARGET_VALID_TYPE_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(c4x_attribute_table, c4x_handle_fntype_attribute): New.
* config/h8300/h8300.c (h8300_valid_decl_attribute): Remove.
(TARGET_VALID_DECL_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(h8300_attribute_table, h8300_handle_fndecl_attribute,
h8300_handle_eightbit_data_attribute,
h8300_handle_tiny_data_attribute): New.
* config/i386/i386-protos.h (ix86_valid_type_attribute_p,
i386_pe_valid_decl_attribute_p, i386_pe_valid_type_attribute_p):
Remove prototypes.
(ix86_handle_dll_attribute, ix86_handle_shared_attribute): New
declarations.
* config/i386/i386.c (ix86_valid_type_attribute_p: Remove.
(TARGET_VALID_TYPE_ATTRIBUTE, TARGET_VALID_DECL_ATTRIBUTE): Don't
define.
(TARGET_ATTRIBUTE_TABLE): Define.
(ix86_attribute_table, ix86_handle_cdecl_attribute,
ix86_handle_regparm_attribute): New.
* config/i386/winnt.c (i386_pe_valid_decl_attribute_p,
i386_pe_valid_type_attribute_p): Remove.
(ix86_handle_dll_attribute, ix86_handle_shared_attribute): New.
* config/ia64/ia64.c (ia64_valid_type_attribute): Remove.
(TARGET_VALID_TYPE_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(ia64_attribute_table): New.
* config/m32r/m32r.c (m32r_valid_decl_attribute, interrupt_ident1,
interrupt_ident2, model_ident1, model_ident2): Remove.
(TARGET_VALID_DECL_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(init_idents): Update.
(m32r_attribute_table, m32r_handle_model_attribute): New.
* config/m68hc11/m68hc11.c (m68hc11_valid_type_attribute_p):
Remove.
(TARGET_VALID_TYPE_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(m68hc11_attribute_table, m68hc11_handle_fntype_attribute): New.
* config/mcore/mcore.c (mcore_valid_decl_attribute): Remove.
(TARGET_VALID_DECL_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(mcore_attribute_table, mcore_handle_naked_attribute): New.
* config/ns32k/ns32k.c (ns32k_valid_type_attribute_p): Remove.
(TARGET_VALID_TYPE_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(ns32k_attribute_table, ns32k_handle_fntype_attribute): New.
* config/rs6000/rs6000.c (rs6000_valid_type_attribute_p): Remove.
(TARGET_VALID_TYPE_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(rs6000_attribute_table, rs6000_handle_longcall_attribute): New.
* config/sh/sh.c (sh_valid_decl_attribute): Remove.
(TARGET_VALID_DECL_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(sh_attribute_table, sh_handle_interrupt_handler_attribute,
sh_handle_sp_switch_attribute, sh_handle_trap_exit_attribute):
New.
* config/stormy16/stormy16.c (stormy16_valid_type_attribute):
Remove.
(TARGET_VALID_TYPE_ATTRIBUTE): Don't define
(TARGET_ATTRIBUTE_TABLE): Define.
(stormy16_attribute_table, stormy16_handle_interrupt_attribute):
New.
* config/v850/v850.c (v850_valid_decl_attribute): Remove.
(TARGET_VALID_DECL_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(v850_attribute_table, v850_handle_interrupt_attribute,
v850_handle_data_area_attribute): New.
* config/v850/v850-c.c (mark_current_function_as_interrupt):
Return void. Call decl_attributes instead of
valid_machine_attribute.
cp:
Table-driven attributes.
* decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
* decl2.c (cplus_decl_attributes): Only take one attributes
parameter.
* cp-tree.c (cplus_decl_attributes): Update prototype.
* class.c (finish_struct), decl.c (start_decl, start_function),
decl2.c (grokfield), friend.c (do_friend), parse.y
(parse_bitfield): Update calls to cplus_decl_attributes.
* decl.c (grokdeclarator): Take a pointer to a single ordinary
attribute list.
* decl.h (grokdeclarator): Update prototype.
* decl2.c (grokfield): Take a single ordinary attribute list.
* friend.c (do_friend): Likewise.
* decl.c (shadow_tag, groktypename, start_decl,
start_handler_parms, grokdeclarator, grokparms, start_function,
start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
(process_template_parm, do_decl_instantiation): Pass single
ordinary attribute lists around.
* decl.c (grokdeclarator): Correct handling of nested attributes.
Revert the patch
1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
* decl.c (grokdeclarator): Embedded attrs bind to the right,
not the left.
.
* cp-tree.h (cp_valid_lang_attribute): Remove declaration
(cp_attribute_table): Declare.
* decl.c (valid_lang_attribute): Don't define.
(lang_attribute_table): Define.
(init_decl_processing): Initialize lang_attribute_table instead of
valid_lang_attribute.
* tree.c (cp_valid_lang_attribute): Remove.
(handle_java_interface_attribute, handle_com_interface_attribute,
handle_init_priority_attribute): New functions.
(cp_attribute_table): New array.
* decl2.c (import_export_class): Don't use
targetm.valid_type_attribute.
testsuite:
Table-driven attributes.
* g++.dg/ext/attrib1.C: New test.
From-SVN: r45718
2001-09-21 03:27:06 +02:00
|
|
|
* Target Attributes:: Defining target-specific uses of @code{__attribute__}.
|
mips.c (mips_class_max_nregs, [...]): New functions.
2002-04-24 Matt Hiller <hiller@redhat.com>
* mips.c (mips_class_max_nregs, mips_register_move_cost): New
functions.
* mips.h (CLASS_MAX_NREGS, REGISTER_MOVE_COST): Redefine as calls
of the corresponding functions.
* mips-protos.h (mips_class_max_nregs, mips_register_move_cost):
New prototypes.
2002-04-24 Matt Hiller <hiller@redhat.com>
* config/mips/mips.h (mips_sw_reg_names): Declare as extern.
(ALL_COP_ADDITIONAL_REGISTER_NAMES): New macro.
(FIRST_PSEUDO_REGISTER): Redefine considering coprocessor
registers, adjust comment accordingly.
(FIXED_REGISTERS, CALL_USED_REGISTERS, CALL_REALLY_USED_REGISTERS,
reg_class, REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGISTER_NAMES,
DEBUG_REGISTER_NAMES, REG_ALLOC_ORDER): Adjust to include entries
for coprocessor registers.
(ADDITIONAL_REGISTER_NAMES): Include
ALL_COP_ADDITIONAL_REGISTER_NAMES.
(COP0_REG_FIRST, COP0_REG_LAST, COP0_REG_NUM,
COP2_REG_FIRST, COP2_REG_LAST, COP2_REG_NUM,
COP3_REG_FIRST, COP3_REG_LAST, COP3_REG_NUM,
COP0_REG_P, COP2_REG_P, COP3_REG_P, ALL_COP_REG_P,
COPNUM_AS_CHAR_FROM_REGNUM, COP_REG_CLASS_P): New macros.
(mips_char_to_class): Adjust comment to include coprocessor
constraint letters.
* config/mips/mips.c (coprocessor_operand, coprocessor2_operand):
New functions.
(mips_reg_names, mips_regno_to_class): Include coprocessor
information.
(mips_sw_reg_names): Ditto, make non-static.
(mips_move_1word): Handle moves to and from coprocessor registers.
(mips_move_2words): Handle moves to and from coprocessor
registers.
(mips_class_max_nregs, mips_register_move_cost): Handle
coprocessor register classes.
(override_options): Initialize mips_char_to_class and
mips_hard_regno_mode_ok properly for coprocessor registers.
* config/mips/mips.md (movdi_internal, movdi_internal2,
movsi_internal1, movsi_internal2): Add constraint-sets for
coprocessor registers.
* testsuite/gcc.c-torture/mipscop-1.c: New testcase.
* testsuite/gcc.c-torture/mipscop-1.x: Disable above if target
isn't mips.
* testsuite/gcc.c-torture/mipscop-2.c: New testcase.
* testsuite/gcc.c-torture/mipscop-2.x: Disable above if target
isn't mips.
* testsuite/gcc.c-torture/mipscop-3.c: New testcase.
* testsuite/gcc.c-torture/mipscop-3.x: Disable above if target
isn't mips.
* testsuite/gcc.c-torture/mipscop-4.c: New testcase.
* testsuite/gcc.c-torture/mipscop-4.x: Disable above if target
isn't mips.
* doc/tm.texi: Document feature.
From-SVN: r52765
2002-04-25 21:31:45 +02:00
|
|
|
* MIPS Coprocessors:: MIPS coprocessor support and how to customize it.
|
2003-10-24 23:28:13 +02:00
|
|
|
* PCH Target:: Validity checking for precompiled headers.
|
2004-06-25 19:15:46 +02:00
|
|
|
* C++ ABI:: Controlling C++ ABI changes.
|
1996-09-25 01:21:45 +02:00
|
|
|
* Misc:: Everything else.
|
|
|
|
@end menu
|
|
|
|
|
Makefile.in (TARGET_H, [...]): New.
* Makefile.in (TARGET_H, TARGET_DEF_H): New.
(c-decl.o, tree.o, c-typeck.o, $(out_object_file)): Update.
* c-decl.c (duplicate_decls): Use function pointer.
* c-typeck.c (common_type): Similarly.
* tree.c (valid_machine_attribute): Similarly.
(merge_machine_type_attributes): Rename merge_type_attributes.
(merge_machine_decl_attributes): Rename merge_decl_attributes.
(merge_dllimport_decl_attributes): New function.
* tree.h (merge_machine_type_attributes): Rename merge_type_attributes.
(merge_machine_decl_attributes): Rename merge_decl_attributes.
(merge_dllimport_decl_attributes): New prototype.
* target.h: New.
* target-def.h: New.
doc: (Joseph Myers)
* doc/gcc.texi, doc/tm.texi: Update documentation.
cp: Make-lang.in: Update dependencies.
* spew.c: Include target.h.
(duplicate_decls): Call target function.
* decl2.c: include target.h
(import_export_class): Use existence of target function pointer.
* typeck.c: Include target.h.
(qualify_type_recursive): Rename variable. Call target function.
(type_after_usual_arithmetic_conversions): Similarly.
(common_type): Similarly.
config: * 1750a/1750a.c, a29k/29k.c, alpha/alpha.c, arc/arc.c, arm/arm.c,
avr/avr.c, c4x/c4x.c, clipper/clipper.c, convex/convex.c,
d30v/d30v.c, dsp16xx/dsp16xx.c, elxsi/elxsi.c, fr30/fr30.c,
i370/i370.c, i386/i386.c, i860/i860.c, i960/i960.c, ia64/ia64.c,
m32r/m32r.c, m68hc11/m68hc11.c, m68k/m68k.c, m88k/m88k.c,
mips/mips.c, mn10200/mn10200.c, mn10300/mn10300.c, ns32k/ns32k.c,
pa/pa.c, pdp11/pdp11.c, pj/pj.c, romp/romp.c, rs6000/rs6000.c,
sh/sh.c, sparc/sparc.c, v850/v850.c, vax/vax.c, we32k/we32k.c)
: Include target.h and target-def.h. Define target.
* arc/arc-protos.h (arc_valid_machine_decl_attribute): Remove.
* arc/arc.c (arc_valid_machine_decl_attribute): Rename
arc_valid_decl_attribute, make static.
* arc/arc.h (VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* arm/arm-protos.h (arm_valid_machine_decl_attribute,
arm_valid_type_attribute_p, arm_pe_valid_machine_decl_attribute,
arm_pe_merge_machine_decl_attributes): Remove.
* arm/arm.c (arm_valid_machine_decl_attribute_p): Rename
arm_valid_decl_attribute_p, make static.
(arm_pe_valid_decl_attribute_p): Move from pe.c.
* arm/pe.c (arm_pe_valid_machine_decl_attribute_p): Move to arm.c.
(arm_pe_merge_machine_decl_attributes): Move to tree.c.
* arm/arm.h (VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* arm/coff.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove.
* arm/elf.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove.
* arm/pe.h (TARGET_DLLIMPORT_DECL_ATTRIBUTES): New.
(VALID_MACHINE_TYPE_ATTRIBUTE, VALID_MACHINE_DECL_ATTRIBUTE): Remove.
* avr/avr-protos.h (valid_machine_type_attribute,
valid_machine_decl_attribute): Remove.
* avr/avr.c (valid_machine_type_attribute,
valid_machine_decl_attribute): Rename and make static.
* avr/avr.h (VALID_MACHINE_TYPE_ATTRIBUTE,
VALID_MACHINE_DECL_ATTRIBUTE): Remove.
* c4x/c4x-protos.h (c4x_valid_type_attribute_p): Remove.
* c4x/c4x.c (c4x_valid_type_attribute_p): Make static.
* c4x/c4x.h (VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* d30v/d30v.h: Remove obsolete comments.
* h8300/h8300-protos.h (h8300_valid_machine_decl_attribute): Remove.
* h8300/h8300.c (h8300_valid_machine_decl_attribute): Rename, make
static.
* h8300/h8300.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove.
* i386/cygwin.h (TARGET_DLLIMPORT_DECL_ATTRIBUTES): Define.
(i386_pe_merge_decl_attributes, MERGE_MACHINE_DECL_ATTRIBUTES,
i386_pe_valid_type_attributes_p): Remove.
* i386/i386-protos.h (ix86_valid_decl_attribute_p,
ix86_valid_type_attribute_p): Remove.
* i386/i386.c (ix86_valid_decl_attribute_p): Remove.
(ix86_valid_type_attribute_p): Make static.
* i386/i386.h (VALID_MACHINE_DECL_ATTRIBUTE,
VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* i386/winnt.c (i386_pe_merge_decl_attributes): Move to tree.c.
* ia64/ia64-protos.h (ia64_valid_type_attribute): Remove.
* ia64/ia64.c (ia64_valid_type_attribute): Make static.
* ia64/ia64.h (VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* m32r/m32r-protos.h (m32r_valid_machine_decl_attribute): Remove.
* m32r/m32r.c (m32r_valid_decl_attribute): Make static.
* m32r/m32r.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove.
* m68hc11/m68hc11-protos.h (m68hc11_valid_decl_attribute_p,
m68hc11_valid_type_attribute_p): Remove.
* m68hc11/m68hc11.c (m68hc11_valid_decl_attribute_p): Remove.
(m68hc11_valid_type_attribute_p): Make static.
* m68hc11/m68hc11.h (VALID_MACHINE_DECL_ATTRIBUTE,
VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* mcore/mcore-protos.h (mcore_valid_machine_decl_attribute,
mcore_merge_machine_decl_attribute): Remove.
* mcore/mcore.c (mcore_valid_machine_decl_attribute): Rename,
make static.
(mcore_merge_machine_decl_attributes): Move to tree.c.
* mcore/mcore.h (VALID_MACHINE_DECL_ATTRIBUTE,
VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
(TARGET_DLLIMPORT_DECL_ATTRIBUTES): Define.
* ns32k/ns32k-protos.h (ns32k_valid_decl_attribute_p,
ns32k_valid_type_attribute_p): Remove.
* ns32k/ns32k.c (ns32k_valid_decl_attribute_p): Remove.
(ns32k_valid_type_attribute_p): Make static.
* ns32k/ns32k.h (VALID_MACHINE_DECL_ATTRIBUTE,
VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* rs6000/rs6000-protos.h (rs6000_valid_decl_attribute_p,
rs6000_valid_type_attribute_p): Remove.
* rs6000/rs6000.c (rs6000_valid_decl_attribute_p): Remove.
(rs6000_valid_type_attribute_p): Make static.
* rs6000/rs6000.h (VALID_MACHINE_DECL_ATTRIBUTE,
VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* sh/sh-protos.h (sh_valid_machine_decl_attribute): Remove.
* sh/sh.c (sh_valid_machine_decl_attribute): Rename, make static.
* sh/sh.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove.
* v850/v850-protos.h (v850_valid_machine_decl_attribute): Remove.
* v850/v850.c (v850_valid_machine_decl_attribute): Rename, make static.
* v850/v850.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove.
From-SVN: r43585
2001-06-26 20:09:27 +02:00
|
|
|
@node Target Structure
|
2001-07-09 00:39:06 +02:00
|
|
|
@section The Global @code{targetm} Variable
|
Makefile.in (TARGET_H, [...]): New.
* Makefile.in (TARGET_H, TARGET_DEF_H): New.
(c-decl.o, tree.o, c-typeck.o, $(out_object_file)): Update.
* c-decl.c (duplicate_decls): Use function pointer.
* c-typeck.c (common_type): Similarly.
* tree.c (valid_machine_attribute): Similarly.
(merge_machine_type_attributes): Rename merge_type_attributes.
(merge_machine_decl_attributes): Rename merge_decl_attributes.
(merge_dllimport_decl_attributes): New function.
* tree.h (merge_machine_type_attributes): Rename merge_type_attributes.
(merge_machine_decl_attributes): Rename merge_decl_attributes.
(merge_dllimport_decl_attributes): New prototype.
* target.h: New.
* target-def.h: New.
doc: (Joseph Myers)
* doc/gcc.texi, doc/tm.texi: Update documentation.
cp: Make-lang.in: Update dependencies.
* spew.c: Include target.h.
(duplicate_decls): Call target function.
* decl2.c: include target.h
(import_export_class): Use existence of target function pointer.
* typeck.c: Include target.h.
(qualify_type_recursive): Rename variable. Call target function.
(type_after_usual_arithmetic_conversions): Similarly.
(common_type): Similarly.
config: * 1750a/1750a.c, a29k/29k.c, alpha/alpha.c, arc/arc.c, arm/arm.c,
avr/avr.c, c4x/c4x.c, clipper/clipper.c, convex/convex.c,
d30v/d30v.c, dsp16xx/dsp16xx.c, elxsi/elxsi.c, fr30/fr30.c,
i370/i370.c, i386/i386.c, i860/i860.c, i960/i960.c, ia64/ia64.c,
m32r/m32r.c, m68hc11/m68hc11.c, m68k/m68k.c, m88k/m88k.c,
mips/mips.c, mn10200/mn10200.c, mn10300/mn10300.c, ns32k/ns32k.c,
pa/pa.c, pdp11/pdp11.c, pj/pj.c, romp/romp.c, rs6000/rs6000.c,
sh/sh.c, sparc/sparc.c, v850/v850.c, vax/vax.c, we32k/we32k.c)
: Include target.h and target-def.h. Define target.
* arc/arc-protos.h (arc_valid_machine_decl_attribute): Remove.
* arc/arc.c (arc_valid_machine_decl_attribute): Rename
arc_valid_decl_attribute, make static.
* arc/arc.h (VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* arm/arm-protos.h (arm_valid_machine_decl_attribute,
arm_valid_type_attribute_p, arm_pe_valid_machine_decl_attribute,
arm_pe_merge_machine_decl_attributes): Remove.
* arm/arm.c (arm_valid_machine_decl_attribute_p): Rename
arm_valid_decl_attribute_p, make static.
(arm_pe_valid_decl_attribute_p): Move from pe.c.
* arm/pe.c (arm_pe_valid_machine_decl_attribute_p): Move to arm.c.
(arm_pe_merge_machine_decl_attributes): Move to tree.c.
* arm/arm.h (VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* arm/coff.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove.
* arm/elf.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove.
* arm/pe.h (TARGET_DLLIMPORT_DECL_ATTRIBUTES): New.
(VALID_MACHINE_TYPE_ATTRIBUTE, VALID_MACHINE_DECL_ATTRIBUTE): Remove.
* avr/avr-protos.h (valid_machine_type_attribute,
valid_machine_decl_attribute): Remove.
* avr/avr.c (valid_machine_type_attribute,
valid_machine_decl_attribute): Rename and make static.
* avr/avr.h (VALID_MACHINE_TYPE_ATTRIBUTE,
VALID_MACHINE_DECL_ATTRIBUTE): Remove.
* c4x/c4x-protos.h (c4x_valid_type_attribute_p): Remove.
* c4x/c4x.c (c4x_valid_type_attribute_p): Make static.
* c4x/c4x.h (VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* d30v/d30v.h: Remove obsolete comments.
* h8300/h8300-protos.h (h8300_valid_machine_decl_attribute): Remove.
* h8300/h8300.c (h8300_valid_machine_decl_attribute): Rename, make
static.
* h8300/h8300.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove.
* i386/cygwin.h (TARGET_DLLIMPORT_DECL_ATTRIBUTES): Define.
(i386_pe_merge_decl_attributes, MERGE_MACHINE_DECL_ATTRIBUTES,
i386_pe_valid_type_attributes_p): Remove.
* i386/i386-protos.h (ix86_valid_decl_attribute_p,
ix86_valid_type_attribute_p): Remove.
* i386/i386.c (ix86_valid_decl_attribute_p): Remove.
(ix86_valid_type_attribute_p): Make static.
* i386/i386.h (VALID_MACHINE_DECL_ATTRIBUTE,
VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* i386/winnt.c (i386_pe_merge_decl_attributes): Move to tree.c.
* ia64/ia64-protos.h (ia64_valid_type_attribute): Remove.
* ia64/ia64.c (ia64_valid_type_attribute): Make static.
* ia64/ia64.h (VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* m32r/m32r-protos.h (m32r_valid_machine_decl_attribute): Remove.
* m32r/m32r.c (m32r_valid_decl_attribute): Make static.
* m32r/m32r.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove.
* m68hc11/m68hc11-protos.h (m68hc11_valid_decl_attribute_p,
m68hc11_valid_type_attribute_p): Remove.
* m68hc11/m68hc11.c (m68hc11_valid_decl_attribute_p): Remove.
(m68hc11_valid_type_attribute_p): Make static.
* m68hc11/m68hc11.h (VALID_MACHINE_DECL_ATTRIBUTE,
VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* mcore/mcore-protos.h (mcore_valid_machine_decl_attribute,
mcore_merge_machine_decl_attribute): Remove.
* mcore/mcore.c (mcore_valid_machine_decl_attribute): Rename,
make static.
(mcore_merge_machine_decl_attributes): Move to tree.c.
* mcore/mcore.h (VALID_MACHINE_DECL_ATTRIBUTE,
VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
(TARGET_DLLIMPORT_DECL_ATTRIBUTES): Define.
* ns32k/ns32k-protos.h (ns32k_valid_decl_attribute_p,
ns32k_valid_type_attribute_p): Remove.
* ns32k/ns32k.c (ns32k_valid_decl_attribute_p): Remove.
(ns32k_valid_type_attribute_p): Make static.
* ns32k/ns32k.h (VALID_MACHINE_DECL_ATTRIBUTE,
VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* rs6000/rs6000-protos.h (rs6000_valid_decl_attribute_p,
rs6000_valid_type_attribute_p): Remove.
* rs6000/rs6000.c (rs6000_valid_decl_attribute_p): Remove.
(rs6000_valid_type_attribute_p): Make static.
* rs6000/rs6000.h (VALID_MACHINE_DECL_ATTRIBUTE,
VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* sh/sh-protos.h (sh_valid_machine_decl_attribute): Remove.
* sh/sh.c (sh_valid_machine_decl_attribute): Rename, make static.
* sh/sh.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove.
* v850/v850-protos.h (v850_valid_machine_decl_attribute): Remove.
* v850/v850.c (v850_valid_machine_decl_attribute): Rename, make static.
* v850/v850.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove.
From-SVN: r43585
2001-06-26 20:09:27 +02:00
|
|
|
@cindex target hooks
|
|
|
|
@cindex target functions
|
|
|
|
|
2001-07-07 03:07:22 +02:00
|
|
|
@deftypevar {struct gcc_target} targetm
|
|
|
|
The target @file{.c} file must define the global @code{targetm} variable
|
Makefile.in (TARGET_H, [...]): New.
* Makefile.in (TARGET_H, TARGET_DEF_H): New.
(c-decl.o, tree.o, c-typeck.o, $(out_object_file)): Update.
* c-decl.c (duplicate_decls): Use function pointer.
* c-typeck.c (common_type): Similarly.
* tree.c (valid_machine_attribute): Similarly.
(merge_machine_type_attributes): Rename merge_type_attributes.
(merge_machine_decl_attributes): Rename merge_decl_attributes.
(merge_dllimport_decl_attributes): New function.
* tree.h (merge_machine_type_attributes): Rename merge_type_attributes.
(merge_machine_decl_attributes): Rename merge_decl_attributes.
(merge_dllimport_decl_attributes): New prototype.
* target.h: New.
* target-def.h: New.
doc: (Joseph Myers)
* doc/gcc.texi, doc/tm.texi: Update documentation.
cp: Make-lang.in: Update dependencies.
* spew.c: Include target.h.
(duplicate_decls): Call target function.
* decl2.c: include target.h
(import_export_class): Use existence of target function pointer.
* typeck.c: Include target.h.
(qualify_type_recursive): Rename variable. Call target function.
(type_after_usual_arithmetic_conversions): Similarly.
(common_type): Similarly.
config: * 1750a/1750a.c, a29k/29k.c, alpha/alpha.c, arc/arc.c, arm/arm.c,
avr/avr.c, c4x/c4x.c, clipper/clipper.c, convex/convex.c,
d30v/d30v.c, dsp16xx/dsp16xx.c, elxsi/elxsi.c, fr30/fr30.c,
i370/i370.c, i386/i386.c, i860/i860.c, i960/i960.c, ia64/ia64.c,
m32r/m32r.c, m68hc11/m68hc11.c, m68k/m68k.c, m88k/m88k.c,
mips/mips.c, mn10200/mn10200.c, mn10300/mn10300.c, ns32k/ns32k.c,
pa/pa.c, pdp11/pdp11.c, pj/pj.c, romp/romp.c, rs6000/rs6000.c,
sh/sh.c, sparc/sparc.c, v850/v850.c, vax/vax.c, we32k/we32k.c)
: Include target.h and target-def.h. Define target.
* arc/arc-protos.h (arc_valid_machine_decl_attribute): Remove.
* arc/arc.c (arc_valid_machine_decl_attribute): Rename
arc_valid_decl_attribute, make static.
* arc/arc.h (VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* arm/arm-protos.h (arm_valid_machine_decl_attribute,
arm_valid_type_attribute_p, arm_pe_valid_machine_decl_attribute,
arm_pe_merge_machine_decl_attributes): Remove.
* arm/arm.c (arm_valid_machine_decl_attribute_p): Rename
arm_valid_decl_attribute_p, make static.
(arm_pe_valid_decl_attribute_p): Move from pe.c.
* arm/pe.c (arm_pe_valid_machine_decl_attribute_p): Move to arm.c.
(arm_pe_merge_machine_decl_attributes): Move to tree.c.
* arm/arm.h (VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* arm/coff.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove.
* arm/elf.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove.
* arm/pe.h (TARGET_DLLIMPORT_DECL_ATTRIBUTES): New.
(VALID_MACHINE_TYPE_ATTRIBUTE, VALID_MACHINE_DECL_ATTRIBUTE): Remove.
* avr/avr-protos.h (valid_machine_type_attribute,
valid_machine_decl_attribute): Remove.
* avr/avr.c (valid_machine_type_attribute,
valid_machine_decl_attribute): Rename and make static.
* avr/avr.h (VALID_MACHINE_TYPE_ATTRIBUTE,
VALID_MACHINE_DECL_ATTRIBUTE): Remove.
* c4x/c4x-protos.h (c4x_valid_type_attribute_p): Remove.
* c4x/c4x.c (c4x_valid_type_attribute_p): Make static.
* c4x/c4x.h (VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* d30v/d30v.h: Remove obsolete comments.
* h8300/h8300-protos.h (h8300_valid_machine_decl_attribute): Remove.
* h8300/h8300.c (h8300_valid_machine_decl_attribute): Rename, make
static.
* h8300/h8300.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove.
* i386/cygwin.h (TARGET_DLLIMPORT_DECL_ATTRIBUTES): Define.
(i386_pe_merge_decl_attributes, MERGE_MACHINE_DECL_ATTRIBUTES,
i386_pe_valid_type_attributes_p): Remove.
* i386/i386-protos.h (ix86_valid_decl_attribute_p,
ix86_valid_type_attribute_p): Remove.
* i386/i386.c (ix86_valid_decl_attribute_p): Remove.
(ix86_valid_type_attribute_p): Make static.
* i386/i386.h (VALID_MACHINE_DECL_ATTRIBUTE,
VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* i386/winnt.c (i386_pe_merge_decl_attributes): Move to tree.c.
* ia64/ia64-protos.h (ia64_valid_type_attribute): Remove.
* ia64/ia64.c (ia64_valid_type_attribute): Make static.
* ia64/ia64.h (VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* m32r/m32r-protos.h (m32r_valid_machine_decl_attribute): Remove.
* m32r/m32r.c (m32r_valid_decl_attribute): Make static.
* m32r/m32r.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove.
* m68hc11/m68hc11-protos.h (m68hc11_valid_decl_attribute_p,
m68hc11_valid_type_attribute_p): Remove.
* m68hc11/m68hc11.c (m68hc11_valid_decl_attribute_p): Remove.
(m68hc11_valid_type_attribute_p): Make static.
* m68hc11/m68hc11.h (VALID_MACHINE_DECL_ATTRIBUTE,
VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* mcore/mcore-protos.h (mcore_valid_machine_decl_attribute,
mcore_merge_machine_decl_attribute): Remove.
* mcore/mcore.c (mcore_valid_machine_decl_attribute): Rename,
make static.
(mcore_merge_machine_decl_attributes): Move to tree.c.
* mcore/mcore.h (VALID_MACHINE_DECL_ATTRIBUTE,
VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
(TARGET_DLLIMPORT_DECL_ATTRIBUTES): Define.
* ns32k/ns32k-protos.h (ns32k_valid_decl_attribute_p,
ns32k_valid_type_attribute_p): Remove.
* ns32k/ns32k.c (ns32k_valid_decl_attribute_p): Remove.
(ns32k_valid_type_attribute_p): Make static.
* ns32k/ns32k.h (VALID_MACHINE_DECL_ATTRIBUTE,
VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* rs6000/rs6000-protos.h (rs6000_valid_decl_attribute_p,
rs6000_valid_type_attribute_p): Remove.
* rs6000/rs6000.c (rs6000_valid_decl_attribute_p): Remove.
(rs6000_valid_type_attribute_p): Make static.
* rs6000/rs6000.h (VALID_MACHINE_DECL_ATTRIBUTE,
VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* sh/sh-protos.h (sh_valid_machine_decl_attribute): Remove.
* sh/sh.c (sh_valid_machine_decl_attribute): Rename, make static.
* sh/sh.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove.
* v850/v850-protos.h (v850_valid_machine_decl_attribute): Remove.
* v850/v850.c (v850_valid_machine_decl_attribute): Rename, make static.
* v850/v850.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove.
From-SVN: r43585
2001-06-26 20:09:27 +02:00
|
|
|
which contains pointers to functions and data relating to the target
|
|
|
|
machine. The variable is declared in @file{target.h};
|
|
|
|
@file{target-def.h} defines the macro @code{TARGET_INITIALIZER} which is
|
|
|
|
used to initialize the variable, and macros for the default initializers
|
|
|
|
for elements of the structure. The @file{.c} file should override those
|
|
|
|
macros for which the default definition is inappropriate. For example:
|
|
|
|
@smallexample
|
|
|
|
#include "target.h"
|
|
|
|
#include "target-def.h"
|
|
|
|
|
|
|
|
/* @r{Initialize the GCC target structure.} */
|
|
|
|
|
Table-driven attributes.
* c-decl.c, config/alpha/alpha.c, config/arc/arc.c,
config/arm/arm.c, config/arm/pe.c, config/avr/avr.c,
config/avr/avr.h, config/d30v/d30v.h, config/fr30/fr30.h,
config/h8300/h8300.c, config/i386/cygwin.h, config/i386/winnt.c,
config/m32r/m32r.c, config/mcore/mcore.c, config/sh/sh.c,
config/stormy16/stormy16.h, config/v850/v850.c, doc/c-tree.texi,
doc/tm.texi, ggc-common.c, integrate.c, print-tree.c, tree.c,
tree.h: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
* tree.h (struct tree_decl): Change machine_attributes to
attributes.
* doc/c-tree.texi: Document that all attributes are now attached
to decls and types.
* c-common.c (add_attribute, attrtab, attrtab_idx,
default_valid_lang_attribute, valid_lang_attribute): Remove.
(attribute_tables, attributes_initialized,
c_common_attribute_table, default_lang_attribute_table): New
variables.
(handle_packed_attribute, handle_nocommon_attribute,
handle_common_attribute, handle_noreturn_attribute,
handle_unused_attribute, handle_const_attribute,
handle_transparent_union_attribute, handle_constructor_attribute,
handle_destructor_attribute, handle_mode_attribute,
handle_section_attribute, handle_aligned_attribute,
handle_weak_attribute, handle_alias_attribute,
handle_no_instrument_function_attribute,
handle_no_check_memory_usage_attribute, handle_malloc_attribute,
handle_no_limit_stack_attribute, handle_pure_attribute): New
functions.
(init_attributes, decl_attributes): Rewrite to implement
table-driven attributes.
* c-common.h (enum attribute_flags): Move to tree.h.
* c-format.c (decl_handle_format_attribute,
decl_handle_format_arg_attribute): Rename to
handle_format_attribute and handle_format_arg_attribute. Update
for table-driven attributes.
* c-common.h (decl_handle_format_attribute,
decl_handle_format_arg_attribute): Remove prototypes.
(handle_format_attribute, handle_format_arg_attribute): Add
prototypes.
* c-decl.c (grokdeclarator): Handle attributes nested inside
declarators.
* c-parse.in (setattrs, maybe_setattrs): Remove.
(maybe_type_quals_setattrs): Rename to maybe_type_quals_attrs.
Update to handle nested attributes properly.
(maybe_resetattrs, after_type_declarator,
parm_declarator_nostarttypename, notype_declarator, absdcl1_noea,
absdcl1_ea, direct_absdcl1): Update to handle nested attributes
properly.
(make_pointer_declarator): Update to handle nested attributes
properly.
* doc/extend.texi: Update documentation of limits of attributes
syntax. Warn about problems with attribute semantics in C++.
* target.h (struct target): Remove valid_decl_attribute and
valid_type_attribute. Add attribute_table and
function_attribute_inlinable_p.
* target-def.h (TARGET_VALID_DECL_ATTRIBUTE,
TARGET_VALID_TYPE_ATTRIBUTE): Remove.
(TARGET_ATTRIBUTE_TABLE, TARGET_FUNCTION_ATTRIBUTE_INLINABLE_P):
Add.
(TARGET_INITIALIZER): Update.
* integrate.c (FUNCTION_ATTRIBUTE_INLINABLE_P): Remove default
definition.
(function_attribute_inlinable_p): New function. Check for the
presence of any machine attributes before using
targetm.function_attribute_inlinable_p.
(function_cannot_inline_p): Update.
* Makefile.in (integrate.o): Update dependencies.
* doc/tm.texi: Update documentation of target attributes and
example definition of TARGET_VALID_TYPE_ATTRIBUTE.
* tree.c (default_valid_attribute_p, valid_machine_attribute):
Remove.
(default_target_attribute_table,
default_function_attribute_inlinable_p): New.
(lookup_attribute): Update comment to clarify handling of multiple
attributes with the same name.
(merge_attributes, attribute_list_contained): Allow multiple
attributes with the same name but different arguments to appear in
the same attribute list.
* tree.h (default_valid_attribute_p): Remove prototype.
(struct attribute_spec): New.
(default_target_attribute_table): Declare.
(enum attribute_flags): Move from c-common.h. Add
ATTR_FLAG_TYPE_IN_PLACE.
(default_function_attribute_inlinable_p): Declare.
* config/alpha/alpha.c (vms_valid_decl_attribute_p): Remove.
(TARGET_VALID_DECL_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(vms_attribute_table): New.
* config/arc/arc.c (arc_valid_decl_attribute): Remove.
(TARGET_VALID_DECL_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(arc_attribute_table, arc_handle_interrupt_attribute): New.
* config/arm/arm.c (arm_valid_type_attribute_p,
arm_valid_decl_attribute_p, arm_pe_valid_decl_attribute_p):
Remove.
(TARGET_VALID_TYPE_ATTRIBUTE, TARGET_VALID_DECL_ATTRIBUTE): Don't
define.
(TARGET_ATTRIBUTE_TABLE): Define.
(arm_attribute_table, arm_handle_fndecl_attribute,
arm_handle_isr_attribute): New.
* config/avr/avr.c (avr_valid_type_attribute,
avr_valid_decl_attribute): Remove.
(TARGET_VALID_DECL_ATTRIBUTE, TARGET_VALID_TYPE_ATTRIBUTE): Don't
define.
(TARGET_ATTRIBUTE_TABLE): Define.
(avr_attribute_table, avr_handle_progmem_attribute,
avr_handle_fndecl_attribute): New.
* config/c4x/c4x.c (c4x_valid_type_attribute_p): Remove.
(TARGET_VALID_TYPE_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(c4x_attribute_table, c4x_handle_fntype_attribute): New.
* config/h8300/h8300.c (h8300_valid_decl_attribute): Remove.
(TARGET_VALID_DECL_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(h8300_attribute_table, h8300_handle_fndecl_attribute,
h8300_handle_eightbit_data_attribute,
h8300_handle_tiny_data_attribute): New.
* config/i386/i386-protos.h (ix86_valid_type_attribute_p,
i386_pe_valid_decl_attribute_p, i386_pe_valid_type_attribute_p):
Remove prototypes.
(ix86_handle_dll_attribute, ix86_handle_shared_attribute): New
declarations.
* config/i386/i386.c (ix86_valid_type_attribute_p: Remove.
(TARGET_VALID_TYPE_ATTRIBUTE, TARGET_VALID_DECL_ATTRIBUTE): Don't
define.
(TARGET_ATTRIBUTE_TABLE): Define.
(ix86_attribute_table, ix86_handle_cdecl_attribute,
ix86_handle_regparm_attribute): New.
* config/i386/winnt.c (i386_pe_valid_decl_attribute_p,
i386_pe_valid_type_attribute_p): Remove.
(ix86_handle_dll_attribute, ix86_handle_shared_attribute): New.
* config/ia64/ia64.c (ia64_valid_type_attribute): Remove.
(TARGET_VALID_TYPE_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(ia64_attribute_table): New.
* config/m32r/m32r.c (m32r_valid_decl_attribute, interrupt_ident1,
interrupt_ident2, model_ident1, model_ident2): Remove.
(TARGET_VALID_DECL_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(init_idents): Update.
(m32r_attribute_table, m32r_handle_model_attribute): New.
* config/m68hc11/m68hc11.c (m68hc11_valid_type_attribute_p):
Remove.
(TARGET_VALID_TYPE_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(m68hc11_attribute_table, m68hc11_handle_fntype_attribute): New.
* config/mcore/mcore.c (mcore_valid_decl_attribute): Remove.
(TARGET_VALID_DECL_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(mcore_attribute_table, mcore_handle_naked_attribute): New.
* config/ns32k/ns32k.c (ns32k_valid_type_attribute_p): Remove.
(TARGET_VALID_TYPE_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(ns32k_attribute_table, ns32k_handle_fntype_attribute): New.
* config/rs6000/rs6000.c (rs6000_valid_type_attribute_p): Remove.
(TARGET_VALID_TYPE_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(rs6000_attribute_table, rs6000_handle_longcall_attribute): New.
* config/sh/sh.c (sh_valid_decl_attribute): Remove.
(TARGET_VALID_DECL_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(sh_attribute_table, sh_handle_interrupt_handler_attribute,
sh_handle_sp_switch_attribute, sh_handle_trap_exit_attribute):
New.
* config/stormy16/stormy16.c (stormy16_valid_type_attribute):
Remove.
(TARGET_VALID_TYPE_ATTRIBUTE): Don't define
(TARGET_ATTRIBUTE_TABLE): Define.
(stormy16_attribute_table, stormy16_handle_interrupt_attribute):
New.
* config/v850/v850.c (v850_valid_decl_attribute): Remove.
(TARGET_VALID_DECL_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(v850_attribute_table, v850_handle_interrupt_attribute,
v850_handle_data_area_attribute): New.
* config/v850/v850-c.c (mark_current_function_as_interrupt):
Return void. Call decl_attributes instead of
valid_machine_attribute.
cp:
Table-driven attributes.
* decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
* decl2.c (cplus_decl_attributes): Only take one attributes
parameter.
* cp-tree.c (cplus_decl_attributes): Update prototype.
* class.c (finish_struct), decl.c (start_decl, start_function),
decl2.c (grokfield), friend.c (do_friend), parse.y
(parse_bitfield): Update calls to cplus_decl_attributes.
* decl.c (grokdeclarator): Take a pointer to a single ordinary
attribute list.
* decl.h (grokdeclarator): Update prototype.
* decl2.c (grokfield): Take a single ordinary attribute list.
* friend.c (do_friend): Likewise.
* decl.c (shadow_tag, groktypename, start_decl,
start_handler_parms, grokdeclarator, grokparms, start_function,
start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
(process_template_parm, do_decl_instantiation): Pass single
ordinary attribute lists around.
* decl.c (grokdeclarator): Correct handling of nested attributes.
Revert the patch
1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
* decl.c (grokdeclarator): Embedded attrs bind to the right,
not the left.
.
* cp-tree.h (cp_valid_lang_attribute): Remove declaration
(cp_attribute_table): Declare.
* decl.c (valid_lang_attribute): Don't define.
(lang_attribute_table): Define.
(init_decl_processing): Initialize lang_attribute_table instead of
valid_lang_attribute.
* tree.c (cp_valid_lang_attribute): Remove.
(handle_java_interface_attribute, handle_com_interface_attribute,
handle_init_priority_attribute): New functions.
(cp_attribute_table): New array.
* decl2.c (import_export_class): Don't use
targetm.valid_type_attribute.
testsuite:
Table-driven attributes.
* g++.dg/ext/attrib1.C: New test.
From-SVN: r45718
2001-09-21 03:27:06 +02:00
|
|
|
#undef TARGET_COMP_TYPE_ATTRIBUTES
|
|
|
|
#define TARGET_COMP_TYPE_ATTRIBUTES @var{machine}_comp_type_attributes
|
Makefile.in (TARGET_H, [...]): New.
* Makefile.in (TARGET_H, TARGET_DEF_H): New.
(c-decl.o, tree.o, c-typeck.o, $(out_object_file)): Update.
* c-decl.c (duplicate_decls): Use function pointer.
* c-typeck.c (common_type): Similarly.
* tree.c (valid_machine_attribute): Similarly.
(merge_machine_type_attributes): Rename merge_type_attributes.
(merge_machine_decl_attributes): Rename merge_decl_attributes.
(merge_dllimport_decl_attributes): New function.
* tree.h (merge_machine_type_attributes): Rename merge_type_attributes.
(merge_machine_decl_attributes): Rename merge_decl_attributes.
(merge_dllimport_decl_attributes): New prototype.
* target.h: New.
* target-def.h: New.
doc: (Joseph Myers)
* doc/gcc.texi, doc/tm.texi: Update documentation.
cp: Make-lang.in: Update dependencies.
* spew.c: Include target.h.
(duplicate_decls): Call target function.
* decl2.c: include target.h
(import_export_class): Use existence of target function pointer.
* typeck.c: Include target.h.
(qualify_type_recursive): Rename variable. Call target function.
(type_after_usual_arithmetic_conversions): Similarly.
(common_type): Similarly.
config: * 1750a/1750a.c, a29k/29k.c, alpha/alpha.c, arc/arc.c, arm/arm.c,
avr/avr.c, c4x/c4x.c, clipper/clipper.c, convex/convex.c,
d30v/d30v.c, dsp16xx/dsp16xx.c, elxsi/elxsi.c, fr30/fr30.c,
i370/i370.c, i386/i386.c, i860/i860.c, i960/i960.c, ia64/ia64.c,
m32r/m32r.c, m68hc11/m68hc11.c, m68k/m68k.c, m88k/m88k.c,
mips/mips.c, mn10200/mn10200.c, mn10300/mn10300.c, ns32k/ns32k.c,
pa/pa.c, pdp11/pdp11.c, pj/pj.c, romp/romp.c, rs6000/rs6000.c,
sh/sh.c, sparc/sparc.c, v850/v850.c, vax/vax.c, we32k/we32k.c)
: Include target.h and target-def.h. Define target.
* arc/arc-protos.h (arc_valid_machine_decl_attribute): Remove.
* arc/arc.c (arc_valid_machine_decl_attribute): Rename
arc_valid_decl_attribute, make static.
* arc/arc.h (VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* arm/arm-protos.h (arm_valid_machine_decl_attribute,
arm_valid_type_attribute_p, arm_pe_valid_machine_decl_attribute,
arm_pe_merge_machine_decl_attributes): Remove.
* arm/arm.c (arm_valid_machine_decl_attribute_p): Rename
arm_valid_decl_attribute_p, make static.
(arm_pe_valid_decl_attribute_p): Move from pe.c.
* arm/pe.c (arm_pe_valid_machine_decl_attribute_p): Move to arm.c.
(arm_pe_merge_machine_decl_attributes): Move to tree.c.
* arm/arm.h (VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* arm/coff.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove.
* arm/elf.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove.
* arm/pe.h (TARGET_DLLIMPORT_DECL_ATTRIBUTES): New.
(VALID_MACHINE_TYPE_ATTRIBUTE, VALID_MACHINE_DECL_ATTRIBUTE): Remove.
* avr/avr-protos.h (valid_machine_type_attribute,
valid_machine_decl_attribute): Remove.
* avr/avr.c (valid_machine_type_attribute,
valid_machine_decl_attribute): Rename and make static.
* avr/avr.h (VALID_MACHINE_TYPE_ATTRIBUTE,
VALID_MACHINE_DECL_ATTRIBUTE): Remove.
* c4x/c4x-protos.h (c4x_valid_type_attribute_p): Remove.
* c4x/c4x.c (c4x_valid_type_attribute_p): Make static.
* c4x/c4x.h (VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* d30v/d30v.h: Remove obsolete comments.
* h8300/h8300-protos.h (h8300_valid_machine_decl_attribute): Remove.
* h8300/h8300.c (h8300_valid_machine_decl_attribute): Rename, make
static.
* h8300/h8300.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove.
* i386/cygwin.h (TARGET_DLLIMPORT_DECL_ATTRIBUTES): Define.
(i386_pe_merge_decl_attributes, MERGE_MACHINE_DECL_ATTRIBUTES,
i386_pe_valid_type_attributes_p): Remove.
* i386/i386-protos.h (ix86_valid_decl_attribute_p,
ix86_valid_type_attribute_p): Remove.
* i386/i386.c (ix86_valid_decl_attribute_p): Remove.
(ix86_valid_type_attribute_p): Make static.
* i386/i386.h (VALID_MACHINE_DECL_ATTRIBUTE,
VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* i386/winnt.c (i386_pe_merge_decl_attributes): Move to tree.c.
* ia64/ia64-protos.h (ia64_valid_type_attribute): Remove.
* ia64/ia64.c (ia64_valid_type_attribute): Make static.
* ia64/ia64.h (VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* m32r/m32r-protos.h (m32r_valid_machine_decl_attribute): Remove.
* m32r/m32r.c (m32r_valid_decl_attribute): Make static.
* m32r/m32r.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove.
* m68hc11/m68hc11-protos.h (m68hc11_valid_decl_attribute_p,
m68hc11_valid_type_attribute_p): Remove.
* m68hc11/m68hc11.c (m68hc11_valid_decl_attribute_p): Remove.
(m68hc11_valid_type_attribute_p): Make static.
* m68hc11/m68hc11.h (VALID_MACHINE_DECL_ATTRIBUTE,
VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* mcore/mcore-protos.h (mcore_valid_machine_decl_attribute,
mcore_merge_machine_decl_attribute): Remove.
* mcore/mcore.c (mcore_valid_machine_decl_attribute): Rename,
make static.
(mcore_merge_machine_decl_attributes): Move to tree.c.
* mcore/mcore.h (VALID_MACHINE_DECL_ATTRIBUTE,
VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
(TARGET_DLLIMPORT_DECL_ATTRIBUTES): Define.
* ns32k/ns32k-protos.h (ns32k_valid_decl_attribute_p,
ns32k_valid_type_attribute_p): Remove.
* ns32k/ns32k.c (ns32k_valid_decl_attribute_p): Remove.
(ns32k_valid_type_attribute_p): Make static.
* ns32k/ns32k.h (VALID_MACHINE_DECL_ATTRIBUTE,
VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* rs6000/rs6000-protos.h (rs6000_valid_decl_attribute_p,
rs6000_valid_type_attribute_p): Remove.
* rs6000/rs6000.c (rs6000_valid_decl_attribute_p): Remove.
(rs6000_valid_type_attribute_p): Make static.
* rs6000/rs6000.h (VALID_MACHINE_DECL_ATTRIBUTE,
VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* sh/sh-protos.h (sh_valid_machine_decl_attribute): Remove.
* sh/sh.c (sh_valid_machine_decl_attribute): Rename, make static.
* sh/sh.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove.
* v850/v850-protos.h (v850_valid_machine_decl_attribute): Remove.
* v850/v850.c (v850_valid_machine_decl_attribute): Rename, make static.
* v850/v850.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove.
From-SVN: r43585
2001-06-26 20:09:27 +02:00
|
|
|
|
2001-07-07 03:07:22 +02:00
|
|
|
struct gcc_target targetm = TARGET_INITIALIZER;
|
Makefile.in (TARGET_H, [...]): New.
* Makefile.in (TARGET_H, TARGET_DEF_H): New.
(c-decl.o, tree.o, c-typeck.o, $(out_object_file)): Update.
* c-decl.c (duplicate_decls): Use function pointer.
* c-typeck.c (common_type): Similarly.
* tree.c (valid_machine_attribute): Similarly.
(merge_machine_type_attributes): Rename merge_type_attributes.
(merge_machine_decl_attributes): Rename merge_decl_attributes.
(merge_dllimport_decl_attributes): New function.
* tree.h (merge_machine_type_attributes): Rename merge_type_attributes.
(merge_machine_decl_attributes): Rename merge_decl_attributes.
(merge_dllimport_decl_attributes): New prototype.
* target.h: New.
* target-def.h: New.
doc: (Joseph Myers)
* doc/gcc.texi, doc/tm.texi: Update documentation.
cp: Make-lang.in: Update dependencies.
* spew.c: Include target.h.
(duplicate_decls): Call target function.
* decl2.c: include target.h
(import_export_class): Use existence of target function pointer.
* typeck.c: Include target.h.
(qualify_type_recursive): Rename variable. Call target function.
(type_after_usual_arithmetic_conversions): Similarly.
(common_type): Similarly.
config: * 1750a/1750a.c, a29k/29k.c, alpha/alpha.c, arc/arc.c, arm/arm.c,
avr/avr.c, c4x/c4x.c, clipper/clipper.c, convex/convex.c,
d30v/d30v.c, dsp16xx/dsp16xx.c, elxsi/elxsi.c, fr30/fr30.c,
i370/i370.c, i386/i386.c, i860/i860.c, i960/i960.c, ia64/ia64.c,
m32r/m32r.c, m68hc11/m68hc11.c, m68k/m68k.c, m88k/m88k.c,
mips/mips.c, mn10200/mn10200.c, mn10300/mn10300.c, ns32k/ns32k.c,
pa/pa.c, pdp11/pdp11.c, pj/pj.c, romp/romp.c, rs6000/rs6000.c,
sh/sh.c, sparc/sparc.c, v850/v850.c, vax/vax.c, we32k/we32k.c)
: Include target.h and target-def.h. Define target.
* arc/arc-protos.h (arc_valid_machine_decl_attribute): Remove.
* arc/arc.c (arc_valid_machine_decl_attribute): Rename
arc_valid_decl_attribute, make static.
* arc/arc.h (VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* arm/arm-protos.h (arm_valid_machine_decl_attribute,
arm_valid_type_attribute_p, arm_pe_valid_machine_decl_attribute,
arm_pe_merge_machine_decl_attributes): Remove.
* arm/arm.c (arm_valid_machine_decl_attribute_p): Rename
arm_valid_decl_attribute_p, make static.
(arm_pe_valid_decl_attribute_p): Move from pe.c.
* arm/pe.c (arm_pe_valid_machine_decl_attribute_p): Move to arm.c.
(arm_pe_merge_machine_decl_attributes): Move to tree.c.
* arm/arm.h (VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* arm/coff.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove.
* arm/elf.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove.
* arm/pe.h (TARGET_DLLIMPORT_DECL_ATTRIBUTES): New.
(VALID_MACHINE_TYPE_ATTRIBUTE, VALID_MACHINE_DECL_ATTRIBUTE): Remove.
* avr/avr-protos.h (valid_machine_type_attribute,
valid_machine_decl_attribute): Remove.
* avr/avr.c (valid_machine_type_attribute,
valid_machine_decl_attribute): Rename and make static.
* avr/avr.h (VALID_MACHINE_TYPE_ATTRIBUTE,
VALID_MACHINE_DECL_ATTRIBUTE): Remove.
* c4x/c4x-protos.h (c4x_valid_type_attribute_p): Remove.
* c4x/c4x.c (c4x_valid_type_attribute_p): Make static.
* c4x/c4x.h (VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* d30v/d30v.h: Remove obsolete comments.
* h8300/h8300-protos.h (h8300_valid_machine_decl_attribute): Remove.
* h8300/h8300.c (h8300_valid_machine_decl_attribute): Rename, make
static.
* h8300/h8300.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove.
* i386/cygwin.h (TARGET_DLLIMPORT_DECL_ATTRIBUTES): Define.
(i386_pe_merge_decl_attributes, MERGE_MACHINE_DECL_ATTRIBUTES,
i386_pe_valid_type_attributes_p): Remove.
* i386/i386-protos.h (ix86_valid_decl_attribute_p,
ix86_valid_type_attribute_p): Remove.
* i386/i386.c (ix86_valid_decl_attribute_p): Remove.
(ix86_valid_type_attribute_p): Make static.
* i386/i386.h (VALID_MACHINE_DECL_ATTRIBUTE,
VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* i386/winnt.c (i386_pe_merge_decl_attributes): Move to tree.c.
* ia64/ia64-protos.h (ia64_valid_type_attribute): Remove.
* ia64/ia64.c (ia64_valid_type_attribute): Make static.
* ia64/ia64.h (VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* m32r/m32r-protos.h (m32r_valid_machine_decl_attribute): Remove.
* m32r/m32r.c (m32r_valid_decl_attribute): Make static.
* m32r/m32r.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove.
* m68hc11/m68hc11-protos.h (m68hc11_valid_decl_attribute_p,
m68hc11_valid_type_attribute_p): Remove.
* m68hc11/m68hc11.c (m68hc11_valid_decl_attribute_p): Remove.
(m68hc11_valid_type_attribute_p): Make static.
* m68hc11/m68hc11.h (VALID_MACHINE_DECL_ATTRIBUTE,
VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* mcore/mcore-protos.h (mcore_valid_machine_decl_attribute,
mcore_merge_machine_decl_attribute): Remove.
* mcore/mcore.c (mcore_valid_machine_decl_attribute): Rename,
make static.
(mcore_merge_machine_decl_attributes): Move to tree.c.
* mcore/mcore.h (VALID_MACHINE_DECL_ATTRIBUTE,
VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
(TARGET_DLLIMPORT_DECL_ATTRIBUTES): Define.
* ns32k/ns32k-protos.h (ns32k_valid_decl_attribute_p,
ns32k_valid_type_attribute_p): Remove.
* ns32k/ns32k.c (ns32k_valid_decl_attribute_p): Remove.
(ns32k_valid_type_attribute_p): Make static.
* ns32k/ns32k.h (VALID_MACHINE_DECL_ATTRIBUTE,
VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* rs6000/rs6000-protos.h (rs6000_valid_decl_attribute_p,
rs6000_valid_type_attribute_p): Remove.
* rs6000/rs6000.c (rs6000_valid_decl_attribute_p): Remove.
(rs6000_valid_type_attribute_p): Make static.
* rs6000/rs6000.h (VALID_MACHINE_DECL_ATTRIBUTE,
VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* sh/sh-protos.h (sh_valid_machine_decl_attribute): Remove.
* sh/sh.c (sh_valid_machine_decl_attribute): Rename, make static.
* sh/sh.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove.
* v850/v850-protos.h (v850_valid_machine_decl_attribute): Remove.
* v850/v850.c (v850_valid_machine_decl_attribute): Rename, make static.
* v850/v850.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove.
From-SVN: r43585
2001-06-26 20:09:27 +02:00
|
|
|
@end smallexample
|
|
|
|
@end deftypevar
|
|
|
|
|
|
|
|
Where a macro should be defined in the @file{.c} file in this manner to
|
2001-07-09 00:39:06 +02:00
|
|
|
form part of the @code{targetm} structure, it is documented below as a
|
Makefile.in (TARGET_H, [...]): New.
* Makefile.in (TARGET_H, TARGET_DEF_H): New.
(c-decl.o, tree.o, c-typeck.o, $(out_object_file)): Update.
* c-decl.c (duplicate_decls): Use function pointer.
* c-typeck.c (common_type): Similarly.
* tree.c (valid_machine_attribute): Similarly.
(merge_machine_type_attributes): Rename merge_type_attributes.
(merge_machine_decl_attributes): Rename merge_decl_attributes.
(merge_dllimport_decl_attributes): New function.
* tree.h (merge_machine_type_attributes): Rename merge_type_attributes.
(merge_machine_decl_attributes): Rename merge_decl_attributes.
(merge_dllimport_decl_attributes): New prototype.
* target.h: New.
* target-def.h: New.
doc: (Joseph Myers)
* doc/gcc.texi, doc/tm.texi: Update documentation.
cp: Make-lang.in: Update dependencies.
* spew.c: Include target.h.
(duplicate_decls): Call target function.
* decl2.c: include target.h
(import_export_class): Use existence of target function pointer.
* typeck.c: Include target.h.
(qualify_type_recursive): Rename variable. Call target function.
(type_after_usual_arithmetic_conversions): Similarly.
(common_type): Similarly.
config: * 1750a/1750a.c, a29k/29k.c, alpha/alpha.c, arc/arc.c, arm/arm.c,
avr/avr.c, c4x/c4x.c, clipper/clipper.c, convex/convex.c,
d30v/d30v.c, dsp16xx/dsp16xx.c, elxsi/elxsi.c, fr30/fr30.c,
i370/i370.c, i386/i386.c, i860/i860.c, i960/i960.c, ia64/ia64.c,
m32r/m32r.c, m68hc11/m68hc11.c, m68k/m68k.c, m88k/m88k.c,
mips/mips.c, mn10200/mn10200.c, mn10300/mn10300.c, ns32k/ns32k.c,
pa/pa.c, pdp11/pdp11.c, pj/pj.c, romp/romp.c, rs6000/rs6000.c,
sh/sh.c, sparc/sparc.c, v850/v850.c, vax/vax.c, we32k/we32k.c)
: Include target.h and target-def.h. Define target.
* arc/arc-protos.h (arc_valid_machine_decl_attribute): Remove.
* arc/arc.c (arc_valid_machine_decl_attribute): Rename
arc_valid_decl_attribute, make static.
* arc/arc.h (VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* arm/arm-protos.h (arm_valid_machine_decl_attribute,
arm_valid_type_attribute_p, arm_pe_valid_machine_decl_attribute,
arm_pe_merge_machine_decl_attributes): Remove.
* arm/arm.c (arm_valid_machine_decl_attribute_p): Rename
arm_valid_decl_attribute_p, make static.
(arm_pe_valid_decl_attribute_p): Move from pe.c.
* arm/pe.c (arm_pe_valid_machine_decl_attribute_p): Move to arm.c.
(arm_pe_merge_machine_decl_attributes): Move to tree.c.
* arm/arm.h (VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* arm/coff.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove.
* arm/elf.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove.
* arm/pe.h (TARGET_DLLIMPORT_DECL_ATTRIBUTES): New.
(VALID_MACHINE_TYPE_ATTRIBUTE, VALID_MACHINE_DECL_ATTRIBUTE): Remove.
* avr/avr-protos.h (valid_machine_type_attribute,
valid_machine_decl_attribute): Remove.
* avr/avr.c (valid_machine_type_attribute,
valid_machine_decl_attribute): Rename and make static.
* avr/avr.h (VALID_MACHINE_TYPE_ATTRIBUTE,
VALID_MACHINE_DECL_ATTRIBUTE): Remove.
* c4x/c4x-protos.h (c4x_valid_type_attribute_p): Remove.
* c4x/c4x.c (c4x_valid_type_attribute_p): Make static.
* c4x/c4x.h (VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* d30v/d30v.h: Remove obsolete comments.
* h8300/h8300-protos.h (h8300_valid_machine_decl_attribute): Remove.
* h8300/h8300.c (h8300_valid_machine_decl_attribute): Rename, make
static.
* h8300/h8300.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove.
* i386/cygwin.h (TARGET_DLLIMPORT_DECL_ATTRIBUTES): Define.
(i386_pe_merge_decl_attributes, MERGE_MACHINE_DECL_ATTRIBUTES,
i386_pe_valid_type_attributes_p): Remove.
* i386/i386-protos.h (ix86_valid_decl_attribute_p,
ix86_valid_type_attribute_p): Remove.
* i386/i386.c (ix86_valid_decl_attribute_p): Remove.
(ix86_valid_type_attribute_p): Make static.
* i386/i386.h (VALID_MACHINE_DECL_ATTRIBUTE,
VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* i386/winnt.c (i386_pe_merge_decl_attributes): Move to tree.c.
* ia64/ia64-protos.h (ia64_valid_type_attribute): Remove.
* ia64/ia64.c (ia64_valid_type_attribute): Make static.
* ia64/ia64.h (VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* m32r/m32r-protos.h (m32r_valid_machine_decl_attribute): Remove.
* m32r/m32r.c (m32r_valid_decl_attribute): Make static.
* m32r/m32r.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove.
* m68hc11/m68hc11-protos.h (m68hc11_valid_decl_attribute_p,
m68hc11_valid_type_attribute_p): Remove.
* m68hc11/m68hc11.c (m68hc11_valid_decl_attribute_p): Remove.
(m68hc11_valid_type_attribute_p): Make static.
* m68hc11/m68hc11.h (VALID_MACHINE_DECL_ATTRIBUTE,
VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* mcore/mcore-protos.h (mcore_valid_machine_decl_attribute,
mcore_merge_machine_decl_attribute): Remove.
* mcore/mcore.c (mcore_valid_machine_decl_attribute): Rename,
make static.
(mcore_merge_machine_decl_attributes): Move to tree.c.
* mcore/mcore.h (VALID_MACHINE_DECL_ATTRIBUTE,
VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
(TARGET_DLLIMPORT_DECL_ATTRIBUTES): Define.
* ns32k/ns32k-protos.h (ns32k_valid_decl_attribute_p,
ns32k_valid_type_attribute_p): Remove.
* ns32k/ns32k.c (ns32k_valid_decl_attribute_p): Remove.
(ns32k_valid_type_attribute_p): Make static.
* ns32k/ns32k.h (VALID_MACHINE_DECL_ATTRIBUTE,
VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* rs6000/rs6000-protos.h (rs6000_valid_decl_attribute_p,
rs6000_valid_type_attribute_p): Remove.
* rs6000/rs6000.c (rs6000_valid_decl_attribute_p): Remove.
(rs6000_valid_type_attribute_p): Make static.
* rs6000/rs6000.h (VALID_MACHINE_DECL_ATTRIBUTE,
VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* sh/sh-protos.h (sh_valid_machine_decl_attribute): Remove.
* sh/sh.c (sh_valid_machine_decl_attribute): Rename, make static.
* sh/sh.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove.
* v850/v850-protos.h (v850_valid_machine_decl_attribute): Remove.
* v850/v850.c (v850_valid_machine_decl_attribute): Rename, make static.
* v850/v850.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove.
From-SVN: r43585
2001-06-26 20:09:27 +02:00
|
|
|
``Target Hook'' with a prototype. Many macros will change in future
|
|
|
|
from being defined in the @file{.h} file to being part of the
|
2001-07-09 00:39:06 +02:00
|
|
|
@code{targetm} structure.
|
Makefile.in (TARGET_H, [...]): New.
* Makefile.in (TARGET_H, TARGET_DEF_H): New.
(c-decl.o, tree.o, c-typeck.o, $(out_object_file)): Update.
* c-decl.c (duplicate_decls): Use function pointer.
* c-typeck.c (common_type): Similarly.
* tree.c (valid_machine_attribute): Similarly.
(merge_machine_type_attributes): Rename merge_type_attributes.
(merge_machine_decl_attributes): Rename merge_decl_attributes.
(merge_dllimport_decl_attributes): New function.
* tree.h (merge_machine_type_attributes): Rename merge_type_attributes.
(merge_machine_decl_attributes): Rename merge_decl_attributes.
(merge_dllimport_decl_attributes): New prototype.
* target.h: New.
* target-def.h: New.
doc: (Joseph Myers)
* doc/gcc.texi, doc/tm.texi: Update documentation.
cp: Make-lang.in: Update dependencies.
* spew.c: Include target.h.
(duplicate_decls): Call target function.
* decl2.c: include target.h
(import_export_class): Use existence of target function pointer.
* typeck.c: Include target.h.
(qualify_type_recursive): Rename variable. Call target function.
(type_after_usual_arithmetic_conversions): Similarly.
(common_type): Similarly.
config: * 1750a/1750a.c, a29k/29k.c, alpha/alpha.c, arc/arc.c, arm/arm.c,
avr/avr.c, c4x/c4x.c, clipper/clipper.c, convex/convex.c,
d30v/d30v.c, dsp16xx/dsp16xx.c, elxsi/elxsi.c, fr30/fr30.c,
i370/i370.c, i386/i386.c, i860/i860.c, i960/i960.c, ia64/ia64.c,
m32r/m32r.c, m68hc11/m68hc11.c, m68k/m68k.c, m88k/m88k.c,
mips/mips.c, mn10200/mn10200.c, mn10300/mn10300.c, ns32k/ns32k.c,
pa/pa.c, pdp11/pdp11.c, pj/pj.c, romp/romp.c, rs6000/rs6000.c,
sh/sh.c, sparc/sparc.c, v850/v850.c, vax/vax.c, we32k/we32k.c)
: Include target.h and target-def.h. Define target.
* arc/arc-protos.h (arc_valid_machine_decl_attribute): Remove.
* arc/arc.c (arc_valid_machine_decl_attribute): Rename
arc_valid_decl_attribute, make static.
* arc/arc.h (VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* arm/arm-protos.h (arm_valid_machine_decl_attribute,
arm_valid_type_attribute_p, arm_pe_valid_machine_decl_attribute,
arm_pe_merge_machine_decl_attributes): Remove.
* arm/arm.c (arm_valid_machine_decl_attribute_p): Rename
arm_valid_decl_attribute_p, make static.
(arm_pe_valid_decl_attribute_p): Move from pe.c.
* arm/pe.c (arm_pe_valid_machine_decl_attribute_p): Move to arm.c.
(arm_pe_merge_machine_decl_attributes): Move to tree.c.
* arm/arm.h (VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* arm/coff.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove.
* arm/elf.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove.
* arm/pe.h (TARGET_DLLIMPORT_DECL_ATTRIBUTES): New.
(VALID_MACHINE_TYPE_ATTRIBUTE, VALID_MACHINE_DECL_ATTRIBUTE): Remove.
* avr/avr-protos.h (valid_machine_type_attribute,
valid_machine_decl_attribute): Remove.
* avr/avr.c (valid_machine_type_attribute,
valid_machine_decl_attribute): Rename and make static.
* avr/avr.h (VALID_MACHINE_TYPE_ATTRIBUTE,
VALID_MACHINE_DECL_ATTRIBUTE): Remove.
* c4x/c4x-protos.h (c4x_valid_type_attribute_p): Remove.
* c4x/c4x.c (c4x_valid_type_attribute_p): Make static.
* c4x/c4x.h (VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* d30v/d30v.h: Remove obsolete comments.
* h8300/h8300-protos.h (h8300_valid_machine_decl_attribute): Remove.
* h8300/h8300.c (h8300_valid_machine_decl_attribute): Rename, make
static.
* h8300/h8300.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove.
* i386/cygwin.h (TARGET_DLLIMPORT_DECL_ATTRIBUTES): Define.
(i386_pe_merge_decl_attributes, MERGE_MACHINE_DECL_ATTRIBUTES,
i386_pe_valid_type_attributes_p): Remove.
* i386/i386-protos.h (ix86_valid_decl_attribute_p,
ix86_valid_type_attribute_p): Remove.
* i386/i386.c (ix86_valid_decl_attribute_p): Remove.
(ix86_valid_type_attribute_p): Make static.
* i386/i386.h (VALID_MACHINE_DECL_ATTRIBUTE,
VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* i386/winnt.c (i386_pe_merge_decl_attributes): Move to tree.c.
* ia64/ia64-protos.h (ia64_valid_type_attribute): Remove.
* ia64/ia64.c (ia64_valid_type_attribute): Make static.
* ia64/ia64.h (VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* m32r/m32r-protos.h (m32r_valid_machine_decl_attribute): Remove.
* m32r/m32r.c (m32r_valid_decl_attribute): Make static.
* m32r/m32r.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove.
* m68hc11/m68hc11-protos.h (m68hc11_valid_decl_attribute_p,
m68hc11_valid_type_attribute_p): Remove.
* m68hc11/m68hc11.c (m68hc11_valid_decl_attribute_p): Remove.
(m68hc11_valid_type_attribute_p): Make static.
* m68hc11/m68hc11.h (VALID_MACHINE_DECL_ATTRIBUTE,
VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* mcore/mcore-protos.h (mcore_valid_machine_decl_attribute,
mcore_merge_machine_decl_attribute): Remove.
* mcore/mcore.c (mcore_valid_machine_decl_attribute): Rename,
make static.
(mcore_merge_machine_decl_attributes): Move to tree.c.
* mcore/mcore.h (VALID_MACHINE_DECL_ATTRIBUTE,
VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
(TARGET_DLLIMPORT_DECL_ATTRIBUTES): Define.
* ns32k/ns32k-protos.h (ns32k_valid_decl_attribute_p,
ns32k_valid_type_attribute_p): Remove.
* ns32k/ns32k.c (ns32k_valid_decl_attribute_p): Remove.
(ns32k_valid_type_attribute_p): Make static.
* ns32k/ns32k.h (VALID_MACHINE_DECL_ATTRIBUTE,
VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* rs6000/rs6000-protos.h (rs6000_valid_decl_attribute_p,
rs6000_valid_type_attribute_p): Remove.
* rs6000/rs6000.c (rs6000_valid_decl_attribute_p): Remove.
(rs6000_valid_type_attribute_p): Make static.
* rs6000/rs6000.h (VALID_MACHINE_DECL_ATTRIBUTE,
VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
* sh/sh-protos.h (sh_valid_machine_decl_attribute): Remove.
* sh/sh.c (sh_valid_machine_decl_attribute): Rename, make static.
* sh/sh.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove.
* v850/v850-protos.h (v850_valid_machine_decl_attribute): Remove.
* v850/v850.c (v850_valid_machine_decl_attribute): Rename, make static.
* v850/v850.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove.
From-SVN: r43585
2001-06-26 20:09:27 +02:00
|
|
|
|
1996-09-25 01:21:45 +02:00
|
|
|
@node Driver
|
|
|
|
@section Controlling the Compilation Driver, @file{gcc}
|
|
|
|
@cindex driver
|
|
|
|
@cindex controlling the compilation driver
|
|
|
|
|
|
|
|
@c prevent bad page break with this line
|
|
|
|
You can control the compilation driver.
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac SWITCH_TAKES_ARG (@var{char})
|
c-tree.texi, [...]: Use more logical markup.
* doc/c-tree.texi, doc/contrib.texi, doc/extend.texi,
doc/gcc.texi, doc/gcov.texi, doc/install-old.texi,
doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: Use more
logical markup. Use TeX quotes and dashes. Use @dots{} and
@minus{}. Avoid spaces inside @var. Update last modification
date in gcc.texi.
* doc/gcc.1, doc/gcov.1: Regenerate.
From-SVN: r43369
2001-06-14 13:08:04 +02:00
|
|
|
A C expression which determines whether the option @option{-@var{char}}
|
1996-09-25 01:21:45 +02:00
|
|
|
takes arguments. The value should be the number of arguments that
|
|
|
|
option takes--zero, for many options.
|
|
|
|
|
|
|
|
By default, this macro is defined as
|
|
|
|
@code{DEFAULT_SWITCH_TAKES_ARG}, which handles the standard options
|
|
|
|
properly. You need not define @code{SWITCH_TAKES_ARG} unless you
|
|
|
|
wish to add additional options which take arguments. Any redefinition
|
|
|
|
should call @code{DEFAULT_SWITCH_TAKES_ARG} and then check for
|
|
|
|
additional options.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac WORD_SWITCH_TAKES_ARG (@var{name})
|
c-tree.texi, [...]: Use more logical markup.
* doc/c-tree.texi, doc/contrib.texi, doc/extend.texi,
doc/gcc.texi, doc/gcov.texi, doc/install-old.texi,
doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: Use more
logical markup. Use TeX quotes and dashes. Use @dots{} and
@minus{}. Avoid spaces inside @var. Update last modification
date in gcc.texi.
* doc/gcc.1, doc/gcov.1: Regenerate.
From-SVN: r43369
2001-06-14 13:08:04 +02:00
|
|
|
A C expression which determines whether the option @option{-@var{name}}
|
1996-09-25 01:21:45 +02:00
|
|
|
takes arguments. The value should be the number of arguments that
|
|
|
|
option takes--zero, for many options. This macro rather than
|
|
|
|
@code{SWITCH_TAKES_ARG} is used for multi-character option names.
|
|
|
|
|
|
|
|
By default, this macro is defined as
|
|
|
|
@code{DEFAULT_WORD_SWITCH_TAKES_ARG}, which handles the standard options
|
|
|
|
properly. You need not define @code{WORD_SWITCH_TAKES_ARG} unless you
|
|
|
|
wish to add additional options which take arguments. Any redefinition
|
|
|
|
should call @code{DEFAULT_WORD_SWITCH_TAKES_ARG} and then check for
|
|
|
|
additional options.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac SWITCH_CURTAILS_COMPILATION (@var{char})
|
c-tree.texi, [...]: Use more logical markup.
* doc/c-tree.texi, doc/contrib.texi, doc/extend.texi,
doc/gcc.texi, doc/gcov.texi, doc/install-old.texi,
doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: Use more
logical markup. Use TeX quotes and dashes. Use @dots{} and
@minus{}. Avoid spaces inside @var. Update last modification
date in gcc.texi.
* doc/gcc.1, doc/gcov.1: Regenerate.
From-SVN: r43369
2001-06-14 13:08:04 +02:00
|
|
|
A C expression which determines whether the option @option{-@var{char}}
|
1998-05-18 01:08:40 +02:00
|
|
|
stops compilation before the generation of an executable. The value is
|
2001-10-10 01:11:55 +02:00
|
|
|
boolean, nonzero if the option does stop an executable from being
|
1998-05-18 01:08:40 +02:00
|
|
|
generated, zero otherwise.
|
|
|
|
|
|
|
|
By default, this macro is defined as
|
|
|
|
@code{DEFAULT_SWITCH_CURTAILS_COMPILATION}, which handles the standard
|
|
|
|
options properly. You need not define
|
|
|
|
@code{SWITCH_CURTAILS_COMPILATION} unless you wish to add additional
|
|
|
|
options which affect the generation of an executable. Any redefinition
|
|
|
|
should call @code{DEFAULT_SWITCH_CURTAILS_COMPILATION} and then check
|
|
|
|
for additional options.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1998-05-18 01:08:40 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac SWITCHES_NEED_SPACES
|
1996-09-25 01:21:45 +02:00
|
|
|
A string-valued C expression which enumerates the options for which
|
|
|
|
the linker needs a space between the option and its argument.
|
|
|
|
|
|
|
|
If this macro is not defined, the default value is @code{""}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac TARGET_OPTION_TRANSLATE_TABLE
|
2001-07-05 22:09:34 +02:00
|
|
|
If defined, a list of pairs of strings, the first of which is a
|
|
|
|
potential command line target to the @file{gcc} driver program, and the
|
|
|
|
second of which is a space-separated (tabs and other whitespace are not
|
|
|
|
supported) list of options with which to replace the first option. The
|
|
|
|
target defining this list is responsible for assuring that the results
|
|
|
|
are valid. Replacement options may not be the @code{--opt} style, they
|
|
|
|
must be the @code{-opt} style. It is the intention of this macro to
|
|
|
|
provide a mechanism for substitution that affects the multilibs chosen,
|
|
|
|
such as one option that enables many options, some of which select
|
compat.texi, [...]: Use @option around options.
* doc/compat.texi, doc/cpp.texi, doc/cppopts.texi,
doc/extend.texi, doc/install.texi, doc/invoke.texi,
doc/sourcebuild.texi, doc/tm.texi, doc/tree-ssa.texi,
doc/trouble.texi: Use @option around options.
From-SVN: r87635
2004-09-17 10:22:53 +02:00
|
|
|
multilibs. Example nonsensical definition, where @option{-malt-abi},
|
|
|
|
@option{-EB}, and @option{-mspoo} cause different multilibs to be chosen:
|
2001-07-05 22:09:34 +02:00
|
|
|
|
2002-09-04 19:35:59 +02:00
|
|
|
@smallexample
|
2001-07-05 22:09:34 +02:00
|
|
|
#define TARGET_OPTION_TRANSLATE_TABLE \
|
|
|
|
@{ "-fast", "-march=fast-foo -malt-abi -I/usr/fast-foo" @}, \
|
|
|
|
@{ "-compat", "-EB -malign=4 -mspoo" @}
|
2002-09-04 19:35:59 +02:00
|
|
|
@end smallexample
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2001-07-05 22:09:34 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac DRIVER_SELF_SPECS
|
2002-10-14 09:15:39 +02:00
|
|
|
A list of specs for the driver itself. It should be a suitable
|
|
|
|
initializer for an array of strings, with no surrounding braces.
|
|
|
|
|
2003-01-19 14:04:24 +01:00
|
|
|
The driver applies these specs to its own command line between loading
|
|
|
|
default @file{specs} files (but not command-line specified ones) and
|
|
|
|
choosing the multilib directory or running any subcommands. It
|
|
|
|
applies them in the order given, so each spec can depend on the
|
|
|
|
options added by earlier ones. It is also possible to remove options
|
|
|
|
using @samp{%<@var{option}} in the usual way.
|
2002-10-14 09:15:39 +02:00
|
|
|
|
|
|
|
This macro can be useful when a port has several interdependent target
|
|
|
|
options. It provides a way of standardizing the command line so
|
|
|
|
that the other specs are easier to write.
|
|
|
|
|
|
|
|
Do not define this macro if it does not need to do anything.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2002-10-14 09:15:39 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac OPTION_DEFAULT_SPECS
|
config.gcc: Reorganize --with-cpu logic.
* config.gcc: Reorganize --with-cpu logic. Set
configure_default_options according to the default CPU, --with-cpu,
--with-arch, --with-tune, --with-schedule, --with-abi, and
--with-float. Check for legal values of various options.
* configure.in: Define configure_default_options in configargs.h.
* configure: Regenerated.
* config/mips/mips.h (TARGET_DEFAULT_ARCH_P)
(TARGET_DEFAULT_FLOAT_P): New macros.
* gcc.c (do_option_spec): New function.
(struct default_spec, option_default_specs): New.
(main): Call do_option_spec.
* config/alpha/alpha.h, config/arm/arm.h, config/i386/i386.h,
config/mips/mips.h, config/pa/pa.h, config/rs6000/rs6000.h,
config/sparc/sparc.h (OPTION_DEFAULT_SPECS): Define.
* doc/install.texi: Update --with-cpu documentation. Mention
--with-arch, --with-schedule, --with-tune, --with-abi, and
--with-float.
* doc/tm.texi (Driver): Document OPTION_DEFAULT_SPECS.
From-SVN: r67457
2003-06-04 19:50:44 +02:00
|
|
|
A list of specs used to support configure-time default options (i.e.@:
|
|
|
|
@option{--with} options) in the driver. It should be a suitable initializer
|
|
|
|
for an array of structures, each containing two strings, without the
|
|
|
|
outermost pair of surrounding braces.
|
|
|
|
|
|
|
|
The first item in the pair is the name of the default. This must match
|
|
|
|
the code in @file{config.gcc} for the target. The second item is a spec
|
|
|
|
to apply if a default with this name was specified. The string
|
|
|
|
@samp{%(VALUE)} in the spec will be replaced by the value of the default
|
|
|
|
everywhere it occurs.
|
|
|
|
|
|
|
|
The driver will apply these specs to its own command line between loading
|
|
|
|
default @file{specs} files and processing @code{DRIVER_SELF_SPECS}, using
|
|
|
|
the same mechanism as @code{DRIVER_SELF_SPECS}.
|
|
|
|
|
|
|
|
Do not define this macro if it does not need to do anything.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
config.gcc: Reorganize --with-cpu logic.
* config.gcc: Reorganize --with-cpu logic. Set
configure_default_options according to the default CPU, --with-cpu,
--with-arch, --with-tune, --with-schedule, --with-abi, and
--with-float. Check for legal values of various options.
* configure.in: Define configure_default_options in configargs.h.
* configure: Regenerated.
* config/mips/mips.h (TARGET_DEFAULT_ARCH_P)
(TARGET_DEFAULT_FLOAT_P): New macros.
* gcc.c (do_option_spec): New function.
(struct default_spec, option_default_specs): New.
(main): Call do_option_spec.
* config/alpha/alpha.h, config/arm/arm.h, config/i386/i386.h,
config/mips/mips.h, config/pa/pa.h, config/rs6000/rs6000.h,
config/sparc/sparc.h (OPTION_DEFAULT_SPECS): Define.
* doc/install.texi: Update --with-cpu documentation. Mention
--with-arch, --with-schedule, --with-tune, --with-abi, and
--with-float.
* doc/tm.texi (Driver): Document OPTION_DEFAULT_SPECS.
From-SVN: r67457
2003-06-04 19:50:44 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac CPP_SPEC
|
1999-08-25 09:27:13 +02:00
|
|
|
A C string constant that tells the GCC driver program options to
|
c-tree.texi, [...]: Replace . at end of sentences preceded by a capital letter with @..
* doc/c-tree.texi, doc/contrib.texi, doc/cpp.texi,
doc/cppinternals.texi, doc/extend.texi, doc/gcc.texi,
doc/gcov.texi, doc/install-old.texi, doc/install.texi,
doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: Replace
. at end of sentences preceded by a capital letter with @..
From-SVN: r43611
2001-06-27 17:04:16 +02:00
|
|
|
pass to CPP@. It can also specify how to translate options you
|
|
|
|
give to GCC into options for GCC to pass to the CPP@.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
Do not define this macro if it does not need to do anything.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac CPLUSPLUS_CPP_SPEC
|
2001-02-07 19:58:07 +01:00
|
|
|
This macro is just like @code{CPP_SPEC}, but is used for C++, rather
|
c-tree.texi, [...]: Replace . at end of sentences preceded by a capital letter with @..
* doc/c-tree.texi, doc/contrib.texi, doc/cpp.texi,
doc/cppinternals.texi, doc/extend.texi, doc/gcc.texi,
doc/gcov.texi, doc/install-old.texi, doc/install.texi,
doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: Replace
. at end of sentences preceded by a capital letter with @..
From-SVN: r43611
2001-06-27 17:04:16 +02:00
|
|
|
than C@. If you do not define this macro, then the value of
|
2001-02-07 19:58:07 +01:00
|
|
|
@code{CPP_SPEC} (if any) will be used instead.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2001-02-07 19:58:07 +01:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac CC1_SPEC
|
1999-08-25 09:27:13 +02:00
|
|
|
A C string constant that tells the GCC driver program options to
|
1999-09-14 08:52:41 +02:00
|
|
|
pass to @code{cc1}, @code{cc1plus}, @code{f771}, and the other language
|
|
|
|
front ends.
|
1999-08-25 09:27:13 +02:00
|
|
|
It can also specify how to translate options you give to GCC into options
|
c-tree.texi, [...]: Use more logical markup.
* doc/c-tree.texi, doc/contrib.texi, doc/extend.texi,
doc/gcc.texi, doc/gcov.texi, doc/install-old.texi,
doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: Use more
logical markup. Use TeX quotes and dashes. Use @dots{} and
@minus{}. Avoid spaces inside @var. Update last modification
date in gcc.texi.
* doc/gcc.1, doc/gcov.1: Regenerate.
From-SVN: r43369
2001-06-14 13:08:04 +02:00
|
|
|
for GCC to pass to front ends.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
Do not define this macro if it does not need to do anything.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac CC1PLUS_SPEC
|
1999-08-25 09:27:13 +02:00
|
|
|
A C string constant that tells the GCC driver program options to
|
1996-09-25 01:21:45 +02:00
|
|
|
pass to @code{cc1plus}. It can also specify how to translate options you
|
1999-08-25 09:27:13 +02:00
|
|
|
give to GCC into options for GCC to pass to the @code{cc1plus}.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
Do not define this macro if it does not need to do anything.
|
1999-10-28 11:34:40 +02:00
|
|
|
Note that everything defined in CC1_SPEC is already passed to
|
|
|
|
@code{cc1plus} so there is no need to duplicate the contents of
|
c-tree.texi, [...]: Replace . at end of sentences preceded by a capital letter with @..
* doc/c-tree.texi, doc/contrib.texi, doc/cpp.texi,
doc/cppinternals.texi, doc/extend.texi, doc/gcc.texi,
doc/gcov.texi, doc/install-old.texi, doc/install.texi,
doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: Replace
. at end of sentences preceded by a capital letter with @..
From-SVN: r43611
2001-06-27 17:04:16 +02:00
|
|
|
CC1_SPEC in CC1PLUS_SPEC@.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ASM_SPEC
|
1999-08-25 09:27:13 +02:00
|
|
|
A C string constant that tells the GCC driver program options to
|
1996-09-25 01:21:45 +02:00
|
|
|
pass to the assembler. It can also specify how to translate options
|
1999-08-25 09:27:13 +02:00
|
|
|
you give to GCC into options for GCC to pass to the assembler.
|
1996-09-25 01:21:45 +02:00
|
|
|
See the file @file{sun3.h} for an example of this.
|
|
|
|
|
|
|
|
Do not define this macro if it does not need to do anything.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ASM_FINAL_SPEC
|
1999-08-25 09:27:13 +02:00
|
|
|
A C string constant that tells the GCC driver program how to
|
1996-09-25 01:21:45 +02:00
|
|
|
run any programs which cleanup after the normal assembler.
|
|
|
|
Normally, this is not needed. See the file @file{mips.h} for
|
|
|
|
an example of this.
|
|
|
|
|
|
|
|
Do not define this macro if it does not need to do anything.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac AS_NEEDS_DASH_FOR_PIPED_INPUT
|
2002-12-16 19:23:00 +01:00
|
|
|
Define this macro, with no value, if the driver should give the assembler
|
|
|
|
an argument consisting of a single dash, @option{-}, to instruct it to
|
|
|
|
read from its standard input (which will be a pipe connected to the
|
|
|
|
output of the compiler proper). This argument is given after any
|
|
|
|
@option{-o} option specifying the name of the output file.
|
|
|
|
|
|
|
|
If you do not define this macro, the assembler is assumed to read its
|
|
|
|
standard input if given no non-option arguments. If your assembler
|
|
|
|
cannot read standard input at all, use a @samp{%@{pipe:%e@}} construct;
|
|
|
|
see @file{mips.h} for instance.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2002-12-16 19:23:00 +01:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac LINK_SPEC
|
1999-08-25 09:27:13 +02:00
|
|
|
A C string constant that tells the GCC driver program options to
|
1996-09-25 01:21:45 +02:00
|
|
|
pass to the linker. It can also specify how to translate options you
|
1999-08-25 09:27:13 +02:00
|
|
|
give to GCC into options for GCC to pass to the linker.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
Do not define this macro if it does not need to do anything.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac LIB_SPEC
|
1996-09-25 01:21:45 +02:00
|
|
|
Another C string constant used much like @code{LINK_SPEC}. The difference
|
|
|
|
between the two is that @code{LIB_SPEC} is used at the end of the
|
|
|
|
command given to the linker.
|
|
|
|
|
|
|
|
If this macro is not defined, a default is provided that
|
|
|
|
loads the standard C library from the usual place. See @file{gcc.c}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac LIBGCC_SPEC
|
1999-08-25 09:27:13 +02:00
|
|
|
Another C string constant that tells the GCC driver program
|
1996-09-25 01:21:45 +02:00
|
|
|
how and when to place a reference to @file{libgcc.a} into the
|
|
|
|
linker command line. This constant is placed both before and after
|
|
|
|
the value of @code{LIB_SPEC}.
|
|
|
|
|
1999-08-25 09:27:13 +02:00
|
|
|
If this macro is not defined, the GCC driver provides a default that
|
c-tree.texi, [...]: Use more logical markup.
* doc/c-tree.texi, doc/contrib.texi, doc/extend.texi,
doc/gcc.texi, doc/gcov.texi, doc/install-old.texi,
doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: Use more
logical markup. Use TeX quotes and dashes. Use @dots{} and
@minus{}. Avoid spaces inside @var. Update last modification
date in gcc.texi.
* doc/gcc.1, doc/gcov.1: Regenerate.
From-SVN: r43369
2001-06-14 13:08:04 +02:00
|
|
|
passes the string @option{-lgcc} to the linker.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2004-02-19 06:52:38 +01:00
|
|
|
@defmac REAL_LIBGCC_SPEC
|
|
|
|
By default, if @code{ENABLE_SHARED_LIBGCC} is defined, the
|
|
|
|
@code{LIBGCC_SPEC} is not directly used by the driver program but is
|
|
|
|
instead modified to refer to different versions of @file{libgcc.a}
|
compat.texi, [...]: Use @option around options.
* doc/compat.texi, doc/cpp.texi, doc/cppopts.texi,
doc/extend.texi, doc/install.texi, doc/invoke.texi,
doc/sourcebuild.texi, doc/tm.texi, doc/tree-ssa.texi,
doc/trouble.texi: Use @option around options.
From-SVN: r87635
2004-09-17 10:22:53 +02:00
|
|
|
depending on the values of the command line flags @option{-static},
|
|
|
|
@option{-shared}, @option{-static-libgcc}, and @option{-shared-libgcc}. On
|
2004-02-19 06:52:38 +01:00
|
|
|
targets where these modifications are inappropriate, define
|
|
|
|
@code{REAL_LIBGCC_SPEC} instead. @code{REAL_LIBGCC_SPEC} tells the
|
|
|
|
driver how to place a reference to @file{libgcc} on the link command
|
|
|
|
line, but, unlike @code{LIBGCC_SPEC}, it is used unmodified.
|
|
|
|
@end defmac
|
|
|
|
|
2004-10-06 02:54:01 +02:00
|
|
|
@defmac USE_LD_AS_NEEDED
|
|
|
|
A macro that controls the modifications to @code{LIBGCC_SPEC}
|
|
|
|
mentioned in @code{REAL_LIBGCC_SPEC}. If nonzero, a spec will be
|
|
|
|
generated that uses --as-needed and the shared libgcc in place of the
|
|
|
|
static exception handler library, when linking without any of
|
|
|
|
@code{-static}, @code{-static-libgcc}, or @code{-shared-libgcc}.
|
|
|
|
@end defmac
|
|
|
|
|
|
|
|
@defmac LINK_EH_SPEC
|
|
|
|
If defined, this C string constant is added to @code{LINK_SPEC}.
|
|
|
|
When @code{USE_LD_AS_NEEDED} is zero or undefined, it also affects
|
|
|
|
the modifications to @code{LIBGCC_SPEC} mentioned in
|
|
|
|
@code{REAL_LIBGCC_SPEC}.
|
|
|
|
@end defmac
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac STARTFILE_SPEC
|
1996-09-25 01:21:45 +02:00
|
|
|
Another C string constant used much like @code{LINK_SPEC}. The
|
|
|
|
difference between the two is that @code{STARTFILE_SPEC} is used at
|
|
|
|
the very beginning of the command given to the linker.
|
|
|
|
|
|
|
|
If this macro is not defined, a default is provided that loads the
|
|
|
|
standard C startup file from the usual place. See @file{gcc.c}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ENDFILE_SPEC
|
1996-09-25 01:21:45 +02:00
|
|
|
Another C string constant used much like @code{LINK_SPEC}. The
|
|
|
|
difference between the two is that @code{ENDFILE_SPEC} is used at
|
|
|
|
the very end of the command given to the linker.
|
|
|
|
|
|
|
|
Do not define this macro if it does not need to do anything.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac THREAD_MODEL_SPEC
|
2001-05-14 00:17:02 +02:00
|
|
|
GCC @code{-v} will print the thread model GCC was configured to use.
|
|
|
|
However, this doesn't work on platforms that are multilibbed on thread
|
|
|
|
models, such as AIX 4.3. On such platforms, define
|
|
|
|
@code{THREAD_MODEL_SPEC} such that it evaluates to a string without
|
|
|
|
blanks that names one of the recognized thread models. @code{%*}, the
|
|
|
|
default value of this macro, will expand to the value of
|
|
|
|
@code{thread_file} set in @file{config.gcc}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2001-05-14 00:17:02 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac SYSROOT_SUFFIX_SPEC
|
2003-10-10 23:28:56 +02:00
|
|
|
Define this macro to add a suffix to the target sysroot when GCC is
|
|
|
|
configured with a sysroot. This will cause GCC to search for usr/lib,
|
|
|
|
et al, within sysroot+suffix.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2003-06-19 22:18:22 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac SYSROOT_HEADERS_SUFFIX_SPEC
|
2003-10-10 23:28:56 +02:00
|
|
|
Define this macro to add a headers_suffix to the target sysroot when
|
|
|
|
GCC is configured with a sysroot. This will cause GCC to pass the
|
2003-11-27 12:24:42 +01:00
|
|
|
updated sysroot+headers_suffix to CPP, causing it to search for
|
2003-06-19 22:18:22 +02:00
|
|
|
usr/include, et al, within sysroot+headers_suffix.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2003-06-19 22:18:22 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac EXTRA_SPECS
|
1996-09-25 01:21:45 +02:00
|
|
|
Define this macro to provide additional specifications to put in the
|
|
|
|
@file{specs} file that can be used in various specifications like
|
|
|
|
@code{CC1_SPEC}.
|
|
|
|
|
|
|
|
The definition should be an initializer for an array of structures,
|
|
|
|
containing a string constant, that defines the specification name, and a
|
|
|
|
string constant that provides the specification.
|
|
|
|
|
|
|
|
Do not define this macro if it does not need to do anything.
|
|
|
|
|
|
|
|
@code{EXTRA_SPECS} is useful when an architecture contains several
|
c-tree.texi, [...]: Use more logical markup.
* doc/c-tree.texi, doc/contrib.texi, doc/extend.texi,
doc/gcc.texi, doc/gcov.texi, doc/install-old.texi,
doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: Use more
logical markup. Use TeX quotes and dashes. Use @dots{} and
@minus{}. Avoid spaces inside @var. Update last modification
date in gcc.texi.
* doc/gcc.1, doc/gcov.1: Regenerate.
From-SVN: r43369
2001-06-14 13:08:04 +02:00
|
|
|
related targets, which have various @code{@dots{}_SPECS} which are similar
|
1996-09-25 01:21:45 +02:00
|
|
|
to each other, and the maintainer would like one central place to keep
|
|
|
|
these definitions.
|
|
|
|
|
|
|
|
For example, the PowerPC System V.4 targets use @code{EXTRA_SPECS} to
|
|
|
|
define either @code{_CALL_SYSV} when the System V calling sequence is
|
|
|
|
used or @code{_CALL_AIX} when the older AIX-based calling sequence is
|
|
|
|
used.
|
|
|
|
|
|
|
|
The @file{config/rs6000/rs6000.h} target file defines:
|
|
|
|
|
c-tree.texi, [...]: Use @smallexample instead of @example.
* doc/c-tree.texi, doc/compat.texi, doc/cpp.texi,
doc/cppopts.texi, doc/extend.texi, doc/install.texi,
doc/interface.texi, doc/invoke.texi, doc/libgcc.texi, doc/md.texi,
doc/objc.texi, doc/rtl.texi, doc/tm.texi, doc/trouble.texi: Use
@smallexample instead of @example.
From-SVN: r76075
2004-01-18 02:20:48 +01:00
|
|
|
@smallexample
|
1996-09-25 01:21:45 +02:00
|
|
|
#define EXTRA_SPECS \
|
|
|
|
@{ "cpp_sysv_default", CPP_SYSV_DEFAULT @},
|
|
|
|
|
|
|
|
#define CPP_SYS_DEFAULT ""
|
c-tree.texi, [...]: Use @smallexample instead of @example.
* doc/c-tree.texi, doc/compat.texi, doc/cpp.texi,
doc/cppopts.texi, doc/extend.texi, doc/install.texi,
doc/interface.texi, doc/invoke.texi, doc/libgcc.texi, doc/md.texi,
doc/objc.texi, doc/rtl.texi, doc/tm.texi, doc/trouble.texi: Use
@smallexample instead of @example.
From-SVN: r76075
2004-01-18 02:20:48 +01:00
|
|
|
@end smallexample
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
The @file{config/rs6000/sysv.h} target file defines:
|
|
|
|
@smallexample
|
|
|
|
#undef CPP_SPEC
|
|
|
|
#define CPP_SPEC \
|
|
|
|
"%@{posix: -D_POSIX_SOURCE @} \
|
config-ml.in: Remove support for --disable-aix removing call-aix multilibs.
config/rs6000/sysv4.h (SUBTARGET_OVERRIDE_OPTIONS): Delete support for
-mcall-aix switch.
config/rs6000/eabiaix.h: Delete.
config/rs6000/rs6000.h (rs6000_abi): Remove ABI_AIX_NODESC.
(RS6000_REG_SAVE, RS6000_SAVE_AREA, FP_ARGS_MAX_REG, RETURN_ADDRESS_OFFSET):
Remove use of ABI_AIX_NODESC.
config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Likewise.
config/rs6000/rs6000.c (print_operand, rs6000_stack_info, debug_stack_info,
output_function_profiler, rs6000_trampoline_size,
rs6000_initialise_trampoline): Likewise.
config/rs6000/rs6000.md (call, call_value, call_nonlocal_sysv,
call_indirect_nonlocal_sysv, call_value_indirect_nonlocal_sysv,
call_value_nonlocal_sysv, sibcall_value_nonlocal_sysv, sibcall_nonlocal_sysv,
sibcall_value_local64): Likewise.
config/rs6000/t-ppcgas (MULTILIB_OPTIONS): Remove mcall-aix multilibs.
(MULTILIB_DIRNAMES): Remove mcall-aix directories.
(MULTILIB_EXCEPTIONS): Delete.
(MULTILIB_MATCHES): Remove mcall-aix matches.
doc/fragments.texi: Replace -mcall-aix example with an ARM one.
doc/install.texi: Delete powerpc-*-eabiaix target.
doc/invoke.texi: Remove documentation of mcall-aix switch.
doc/tm.texi: Remove mcall-aix from example CPP_SPEC.
config.gcc: Delete powerpc-*-eabiaix target.
From-SVN: r65546
2003-04-13 18:59:45 +02:00
|
|
|
%@{mcall-sysv: -D_CALL_SYSV @} \
|
|
|
|
%@{!mcall-sysv: %(cpp_sysv_default) @} \
|
1996-09-25 01:21:45 +02:00
|
|
|
%@{msoft-float: -D_SOFT_FLOAT@} %@{mcpu=403: -D_SOFT_FLOAT@}"
|
|
|
|
|
|
|
|
#undef CPP_SYSV_DEFAULT
|
|
|
|
#define CPP_SYSV_DEFAULT "-D_CALL_SYSV"
|
|
|
|
@end smallexample
|
|
|
|
|
|
|
|
while the @file{config/rs6000/eabiaix.h} target file defines
|
|
|
|
@code{CPP_SYSV_DEFAULT} as:
|
|
|
|
|
|
|
|
@smallexample
|
|
|
|
#undef CPP_SYSV_DEFAULT
|
|
|
|
#define CPP_SYSV_DEFAULT "-D_CALL_AIX"
|
|
|
|
@end smallexample
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac LINK_LIBGCC_SPECIAL
|
1996-09-25 01:21:45 +02:00
|
|
|
Define this macro if the driver program should find the library
|
c-tree.texi, [...]: Use more logical markup.
* doc/c-tree.texi, doc/contrib.texi, doc/extend.texi,
doc/gcc.texi, doc/gcov.texi, doc/install-old.texi,
doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: Use more
logical markup. Use TeX quotes and dashes. Use @dots{} and
@minus{}. Avoid spaces inside @var. Update last modification
date in gcc.texi.
* doc/gcc.1, doc/gcov.1: Regenerate.
From-SVN: r43369
2001-06-14 13:08:04 +02:00
|
|
|
@file{libgcc.a} itself and should not pass @option{-L} options to the
|
1996-09-25 01:21:45 +02:00
|
|
|
linker. If you do not define this macro, the driver program will pass
|
c-tree.texi, [...]: Use more logical markup.
* doc/c-tree.texi, doc/contrib.texi, doc/extend.texi,
doc/gcc.texi, doc/gcov.texi, doc/install-old.texi,
doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: Use more
logical markup. Use TeX quotes and dashes. Use @dots{} and
@minus{}. Avoid spaces inside @var. Update last modification
date in gcc.texi.
* doc/gcc.1, doc/gcov.1: Regenerate.
From-SVN: r43369
2001-06-14 13:08:04 +02:00
|
|
|
the argument @option{-lgcc} to tell the linker to do the search and will
|
|
|
|
pass @option{-L} options to it.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac LINK_LIBGCC_SPECIAL_1
|
1996-09-25 01:21:45 +02:00
|
|
|
Define this macro if the driver program should find the library
|
|
|
|
@file{libgcc.a}. If you do not define this macro, the driver program will pass
|
c-tree.texi, [...]: Use more logical markup.
* doc/c-tree.texi, doc/contrib.texi, doc/extend.texi,
doc/gcc.texi, doc/gcov.texi, doc/install-old.texi,
doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: Use more
logical markup. Use TeX quotes and dashes. Use @dots{} and
@minus{}. Avoid spaces inside @var. Update last modification
date in gcc.texi.
* doc/gcc.1, doc/gcov.1: Regenerate.
From-SVN: r43369
2001-06-14 13:08:04 +02:00
|
|
|
the argument @option{-lgcc} to tell the linker to do the search.
|
1996-09-25 01:21:45 +02:00
|
|
|
This macro is similar to @code{LINK_LIBGCC_SPECIAL}, except that it does
|
c-tree.texi, [...]: Use more logical markup.
* doc/c-tree.texi, doc/contrib.texi, doc/extend.texi,
doc/gcc.texi, doc/gcov.texi, doc/install-old.texi,
doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: Use more
logical markup. Use TeX quotes and dashes. Use @dots{} and
@minus{}. Avoid spaces inside @var. Update last modification
date in gcc.texi.
* doc/gcc.1, doc/gcov.1: Regenerate.
From-SVN: r43369
2001-06-14 13:08:04 +02:00
|
|
|
not affect @option{-L} options.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac LINK_GCC_C_SEQUENCE_SPEC
|
2002-04-04 03:15:40 +02:00
|
|
|
The sequence in which libgcc and libc are specified to the linker.
|
|
|
|
By default this is @code{%G %L %G}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2002-04-04 03:15:40 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac LINK_COMMAND_SPEC
|
1998-06-29 23:40:49 +02:00
|
|
|
A C string constant giving the complete command line need to execute the
|
|
|
|
linker. When you do this, you will need to update your port each time a
|
|
|
|
change is made to the link command line within @file{gcc.c}. Therefore,
|
|
|
|
define this macro only if you need to completely redefine the command
|
|
|
|
line for invoking the linker and there is no other way to accomplish
|
2002-04-04 03:15:40 +02:00
|
|
|
the effect you need. Overriding this macro may be avoidable by overriding
|
|
|
|
@code{LINK_GCC_C_SEQUENCE_SPEC} instead.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1998-06-29 23:40:49 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac LINK_ELIMINATE_DUPLICATE_LDIRECTORIES
|
2001-08-10 00:33:35 +02:00
|
|
|
A nonzero value causes @command{collect2} to remove duplicate @option{-L@var{directory}} search
|
2001-04-27 21:59:53 +02:00
|
|
|
directories from linking commands. Do not give it a nonzero value if
|
|
|
|
removing duplicate search directories changes the linker's semantics.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2001-04-27 21:59:53 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac MULTILIB_DEFAULTS
|
1996-09-25 01:21:45 +02:00
|
|
|
Define this macro as a C expression for the initializer of an array of
|
|
|
|
string to tell the driver program which options are defaults for this
|
|
|
|
target and thus do not need to be handled specially when using
|
|
|
|
@code{MULTILIB_OPTIONS}.
|
|
|
|
|
|
|
|
Do not define this macro if @code{MULTILIB_OPTIONS} is not defined in
|
|
|
|
the target makefile fragment or if none of the options listed in
|
|
|
|
@code{MULTILIB_OPTIONS} are set by default.
|
|
|
|
@xref{Target Fragment}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac RELATIVE_PREFIX_NOT_LINKDIR
|
2003-01-24 16:57:41 +01:00
|
|
|
Define this macro to tell @command{gcc} that it should only translate
|
c-tree.texi, [...]: Use more logical markup.
* doc/c-tree.texi, doc/contrib.texi, doc/extend.texi,
doc/gcc.texi, doc/gcov.texi, doc/install-old.texi,
doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: Use more
logical markup. Use TeX quotes and dashes. Use @dots{} and
@minus{}. Avoid spaces inside @var. Update last modification
date in gcc.texi.
* doc/gcc.1, doc/gcov.1: Regenerate.
From-SVN: r43369
2001-06-14 13:08:04 +02:00
|
|
|
a @option{-B} prefix into a @option{-L} linker option if the prefix
|
1996-09-25 01:21:45 +02:00
|
|
|
indicates an absolute file name.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac MD_EXEC_PREFIX
|
1996-09-25 01:21:45 +02:00
|
|
|
If defined, this macro is an additional prefix to try after
|
|
|
|
@code{STANDARD_EXEC_PREFIX}. @code{MD_EXEC_PREFIX} is not searched
|
c-tree.texi, [...]: Use more logical markup.
* doc/c-tree.texi, doc/contrib.texi, doc/extend.texi,
doc/gcc.texi, doc/gcov.texi, doc/install-old.texi,
doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: Use more
logical markup. Use TeX quotes and dashes. Use @dots{} and
@minus{}. Avoid spaces inside @var. Update last modification
date in gcc.texi.
* doc/gcc.1, doc/gcov.1: Regenerate.
From-SVN: r43369
2001-06-14 13:08:04 +02:00
|
|
|
when the @option{-b} option is used, or the compiler is built as a cross
|
1999-05-31 04:56:40 +02:00
|
|
|
compiler. If you define @code{MD_EXEC_PREFIX}, then be sure to add it
|
|
|
|
to the list of directories used to find the assembler in @file{configure.in}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac STANDARD_STARTFILE_PREFIX
|
1996-09-25 01:21:45 +02:00
|
|
|
Define this macro as a C string constant if you wish to override the
|
2003-08-28 02:39:32 +02:00
|
|
|
standard choice of @code{libdir} as the default prefix to
|
1996-09-25 01:21:45 +02:00
|
|
|
try when searching for startup files such as @file{crt0.o}.
|
2003-08-28 02:39:32 +02:00
|
|
|
@code{STANDARD_STARTFILE_PREFIX} is not searched when the compiler
|
|
|
|
is built as a cross compiler.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2004-07-02 01:55:22 +02:00
|
|
|
@defmac STANDARD_STARTFILE_PREFIX_1
|
|
|
|
Define this macro as a C string constant if you wish to override the
|
|
|
|
standard choice of @code{/lib} as a prefix to try after the default prefix
|
|
|
|
when searching for startup files such as @file{crt0.o}.
|
|
|
|
@code{STANDARD_STARTFILE_PREFIX_1} is not searched when the compiler
|
|
|
|
is built as a cross compiler.
|
|
|
|
@end defmac
|
|
|
|
|
|
|
|
@defmac STANDARD_STARTFILE_PREFIX_2
|
|
|
|
Define this macro as a C string constant if you wish to override the
|
|
|
|
standard choice of @code{/lib} as yet another prefix to try after the
|
|
|
|
default prefix when searching for startup files such as @file{crt0.o}.
|
|
|
|
@code{STANDARD_STARTFILE_PREFIX_2} is not searched when the compiler
|
|
|
|
is built as a cross compiler.
|
|
|
|
@end defmac
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac MD_STARTFILE_PREFIX
|
1996-09-25 01:21:45 +02:00
|
|
|
If defined, this macro supplies an additional prefix to try after the
|
|
|
|
standard prefixes. @code{MD_EXEC_PREFIX} is not searched when the
|
c-tree.texi, [...]: Use more logical markup.
* doc/c-tree.texi, doc/contrib.texi, doc/extend.texi,
doc/gcc.texi, doc/gcov.texi, doc/install-old.texi,
doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: Use more
logical markup. Use TeX quotes and dashes. Use @dots{} and
@minus{}. Avoid spaces inside @var. Update last modification
date in gcc.texi.
* doc/gcc.1, doc/gcov.1: Regenerate.
From-SVN: r43369
2001-06-14 13:08:04 +02:00
|
|
|
@option{-b} option is used, or when the compiler is built as a cross
|
1996-09-25 01:21:45 +02:00
|
|
|
compiler.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac MD_STARTFILE_PREFIX_1
|
1996-09-25 01:21:45 +02:00
|
|
|
If defined, this macro supplies yet another prefix to try after the
|
c-tree.texi, [...]: Use more logical markup.
* doc/c-tree.texi, doc/contrib.texi, doc/extend.texi,
doc/gcc.texi, doc/gcov.texi, doc/install-old.texi,
doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: Use more
logical markup. Use TeX quotes and dashes. Use @dots{} and
@minus{}. Avoid spaces inside @var. Update last modification
date in gcc.texi.
* doc/gcc.1, doc/gcov.1: Regenerate.
From-SVN: r43369
2001-06-14 13:08:04 +02:00
|
|
|
standard prefixes. It is not searched when the @option{-b} option is
|
1996-09-25 01:21:45 +02:00
|
|
|
used, or when the compiler is built as a cross compiler.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac INIT_ENVIRONMENT
|
1997-11-02 22:19:36 +01:00
|
|
|
Define this macro as a C string constant if you wish to set environment
|
1996-09-25 01:21:45 +02:00
|
|
|
variables for programs called by the driver, such as the assembler and
|
|
|
|
loader. The driver passes the value of this macro to @code{putenv} to
|
|
|
|
initialize the necessary environment variables.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac LOCAL_INCLUDE_DIR
|
1996-09-25 01:21:45 +02:00
|
|
|
Define this macro as a C string constant if you wish to override the
|
|
|
|
standard choice of @file{/usr/local/include} as the default prefix to
|
|
|
|
try when searching for local header files. @code{LOCAL_INCLUDE_DIR}
|
|
|
|
comes before @code{SYSTEM_INCLUDE_DIR} in the search order.
|
|
|
|
|
haifa-sched.c: Convert to target hooks.
* haifa-sched.c: Convert to target hooks. Macros replaced
are ISSUE_RATE, ADJUST_COST, ADJUST_PRIORITY, MD_SCHED_INIT,
MD_SCHED_REORDER, MD_SCHED_REORDER2, MD_SCHED_VARIABLE_ISSUE,
MD_SCHED_FINISH, and HAVE_cycle_display.
* target-def.h (TARGET_SCHED_ADJUST_COST,
TARGET_SCHED_ADJUST_PRIORITY, TARGET_SCHED_ISSUE_RATE,
TARGET_SCHED_VARIABLE_ISSUE, TARGET_SCHED_INIT,
TARGET_SCHED_FINISH, TARGET_SCHED_REORDER,
TARGET_SCHED_REORDER2, TARGET_SCHED_CYCLE_DISPLAY):
New hook #defines to be overridden.
(TARGET_SCHED): Bring them all together.
(TARGET_INITIALIZER): Update.
* target.h: Don't forward declare struct rtx_def. Use 'rtx'
instead of 'struct rtx_def *' throughout.
(struct sched): New set of hooks for the scheduler.
* Makefile.in (haifa-sched.o): Depend on target.h.
* doc/tm.texi: Document the new scheduler hooks, together in
their own section, instead of scattered around.
Fix a bunch of underfull/overfull hboxes.
* a29k.h, alpha.h, arm.h, c4x.h, convex.h, d30v.h, i386.h,
ia64.h, m32r.h, m88k.h, mips.h, pa.h, rs6000.h, s390.h, sh.h,
sparc.h: Don't define any of the old scheduler macros.
* a29k.c, alpha.c, arm.c, c4x.c, convex.c, d30v.c, i386.c,
ia64.c, m32r.c, m88k.c, mips.c, pa.c, rs6000.c, s390.c, sh.c,
sparc.c: Create hook functions from code extracted from
corresponding target header, or make existing hooks static, as
appropriate. Set the appropriate entries in targetm.
* alpha-protos.h, arm-protos.h, c4x-protos.h, d30v-protos.h,
i386-protos.h, ia64-protos.h, m32r-protos.h, pa-protos.h,
rs6000-protos.h, s390-protos.h, sparc-protos.h:
Remove prototypes for functions which are now static.
* d30v.h, d30v.c, m32r.h, m32r.c: Remove #ifdef HAIFA and
related gunk; the Haifa scheduler is now the only choice.
From-SVN: r45009
2001-08-18 22:25:54 +02:00
|
|
|
Cross compilers do not search either @file{/usr/local/include} or its
|
|
|
|
replacement.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac MODIFY_TARGET_NAME
|
|
|
|
Define this macro if you wish to define command-line switches that
|
|
|
|
modify the default target name.
|
2000-09-20 22:06:55 +02:00
|
|
|
|
|
|
|
For each switch, you can include a string to be appended to the first
|
|
|
|
part of the configuration name or a string to be deleted from the
|
|
|
|
configuration name, if present. The definition should be an initializer
|
|
|
|
for an array of structures. Each array element should have three
|
|
|
|
elements: the switch name (a string constant, including the initial
|
|
|
|
dash), one of the enumeration codes @code{ADD} or @code{DELETE} to
|
|
|
|
indicate whether the string should be inserted or deleted, and the string
|
|
|
|
to be inserted or deleted (a string constant).
|
|
|
|
|
|
|
|
For example, on a machine where @samp{64} at the end of the
|
c-tree.texi, [...]: Use more logical markup.
* doc/c-tree.texi, doc/contrib.texi, doc/extend.texi,
doc/gcc.texi, doc/gcov.texi, doc/install-old.texi,
doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: Use more
logical markup. Use TeX quotes and dashes. Use @dots{} and
@minus{}. Avoid spaces inside @var. Update last modification
date in gcc.texi.
* doc/gcc.1, doc/gcov.1: Regenerate.
From-SVN: r43369
2001-06-14 13:08:04 +02:00
|
|
|
configuration name denotes a 64-bit target and you want the @option{-32}
|
|
|
|
and @option{-64} switches to select between 32- and 64-bit targets, you would
|
2000-09-20 22:06:55 +02:00
|
|
|
code
|
|
|
|
|
|
|
|
@smallexample
|
|
|
|
#define MODIFY_TARGET_NAME \
|
|
|
|
@{ @{ "-32", DELETE, "64"@}, \
|
|
|
|
@{"-64", ADD, "64"@}@}
|
|
|
|
@end smallexample
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2000-09-20 22:06:55 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac SYSTEM_INCLUDE_DIR
|
1996-09-25 01:21:45 +02:00
|
|
|
Define this macro as a C string constant if you wish to specify a
|
|
|
|
system-specific directory to search for header files before the standard
|
|
|
|
directory. @code{SYSTEM_INCLUDE_DIR} comes before
|
|
|
|
@code{STANDARD_INCLUDE_DIR} in the search order.
|
|
|
|
|
|
|
|
Cross compilers do not use this macro and do not search the directory
|
|
|
|
specified.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac STANDARD_INCLUDE_DIR
|
1996-09-25 01:21:45 +02:00
|
|
|
Define this macro as a C string constant if you wish to override the
|
|
|
|
standard choice of @file{/usr/include} as the default prefix to
|
|
|
|
try when searching for header files.
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
Cross compilers ignore this macro and do not search either
|
1996-09-25 01:21:45 +02:00
|
|
|
@file{/usr/include} or its replacement.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac STANDARD_INCLUDE_COMPONENT
|
1997-11-02 22:19:36 +01:00
|
|
|
The ``component'' corresponding to @code{STANDARD_INCLUDE_DIR}.
|
|
|
|
See @code{INCLUDE_DEFAULTS}, below, for the description of components.
|
|
|
|
If you do not define this macro, no component is used.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1997-11-02 22:19:36 +01:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac INCLUDE_DEFAULTS
|
1996-09-25 01:21:45 +02:00
|
|
|
Define this macro if you wish to override the entire default search path
|
1997-11-02 22:19:36 +01:00
|
|
|
for include files. For a native compiler, the default search path
|
|
|
|
usually consists of @code{GCC_INCLUDE_DIR}, @code{LOCAL_INCLUDE_DIR},
|
1996-09-25 01:21:45 +02:00
|
|
|
@code{SYSTEM_INCLUDE_DIR}, @code{GPLUSPLUS_INCLUDE_DIR}, and
|
|
|
|
@code{STANDARD_INCLUDE_DIR}. In addition, @code{GPLUSPLUS_INCLUDE_DIR}
|
|
|
|
and @code{GCC_INCLUDE_DIR} are defined automatically by @file{Makefile},
|
c-tree.texi, [...]: Replace . at end of sentences preceded by a capital letter with @..
* doc/c-tree.texi, doc/contrib.texi, doc/cpp.texi,
doc/cppinternals.texi, doc/extend.texi, doc/gcc.texi,
doc/gcov.texi, doc/install-old.texi, doc/install.texi,
doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: Replace
. at end of sentences preceded by a capital letter with @..
From-SVN: r43611
2001-06-27 17:04:16 +02:00
|
|
|
and specify private search areas for GCC@. The directory
|
1996-09-25 01:21:45 +02:00
|
|
|
@code{GPLUSPLUS_INCLUDE_DIR} is used only for C++ programs.
|
|
|
|
|
|
|
|
The definition should be an initializer for an array of structures.
|
1997-11-02 22:19:36 +01:00
|
|
|
Each array element should have four elements: the directory name (a
|
2000-03-19 13:32:32 +01:00
|
|
|
string constant), the component name (also a string constant), a flag
|
|
|
|
for C++-only directories,
|
1997-11-02 22:19:36 +01:00
|
|
|
and a flag showing that the includes in the directory don't need to be
|
|
|
|
wrapped in @code{extern @samp{C}} when compiling C++. Mark the end of
|
|
|
|
the array with a null element.
|
|
|
|
|
|
|
|
The component name denotes what GNU package the include file is part of,
|
2003-07-31 03:32:24 +02:00
|
|
|
if any, in all uppercase letters. For example, it might be @samp{GCC}
|
2000-03-19 13:32:32 +01:00
|
|
|
or @samp{BINUTILS}. If the package is part of a vendor-supplied
|
1997-11-02 22:19:36 +01:00
|
|
|
operating system, code the component name as @samp{0}.
|
|
|
|
|
|
|
|
For example, here is the definition used for VAX/VMS:
|
1996-09-25 01:21:45 +02:00
|
|
|
|
c-tree.texi, [...]: Use @smallexample instead of @example.
* doc/c-tree.texi, doc/compat.texi, doc/cpp.texi,
doc/cppopts.texi, doc/extend.texi, doc/install.texi,
doc/interface.texi, doc/invoke.texi, doc/libgcc.texi, doc/md.texi,
doc/objc.texi, doc/rtl.texi, doc/tm.texi, doc/trouble.texi: Use
@smallexample instead of @example.
From-SVN: r76075
2004-01-18 02:20:48 +01:00
|
|
|
@smallexample
|
1996-09-25 01:21:45 +02:00
|
|
|
#define INCLUDE_DEFAULTS \
|
|
|
|
@{ \
|
1997-11-02 22:19:36 +01:00
|
|
|
@{ "GNU_GXX_INCLUDE:", "G++", 1, 1@}, \
|
|
|
|
@{ "GNU_CC_INCLUDE:", "GCC", 0, 0@}, \
|
|
|
|
@{ "SYS$SYSROOT:[SYSLIB.]", 0, 0, 0@}, \
|
|
|
|
@{ ".", 0, 0, 0@}, \
|
|
|
|
@{ 0, 0, 0, 0@} \
|
1996-09-25 01:21:45 +02:00
|
|
|
@}
|
c-tree.texi, [...]: Use @smallexample instead of @example.
* doc/c-tree.texi, doc/compat.texi, doc/cpp.texi,
doc/cppopts.texi, doc/extend.texi, doc/install.texi,
doc/interface.texi, doc/invoke.texi, doc/libgcc.texi, doc/md.texi,
doc/objc.texi, doc/rtl.texi, doc/tm.texi, doc/trouble.texi: Use
@smallexample instead of @example.
From-SVN: r76075
2004-01-18 02:20:48 +01:00
|
|
|
@end smallexample
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
Here is the order of prefixes tried for exec files:
|
|
|
|
|
|
|
|
@enumerate
|
|
|
|
@item
|
c-tree.texi, [...]: Use more logical markup.
* doc/c-tree.texi, doc/contrib.texi, doc/extend.texi,
doc/gcc.texi, doc/gcov.texi, doc/install-old.texi,
doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: Use more
logical markup. Use TeX quotes and dashes. Use @dots{} and
@minus{}. Avoid spaces inside @var. Update last modification
date in gcc.texi.
* doc/gcc.1, doc/gcov.1: Regenerate.
From-SVN: r43369
2001-06-14 13:08:04 +02:00
|
|
|
Any prefixes specified by the user with @option{-B}.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
@item
|
|
|
|
The environment variable @code{GCC_EXEC_PREFIX}, if any.
|
|
|
|
|
|
|
|
@item
|
|
|
|
The directories specified by the environment variable @code{COMPILER_PATH}.
|
|
|
|
|
|
|
|
@item
|
|
|
|
The macro @code{STANDARD_EXEC_PREFIX}.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@file{/usr/lib/gcc/}.
|
|
|
|
|
|
|
|
@item
|
|
|
|
The macro @code{MD_EXEC_PREFIX}, if any.
|
|
|
|
@end enumerate
|
|
|
|
|
|
|
|
Here is the order of prefixes tried for startfiles:
|
|
|
|
|
|
|
|
@enumerate
|
|
|
|
@item
|
c-tree.texi, [...]: Use more logical markup.
* doc/c-tree.texi, doc/contrib.texi, doc/extend.texi,
doc/gcc.texi, doc/gcov.texi, doc/install-old.texi,
doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: Use more
logical markup. Use TeX quotes and dashes. Use @dots{} and
@minus{}. Avoid spaces inside @var. Update last modification
date in gcc.texi.
* doc/gcc.1, doc/gcov.1: Regenerate.
From-SVN: r43369
2001-06-14 13:08:04 +02:00
|
|
|
Any prefixes specified by the user with @option{-B}.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
@item
|
|
|
|
The environment variable @code{GCC_EXEC_PREFIX}, if any.
|
|
|
|
|
|
|
|
@item
|
|
|
|
The directories specified by the environment variable @code{LIBRARY_PATH}
|
configure.in (i?86-*-beos{pe,elf,}*): Recognize.
* configure.in (i?86-*-beos{pe,elf,}*): Recognize.
* i386/t-beos, i386/x-beos, i386/xm-beos.h: New files.
* i386/beos-elf.h, i386/beos-pe.h: New files.
* Makefile.in (CROSS_SYSTEM_HEADER_DIR): New.
* cross-make (SYSTEM_HEADER_DIR): Define using
CROSS_SYSTEM_HEADER_DIR.
* gcc.c (LIBRARY_PATH_ENV): Provide default.
(process_command): Use it.
(main): Likewise. Kill trailing = from env vars.
(build_search_list): Put it back.
* collect2.c (main): Use LIBRARY_PATH_ENV.
* configure.in (GCC_NEED_DECLARATIONS): Add environ.
* toplev.c: Use NEED_DECLARATION_ENVIRON.
* tm.texi (Frame Layout): Document SMALL_STACK.
* c-common.c (c_common_nodes_and_builtins): Check it.
* system.h: Undef alloca after including glibc's <stdlib.h>,
if USE_C_ALLOCA is defined.
* gcc.c (set_input): New fn.
(main): After all input files are compiled, reset the input file
info to the first.
* aclocal.m4 (rindex, index): If already defined, don't attempt
to redefine.
* ginclude/varargs.h: (__va_list__): Define ifndef.
* ginclude/stdarg.h: Likewise.
* ginclude/stddef.h (__WCHAR_TYPE__) [BEOS]: Use int
instead of unsigned char.
* hash.h (true, false, boolean): Undef before enum.
From-SVN: r31366
2000-01-13 01:37:06 +01:00
|
|
|
(or port-specific name; native only, cross compilers do not use this).
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
@item
|
|
|
|
The macro @code{STANDARD_EXEC_PREFIX}.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@file{/usr/lib/gcc/}.
|
|
|
|
|
|
|
|
@item
|
|
|
|
The macro @code{MD_EXEC_PREFIX}, if any.
|
|
|
|
|
|
|
|
@item
|
|
|
|
The macro @code{MD_STARTFILE_PREFIX}, if any.
|
|
|
|
|
|
|
|
@item
|
|
|
|
The macro @code{STANDARD_STARTFILE_PREFIX}.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@file{/lib/}.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@file{/usr/lib/}.
|
|
|
|
@end enumerate
|
|
|
|
|
|
|
|
@node Run-time Target
|
|
|
|
@section Run-time Target Specification
|
|
|
|
@cindex run-time target specification
|
|
|
|
@cindex predefined macros
|
|
|
|
@cindex target specifications
|
|
|
|
|
|
|
|
@c prevent bad page break with this line
|
|
|
|
Here are run-time target specifications.
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac TARGET_CPU_CPP_BUILTINS ()
|
Makefile.in (c-common.o, cppinit.o): Update.
* Makefile.in (c-common.o, cppinit.o): Update.
* c-common.c: Include except.h.
(cb_register_builtins): Handle __USING_SJLJ_EXCEPTIONS__.
Call TARGET_CPU_CPP_BUILTINS and TARGET_OS_CPP_BUILTINS.
* cppinit.c (__USING_SJLJ_EXCEPTIONS): Not here.
* defaults.h (TARGET_OS_CPP_BUILTINS, TARGET_CPU_CPP_BUILTINS,
CPP_PREDEFINES): Handle here.
config:
* alpha/alpha-interix.h, alpha/gnu.h, alpha/linux.h,
alpha/netbsd.h, alpha/openbsd.h, alpha/osf.h, alpha/unicosmk.h,
alpha/vms.h, alpha/vxworks.h: Remove CPP_PREDEFINES, define
TARGET_OS_CPP_BUILTINS.
* alpha/alpha.h (TARGET_CPU_CPP_BUILTINS): Define.
(CPP_SPEC, EXTRA_SPECS): Update.
(CPP_AM_BWX_SPEC, CPP_AM_MAX_SPEC, CPP_AM_FIX_SPEC,
CPP_AM_CIX_SPEC, CPP_IM_EV4_SPEC, CPP_IM_EV5_SPEC,
CPP_IM_EV6_SPEC, CPP_CPU_EV4_SPEC, CPP_CPU_EV5_SPEC,
CPP_CPU_EV56_SPEC, CPP_CPU_PCA56_SPEC, CPP_CPU_EV6_SPEC,
CPP_CPU_EV67_SPEC, CPP_CPU_DEFAULT_SPEC, CPP_CPU_SPEC): Remove.
doc:
* tm.texi (TARGET_REGISTER_CPP_BUILTINS): Remove.
(TARGET_OS_CPP_BUILTINS, TARGET_CPU_CPP_BUILTINS): Define.
From-SVN: r53410
2002-05-13 07:57:38 +02:00
|
|
|
This function-like macro expands to a block of code that defines
|
|
|
|
built-in preprocessor macros and assertions for the target cpu, using
|
2002-05-22 00:26:18 +02:00
|
|
|
the functions @code{builtin_define}, @code{builtin_define_std} and
|
Makefile.in: Update.
* Makefile.in: Update.
* c-common.c: Don't include real.h or except.h.
(REGISTER_PREFIX): Remove.
(builtin_define_std, builtin_define_with_value,
builtin_define_with_int_value, builtin_define_with_hex_fp_value,
builtin_define_type_max, builtin_define_type_precision,
builtin_define_float_constants): Move to c-cppbuiltin.c.
(c_stddef_cpp_builtins): New.
* c-common.h (builtin_define_with_value, c_stddef_cpp_builtins): New.
* c-cppbuiltin.c: New, extracted from c-common.c.
(define__GNUC__): New.
* cppspec.c (lang_specific_driver): Remove support of -no-gcc.
* gcc.c: Remove support of %v1, %v2 and %v3 specs.
(cpp_unique_options): Don't support no-gcc.
(do_spec_1): Remove support of version specs.
* doc/invoke.texi: Remove documentation of %v1, %v2 and %v3.
* doc/passes.texi: Update.
* doc/tm.texi: Update.
cp:
* Make-lang.in (CXX_C_OBJS): Update.
* lang-specs.h: Don't define __GNUG__ here.
From-SVN: r64162
2003-03-11 07:42:21 +01:00
|
|
|
@code{builtin_assert}. When the front end
|
Makefile.in (c-common.o, cppinit.o): Update.
* Makefile.in (c-common.o, cppinit.o): Update.
* c-common.c: Include except.h.
(cb_register_builtins): Handle __USING_SJLJ_EXCEPTIONS__.
Call TARGET_CPU_CPP_BUILTINS and TARGET_OS_CPP_BUILTINS.
* cppinit.c (__USING_SJLJ_EXCEPTIONS): Not here.
* defaults.h (TARGET_OS_CPP_BUILTINS, TARGET_CPU_CPP_BUILTINS,
CPP_PREDEFINES): Handle here.
config:
* alpha/alpha-interix.h, alpha/gnu.h, alpha/linux.h,
alpha/netbsd.h, alpha/openbsd.h, alpha/osf.h, alpha/unicosmk.h,
alpha/vms.h, alpha/vxworks.h: Remove CPP_PREDEFINES, define
TARGET_OS_CPP_BUILTINS.
* alpha/alpha.h (TARGET_CPU_CPP_BUILTINS): Define.
(CPP_SPEC, EXTRA_SPECS): Update.
(CPP_AM_BWX_SPEC, CPP_AM_MAX_SPEC, CPP_AM_FIX_SPEC,
CPP_AM_CIX_SPEC, CPP_IM_EV4_SPEC, CPP_IM_EV5_SPEC,
CPP_IM_EV6_SPEC, CPP_CPU_EV4_SPEC, CPP_CPU_EV5_SPEC,
CPP_CPU_EV56_SPEC, CPP_CPU_PCA56_SPEC, CPP_CPU_EV6_SPEC,
CPP_CPU_EV67_SPEC, CPP_CPU_DEFAULT_SPEC, CPP_CPU_SPEC): Remove.
doc:
* tm.texi (TARGET_REGISTER_CPP_BUILTINS): Remove.
(TARGET_OS_CPP_BUILTINS, TARGET_CPU_CPP_BUILTINS): Define.
From-SVN: r53410
2002-05-13 07:57:38 +02:00
|
|
|
calls this macro it provides a trailing semicolon, and since it has
|
|
|
|
finished command line option processing your code can use those
|
|
|
|
results freely.
|
2002-05-10 00:48:36 +02:00
|
|
|
|
|
|
|
@code{builtin_assert} takes a string in the form you pass to the
|
|
|
|
command-line option @option{-A}, such as @code{cpu=mips}, and creates
|
2002-06-19 22:14:19 +02:00
|
|
|
the assertion. @code{builtin_define} takes a string in the form
|
2002-05-10 00:48:36 +02:00
|
|
|
accepted by option @option{-D} and unconditionally defines the macro.
|
|
|
|
|
2002-06-19 22:14:19 +02:00
|
|
|
@code{builtin_define_std} takes a string representing the name of an
|
2002-05-10 00:48:36 +02:00
|
|
|
object-like macro. If it doesn't lie in the user's namespace,
|
2002-06-19 22:14:19 +02:00
|
|
|
@code{builtin_define_std} defines it unconditionally. Otherwise, it
|
2002-05-10 00:48:36 +02:00
|
|
|
defines a version with two leading underscores, and another version
|
|
|
|
with two leading and trailing underscores, and defines the original
|
|
|
|
only if an ISO standard was not requested on the command line. For
|
|
|
|
example, passing @code{unix} defines @code{__unix}, @code{__unix__}
|
|
|
|
and possibly @code{unix}; passing @code{_mips} defines @code{__mips},
|
|
|
|
@code{__mips__} and possibly @code{_mips}, and passing @code{_ABI64}
|
|
|
|
defines only @code{_ABI64}.
|
|
|
|
|
2002-05-19 23:53:53 +02:00
|
|
|
You can also test for the C dialect being compiled. The variable
|
|
|
|
@code{c_language} is set to one of @code{clk_c}, @code{clk_cplusplus}
|
|
|
|
or @code{clk_objective_c}. Note that if we are preprocessing
|
|
|
|
assembler, this variable will be @code{clk_c} but the function-like
|
|
|
|
macro @code{preprocessing_asm_p()} will return true, so you might want
|
tm.texi (Run-time Target): Add comment about flag_iso and strict ANSI.
2002-06-11 Eric Christopher <echristo@redhat.com>
* doc/tm.texi (Run-time Target): Add comment about flag_iso
and strict ANSI.
* config/mips/ecoff.h (CPP_PREDEFINES): Remove.
* config/mips/ecoffl.h: Ditto.
* config/mips/elf64.h (SUBTARGET_CPP_SPEC): Remove.
(CPP_PREDEFINES): Ditto.
* config/mips/elfl64.h: Ditto.
* config/mips/elfl.h: Ditto.
* config/mips/iris3.h (CPP_PREDEFINES, SUBTARGET_CPP_SPEC): #if 0
out until irix header consolidation.
* config/mips/iris5.h (CPP_PREDEFINES, SUBTARGET_CPP_SPEC): Replace
with SUBTARGET_OS_CPP_BUILTINS.
* config/mips/iris6.h: Ditto.
(CPLUSPLUS_CPP_SPEC): Remove.
* config/mips/linux.h: Ditto.
* config/mips/netbsd.h: Ditto.
* config/mips/openbsd.h: Ditto.
* config/mips/rtems.h: Ditto.
* config/mips/rtems64.h: Ditto.
* config/mips/sni-svr4.h: Ditto.
* config/mips/mips.h (ISA_MIPS1, ISA_MIPS2, ISA_MIPS3, ISA_MIPS4,
ISA_MIPS32, ISA_MIPS64): New defines.
(GENERATE_MULT3_SI, HAVE_SQRT_P, ISA_HAS_64BIT_REGS,
ISA_HAS_BRANCHLIKELY, ISA_HAS_CONDMOVE, ISA_HAS_8CC, ISA_HAS_FP4,
ISA_HAS_COND_TRAP, ISA_HAS_MADD_MSUB, ISA_HAS_NMADD_NMSUB,
ISA_HAS_CLZ_CLO, ISA_HAS_DCLZ_DCLO): Use.
(TARGET_CPU_CPP_BUILTINS): Define.
(CPP_PREDEFINES, LONG_MAX_SPEC, CPP_FPR_SPEC, CPP_SPEC): Remove.
* config/mips/mips.md (mulsi3_mult3): Use ISA_MIPS32/64.
(movdicc): Remove check for ISA_MIPS32.
(bunordered, bordered, bungt, bunlt, buneq, bunge, bunle,
sunordered_df, sunordered_sf, sordered_df, sordered_sf,
sunlt_df, sunlt_sf, sungt_df, sungt_sf, suneq_df, suneq_sf, sunge_df,
sunge_sf, sunle_df, sunle_sf): New patterns.
From-SVN: r54493
2002-06-11 09:26:38 +02:00
|
|
|
to check for that first. If you need to check for strict ANSI, the
|
c-common.c (preprocessing_trad_p): Define.
* c-common.c (preprocessing_trad_p): Define.
* pa-hiux.h, pa-hpux.h, pa-hpux7.h (CPP_PREDEFINES): Delete.
(TARGET_OS_CPP_BUILTINS, SUBTARGET_SWITCHES): Define.
* pa-hpux10.h (TARGET_OS_CPP_BUILTINS, CPP_SPEC): Define.
* pa-hpux11.h (TARGET_OS_CPP_BUILTINS): Define.
* pa-linux.h (CPP_PREDEFINES): Delete.
(TARGET_OS_CPP_BUILTINS, CPP_SPEC): Define.
* pa32-linux.h, pa64-linux.h (CPP_SPEC): Delete.
* pa-osf.h, pa-pro-end.h, rtems.h (CPP_PREDEFINES): Delete.
(TARGET_OS_CPP_BUILTINS): Define.
* pa.h (MASK_SIO, TARGET_SIO, TARGET_PA_10): Define.
(TARGET_SWITCHES): Reformat. Use N_() macro. Add SUBTARGET_SWITCHES.
(SUBTARGET_SWITCHES): Provide default definition.
(TARGET_OPTIONS): Reformat. Use N_() macro.
(CPP_PA10_SPEC, CPP_PA11_SPEC, CPP_PA20_SPEC, CPP_64BIT_SPEC,
CPP_CPU_DEFAULT_SPEC, CPP_64BIT_DEFAULT_SPEC, SUBTARGET_EXTRA_SPECS,
EXTRA_SPECS, CPP_SPEC, CPLUSPLUS_CPP_SPEC, CPP_PREDEFINES): Delete.
(TARGET_CPU_CPP_BUILTINS): Define.
(TARGET_OS_CPP_BUILTINS): Define for BSD-like systems.
* doc/invoke.texi (msio, mwsio): Document new hppa options.
* doc/tm.texi (TARGET_CPU_CPP_BUILTINS): Document macro
preprocessing_trad_p().
From-SVN: r57416
2002-09-22 21:23:20 +02:00
|
|
|
variable @code{flag_iso} can be used. The function-like macro
|
|
|
|
@code{preprocessing_trad_p()} can be used to check for traditional
|
|
|
|
preprocessing.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2002-05-19 23:53:53 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac TARGET_OS_CPP_BUILTINS ()
|
Makefile.in (c-common.o, cppinit.o): Update.
* Makefile.in (c-common.o, cppinit.o): Update.
* c-common.c: Include except.h.
(cb_register_builtins): Handle __USING_SJLJ_EXCEPTIONS__.
Call TARGET_CPU_CPP_BUILTINS and TARGET_OS_CPP_BUILTINS.
* cppinit.c (__USING_SJLJ_EXCEPTIONS): Not here.
* defaults.h (TARGET_OS_CPP_BUILTINS, TARGET_CPU_CPP_BUILTINS,
CPP_PREDEFINES): Handle here.
config:
* alpha/alpha-interix.h, alpha/gnu.h, alpha/linux.h,
alpha/netbsd.h, alpha/openbsd.h, alpha/osf.h, alpha/unicosmk.h,
alpha/vms.h, alpha/vxworks.h: Remove CPP_PREDEFINES, define
TARGET_OS_CPP_BUILTINS.
* alpha/alpha.h (TARGET_CPU_CPP_BUILTINS): Define.
(CPP_SPEC, EXTRA_SPECS): Update.
(CPP_AM_BWX_SPEC, CPP_AM_MAX_SPEC, CPP_AM_FIX_SPEC,
CPP_AM_CIX_SPEC, CPP_IM_EV4_SPEC, CPP_IM_EV5_SPEC,
CPP_IM_EV6_SPEC, CPP_CPU_EV4_SPEC, CPP_CPU_EV5_SPEC,
CPP_CPU_EV56_SPEC, CPP_CPU_PCA56_SPEC, CPP_CPU_EV6_SPEC,
CPP_CPU_EV67_SPEC, CPP_CPU_DEFAULT_SPEC, CPP_CPU_SPEC): Remove.
doc:
* tm.texi (TARGET_REGISTER_CPP_BUILTINS): Remove.
(TARGET_OS_CPP_BUILTINS, TARGET_CPU_CPP_BUILTINS): Define.
From-SVN: r53410
2002-05-13 07:57:38 +02:00
|
|
|
Similarly to @code{TARGET_CPU_CPP_BUILTINS} but this macro is optional
|
|
|
|
and is used for the target operating system instead.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
Makefile.in (c-common.o, cppinit.o): Update.
* Makefile.in (c-common.o, cppinit.o): Update.
* c-common.c: Include except.h.
(cb_register_builtins): Handle __USING_SJLJ_EXCEPTIONS__.
Call TARGET_CPU_CPP_BUILTINS and TARGET_OS_CPP_BUILTINS.
* cppinit.c (__USING_SJLJ_EXCEPTIONS): Not here.
* defaults.h (TARGET_OS_CPP_BUILTINS, TARGET_CPU_CPP_BUILTINS,
CPP_PREDEFINES): Handle here.
config:
* alpha/alpha-interix.h, alpha/gnu.h, alpha/linux.h,
alpha/netbsd.h, alpha/openbsd.h, alpha/osf.h, alpha/unicosmk.h,
alpha/vms.h, alpha/vxworks.h: Remove CPP_PREDEFINES, define
TARGET_OS_CPP_BUILTINS.
* alpha/alpha.h (TARGET_CPU_CPP_BUILTINS): Define.
(CPP_SPEC, EXTRA_SPECS): Update.
(CPP_AM_BWX_SPEC, CPP_AM_MAX_SPEC, CPP_AM_FIX_SPEC,
CPP_AM_CIX_SPEC, CPP_IM_EV4_SPEC, CPP_IM_EV5_SPEC,
CPP_IM_EV6_SPEC, CPP_CPU_EV4_SPEC, CPP_CPU_EV5_SPEC,
CPP_CPU_EV56_SPEC, CPP_CPU_PCA56_SPEC, CPP_CPU_EV6_SPEC,
CPP_CPU_EV67_SPEC, CPP_CPU_DEFAULT_SPEC, CPP_CPU_SPEC): Remove.
doc:
* tm.texi (TARGET_REGISTER_CPP_BUILTINS): Remove.
(TARGET_OS_CPP_BUILTINS, TARGET_CPU_CPP_BUILTINS): Define.
From-SVN: r53410
2002-05-13 07:57:38 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac TARGET_OBJFMT_CPP_BUILTINS ()
|
c-cppbuiltin.c (TARGET_OS_CPP_BUILTINS, [...]): Default here.
* c-cppbuiltin.c (TARGET_OS_CPP_BUILTINS, TARGET_OBJFMT_CPP_BUILTINS):
Default here.
(c_cpp_builtins): Invoke TARGET_OBJFMT_CPP_BUILTINS().
* defaults.h: Don't default TARGET_OS_CPP_BUILTINS here.
* config/elfos.h (TARGET_OBJFMT_CPP_BUILTINS): Define __ELF__.
* config/freebsd-spec.h, config/netbsd-elf.h, config/alpha/gnu.h,
config/arm/linux-elf.h, config/arm/rtems-elf.h,
config/arm/unknown-elf.h, config/cris/cris.h, config/cris/linux.h,
config/h8300/elf.h, config/i370/linux.h, config/i386/beos-elf.h,
config/i386/gnu.h, config/i386/linux.h, config/i386/linux64.h,
config/i386/moss.h, config/i386/rtemself.h, config/ia64/ia64.h,
config/m68k/rtemself.h, config/mcore/mcore-elf.h, config/mips/linux.h,
config/pa/pa-linux.h, config/rs6000/linux.h, config/rs6000/linux64.h,
config/rs6000/sysv4.h, config/rs6000/vxworks.h, config/s390/linux.h,
config/sh/coff.h, config/sh/elf.h, config/sh/rtemself.h,
config/sh/sh.h, config/sparc/linux.h, config/sparc/linux64.h,
config/sparc/openbsd64.h, config/sparc/sp64-elf.h,
config/sparc/sp86x-elf.h, config/xtensa/elf.h, config/xtensa/linux.h:
Don't define __ELF__.
* config/alpha.h, config/m68k/linux.h (TARGET_OBJFMT_CPP_BUILTINS):
Define __ELF__.
* doc/cpp.texi: Document __ELF__.
* doc/tm.texi: Document TARGET_OBJFMT_CPP_BUILTINS.
From-SVN: r66926
2003-05-18 11:46:23 +02:00
|
|
|
Similarly to @code{TARGET_CPU_CPP_BUILTINS} but this macro is optional
|
|
|
|
and is used for the target object format. @file{elfos.h} uses this
|
|
|
|
macro to define @code{__ELF__}, so you probably do not need to define
|
|
|
|
it yourself.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
c-cppbuiltin.c (TARGET_OS_CPP_BUILTINS, [...]): Default here.
* c-cppbuiltin.c (TARGET_OS_CPP_BUILTINS, TARGET_OBJFMT_CPP_BUILTINS):
Default here.
(c_cpp_builtins): Invoke TARGET_OBJFMT_CPP_BUILTINS().
* defaults.h: Don't default TARGET_OS_CPP_BUILTINS here.
* config/elfos.h (TARGET_OBJFMT_CPP_BUILTINS): Define __ELF__.
* config/freebsd-spec.h, config/netbsd-elf.h, config/alpha/gnu.h,
config/arm/linux-elf.h, config/arm/rtems-elf.h,
config/arm/unknown-elf.h, config/cris/cris.h, config/cris/linux.h,
config/h8300/elf.h, config/i370/linux.h, config/i386/beos-elf.h,
config/i386/gnu.h, config/i386/linux.h, config/i386/linux64.h,
config/i386/moss.h, config/i386/rtemself.h, config/ia64/ia64.h,
config/m68k/rtemself.h, config/mcore/mcore-elf.h, config/mips/linux.h,
config/pa/pa-linux.h, config/rs6000/linux.h, config/rs6000/linux64.h,
config/rs6000/sysv4.h, config/rs6000/vxworks.h, config/s390/linux.h,
config/sh/coff.h, config/sh/elf.h, config/sh/rtemself.h,
config/sh/sh.h, config/sparc/linux.h, config/sparc/linux64.h,
config/sparc/openbsd64.h, config/sparc/sp64-elf.h,
config/sparc/sp86x-elf.h, config/xtensa/elf.h, config/xtensa/linux.h:
Don't define __ELF__.
* config/alpha.h, config/m68k/linux.h (TARGET_OBJFMT_CPP_BUILTINS):
Define __ELF__.
* doc/cpp.texi: Document __ELF__.
* doc/tm.texi: Document TARGET_OBJFMT_CPP_BUILTINS.
From-SVN: r66926
2003-05-18 11:46:23 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@deftypevar {extern int} target_flags
|
1996-09-25 01:21:45 +02:00
|
|
|
This declaration should be present.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end deftypevar
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
@cindex optional hardware or system features
|
|
|
|
@cindex features, optional, in system conventions
|
2003-06-20 08:41:12 +02:00
|
|
|
|
|
|
|
@defmac TARGET_@var{featurename}
|
1996-09-25 01:21:45 +02:00
|
|
|
This series of macros is to allow compiler command arguments to
|
|
|
|
enable or disable the use of optional features of the target machine.
|
|
|
|
For example, one machine description serves both the 68000 and
|
|
|
|
the 68020; a command argument tells the compiler whether it should
|
|
|
|
use 68020-only instructions or not. This command argument works
|
|
|
|
by means of a macro @code{TARGET_68020} that tests a bit in
|
|
|
|
@code{target_flags}.
|
|
|
|
|
|
|
|
Define a macro @code{TARGET_@var{featurename}} for each such option.
|
2000-03-19 13:32:32 +01:00
|
|
|
Its definition should test a bit in @code{target_flags}. It is
|
2003-06-20 08:41:12 +02:00
|
|
|
recommended that a helper macro @code{MASK_@var{featurename}}
|
2000-03-19 13:32:32 +01:00
|
|
|
is defined for each bit-value to test, and used in
|
|
|
|
@code{TARGET_@var{featurename}} and @code{TARGET_SWITCHES}. For
|
|
|
|
example:
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
@smallexample
|
2000-03-19 13:32:32 +01:00
|
|
|
#define TARGET_MASK_68020 1
|
2003-06-20 08:41:12 +02:00
|
|
|
#define TARGET_68020 (target_flags & MASK_68020)
|
1996-09-25 01:21:45 +02:00
|
|
|
@end smallexample
|
|
|
|
|
|
|
|
One place where these macros are used is in the condition-expressions
|
|
|
|
of instruction patterns. Note how @code{TARGET_68020} appears
|
|
|
|
frequently in the 68000 machine description file, @file{m68k.md}.
|
|
|
|
Another place they are used is in the definitions of the other
|
|
|
|
macros in the @file{@var{machine}.h} file.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac TARGET_SWITCHES
|
1996-09-25 01:21:45 +02:00
|
|
|
This macro defines names of command options to set and clear
|
|
|
|
bits in @code{target_flags}. Its definition is an initializer
|
|
|
|
with a subgrouping for each command option.
|
|
|
|
|
|
|
|
Each subgrouping contains a string constant, that defines the option
|
1998-07-13 19:20:29 +02:00
|
|
|
name, a number, which contains the bits to set in
|
|
|
|
@code{target_flags}, and a second string which is the description
|
2001-06-07 18:41:27 +02:00
|
|
|
displayed by @option{--help}. If the number is negative then the bits specified
|
1998-07-13 19:20:29 +02:00
|
|
|
by the number are cleared instead of being set. If the description
|
|
|
|
string is present but empty, then no help information will be displayed
|
|
|
|
for that option, but it will not count as an undocumented option. The
|
|
|
|
actual option name is made by appending @samp{-m} to the specified name.
|
2001-06-07 18:41:27 +02:00
|
|
|
Non-empty description strings should be marked with @code{N_(@dots{})} for
|
2002-02-17 15:55:10 +01:00
|
|
|
@command{xgettext}. Please do not mark empty strings because the empty
|
c-tree.texi, [...]: Correct end-of-sentence markup and markup of "etc.", "e.g." and "i.e.".
* doc/c-tree.texi, doc/cfg.texi, doc/contrib.texi, doc/cpp.texi,
doc/cppopts.texi, doc/extend.texi, doc/fragments.texi,
doc/frontends.texi, doc/gcov.texi, doc/hostconfig.texi,
doc/implement-c.texi, doc/install.texi, doc/invoke.texi,
doc/libgcc.texi, doc/md.texi, doc/passes.texi,
doc/portability.texi, doc/rtl.texi, doc/sourcebuild.texi,
doc/standards.texi, doc/tm.texi, doc/tree-ssa.texi,
doc/trouble.texi: Correct end-of-sentence markup and markup of
"etc.", "e.g." and "i.e.". Use @code in various places where
appropriate.
From-SVN: r90101
2004-11-05 02:36:57 +01:00
|
|
|
string is reserved by GNU gettext. @code{gettext("")} returns the header entry
|
2002-02-17 15:55:10 +01:00
|
|
|
of the message catalog with meta information, not the empty string.
|
|
|
|
|
|
|
|
In addition to the description for @option{--help},
|
2001-06-07 18:41:27 +02:00
|
|
|
more detailed documentation for each option should be added to
|
|
|
|
@file{invoke.texi}.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
One of the subgroupings should have a null string. The number in
|
|
|
|
this grouping is the default value for @code{target_flags}. Any
|
|
|
|
target options act starting with that value.
|
|
|
|
|
c-tree.texi, [...]: Use more logical markup.
* doc/c-tree.texi, doc/contrib.texi, doc/extend.texi,
doc/gcc.texi, doc/gcov.texi, doc/install-old.texi,
doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: Use more
logical markup. Use TeX quotes and dashes. Use @dots{} and
@minus{}. Avoid spaces inside @var. Update last modification
date in gcc.texi.
* doc/gcc.1, doc/gcov.1: Regenerate.
From-SVN: r43369
2001-06-14 13:08:04 +02:00
|
|
|
Here is an example which defines @option{-m68000} and @option{-m68020}
|
1996-09-25 01:21:45 +02:00
|
|
|
with opposite meanings, and picks the latter as the default:
|
|
|
|
|
|
|
|
@smallexample
|
|
|
|
#define TARGET_SWITCHES \
|
2003-06-20 08:41:12 +02:00
|
|
|
@{ @{ "68020", MASK_68020, "" @}, \
|
|
|
|
@{ "68000", -MASK_68020, \
|
2001-06-07 18:41:27 +02:00
|
|
|
N_("Compile for the 68000") @}, \
|
2003-06-20 08:41:12 +02:00
|
|
|
@{ "", MASK_68020, "" @}, \
|
|
|
|
@}
|
1996-09-25 01:21:45 +02:00
|
|
|
@end smallexample
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac TARGET_OPTIONS
|
1996-09-25 01:21:45 +02:00
|
|
|
This macro is similar to @code{TARGET_SWITCHES} but defines names of command
|
|
|
|
options that have values. Its definition is an initializer with a
|
|
|
|
subgrouping for each command option.
|
|
|
|
|
toplev.c (target_options): Add value field.
* toplev.c (target_options): Add value field.
(set_target_switch): Handle target options with values.
* doc/tm.texi: Document how fixed vs variable target
options work.
* config/alpha/alpha.h, config/arc/arc.h, config/avr/avr.h,
config/c4x/c4x.h, config/cris/aout.h, config/cris/cris.h,
config/d30v/d30v.h, config/dsp16xx/dsp16xx.h,
config/frv/frv.h, config/i386/i386.h, config/ia64/ia64.h,
config/m32r/m32r.h, config/m68hc11/m68hc11.h,
config/m68k/m68k.h, config/m88k/m88k.h, config/mcore/mcore.h,
config/mips/mips.h, config/mmix/mmix.h, config/pa/pa.h,
config/rs6000/rs6000.h, config/rs6000/sysv4.h,
config/s390/s390.h, config/sparc/sparc.h, config/v850/v850.h:
Add value initializer to target options.
From-SVN: r65756
2003-04-18 01:18:58 +02:00
|
|
|
Each subgrouping contains a string constant, that defines the option
|
|
|
|
name, the address of a variable, a description string, and a value.
|
|
|
|
Non-empty description strings should be marked with @code{N_(@dots{})}
|
|
|
|
for @command{xgettext}. Please do not mark empty strings because the
|
c-tree.texi, [...]: Correct end-of-sentence markup and markup of "etc.", "e.g." and "i.e.".
* doc/c-tree.texi, doc/cfg.texi, doc/contrib.texi, doc/cpp.texi,
doc/cppopts.texi, doc/extend.texi, doc/fragments.texi,
doc/frontends.texi, doc/gcov.texi, doc/hostconfig.texi,
doc/implement-c.texi, doc/install.texi, doc/invoke.texi,
doc/libgcc.texi, doc/md.texi, doc/passes.texi,
doc/portability.texi, doc/rtl.texi, doc/sourcebuild.texi,
doc/standards.texi, doc/tm.texi, doc/tree-ssa.texi,
doc/trouble.texi: Correct end-of-sentence markup and markup of
"etc.", "e.g." and "i.e.". Use @code in various places where
appropriate.
From-SVN: r90101
2004-11-05 02:36:57 +01:00
|
|
|
empty string is reserved by GNU gettext. @code{gettext("")} returns the
|
toplev.c (target_options): Add value field.
* toplev.c (target_options): Add value field.
(set_target_switch): Handle target options with values.
* doc/tm.texi: Document how fixed vs variable target
options work.
* config/alpha/alpha.h, config/arc/arc.h, config/avr/avr.h,
config/c4x/c4x.h, config/cris/aout.h, config/cris/cris.h,
config/d30v/d30v.h, config/dsp16xx/dsp16xx.h,
config/frv/frv.h, config/i386/i386.h, config/ia64/ia64.h,
config/m32r/m32r.h, config/m68hc11/m68hc11.h,
config/m68k/m68k.h, config/m88k/m88k.h, config/mcore/mcore.h,
config/mips/mips.h, config/mmix/mmix.h, config/pa/pa.h,
config/rs6000/rs6000.h, config/rs6000/sysv4.h,
config/s390/s390.h, config/sparc/sparc.h, config/v850/v850.h:
Add value initializer to target options.
From-SVN: r65756
2003-04-18 01:18:58 +02:00
|
|
|
header entry of the message catalog with meta information, not the empty
|
|
|
|
string.
|
|
|
|
|
|
|
|
If the value listed in the table is @code{NULL}, then the variable, type
|
|
|
|
@code{char *}, is set to the variable part of the given option if the
|
|
|
|
fixed part matches. In other words, if the first part of the option
|
|
|
|
matches what's in the table, the variable will be set to point to the
|
|
|
|
rest of the option. This allows the user to specify a value for that
|
|
|
|
option. The actual option name is made by appending @samp{-m} to the
|
|
|
|
specified name. Again, each option should also be documented in
|
|
|
|
@file{invoke.texi}.
|
2002-02-17 15:55:10 +01:00
|
|
|
|
toplev.c (target_options): Add value field.
* toplev.c (target_options): Add value field.
(set_target_switch): Handle target options with values.
* doc/tm.texi: Document how fixed vs variable target
options work.
* config/alpha/alpha.h, config/arc/arc.h, config/avr/avr.h,
config/c4x/c4x.h, config/cris/aout.h, config/cris/cris.h,
config/d30v/d30v.h, config/dsp16xx/dsp16xx.h,
config/frv/frv.h, config/i386/i386.h, config/ia64/ia64.h,
config/m32r/m32r.h, config/m68hc11/m68hc11.h,
config/m68k/m68k.h, config/m88k/m88k.h, config/mcore/mcore.h,
config/mips/mips.h, config/mmix/mmix.h, config/pa/pa.h,
config/rs6000/rs6000.h, config/rs6000/sysv4.h,
config/s390/s390.h, config/sparc/sparc.h, config/v850/v850.h:
Add value initializer to target options.
From-SVN: r65756
2003-04-18 01:18:58 +02:00
|
|
|
If the value listed in the table is non-@code{NULL}, then the option
|
|
|
|
must match the option in the table exactly (with @samp{-m}), and the
|
|
|
|
variable is set to point to the value listed in the table.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
c-tree.texi, [...]: Use more logical markup.
* doc/c-tree.texi, doc/contrib.texi, doc/extend.texi,
doc/gcc.texi, doc/gcov.texi, doc/install-old.texi,
doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: Use more
logical markup. Use TeX quotes and dashes. Use @dots{} and
@minus{}. Avoid spaces inside @var. Update last modification
date in gcc.texi.
* doc/gcc.1, doc/gcov.1: Regenerate.
From-SVN: r43369
2001-06-14 13:08:04 +02:00
|
|
|
Here is an example which defines @option{-mshort-data-@var{number}}. If the
|
|
|
|
given option is @option{-mshort-data-512}, the variable @code{m88k_short_data}
|
1996-09-25 01:21:45 +02:00
|
|
|
will be set to the string @code{"512"}.
|
|
|
|
|
|
|
|
@smallexample
|
|
|
|
extern char *m88k_short_data;
|
|
|
|
#define TARGET_OPTIONS \
|
2001-06-07 18:41:27 +02:00
|
|
|
@{ @{ "short-data-", &m88k_short_data, \
|
toplev.c (target_options): Add value field.
* toplev.c (target_options): Add value field.
(set_target_switch): Handle target options with values.
* doc/tm.texi: Document how fixed vs variable target
options work.
* config/alpha/alpha.h, config/arc/arc.h, config/avr/avr.h,
config/c4x/c4x.h, config/cris/aout.h, config/cris/cris.h,
config/d30v/d30v.h, config/dsp16xx/dsp16xx.h,
config/frv/frv.h, config/i386/i386.h, config/ia64/ia64.h,
config/m32r/m32r.h, config/m68hc11/m68hc11.h,
config/m68k/m68k.h, config/m88k/m88k.h, config/mcore/mcore.h,
config/mips/mips.h, config/mmix/mmix.h, config/pa/pa.h,
config/rs6000/rs6000.h, config/rs6000/sysv4.h,
config/s390/s390.h, config/sparc/sparc.h, config/v850/v850.h:
Add value initializer to target options.
From-SVN: r65756
2003-04-18 01:18:58 +02:00
|
|
|
N_("Specify the size of the short data section"), 0 @} @}
|
|
|
|
@end smallexample
|
|
|
|
|
2003-06-23 18:01:42 +02:00
|
|
|
Here is a variant of the above that allows the user to also specify
|
toplev.c (target_options): Add value field.
* toplev.c (target_options): Add value field.
(set_target_switch): Handle target options with values.
* doc/tm.texi: Document how fixed vs variable target
options work.
* config/alpha/alpha.h, config/arc/arc.h, config/avr/avr.h,
config/c4x/c4x.h, config/cris/aout.h, config/cris/cris.h,
config/d30v/d30v.h, config/dsp16xx/dsp16xx.h,
config/frv/frv.h, config/i386/i386.h, config/ia64/ia64.h,
config/m32r/m32r.h, config/m68hc11/m68hc11.h,
config/m68k/m68k.h, config/m88k/m88k.h, config/mcore/mcore.h,
config/mips/mips.h, config/mmix/mmix.h, config/pa/pa.h,
config/rs6000/rs6000.h, config/rs6000/sysv4.h,
config/s390/s390.h, config/sparc/sparc.h, config/v850/v850.h:
Add value initializer to target options.
From-SVN: r65756
2003-04-18 01:18:58 +02:00
|
|
|
just @option{-mshort-data} where a default of @code{"64"} is used.
|
|
|
|
|
|
|
|
@smallexample
|
|
|
|
extern char *m88k_short_data;
|
|
|
|
#define TARGET_OPTIONS \
|
|
|
|
@{ @{ "short-data-", &m88k_short_data, \
|
|
|
|
N_("Specify the size of the short data section"), 0 @} \
|
|
|
|
@{ "short-data", &m88k_short_data, "", "64" @},
|
|
|
|
@}
|
|
|
|
@end smallexample
|
|
|
|
|
|
|
|
Here is an example which defines @option{-mno-alu}, @option{-malu1}, and
|
|
|
|
@option{-malu2} as a three-state switch, along with suitable macros for
|
|
|
|
checking the state of the option (documentation is elided for brevity).
|
|
|
|
|
|
|
|
@smallexample
|
|
|
|
[chip.c]
|
|
|
|
char *chip_alu = ""; /* Specify default here. */
|
|
|
|
|
|
|
|
[chip.h]
|
|
|
|
extern char *chip_alu;
|
|
|
|
#define TARGET_OPTIONS \
|
|
|
|
@{ @{ "no-alu", &chip_alu, "", "" @}, \
|
|
|
|
@{ "alu1", &chip_alu, "", "1" @}, \
|
|
|
|
@{ "alu2", &chip_alu, "", "2" @}, @}
|
|
|
|
#define TARGET_ALU (chip_alu[0] != '\0')
|
|
|
|
#define TARGET_ALU1 (chip_alu[0] == '1')
|
|
|
|
#define TARGET_ALU2 (chip_alu[0] == '2')
|
1996-09-25 01:21:45 +02:00
|
|
|
@end smallexample
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac TARGET_VERSION
|
1996-09-25 01:21:45 +02:00
|
|
|
This macro is a C statement to print on @code{stderr} a string
|
|
|
|
describing the particular machine description choice. Every machine
|
|
|
|
description should define @code{TARGET_VERSION}. For example:
|
|
|
|
|
|
|
|
@smallexample
|
|
|
|
#ifdef MOTOROLA
|
|
|
|
#define TARGET_VERSION \
|
|
|
|
fprintf (stderr, " (68k, Motorola syntax)");
|
|
|
|
#else
|
|
|
|
#define TARGET_VERSION \
|
|
|
|
fprintf (stderr, " (68k, MIT syntax)");
|
|
|
|
#endif
|
|
|
|
@end smallexample
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac OVERRIDE_OPTIONS
|
1996-09-25 01:21:45 +02:00
|
|
|
Sometimes certain combinations of command options do not make sense on
|
|
|
|
a particular target machine. You can define a macro
|
|
|
|
@code{OVERRIDE_OPTIONS} to take account of this. This macro, if
|
|
|
|
defined, is executed once just after all the command options have been
|
|
|
|
parsed.
|
|
|
|
|
|
|
|
Don't use this macro to turn on various extra optimizations for
|
c-tree.texi, [...]: Use more logical markup.
* doc/c-tree.texi, doc/contrib.texi, doc/extend.texi,
doc/gcc.texi, doc/gcov.texi, doc/install-old.texi,
doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: Use more
logical markup. Use TeX quotes and dashes. Use @dots{} and
@minus{}. Avoid spaces inside @var. Update last modification
date in gcc.texi.
* doc/gcc.1, doc/gcov.1: Regenerate.
From-SVN: r43369
2001-06-14 13:08:04 +02:00
|
|
|
@option{-O}. That is what @code{OPTIMIZATION_OPTIONS} is for.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac OPTIMIZATION_OPTIONS (@var{level}, @var{size})
|
1996-09-25 01:21:45 +02:00
|
|
|
Some machines may desire to change what optimizations are performed for
|
|
|
|
various optimization levels. This macro, if defined, is executed once
|
|
|
|
just after the optimization level is determined and before the remainder
|
|
|
|
of the command options have been parsed. Values set in this macro are
|
|
|
|
used as the default values for the other command line options.
|
|
|
|
|
c-tree.texi, [...]: Use more logical markup.
* doc/c-tree.texi, doc/contrib.texi, doc/extend.texi,
doc/gcc.texi, doc/gcov.texi, doc/install-old.texi,
doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: Use more
logical markup. Use TeX quotes and dashes. Use @dots{} and
@minus{}. Avoid spaces inside @var. Update last modification
date in gcc.texi.
* doc/gcc.1, doc/gcov.1: Regenerate.
From-SVN: r43369
2001-06-14 13:08:04 +02:00
|
|
|
@var{level} is the optimization level specified; 2 if @option{-O2} is
|
|
|
|
specified, 1 if @option{-O} is specified, and 0 if neither is specified.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2001-10-10 01:11:55 +02:00
|
|
|
@var{size} is nonzero if @option{-Os} is specified and zero otherwise.
|
1998-01-27 00:00:04 +01:00
|
|
|
|
1996-09-25 01:21:45 +02:00
|
|
|
You should not use this macro to change options that are not
|
|
|
|
machine-specific. These should uniformly selected by the same
|
|
|
|
optimization level on all supported machines. Use this macro to enable
|
|
|
|
machine-specific optimizations.
|
|
|
|
|
|
|
|
@strong{Do not examine @code{write_symbols} in
|
|
|
|
this macro!} The debugging options are not supposed to alter the
|
|
|
|
generated code.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac CAN_DEBUG_WITHOUT_FP
|
1996-09-25 01:21:45 +02:00
|
|
|
Define this macro if debugging can be performed even without a frame
|
1999-08-25 09:27:13 +02:00
|
|
|
pointer. If this macro is defined, GCC will turn on the
|
c-tree.texi, [...]: Use more logical markup.
* doc/c-tree.texi, doc/contrib.texi, doc/extend.texi,
doc/gcc.texi, doc/gcov.texi, doc/install-old.texi,
doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: Use more
logical markup. Use TeX quotes and dashes. Use @dots{} and
@minus{}. Avoid spaces inside @var. Update last modification
date in gcc.texi.
* doc/gcc.1, doc/gcov.1: Regenerate.
From-SVN: r43369
2001-06-14 13:08:04 +02:00
|
|
|
@option{-fomit-frame-pointer} option whenever @option{-O} is specified.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2001-01-10 22:40:14 +01:00
|
|
|
@node Per-Function Data
|
|
|
|
@section Defining data structures for per-function information.
|
|
|
|
@cindex per-function data
|
|
|
|
@cindex data structures
|
|
|
|
|
|
|
|
If the target needs to store information on a per-function basis, GCC
|
|
|
|
provides a macro and a couple of variables to allow this. Note, just
|
|
|
|
using statics to store the information is a bad idea, since GCC supports
|
|
|
|
nested functions, so you can be halfway through encoding one function
|
|
|
|
when another one comes along.
|
|
|
|
|
|
|
|
GCC defines a data structure called @code{struct function} which
|
|
|
|
contains all of the data specific to an individual function. This
|
|
|
|
structure contains a field called @code{machine} whose type is
|
|
|
|
@code{struct machine_function *}, which can be used by targets to point
|
|
|
|
to their own specific data.
|
|
|
|
|
|
|
|
If a target needs per-function specific data it should define the type
|
2002-06-04 09:11:05 +02:00
|
|
|
@code{struct machine_function} and also the macro @code{INIT_EXPANDERS}.
|
|
|
|
This macro should be used to initialize the function pointer
|
|
|
|
@code{init_machine_status}. This pointer is explained below.
|
2001-01-10 22:40:14 +01:00
|
|
|
|
|
|
|
One typical use of per-function, target specific data is to create an
|
|
|
|
RTX to hold the register containing the function's return address. This
|
|
|
|
RTX can then be used to implement the @code{__builtin_return_address}
|
|
|
|
function, for level 0.
|
|
|
|
|
2001-07-03 02:46:05 +02:00
|
|
|
Note---earlier implementations of GCC used a single data area to hold
|
2001-01-10 22:40:14 +01:00
|
|
|
all of the per-function information. Thus when processing of a nested
|
|
|
|
function began the old per-function data had to be pushed onto a
|
|
|
|
stack, and when the processing was finished, it had to be popped off the
|
|
|
|
stack. GCC used to provide function pointers called
|
2001-04-28 13:35:04 +02:00
|
|
|
@code{save_machine_status} and @code{restore_machine_status} to handle
|
2001-01-10 22:40:14 +01:00
|
|
|
the saving and restoring of the target specific information. Since the
|
|
|
|
single data area approach is no longer used, these pointers are no
|
|
|
|
longer supported.
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac INIT_EXPANDERS
|
2001-12-09 21:21:57 +01:00
|
|
|
Macro called to initialize any target specific information. This macro
|
2001-01-10 22:40:14 +01:00
|
|
|
is called once per function, before generation of any RTL has begun.
|
2001-12-09 21:21:57 +01:00
|
|
|
The intention of this macro is to allow the initialization of the
|
2003-06-20 08:41:12 +02:00
|
|
|
function pointer @code{init_machine_status}.
|
|
|
|
@end defmac
|
2001-01-10 22:40:14 +01:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@deftypevar {void (*)(struct function *)} init_machine_status
|
|
|
|
If this function pointer is non-@code{NULL} it will be called once per
|
|
|
|
function, before function compilation starts, in order to allow the
|
|
|
|
target to perform any target specific initialization of the
|
|
|
|
@code{struct function} structure. It is intended that this would be
|
|
|
|
used to initialize the @code{machine} of that structure.
|
2001-01-10 22:40:14 +01:00
|
|
|
|
c-tree.texi, [...]: Correct end-of-sentence markup and markup of "etc.", "e.g." and "i.e.".
* doc/c-tree.texi, doc/cfg.texi, doc/contrib.texi, doc/cpp.texi,
doc/cppopts.texi, doc/extend.texi, doc/fragments.texi,
doc/frontends.texi, doc/gcov.texi, doc/hostconfig.texi,
doc/implement-c.texi, doc/install.texi, doc/invoke.texi,
doc/libgcc.texi, doc/md.texi, doc/passes.texi,
doc/portability.texi, doc/rtl.texi, doc/sourcebuild.texi,
doc/standards.texi, doc/tm.texi, doc/tree-ssa.texi,
doc/trouble.texi: Correct end-of-sentence markup and markup of
"etc.", "e.g." and "i.e.". Use @code in various places where
appropriate.
From-SVN: r90101
2004-11-05 02:36:57 +01:00
|
|
|
@code{struct machine_function} structures are expected to be freed by GC@.
|
2002-06-04 09:11:05 +02:00
|
|
|
Generally, any memory that they reference must be allocated by using
|
|
|
|
@code{ggc_alloc}, including the structure itself.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end deftypevar
|
2001-01-10 22:40:14 +01:00
|
|
|
|
1996-09-25 01:21:45 +02:00
|
|
|
@node Storage Layout
|
|
|
|
@section Storage Layout
|
|
|
|
@cindex storage layout
|
|
|
|
|
|
|
|
Note that the definitions of the macros in this table which are sizes or
|
|
|
|
alignments measured in bits do not need to be constant. They can be C
|
|
|
|
expressions that refer to static variables, such as the @code{target_flags}.
|
|
|
|
@xref{Run-time Target}.
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac BITS_BIG_ENDIAN
|
1996-09-25 01:21:45 +02:00
|
|
|
Define this macro to have the value 1 if the most significant bit in a
|
|
|
|
byte has the lowest number; otherwise define it to have the value zero.
|
|
|
|
This means that bit-field instructions count from the most significant
|
|
|
|
bit. If the machine has no bit-field instructions, then this must still
|
|
|
|
be defined, but it doesn't matter which value it is defined to. This
|
|
|
|
macro need not be a constant.
|
|
|
|
|
|
|
|
This macro does not affect the way structure fields are packed into
|
|
|
|
bytes or words; that is controlled by @code{BYTES_BIG_ENDIAN}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac BYTES_BIG_ENDIAN
|
1996-09-25 01:21:45 +02:00
|
|
|
Define this macro to have the value 1 if the most significant byte in a
|
|
|
|
word has the lowest number. This macro need not be a constant.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac WORDS_BIG_ENDIAN
|
1996-09-25 01:21:45 +02:00
|
|
|
Define this macro to have the value 1 if, in a multiword object, the
|
|
|
|
most significant word has the lowest number. This applies to both
|
1999-08-25 09:27:13 +02:00
|
|
|
memory locations and registers; GCC fundamentally assumes that the
|
1996-09-25 01:21:45 +02:00
|
|
|
order of words in memory is the same as the order in registers. This
|
|
|
|
macro need not be a constant.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac LIBGCC2_WORDS_BIG_ENDIAN
|
2001-07-03 02:46:05 +02:00
|
|
|
Define this macro if @code{WORDS_BIG_ENDIAN} is not constant. This must be a
|
|
|
|
constant value with the same meaning as @code{WORDS_BIG_ENDIAN}, which will be
|
|
|
|
used only when compiling @file{libgcc2.c}. Typically the value will be set
|
1996-09-25 01:21:45 +02:00
|
|
|
based on preprocessor defines.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac FLOAT_WORDS_BIG_ENDIAN
|
1996-09-25 01:21:45 +02:00
|
|
|
Define this macro to have the value 1 if @code{DFmode}, @code{XFmode} or
|
|
|
|
@code{TFmode} floating point numbers are stored in memory with the word
|
|
|
|
containing the sign bit at the lowest address; otherwise define it to
|
|
|
|
have the value 0. This macro need not be a constant.
|
|
|
|
|
|
|
|
You need not define this macro if the ordering is the same as for
|
|
|
|
multi-word integers.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac BITS_PER_UNIT
|
1996-09-25 01:21:45 +02:00
|
|
|
Define this macro to be the number of bits in an addressable storage
|
a29k.h, [...]: (BITS_PER_UNIT): Delete.
* a29k.h, alpha.h, arc.h, arm.h, avr.h, clipper.h, convex.h,
cris.h, d30v.h, elxsi.h, fr30.h, h8300.h, i370.h, i386.h, i860.h,
i960.h, ia64.h, m32r.h, m68hc11.h, m68k.h, m88k.h, mcore.h,
mips.h, mmix.h, mn10200.h, mn10300.h, ns32k.h, pa.h, pdp11.h,
pj.h, romp.h, rs6000.h, s390.h, sh.h, sparc.h, stormy16.h, v850.h,
vax.h, we32k.h, xtensa.h: (BITS_PER_UNIT): Delete.
* defaults.h (BITS_PER_UNIT): Define.
* doc/tm.texi (BITS_PER_UNIT): Document default value.
From-SVN: r50235
2002-03-03 03:27:42 +01:00
|
|
|
unit (byte). If you do not define this macro the default is 8.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac BITS_PER_WORD
|
1750a.h, [...] (BITS_PER_WORD): Delete.
* 1750a.h, a29k.h, alpha.h, arc.h, arm.h, avr.h, c4x.h, clipper.h,
convex.h, cris.h, d30v.h, dsp16xx.h, elxsi.h, fr30.h, h8300.h,
i370.h, i386.h, i860.h, i960.h, ia64.h, m32r.h, m68hc11.h, m68k.h,
m88k.h, mcore.h, mips.h, mmix.h, mn10200.h, mn10300.h, ns32k.h,
pa.h, pdp11.h, pj.h, romp.h, rs6000.h, s390.h, sh.h, sparc.h,
stormy16.h, v850.h, vax.h, we32k.h, xtensa.h (BITS_PER_WORD):
Delete.
* defaults.h (BITS_PER_WORD): Define.
* doc/tm.texi (BITS_PER_WORD): Document default value.
From-SVN: r50257
2002-03-03 16:40:44 +01:00
|
|
|
Number of bits in a word. If you do not define this macro, the default
|
|
|
|
is @code{BITS_PER_UNIT * UNITS_PER_WORD}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac MAX_BITS_PER_WORD
|
1996-09-25 01:21:45 +02:00
|
|
|
Maximum number of bits in a word. If this is undefined, the default is
|
|
|
|
@code{BITS_PER_WORD}. Otherwise, it is the constant value that is the
|
|
|
|
largest value that @code{BITS_PER_WORD} can have at run-time.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac UNITS_PER_WORD
|
1996-09-25 01:21:45 +02:00
|
|
|
Number of storage units in a word; normally 4.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac MIN_UNITS_PER_WORD
|
1996-09-25 01:21:45 +02:00
|
|
|
Minimum number of units in a word. If this is undefined, the default is
|
|
|
|
@code{UNITS_PER_WORD}. Otherwise, it is the constant value that is the
|
|
|
|
smallest value that @code{UNITS_PER_WORD} can have at run-time.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac POINTER_SIZE
|
1996-09-25 01:21:45 +02:00
|
|
|
Width of a pointer, in bits. You must specify a value no wider than the
|
|
|
|
width of @code{Pmode}. If it is not equal to the width of @code{Pmode},
|
1750a.h, [...] (POINTER_SIZE): Delete.
* 1750a.h, a29k.h, arc.h, arm.h, c4x.h, clipper.h, cris.h, d30v.h,
dsp16xx.h, fr30.h, h8300.h, i370.h, i386.h, i860.h, i960.h,
m32r.h, m68hc11.h, m68k.h, m88k.h, mcore.h, mmix.h, mn10300.h,
ns32k.h, pa.h, pdp11.h, pj.h, romp.h, s390.h, stormy16.h,
v850.h, vax.h, we32k.h, xtensa.h (POINTER_SIZE): Delete.
* defaults.h (POINTER_SIZE): Define.
* doc/tm.texi (POINTER_SIZE): Document default.
From-SVN: r50634
2002-03-12 06:28:21 +01:00
|
|
|
you must define @code{POINTERS_EXTEND_UNSIGNED}. If you do not specify
|
|
|
|
a value the default is @code{BITS_PER_WORD}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac POINTERS_EXTEND_UNSIGNED
|
* tm.texi (POINTERS_EXTEND_UNSIGNED) Modify definition.
* optabs.c (can_extend_p) Check HAVE_ptr_extend for a specialized
pointer extension instruction.
* combine.c (nonzero_bits,num_sign_bit_copies) Likewise.
* simplify-rtx.c (simplify_unary_operation) Likewise.
* explow.c (convert_memory_address) Check value of
POINTERS_EXTEND_UNSIGNED to avoid some conversions when
less than zero.
* config/ia64/t-hpux (LIBGCC, INSTALL_LIBGCC, MULTILIB_OPTIONS,
MULTILIB_DIRNAMES, MULTILIB_MATCHES) Add multilib support.
* config/ia64/hpux.h (CPP_SPEC, ASM_SPEC, SUBTARGET_SWITCHES)
Add Multilib Support.
(POINTERS_EXTEND_UNSIGNED) Define for ILP32 support.
* config/ia64/ia64.h (MASK_ILP32, TARGET_ILP32, SUBTARGET_SWITCHES)
Add Multilib Support.
(POINTER_SIZE, LONG_TYPE_SIZE, MAX_LONG_TYPE_SIZE) Modify for ILP32
support.
* config/ia64/ia64.c (rtx_needs_barrier) Add support for addp4.
* config/ia64/ia64.md (ptr_extend) New instruction to "swizzle"
a 32 bit HP-UX pointer into a 64 bit HP-UX pointer.
From-SVN: r44166
2001-07-20 01:26:51 +02:00
|
|
|
A C expression whose value is greater than zero if pointers that need to be
|
1998-05-06 01:18:02 +02:00
|
|
|
extended from being @code{POINTER_SIZE} bits wide to @code{Pmode} are to
|
* tm.texi (POINTERS_EXTEND_UNSIGNED) Modify definition.
* optabs.c (can_extend_p) Check HAVE_ptr_extend for a specialized
pointer extension instruction.
* combine.c (nonzero_bits,num_sign_bit_copies) Likewise.
* simplify-rtx.c (simplify_unary_operation) Likewise.
* explow.c (convert_memory_address) Check value of
POINTERS_EXTEND_UNSIGNED to avoid some conversions when
less than zero.
* config/ia64/t-hpux (LIBGCC, INSTALL_LIBGCC, MULTILIB_OPTIONS,
MULTILIB_DIRNAMES, MULTILIB_MATCHES) Add multilib support.
* config/ia64/hpux.h (CPP_SPEC, ASM_SPEC, SUBTARGET_SWITCHES)
Add Multilib Support.
(POINTERS_EXTEND_UNSIGNED) Define for ILP32 support.
* config/ia64/ia64.h (MASK_ILP32, TARGET_ILP32, SUBTARGET_SWITCHES)
Add Multilib Support.
(POINTER_SIZE, LONG_TYPE_SIZE, MAX_LONG_TYPE_SIZE) Modify for ILP32
support.
* config/ia64/ia64.c (rtx_needs_barrier) Add support for addp4.
* config/ia64/ia64.md (ptr_extend) New instruction to "swizzle"
a 32 bit HP-UX pointer into a 64 bit HP-UX pointer.
From-SVN: r44166
2001-07-20 01:26:51 +02:00
|
|
|
be zero-extended and zero if they are to be sign-extended. If the value
|
|
|
|
is less then zero then there must be an "ptr_extend" instruction that
|
|
|
|
extends a pointer from @code{POINTER_SIZE} to @code{Pmode}.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
You need not define this macro if the @code{POINTER_SIZE} is equal
|
|
|
|
to the width of @code{Pmode}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac PROMOTE_MODE (@var{m}, @var{unsignedp}, @var{type})
|
1996-09-25 01:21:45 +02:00
|
|
|
A macro to update @var{m} and @var{unsignedp} when an object whose type
|
|
|
|
is @var{type} and which has the specified mode and signedness is to be
|
|
|
|
stored in a register. This macro is only called when @var{type} is a
|
|
|
|
scalar type.
|
|
|
|
|
|
|
|
On most RISC machines, which only have operations that operate on a full
|
|
|
|
register, define this macro to set @var{m} to @code{word_mode} if
|
|
|
|
@var{m} is an integer mode narrower than @code{BITS_PER_WORD}. In most
|
|
|
|
cases, only integer modes should be widened because wider-precision
|
|
|
|
floating-point operations are usually more expensive than their narrower
|
|
|
|
counterparts.
|
|
|
|
|
|
|
|
For most machines, the macro definition does not change @var{unsignedp}.
|
|
|
|
However, some machines, have instructions that preferentially handle
|
|
|
|
either signed or unsigned quantities of certain modes. For example, on
|
|
|
|
the DEC Alpha, 32-bit loads from memory and 32-bit add instructions
|
|
|
|
sign-extend the result to 64 bits. On such machines, set
|
|
|
|
@var{unsignedp} according to which kind of extension is more efficient.
|
|
|
|
|
|
|
|
Do not define this macro if it would never modify @var{m}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2004-04-08 20:26:09 +02:00
|
|
|
@defmac PROMOTE_FUNCTION_MODE
|
|
|
|
Like @code{PROMOTE_MODE}, but is applied to outgoing function arguments or
|
|
|
|
function return values, as specified by @code{TARGET_PROMOTE_FUNCTION_ARGS}
|
|
|
|
and @code{TARGET_PROMOTE_FUNCTION_RETURN}, respectively.
|
|
|
|
|
|
|
|
The default is @code{PROMOTE_MODE}.
|
|
|
|
@end defmac
|
|
|
|
|
targhooks.c: New file.
* targhooks.c: New file.
* targhooks.h: New file.
* Makefile.in: Add targhooks.o support.
(function.o): Depend on$(TARGET_H).
(stmt.o): Likewise.
(combine.o): Depend on $(TREE_H) and $(TARGET_H).
* builtins.c (apply_args_size, expand_builtin_apply_args_1,
expand_builtin_apply): Convert to calls.struct_value_rtx hook.
(expand_builtin_saveregs): Convert to
calls.expand_builtin_saveregs hook.
* c-decl.c (start_decl): Handle new calls.promote_prototypes hook
here, instead of ...
(get_parm_info) ... here.
(store_parm_decls_oldstyle): Convert to calls.promote_prototypes
hook.
(finish_function): Handle calls.promote_prototypes hook here too.
* c-typeck.c (convert_arguments): Convert to
calls.promote_prototypes hook.
(c_convert_parm_for_inlining): Likewise.
* calls.c (initialize_argument_information): Convert to
calls.promote_function_args hook.
(expand_call): Convert to calls.struct_value_rtx,
calls.strict_argument_naming,
calls.pretend_outgoing_varargs_named, and
calls.promote_function_return hooks. Pass fndecl to
aggregate_value_p. Initialize CUMULATIVE_ARGS before calling
hooks, so they can use that.
(emit_library_call_value_1): Likewise.
* combine.c (setup_incoming_promotions): Convert to
calls.promote_function_args hook.
* emit-rtl.c: Convert to calls.struct_value_rtx hook.
* expr.c (expand_assignment): Pass call to aggregate_value_p.
(expand_expr): Likewise.
* expr.h: Remove support for SETUP_INCOMING_VARARGS,
STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED,
RETURN_IN_MEMORY macro defaults.
* final.c (profile_function): Convert to calls.struct_value_rtx
hook.
* function.c (aggregate_value_p): Accept function type tree as
second parameter; try to deduce fntype from it. Convert to
calls.return_in_memory hook.
(assign_parms): Convert to calls.setup_incoming_varargs,
calls.strict_argument_naming, calls.promote_function_args,
calls.pretend_outgoing_varargs_named hooks. Pass fndecl to
aggregate_value_p.
(expand_function_start): Likewise. Convert to
calls.struct_value_rtx hook.
(expand_function_end): Convert to calls.promote_function_return hook.
(allocate_struct_function): Pass fndecl to aggregate_value_p.
* hard-reg-set.h: Update comments to new hook names.
* integrate.c (expand_inline_function): Pass fndecl to aggregate_value_p.
* reg-stack.c (stack_result): Likewise.
* rtl.h (struct_value_rtx, struct_value_incoming_rtx): Delete.
* stmt.c (expand_value_return): Convert to
calls.promote_function_return hook.
* target-def.h: Add TARGET_PROMOTE_FUNCTION_ARGS,
TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES,
TARGET_STRUCT_VALUE_RTX, TARGET_RETURN_IN_MEMORY,
TARGET_EXPAND_BUILTIN_SAVEREGS, TARGET_SETUP_INCOMING_VARARGS,
TARGET_STRICT_ARGUMENT_NAMING,
TARGET_PRETEND_OUTGOING_VARARGS_NAMED, and TARGET_CALLS.
* target.h: Likewise.
* tree.h (aggregate_value_p): Also takes a tree to deduce function
attributes from (for target hooks).
* doc/tm.texi (PROMOTE_FUNCTION_ARGS, PROMOTE_FUNCTION_RETURN,
PROMOTE_PROTOTYPES, RETURN_IN_MEMORY, STRUCT_VALUE_REGNUM,
STRUCT_VALUE, STRUCT_VALUE_INCOMING_REGNUM, STRUCT_VALUE_INCOMING,
EXPAND_BUILTIN_SAVEREGS, SETUP_INCOMING_VARARGS,
STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED): Convert
to hooks.
* config/alpha/alpha.c (alpha_output_mi_thunk_osf): Pass function
to aggregate_value_p.
* config/arm/arm.c (arm_init_cumulative_args,
arm_output_mi_thunk): Likewise.
* config/i386/i386.c (ix86_return_pops_args, x86_this_parameter):
Likewise.
* config/mips/mips.c (mips_save_reg_p, mips_expand_prologue,
mips_can_use_return_insn): Likewise.
* config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise.
* config/s390/s390.c (s390_output_mi_thunk): Likewise.
* config/sparc/sparc.c (sparc_output_mi_thunk): Pass function to
aggregate_value_p.
* config/story16/stormy16.c (xstormy16_asm_output_mi_thunk): Pass
function to aggregate_value_p.
* objc/objc-act.c (generate_struct_by_value_array): Pass NULL to
aggregate_value_p.
* config/sh/sh-protos.h (sh_builtin_saveregs): Remove.
(sh_attr_renesas_p, sh_cfun_attr_renesas_p, sh_function_arg,
sh_function_arg_advance, sh_pass_in_reg_p): New. * config/sh/sh.c
(sh_handle_renesas_attribute, sh_promote_prototypes,
sh_struct_value_rtx, sh_return_in_memory, sh_builtin_saveregs,
sh_setup_incoming_varargs, sh_strict_argument_naming,
sh_pretend_outgoing_varargs_named): New decls.
(targetm): Add new hooks.
(calc_live_regs): Save MACL and MACH if the function has the
renesas attribute.
(sh_expand_prologue): Support renesas attribute.
(sh_builtin_saveregs): Make static.
(sh_build_va_list): Support renesas attribute.
(sh_va_start): Likewise.
(sh_va_arg): Likewise.
(sh_promote_prototypes): New.
(sh_function_arg): New, moved from sh.h. Support renesas
attribute.
(sh_function_arg_advance): Likewise.
(sh_return_in_memory): Likewise.
(sh_strict_argument_naming): Likewise.
(sh_pretend_outgoing_varargs_named): Likewise.
(sh_struct_value_rtx): New.
(sh_attribute): Add renesas attribute.
(sh_handle_renesas_attribute): New.
(sh_attr_renesas_p, sh_cfun_attr_renesas_p): New.
(sh_ms_bitfield_layout_p): Support renesas attribute also.
(sh_output_mi_thunk): Pass function to aggregate_value_p. *
config/sh/sh.h (TARGET_SWITCHES): Add -mrenesas as an alias for
-mhitachi.
(STRUCT_VALUE_REGNUM, STRUCT_VALUE, RETURN_IN_MEMORY): Moved to
target hooks.
(sh_args): Add renesas_abi flag.
(INIT_CUMULATIVE_ARGS): Set it. Pass fndecl to aggregate_value_p.
(FUNCTION_ARG_ADVANCE, FUNCTION_ARG): Move to sh.c.
(PASS_IN_REG_P): Support renesas attribute. Pass DF and TF on the
stack for the renesas abi.
(STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED,
SETUP_INCOMING_VARARGS, EXPAND_BUILTIN_SAVEREGS,
PROMOTE_PROTOTYPES): Moved to sh.c. * config/sh/sh.md (call): Set
call cookie to indicate renesas calls.
* decl.c (finish_function): Pass fndecl to aggregate_value_p.
* misc.c (default_pass_by_ref): Convert to calls.return_in_memory
hook.
From-SVN: r71048
2003-09-04 05:18:05 +02:00
|
|
|
@deftypefn {Target Hook} bool TARGET_PROMOTE_FUNCTION_ARGS (tree @var{fntype})
|
|
|
|
This target hook should return @code{true} if the promotion described by
|
2004-04-08 20:26:09 +02:00
|
|
|
@code{PROMOTE_FUNCTION_MODE} should be done for outgoing function
|
|
|
|
arguments.
|
targhooks.c: New file.
* targhooks.c: New file.
* targhooks.h: New file.
* Makefile.in: Add targhooks.o support.
(function.o): Depend on$(TARGET_H).
(stmt.o): Likewise.
(combine.o): Depend on $(TREE_H) and $(TARGET_H).
* builtins.c (apply_args_size, expand_builtin_apply_args_1,
expand_builtin_apply): Convert to calls.struct_value_rtx hook.
(expand_builtin_saveregs): Convert to
calls.expand_builtin_saveregs hook.
* c-decl.c (start_decl): Handle new calls.promote_prototypes hook
here, instead of ...
(get_parm_info) ... here.
(store_parm_decls_oldstyle): Convert to calls.promote_prototypes
hook.
(finish_function): Handle calls.promote_prototypes hook here too.
* c-typeck.c (convert_arguments): Convert to
calls.promote_prototypes hook.
(c_convert_parm_for_inlining): Likewise.
* calls.c (initialize_argument_information): Convert to
calls.promote_function_args hook.
(expand_call): Convert to calls.struct_value_rtx,
calls.strict_argument_naming,
calls.pretend_outgoing_varargs_named, and
calls.promote_function_return hooks. Pass fndecl to
aggregate_value_p. Initialize CUMULATIVE_ARGS before calling
hooks, so they can use that.
(emit_library_call_value_1): Likewise.
* combine.c (setup_incoming_promotions): Convert to
calls.promote_function_args hook.
* emit-rtl.c: Convert to calls.struct_value_rtx hook.
* expr.c (expand_assignment): Pass call to aggregate_value_p.
(expand_expr): Likewise.
* expr.h: Remove support for SETUP_INCOMING_VARARGS,
STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED,
RETURN_IN_MEMORY macro defaults.
* final.c (profile_function): Convert to calls.struct_value_rtx
hook.
* function.c (aggregate_value_p): Accept function type tree as
second parameter; try to deduce fntype from it. Convert to
calls.return_in_memory hook.
(assign_parms): Convert to calls.setup_incoming_varargs,
calls.strict_argument_naming, calls.promote_function_args,
calls.pretend_outgoing_varargs_named hooks. Pass fndecl to
aggregate_value_p.
(expand_function_start): Likewise. Convert to
calls.struct_value_rtx hook.
(expand_function_end): Convert to calls.promote_function_return hook.
(allocate_struct_function): Pass fndecl to aggregate_value_p.
* hard-reg-set.h: Update comments to new hook names.
* integrate.c (expand_inline_function): Pass fndecl to aggregate_value_p.
* reg-stack.c (stack_result): Likewise.
* rtl.h (struct_value_rtx, struct_value_incoming_rtx): Delete.
* stmt.c (expand_value_return): Convert to
calls.promote_function_return hook.
* target-def.h: Add TARGET_PROMOTE_FUNCTION_ARGS,
TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES,
TARGET_STRUCT_VALUE_RTX, TARGET_RETURN_IN_MEMORY,
TARGET_EXPAND_BUILTIN_SAVEREGS, TARGET_SETUP_INCOMING_VARARGS,
TARGET_STRICT_ARGUMENT_NAMING,
TARGET_PRETEND_OUTGOING_VARARGS_NAMED, and TARGET_CALLS.
* target.h: Likewise.
* tree.h (aggregate_value_p): Also takes a tree to deduce function
attributes from (for target hooks).
* doc/tm.texi (PROMOTE_FUNCTION_ARGS, PROMOTE_FUNCTION_RETURN,
PROMOTE_PROTOTYPES, RETURN_IN_MEMORY, STRUCT_VALUE_REGNUM,
STRUCT_VALUE, STRUCT_VALUE_INCOMING_REGNUM, STRUCT_VALUE_INCOMING,
EXPAND_BUILTIN_SAVEREGS, SETUP_INCOMING_VARARGS,
STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED): Convert
to hooks.
* config/alpha/alpha.c (alpha_output_mi_thunk_osf): Pass function
to aggregate_value_p.
* config/arm/arm.c (arm_init_cumulative_args,
arm_output_mi_thunk): Likewise.
* config/i386/i386.c (ix86_return_pops_args, x86_this_parameter):
Likewise.
* config/mips/mips.c (mips_save_reg_p, mips_expand_prologue,
mips_can_use_return_insn): Likewise.
* config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise.
* config/s390/s390.c (s390_output_mi_thunk): Likewise.
* config/sparc/sparc.c (sparc_output_mi_thunk): Pass function to
aggregate_value_p.
* config/story16/stormy16.c (xstormy16_asm_output_mi_thunk): Pass
function to aggregate_value_p.
* objc/objc-act.c (generate_struct_by_value_array): Pass NULL to
aggregate_value_p.
* config/sh/sh-protos.h (sh_builtin_saveregs): Remove.
(sh_attr_renesas_p, sh_cfun_attr_renesas_p, sh_function_arg,
sh_function_arg_advance, sh_pass_in_reg_p): New. * config/sh/sh.c
(sh_handle_renesas_attribute, sh_promote_prototypes,
sh_struct_value_rtx, sh_return_in_memory, sh_builtin_saveregs,
sh_setup_incoming_varargs, sh_strict_argument_naming,
sh_pretend_outgoing_varargs_named): New decls.
(targetm): Add new hooks.
(calc_live_regs): Save MACL and MACH if the function has the
renesas attribute.
(sh_expand_prologue): Support renesas attribute.
(sh_builtin_saveregs): Make static.
(sh_build_va_list): Support renesas attribute.
(sh_va_start): Likewise.
(sh_va_arg): Likewise.
(sh_promote_prototypes): New.
(sh_function_arg): New, moved from sh.h. Support renesas
attribute.
(sh_function_arg_advance): Likewise.
(sh_return_in_memory): Likewise.
(sh_strict_argument_naming): Likewise.
(sh_pretend_outgoing_varargs_named): Likewise.
(sh_struct_value_rtx): New.
(sh_attribute): Add renesas attribute.
(sh_handle_renesas_attribute): New.
(sh_attr_renesas_p, sh_cfun_attr_renesas_p): New.
(sh_ms_bitfield_layout_p): Support renesas attribute also.
(sh_output_mi_thunk): Pass function to aggregate_value_p. *
config/sh/sh.h (TARGET_SWITCHES): Add -mrenesas as an alias for
-mhitachi.
(STRUCT_VALUE_REGNUM, STRUCT_VALUE, RETURN_IN_MEMORY): Moved to
target hooks.
(sh_args): Add renesas_abi flag.
(INIT_CUMULATIVE_ARGS): Set it. Pass fndecl to aggregate_value_p.
(FUNCTION_ARG_ADVANCE, FUNCTION_ARG): Move to sh.c.
(PASS_IN_REG_P): Support renesas attribute. Pass DF and TF on the
stack for the renesas abi.
(STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED,
SETUP_INCOMING_VARARGS, EXPAND_BUILTIN_SAVEREGS,
PROMOTE_PROTOTYPES): Moved to sh.c. * config/sh/sh.md (call): Set
call cookie to indicate renesas calls.
* decl.c (finish_function): Pass fndecl to aggregate_value_p.
* misc.c (default_pass_by_ref): Convert to calls.return_in_memory
hook.
From-SVN: r71048
2003-09-04 05:18:05 +02:00
|
|
|
@end deftypefn
|
1996-09-25 01:21:45 +02:00
|
|
|
|
targhooks.c: New file.
* targhooks.c: New file.
* targhooks.h: New file.
* Makefile.in: Add targhooks.o support.
(function.o): Depend on$(TARGET_H).
(stmt.o): Likewise.
(combine.o): Depend on $(TREE_H) and $(TARGET_H).
* builtins.c (apply_args_size, expand_builtin_apply_args_1,
expand_builtin_apply): Convert to calls.struct_value_rtx hook.
(expand_builtin_saveregs): Convert to
calls.expand_builtin_saveregs hook.
* c-decl.c (start_decl): Handle new calls.promote_prototypes hook
here, instead of ...
(get_parm_info) ... here.
(store_parm_decls_oldstyle): Convert to calls.promote_prototypes
hook.
(finish_function): Handle calls.promote_prototypes hook here too.
* c-typeck.c (convert_arguments): Convert to
calls.promote_prototypes hook.
(c_convert_parm_for_inlining): Likewise.
* calls.c (initialize_argument_information): Convert to
calls.promote_function_args hook.
(expand_call): Convert to calls.struct_value_rtx,
calls.strict_argument_naming,
calls.pretend_outgoing_varargs_named, and
calls.promote_function_return hooks. Pass fndecl to
aggregate_value_p. Initialize CUMULATIVE_ARGS before calling
hooks, so they can use that.
(emit_library_call_value_1): Likewise.
* combine.c (setup_incoming_promotions): Convert to
calls.promote_function_args hook.
* emit-rtl.c: Convert to calls.struct_value_rtx hook.
* expr.c (expand_assignment): Pass call to aggregate_value_p.
(expand_expr): Likewise.
* expr.h: Remove support for SETUP_INCOMING_VARARGS,
STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED,
RETURN_IN_MEMORY macro defaults.
* final.c (profile_function): Convert to calls.struct_value_rtx
hook.
* function.c (aggregate_value_p): Accept function type tree as
second parameter; try to deduce fntype from it. Convert to
calls.return_in_memory hook.
(assign_parms): Convert to calls.setup_incoming_varargs,
calls.strict_argument_naming, calls.promote_function_args,
calls.pretend_outgoing_varargs_named hooks. Pass fndecl to
aggregate_value_p.
(expand_function_start): Likewise. Convert to
calls.struct_value_rtx hook.
(expand_function_end): Convert to calls.promote_function_return hook.
(allocate_struct_function): Pass fndecl to aggregate_value_p.
* hard-reg-set.h: Update comments to new hook names.
* integrate.c (expand_inline_function): Pass fndecl to aggregate_value_p.
* reg-stack.c (stack_result): Likewise.
* rtl.h (struct_value_rtx, struct_value_incoming_rtx): Delete.
* stmt.c (expand_value_return): Convert to
calls.promote_function_return hook.
* target-def.h: Add TARGET_PROMOTE_FUNCTION_ARGS,
TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES,
TARGET_STRUCT_VALUE_RTX, TARGET_RETURN_IN_MEMORY,
TARGET_EXPAND_BUILTIN_SAVEREGS, TARGET_SETUP_INCOMING_VARARGS,
TARGET_STRICT_ARGUMENT_NAMING,
TARGET_PRETEND_OUTGOING_VARARGS_NAMED, and TARGET_CALLS.
* target.h: Likewise.
* tree.h (aggregate_value_p): Also takes a tree to deduce function
attributes from (for target hooks).
* doc/tm.texi (PROMOTE_FUNCTION_ARGS, PROMOTE_FUNCTION_RETURN,
PROMOTE_PROTOTYPES, RETURN_IN_MEMORY, STRUCT_VALUE_REGNUM,
STRUCT_VALUE, STRUCT_VALUE_INCOMING_REGNUM, STRUCT_VALUE_INCOMING,
EXPAND_BUILTIN_SAVEREGS, SETUP_INCOMING_VARARGS,
STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED): Convert
to hooks.
* config/alpha/alpha.c (alpha_output_mi_thunk_osf): Pass function
to aggregate_value_p.
* config/arm/arm.c (arm_init_cumulative_args,
arm_output_mi_thunk): Likewise.
* config/i386/i386.c (ix86_return_pops_args, x86_this_parameter):
Likewise.
* config/mips/mips.c (mips_save_reg_p, mips_expand_prologue,
mips_can_use_return_insn): Likewise.
* config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise.
* config/s390/s390.c (s390_output_mi_thunk): Likewise.
* config/sparc/sparc.c (sparc_output_mi_thunk): Pass function to
aggregate_value_p.
* config/story16/stormy16.c (xstormy16_asm_output_mi_thunk): Pass
function to aggregate_value_p.
* objc/objc-act.c (generate_struct_by_value_array): Pass NULL to
aggregate_value_p.
* config/sh/sh-protos.h (sh_builtin_saveregs): Remove.
(sh_attr_renesas_p, sh_cfun_attr_renesas_p, sh_function_arg,
sh_function_arg_advance, sh_pass_in_reg_p): New. * config/sh/sh.c
(sh_handle_renesas_attribute, sh_promote_prototypes,
sh_struct_value_rtx, sh_return_in_memory, sh_builtin_saveregs,
sh_setup_incoming_varargs, sh_strict_argument_naming,
sh_pretend_outgoing_varargs_named): New decls.
(targetm): Add new hooks.
(calc_live_regs): Save MACL and MACH if the function has the
renesas attribute.
(sh_expand_prologue): Support renesas attribute.
(sh_builtin_saveregs): Make static.
(sh_build_va_list): Support renesas attribute.
(sh_va_start): Likewise.
(sh_va_arg): Likewise.
(sh_promote_prototypes): New.
(sh_function_arg): New, moved from sh.h. Support renesas
attribute.
(sh_function_arg_advance): Likewise.
(sh_return_in_memory): Likewise.
(sh_strict_argument_naming): Likewise.
(sh_pretend_outgoing_varargs_named): Likewise.
(sh_struct_value_rtx): New.
(sh_attribute): Add renesas attribute.
(sh_handle_renesas_attribute): New.
(sh_attr_renesas_p, sh_cfun_attr_renesas_p): New.
(sh_ms_bitfield_layout_p): Support renesas attribute also.
(sh_output_mi_thunk): Pass function to aggregate_value_p. *
config/sh/sh.h (TARGET_SWITCHES): Add -mrenesas as an alias for
-mhitachi.
(STRUCT_VALUE_REGNUM, STRUCT_VALUE, RETURN_IN_MEMORY): Moved to
target hooks.
(sh_args): Add renesas_abi flag.
(INIT_CUMULATIVE_ARGS): Set it. Pass fndecl to aggregate_value_p.
(FUNCTION_ARG_ADVANCE, FUNCTION_ARG): Move to sh.c.
(PASS_IN_REG_P): Support renesas attribute. Pass DF and TF on the
stack for the renesas abi.
(STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED,
SETUP_INCOMING_VARARGS, EXPAND_BUILTIN_SAVEREGS,
PROMOTE_PROTOTYPES): Moved to sh.c. * config/sh/sh.md (call): Set
call cookie to indicate renesas calls.
* decl.c (finish_function): Pass fndecl to aggregate_value_p.
* misc.c (default_pass_by_ref): Convert to calls.return_in_memory
hook.
From-SVN: r71048
2003-09-04 05:18:05 +02:00
|
|
|
@deftypefn {Target Hook} bool TARGET_PROMOTE_FUNCTION_RETURN (tree @var{fntype})
|
|
|
|
This target hook should return @code{true} if the promotion described by
|
2004-04-08 20:26:09 +02:00
|
|
|
@code{PROMOTE_FUNCTION_MODE} should be done for the return value of
|
targhooks.c: New file.
* targhooks.c: New file.
* targhooks.h: New file.
* Makefile.in: Add targhooks.o support.
(function.o): Depend on$(TARGET_H).
(stmt.o): Likewise.
(combine.o): Depend on $(TREE_H) and $(TARGET_H).
* builtins.c (apply_args_size, expand_builtin_apply_args_1,
expand_builtin_apply): Convert to calls.struct_value_rtx hook.
(expand_builtin_saveregs): Convert to
calls.expand_builtin_saveregs hook.
* c-decl.c (start_decl): Handle new calls.promote_prototypes hook
here, instead of ...
(get_parm_info) ... here.
(store_parm_decls_oldstyle): Convert to calls.promote_prototypes
hook.
(finish_function): Handle calls.promote_prototypes hook here too.
* c-typeck.c (convert_arguments): Convert to
calls.promote_prototypes hook.
(c_convert_parm_for_inlining): Likewise.
* calls.c (initialize_argument_information): Convert to
calls.promote_function_args hook.
(expand_call): Convert to calls.struct_value_rtx,
calls.strict_argument_naming,
calls.pretend_outgoing_varargs_named, and
calls.promote_function_return hooks. Pass fndecl to
aggregate_value_p. Initialize CUMULATIVE_ARGS before calling
hooks, so they can use that.
(emit_library_call_value_1): Likewise.
* combine.c (setup_incoming_promotions): Convert to
calls.promote_function_args hook.
* emit-rtl.c: Convert to calls.struct_value_rtx hook.
* expr.c (expand_assignment): Pass call to aggregate_value_p.
(expand_expr): Likewise.
* expr.h: Remove support for SETUP_INCOMING_VARARGS,
STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED,
RETURN_IN_MEMORY macro defaults.
* final.c (profile_function): Convert to calls.struct_value_rtx
hook.
* function.c (aggregate_value_p): Accept function type tree as
second parameter; try to deduce fntype from it. Convert to
calls.return_in_memory hook.
(assign_parms): Convert to calls.setup_incoming_varargs,
calls.strict_argument_naming, calls.promote_function_args,
calls.pretend_outgoing_varargs_named hooks. Pass fndecl to
aggregate_value_p.
(expand_function_start): Likewise. Convert to
calls.struct_value_rtx hook.
(expand_function_end): Convert to calls.promote_function_return hook.
(allocate_struct_function): Pass fndecl to aggregate_value_p.
* hard-reg-set.h: Update comments to new hook names.
* integrate.c (expand_inline_function): Pass fndecl to aggregate_value_p.
* reg-stack.c (stack_result): Likewise.
* rtl.h (struct_value_rtx, struct_value_incoming_rtx): Delete.
* stmt.c (expand_value_return): Convert to
calls.promote_function_return hook.
* target-def.h: Add TARGET_PROMOTE_FUNCTION_ARGS,
TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES,
TARGET_STRUCT_VALUE_RTX, TARGET_RETURN_IN_MEMORY,
TARGET_EXPAND_BUILTIN_SAVEREGS, TARGET_SETUP_INCOMING_VARARGS,
TARGET_STRICT_ARGUMENT_NAMING,
TARGET_PRETEND_OUTGOING_VARARGS_NAMED, and TARGET_CALLS.
* target.h: Likewise.
* tree.h (aggregate_value_p): Also takes a tree to deduce function
attributes from (for target hooks).
* doc/tm.texi (PROMOTE_FUNCTION_ARGS, PROMOTE_FUNCTION_RETURN,
PROMOTE_PROTOTYPES, RETURN_IN_MEMORY, STRUCT_VALUE_REGNUM,
STRUCT_VALUE, STRUCT_VALUE_INCOMING_REGNUM, STRUCT_VALUE_INCOMING,
EXPAND_BUILTIN_SAVEREGS, SETUP_INCOMING_VARARGS,
STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED): Convert
to hooks.
* config/alpha/alpha.c (alpha_output_mi_thunk_osf): Pass function
to aggregate_value_p.
* config/arm/arm.c (arm_init_cumulative_args,
arm_output_mi_thunk): Likewise.
* config/i386/i386.c (ix86_return_pops_args, x86_this_parameter):
Likewise.
* config/mips/mips.c (mips_save_reg_p, mips_expand_prologue,
mips_can_use_return_insn): Likewise.
* config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise.
* config/s390/s390.c (s390_output_mi_thunk): Likewise.
* config/sparc/sparc.c (sparc_output_mi_thunk): Pass function to
aggregate_value_p.
* config/story16/stormy16.c (xstormy16_asm_output_mi_thunk): Pass
function to aggregate_value_p.
* objc/objc-act.c (generate_struct_by_value_array): Pass NULL to
aggregate_value_p.
* config/sh/sh-protos.h (sh_builtin_saveregs): Remove.
(sh_attr_renesas_p, sh_cfun_attr_renesas_p, sh_function_arg,
sh_function_arg_advance, sh_pass_in_reg_p): New. * config/sh/sh.c
(sh_handle_renesas_attribute, sh_promote_prototypes,
sh_struct_value_rtx, sh_return_in_memory, sh_builtin_saveregs,
sh_setup_incoming_varargs, sh_strict_argument_naming,
sh_pretend_outgoing_varargs_named): New decls.
(targetm): Add new hooks.
(calc_live_regs): Save MACL and MACH if the function has the
renesas attribute.
(sh_expand_prologue): Support renesas attribute.
(sh_builtin_saveregs): Make static.
(sh_build_va_list): Support renesas attribute.
(sh_va_start): Likewise.
(sh_va_arg): Likewise.
(sh_promote_prototypes): New.
(sh_function_arg): New, moved from sh.h. Support renesas
attribute.
(sh_function_arg_advance): Likewise.
(sh_return_in_memory): Likewise.
(sh_strict_argument_naming): Likewise.
(sh_pretend_outgoing_varargs_named): Likewise.
(sh_struct_value_rtx): New.
(sh_attribute): Add renesas attribute.
(sh_handle_renesas_attribute): New.
(sh_attr_renesas_p, sh_cfun_attr_renesas_p): New.
(sh_ms_bitfield_layout_p): Support renesas attribute also.
(sh_output_mi_thunk): Pass function to aggregate_value_p. *
config/sh/sh.h (TARGET_SWITCHES): Add -mrenesas as an alias for
-mhitachi.
(STRUCT_VALUE_REGNUM, STRUCT_VALUE, RETURN_IN_MEMORY): Moved to
target hooks.
(sh_args): Add renesas_abi flag.
(INIT_CUMULATIVE_ARGS): Set it. Pass fndecl to aggregate_value_p.
(FUNCTION_ARG_ADVANCE, FUNCTION_ARG): Move to sh.c.
(PASS_IN_REG_P): Support renesas attribute. Pass DF and TF on the
stack for the renesas abi.
(STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED,
SETUP_INCOMING_VARARGS, EXPAND_BUILTIN_SAVEREGS,
PROMOTE_PROTOTYPES): Moved to sh.c. * config/sh/sh.md (call): Set
call cookie to indicate renesas calls.
* decl.c (finish_function): Pass fndecl to aggregate_value_p.
* misc.c (default_pass_by_ref): Convert to calls.return_in_memory
hook.
From-SVN: r71048
2003-09-04 05:18:05 +02:00
|
|
|
functions.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
targhooks.c: New file.
* targhooks.c: New file.
* targhooks.h: New file.
* Makefile.in: Add targhooks.o support.
(function.o): Depend on$(TARGET_H).
(stmt.o): Likewise.
(combine.o): Depend on $(TREE_H) and $(TARGET_H).
* builtins.c (apply_args_size, expand_builtin_apply_args_1,
expand_builtin_apply): Convert to calls.struct_value_rtx hook.
(expand_builtin_saveregs): Convert to
calls.expand_builtin_saveregs hook.
* c-decl.c (start_decl): Handle new calls.promote_prototypes hook
here, instead of ...
(get_parm_info) ... here.
(store_parm_decls_oldstyle): Convert to calls.promote_prototypes
hook.
(finish_function): Handle calls.promote_prototypes hook here too.
* c-typeck.c (convert_arguments): Convert to
calls.promote_prototypes hook.
(c_convert_parm_for_inlining): Likewise.
* calls.c (initialize_argument_information): Convert to
calls.promote_function_args hook.
(expand_call): Convert to calls.struct_value_rtx,
calls.strict_argument_naming,
calls.pretend_outgoing_varargs_named, and
calls.promote_function_return hooks. Pass fndecl to
aggregate_value_p. Initialize CUMULATIVE_ARGS before calling
hooks, so they can use that.
(emit_library_call_value_1): Likewise.
* combine.c (setup_incoming_promotions): Convert to
calls.promote_function_args hook.
* emit-rtl.c: Convert to calls.struct_value_rtx hook.
* expr.c (expand_assignment): Pass call to aggregate_value_p.
(expand_expr): Likewise.
* expr.h: Remove support for SETUP_INCOMING_VARARGS,
STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED,
RETURN_IN_MEMORY macro defaults.
* final.c (profile_function): Convert to calls.struct_value_rtx
hook.
* function.c (aggregate_value_p): Accept function type tree as
second parameter; try to deduce fntype from it. Convert to
calls.return_in_memory hook.
(assign_parms): Convert to calls.setup_incoming_varargs,
calls.strict_argument_naming, calls.promote_function_args,
calls.pretend_outgoing_varargs_named hooks. Pass fndecl to
aggregate_value_p.
(expand_function_start): Likewise. Convert to
calls.struct_value_rtx hook.
(expand_function_end): Convert to calls.promote_function_return hook.
(allocate_struct_function): Pass fndecl to aggregate_value_p.
* hard-reg-set.h: Update comments to new hook names.
* integrate.c (expand_inline_function): Pass fndecl to aggregate_value_p.
* reg-stack.c (stack_result): Likewise.
* rtl.h (struct_value_rtx, struct_value_incoming_rtx): Delete.
* stmt.c (expand_value_return): Convert to
calls.promote_function_return hook.
* target-def.h: Add TARGET_PROMOTE_FUNCTION_ARGS,
TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES,
TARGET_STRUCT_VALUE_RTX, TARGET_RETURN_IN_MEMORY,
TARGET_EXPAND_BUILTIN_SAVEREGS, TARGET_SETUP_INCOMING_VARARGS,
TARGET_STRICT_ARGUMENT_NAMING,
TARGET_PRETEND_OUTGOING_VARARGS_NAMED, and TARGET_CALLS.
* target.h: Likewise.
* tree.h (aggregate_value_p): Also takes a tree to deduce function
attributes from (for target hooks).
* doc/tm.texi (PROMOTE_FUNCTION_ARGS, PROMOTE_FUNCTION_RETURN,
PROMOTE_PROTOTYPES, RETURN_IN_MEMORY, STRUCT_VALUE_REGNUM,
STRUCT_VALUE, STRUCT_VALUE_INCOMING_REGNUM, STRUCT_VALUE_INCOMING,
EXPAND_BUILTIN_SAVEREGS, SETUP_INCOMING_VARARGS,
STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED): Convert
to hooks.
* config/alpha/alpha.c (alpha_output_mi_thunk_osf): Pass function
to aggregate_value_p.
* config/arm/arm.c (arm_init_cumulative_args,
arm_output_mi_thunk): Likewise.
* config/i386/i386.c (ix86_return_pops_args, x86_this_parameter):
Likewise.
* config/mips/mips.c (mips_save_reg_p, mips_expand_prologue,
mips_can_use_return_insn): Likewise.
* config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise.
* config/s390/s390.c (s390_output_mi_thunk): Likewise.
* config/sparc/sparc.c (sparc_output_mi_thunk): Pass function to
aggregate_value_p.
* config/story16/stormy16.c (xstormy16_asm_output_mi_thunk): Pass
function to aggregate_value_p.
* objc/objc-act.c (generate_struct_by_value_array): Pass NULL to
aggregate_value_p.
* config/sh/sh-protos.h (sh_builtin_saveregs): Remove.
(sh_attr_renesas_p, sh_cfun_attr_renesas_p, sh_function_arg,
sh_function_arg_advance, sh_pass_in_reg_p): New. * config/sh/sh.c
(sh_handle_renesas_attribute, sh_promote_prototypes,
sh_struct_value_rtx, sh_return_in_memory, sh_builtin_saveregs,
sh_setup_incoming_varargs, sh_strict_argument_naming,
sh_pretend_outgoing_varargs_named): New decls.
(targetm): Add new hooks.
(calc_live_regs): Save MACL and MACH if the function has the
renesas attribute.
(sh_expand_prologue): Support renesas attribute.
(sh_builtin_saveregs): Make static.
(sh_build_va_list): Support renesas attribute.
(sh_va_start): Likewise.
(sh_va_arg): Likewise.
(sh_promote_prototypes): New.
(sh_function_arg): New, moved from sh.h. Support renesas
attribute.
(sh_function_arg_advance): Likewise.
(sh_return_in_memory): Likewise.
(sh_strict_argument_naming): Likewise.
(sh_pretend_outgoing_varargs_named): Likewise.
(sh_struct_value_rtx): New.
(sh_attribute): Add renesas attribute.
(sh_handle_renesas_attribute): New.
(sh_attr_renesas_p, sh_cfun_attr_renesas_p): New.
(sh_ms_bitfield_layout_p): Support renesas attribute also.
(sh_output_mi_thunk): Pass function to aggregate_value_p. *
config/sh/sh.h (TARGET_SWITCHES): Add -mrenesas as an alias for
-mhitachi.
(STRUCT_VALUE_REGNUM, STRUCT_VALUE, RETURN_IN_MEMORY): Moved to
target hooks.
(sh_args): Add renesas_abi flag.
(INIT_CUMULATIVE_ARGS): Set it. Pass fndecl to aggregate_value_p.
(FUNCTION_ARG_ADVANCE, FUNCTION_ARG): Move to sh.c.
(PASS_IN_REG_P): Support renesas attribute. Pass DF and TF on the
stack for the renesas abi.
(STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED,
SETUP_INCOMING_VARARGS, EXPAND_BUILTIN_SAVEREGS,
PROMOTE_PROTOTYPES): Moved to sh.c. * config/sh/sh.md (call): Set
call cookie to indicate renesas calls.
* decl.c (finish_function): Pass fndecl to aggregate_value_p.
* misc.c (default_pass_by_ref): Convert to calls.return_in_memory
hook.
From-SVN: r71048
2003-09-04 05:18:05 +02:00
|
|
|
If this target hook returns @code{true}, @code{FUNCTION_VALUE} must
|
2004-11-17 00:33:58 +01:00
|
|
|
perform the same promotions done by @code{PROMOTE_FUNCTION_MODE}.
|
targhooks.c: New file.
* targhooks.c: New file.
* targhooks.h: New file.
* Makefile.in: Add targhooks.o support.
(function.o): Depend on$(TARGET_H).
(stmt.o): Likewise.
(combine.o): Depend on $(TREE_H) and $(TARGET_H).
* builtins.c (apply_args_size, expand_builtin_apply_args_1,
expand_builtin_apply): Convert to calls.struct_value_rtx hook.
(expand_builtin_saveregs): Convert to
calls.expand_builtin_saveregs hook.
* c-decl.c (start_decl): Handle new calls.promote_prototypes hook
here, instead of ...
(get_parm_info) ... here.
(store_parm_decls_oldstyle): Convert to calls.promote_prototypes
hook.
(finish_function): Handle calls.promote_prototypes hook here too.
* c-typeck.c (convert_arguments): Convert to
calls.promote_prototypes hook.
(c_convert_parm_for_inlining): Likewise.
* calls.c (initialize_argument_information): Convert to
calls.promote_function_args hook.
(expand_call): Convert to calls.struct_value_rtx,
calls.strict_argument_naming,
calls.pretend_outgoing_varargs_named, and
calls.promote_function_return hooks. Pass fndecl to
aggregate_value_p. Initialize CUMULATIVE_ARGS before calling
hooks, so they can use that.
(emit_library_call_value_1): Likewise.
* combine.c (setup_incoming_promotions): Convert to
calls.promote_function_args hook.
* emit-rtl.c: Convert to calls.struct_value_rtx hook.
* expr.c (expand_assignment): Pass call to aggregate_value_p.
(expand_expr): Likewise.
* expr.h: Remove support for SETUP_INCOMING_VARARGS,
STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED,
RETURN_IN_MEMORY macro defaults.
* final.c (profile_function): Convert to calls.struct_value_rtx
hook.
* function.c (aggregate_value_p): Accept function type tree as
second parameter; try to deduce fntype from it. Convert to
calls.return_in_memory hook.
(assign_parms): Convert to calls.setup_incoming_varargs,
calls.strict_argument_naming, calls.promote_function_args,
calls.pretend_outgoing_varargs_named hooks. Pass fndecl to
aggregate_value_p.
(expand_function_start): Likewise. Convert to
calls.struct_value_rtx hook.
(expand_function_end): Convert to calls.promote_function_return hook.
(allocate_struct_function): Pass fndecl to aggregate_value_p.
* hard-reg-set.h: Update comments to new hook names.
* integrate.c (expand_inline_function): Pass fndecl to aggregate_value_p.
* reg-stack.c (stack_result): Likewise.
* rtl.h (struct_value_rtx, struct_value_incoming_rtx): Delete.
* stmt.c (expand_value_return): Convert to
calls.promote_function_return hook.
* target-def.h: Add TARGET_PROMOTE_FUNCTION_ARGS,
TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES,
TARGET_STRUCT_VALUE_RTX, TARGET_RETURN_IN_MEMORY,
TARGET_EXPAND_BUILTIN_SAVEREGS, TARGET_SETUP_INCOMING_VARARGS,
TARGET_STRICT_ARGUMENT_NAMING,
TARGET_PRETEND_OUTGOING_VARARGS_NAMED, and TARGET_CALLS.
* target.h: Likewise.
* tree.h (aggregate_value_p): Also takes a tree to deduce function
attributes from (for target hooks).
* doc/tm.texi (PROMOTE_FUNCTION_ARGS, PROMOTE_FUNCTION_RETURN,
PROMOTE_PROTOTYPES, RETURN_IN_MEMORY, STRUCT_VALUE_REGNUM,
STRUCT_VALUE, STRUCT_VALUE_INCOMING_REGNUM, STRUCT_VALUE_INCOMING,
EXPAND_BUILTIN_SAVEREGS, SETUP_INCOMING_VARARGS,
STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED): Convert
to hooks.
* config/alpha/alpha.c (alpha_output_mi_thunk_osf): Pass function
to aggregate_value_p.
* config/arm/arm.c (arm_init_cumulative_args,
arm_output_mi_thunk): Likewise.
* config/i386/i386.c (ix86_return_pops_args, x86_this_parameter):
Likewise.
* config/mips/mips.c (mips_save_reg_p, mips_expand_prologue,
mips_can_use_return_insn): Likewise.
* config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise.
* config/s390/s390.c (s390_output_mi_thunk): Likewise.
* config/sparc/sparc.c (sparc_output_mi_thunk): Pass function to
aggregate_value_p.
* config/story16/stormy16.c (xstormy16_asm_output_mi_thunk): Pass
function to aggregate_value_p.
* objc/objc-act.c (generate_struct_by_value_array): Pass NULL to
aggregate_value_p.
* config/sh/sh-protos.h (sh_builtin_saveregs): Remove.
(sh_attr_renesas_p, sh_cfun_attr_renesas_p, sh_function_arg,
sh_function_arg_advance, sh_pass_in_reg_p): New. * config/sh/sh.c
(sh_handle_renesas_attribute, sh_promote_prototypes,
sh_struct_value_rtx, sh_return_in_memory, sh_builtin_saveregs,
sh_setup_incoming_varargs, sh_strict_argument_naming,
sh_pretend_outgoing_varargs_named): New decls.
(targetm): Add new hooks.
(calc_live_regs): Save MACL and MACH if the function has the
renesas attribute.
(sh_expand_prologue): Support renesas attribute.
(sh_builtin_saveregs): Make static.
(sh_build_va_list): Support renesas attribute.
(sh_va_start): Likewise.
(sh_va_arg): Likewise.
(sh_promote_prototypes): New.
(sh_function_arg): New, moved from sh.h. Support renesas
attribute.
(sh_function_arg_advance): Likewise.
(sh_return_in_memory): Likewise.
(sh_strict_argument_naming): Likewise.
(sh_pretend_outgoing_varargs_named): Likewise.
(sh_struct_value_rtx): New.
(sh_attribute): Add renesas attribute.
(sh_handle_renesas_attribute): New.
(sh_attr_renesas_p, sh_cfun_attr_renesas_p): New.
(sh_ms_bitfield_layout_p): Support renesas attribute also.
(sh_output_mi_thunk): Pass function to aggregate_value_p. *
config/sh/sh.h (TARGET_SWITCHES): Add -mrenesas as an alias for
-mhitachi.
(STRUCT_VALUE_REGNUM, STRUCT_VALUE, RETURN_IN_MEMORY): Moved to
target hooks.
(sh_args): Add renesas_abi flag.
(INIT_CUMULATIVE_ARGS): Set it. Pass fndecl to aggregate_value_p.
(FUNCTION_ARG_ADVANCE, FUNCTION_ARG): Move to sh.c.
(PASS_IN_REG_P): Support renesas attribute. Pass DF and TF on the
stack for the renesas abi.
(STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED,
SETUP_INCOMING_VARARGS, EXPAND_BUILTIN_SAVEREGS,
PROMOTE_PROTOTYPES): Moved to sh.c. * config/sh/sh.md (call): Set
call cookie to indicate renesas calls.
* decl.c (finish_function): Pass fndecl to aggregate_value_p.
* misc.c (default_pass_by_ref): Convert to calls.return_in_memory
hook.
From-SVN: r71048
2003-09-04 05:18:05 +02:00
|
|
|
@end deftypefn
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac PARM_BOUNDARY
|
1996-09-25 01:21:45 +02:00
|
|
|
Normal alignment required for function parameters on the stack, in
|
|
|
|
bits. All stack parameters receive at least this much alignment
|
|
|
|
regardless of data type. On most machines, this is the same as the
|
|
|
|
size of an integer.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac STACK_BOUNDARY
|
2001-08-12 03:46:15 +02:00
|
|
|
Define this macro to the minimum alignment enforced by hardware for the
|
|
|
|
stack pointer on this machine. The definition is a C expression for the
|
|
|
|
desired alignment (measured in bits). This value is used as a default
|
|
|
|
if @code{PREFERRED_STACK_BOUNDARY} is not defined. On most machines,
|
|
|
|
this should be the same as @code{PARM_BOUNDARY}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1998-11-19 23:47:55 +01:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac PREFERRED_STACK_BOUNDARY
|
2001-08-12 03:46:15 +02:00
|
|
|
Define this macro if you wish to preserve a certain alignment for the
|
|
|
|
stack pointer, greater than what the hardware enforces. The definition
|
|
|
|
is a C expression for the desired alignment (measured in bits). This
|
|
|
|
macro must evaluate to a value equal to or larger than
|
|
|
|
@code{STACK_BOUNDARY}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac FORCE_PREFERRED_STACK_BOUNDARY_IN_MAIN
|
2001-08-06 18:38:18 +02:00
|
|
|
A C expression that evaluates true if @code{PREFERRED_STACK_BOUNDARY} is
|
|
|
|
not guaranteed by the runtime and we should emit code to align the stack
|
|
|
|
at the beginning of @code{main}.
|
|
|
|
|
1998-11-19 23:47:55 +01:00
|
|
|
@cindex @code{PUSH_ROUNDING}, interaction with @code{PREFERRED_STACK_BOUNDARY}
|
1996-09-25 01:21:45 +02:00
|
|
|
If @code{PUSH_ROUNDING} is not defined, the stack will always be aligned
|
1998-11-19 23:47:55 +01:00
|
|
|
to the specified boundary. If @code{PUSH_ROUNDING} is defined and specifies
|
|
|
|
a less strict alignment than @code{PREFERRED_STACK_BOUNDARY}, the stack may
|
|
|
|
be momentarily unaligned while pushing arguments.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac FUNCTION_BOUNDARY
|
1996-09-25 01:21:45 +02:00
|
|
|
Alignment required for a function entry point, in bits.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac BIGGEST_ALIGNMENT
|
1996-09-25 01:21:45 +02:00
|
|
|
Biggest alignment that any data type can require on this machine, in bits.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac MINIMUM_ATOMIC_ALIGNMENT
|
1997-08-11 17:56:58 +02:00
|
|
|
If defined, the smallest alignment, in bits, that can be given to an
|
|
|
|
object that can be referenced in one operation, without disturbing any
|
|
|
|
nearby object. Normally, this is @code{BITS_PER_UNIT}, but may be larger
|
|
|
|
on machines that don't have byte or half-word store operations.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1997-08-11 17:56:58 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac BIGGEST_FIELD_ALIGNMENT
|
2000-06-14 07:30:09 +02:00
|
|
|
Biggest alignment that any structure or union field can require on this
|
|
|
|
machine, in bits. If defined, this overrides @code{BIGGEST_ALIGNMENT} for
|
|
|
|
structure and union fields only, unless the field alignment has been set
|
|
|
|
by the @code{__attribute__ ((aligned (@var{n})))} construct.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ADJUST_FIELD_ALIGN (@var{field}, @var{computed})
|
1996-09-25 01:21:45 +02:00
|
|
|
An expression for the alignment of a structure field @var{field} if the
|
2002-08-07 23:05:16 +02:00
|
|
|
alignment computed in the usual way (including applying of
|
|
|
|
@code{BIGGEST_ALIGNMENT} and @code{BIGGEST_FIELD_ALIGNMENT} to the
|
|
|
|
alignment) is @var{computed}. It overrides alignment only if the
|
|
|
|
field alignment has not been set by the
|
|
|
|
@code{__attribute__ ((aligned (@var{n})))} construct.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac MAX_OFILE_ALIGNMENT
|
1996-09-25 01:21:45 +02:00
|
|
|
Biggest alignment supported by the object file format of this machine.
|
|
|
|
Use this macro to limit the alignment which can be specified using the
|
|
|
|
@code{__attribute__ ((aligned (@var{n})))} construct. If not defined,
|
|
|
|
the default value is @code{BIGGEST_ALIGNMENT}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac DATA_ALIGNMENT (@var{type}, @var{basic-align})
|
2001-01-25 23:18:16 +01:00
|
|
|
If defined, a C expression to compute the alignment for a variable in
|
1998-05-12 01:47:28 +02:00
|
|
|
the static store. @var{type} is the data type, and @var{basic-align} is
|
|
|
|
the alignment that the object would ordinarily have. The value of this
|
1996-09-25 01:21:45 +02:00
|
|
|
macro is used instead of that alignment to align the object.
|
|
|
|
|
|
|
|
If this macro is not defined, then @var{basic-align} is used.
|
|
|
|
|
|
|
|
@findex strcpy
|
|
|
|
One use of this macro is to increase alignment of medium-size data to
|
|
|
|
make it all fit in fewer cache lines. Another is to cause character
|
|
|
|
arrays to be word-aligned so that @code{strcpy} calls that copy
|
|
|
|
constants to character arrays can be done inline.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac CONSTANT_ALIGNMENT (@var{constant}, @var{basic-align})
|
1996-09-25 01:21:45 +02:00
|
|
|
If defined, a C expression to compute the alignment given to a constant
|
|
|
|
that is being placed in memory. @var{constant} is the constant and
|
|
|
|
@var{basic-align} is the alignment that the object would ordinarily
|
|
|
|
have. The value of this macro is used instead of that alignment to
|
|
|
|
align the object.
|
|
|
|
|
|
|
|
If this macro is not defined, then @var{basic-align} is used.
|
|
|
|
|
|
|
|
The typical use of this macro is to increase alignment for string
|
|
|
|
constants to be word aligned so that @code{strcpy} calls that copy
|
|
|
|
constants can be done inline.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac LOCAL_ALIGNMENT (@var{type}, @var{basic-align})
|
2001-01-25 23:18:16 +01:00
|
|
|
If defined, a C expression to compute the alignment for a variable in
|
1999-02-11 00:10:43 +01:00
|
|
|
the local store. @var{type} is the data type, and @var{basic-align} is
|
|
|
|
the alignment that the object would ordinarily have. The value of this
|
|
|
|
macro is used instead of that alignment to align the object.
|
|
|
|
|
|
|
|
If this macro is not defined, then @var{basic-align} is used.
|
|
|
|
|
|
|
|
One use of this macro is to increase alignment of medium-size data to
|
|
|
|
make it all fit in fewer cache lines.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1999-02-11 00:10:43 +01:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac EMPTY_FIELD_BOUNDARY
|
c-tree.texi, [...]: Fix spelling and typos.
* doc/c-tree.texi, doc/contrib.texi, doc/extend.texi,
doc/gcc.texi, doc/install.texi, doc/invoke.texi, doc/md.texi,
doc/objc.texi, doc/rtl.texi, doc/tm.texi: Fix spelling and typos.
Consistently use "built-in" and "bit-field". Minor logical markup
improvements.
* doc/gcc.1: Regenerate.
From-SVN: r43383
2001-06-15 00:51:18 +02:00
|
|
|
Alignment in bits to be given to a structure bit-field that follows an
|
1996-09-25 01:21:45 +02:00
|
|
|
empty field such as @code{int : 0;}.
|
|
|
|
|
2003-04-03 20:23:04 +02:00
|
|
|
If @code{PCC_BITFIELD_TYPE_MATTERS} is true, it overrides this macro.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac STRUCTURE_SIZE_BOUNDARY
|
1996-09-25 01:21:45 +02:00
|
|
|
Number of bits which any structure or union's size must be a multiple of.
|
|
|
|
Each structure or union's size is rounded up to a multiple of this.
|
|
|
|
|
|
|
|
If you do not define this macro, the default is the same as
|
|
|
|
@code{BITS_PER_UNIT}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac STRICT_ALIGNMENT
|
1996-09-25 01:21:45 +02:00
|
|
|
Define this macro to be the value 1 if instructions will fail to work
|
|
|
|
if given data not on the nominal alignment. If instructions will merely
|
|
|
|
go slower in that case, define this macro as 0.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac PCC_BITFIELD_TYPE_MATTERS
|
1996-09-25 01:21:45 +02:00
|
|
|
Define this if you wish to imitate the way many other C compilers handle
|
c-tree.texi, [...]: Fix spelling and typos.
* doc/c-tree.texi, doc/contrib.texi, doc/extend.texi,
doc/gcc.texi, doc/install.texi, doc/invoke.texi, doc/md.texi,
doc/objc.texi, doc/rtl.texi, doc/tm.texi: Fix spelling and typos.
Consistently use "built-in" and "bit-field". Minor logical markup
improvements.
* doc/gcc.1: Regenerate.
From-SVN: r43383
2001-06-15 00:51:18 +02:00
|
|
|
alignment of bit-fields and the structures that contain them.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2002-12-23 17:39:36 +01:00
|
|
|
The behavior is that the type written for a named bit-field (@code{int},
|
|
|
|
@code{short}, or other integer type) imposes an alignment for the entire
|
|
|
|
structure, as if the structure really did contain an ordinary field of
|
|
|
|
that type. In addition, the bit-field is placed within the structure so
|
|
|
|
that it would fit within such a field, not crossing a boundary for it.
|
|
|
|
|
|
|
|
Thus, on most machines, a named bit-field whose type is written as
|
|
|
|
@code{int} would not cross a four-byte boundary, and would force
|
|
|
|
four-byte alignment for the whole structure. (The alignment used may
|
|
|
|
not be four bytes; it is controlled by the other alignment parameters.)
|
|
|
|
|
|
|
|
An unnamed bit-field will not affect the alignment of the containing
|
|
|
|
structure.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
If the macro is defined, its definition should be a C expression;
|
|
|
|
a nonzero value for the expression enables this behavior.
|
|
|
|
|
|
|
|
Note that if this macro is not defined, or its value is zero, some
|
c-tree.texi, [...]: Fix spelling and typos.
* doc/c-tree.texi, doc/contrib.texi, doc/extend.texi,
doc/gcc.texi, doc/install.texi, doc/invoke.texi, doc/md.texi,
doc/objc.texi, doc/rtl.texi, doc/tm.texi: Fix spelling and typos.
Consistently use "built-in" and "bit-field". Minor logical markup
improvements.
* doc/gcc.1: Regenerate.
From-SVN: r43383
2001-06-15 00:51:18 +02:00
|
|
|
bit-fields may cross more than one alignment boundary. The compiler can
|
1996-09-25 01:21:45 +02:00
|
|
|
support such references if there are @samp{insv}, @samp{extv}, and
|
|
|
|
@samp{extzv} insns that can directly reference memory.
|
|
|
|
|
c-tree.texi, [...]: Fix spelling and typos.
* doc/c-tree.texi, doc/contrib.texi, doc/extend.texi,
doc/gcc.texi, doc/install.texi, doc/invoke.texi, doc/md.texi,
doc/objc.texi, doc/rtl.texi, doc/tm.texi: Fix spelling and typos.
Consistently use "built-in" and "bit-field". Minor logical markup
improvements.
* doc/gcc.1: Regenerate.
From-SVN: r43383
2001-06-15 00:51:18 +02:00
|
|
|
The other known way of making bit-fields work is to define
|
1996-09-25 01:21:45 +02:00
|
|
|
@code{STRUCTURE_SIZE_BOUNDARY} as large as @code{BIGGEST_ALIGNMENT}.
|
|
|
|
Then every structure can be accessed with fullwords.
|
|
|
|
|
c-tree.texi, [...]: Fix spelling and typos.
* doc/c-tree.texi, doc/contrib.texi, doc/extend.texi,
doc/gcc.texi, doc/install.texi, doc/invoke.texi, doc/md.texi,
doc/objc.texi, doc/rtl.texi, doc/tm.texi: Fix spelling and typos.
Consistently use "built-in" and "bit-field". Minor logical markup
improvements.
* doc/gcc.1: Regenerate.
From-SVN: r43383
2001-06-15 00:51:18 +02:00
|
|
|
Unless the machine has bit-field instructions or you define
|
1996-09-25 01:21:45 +02:00
|
|
|
@code{STRUCTURE_SIZE_BOUNDARY} that way, you must define
|
|
|
|
@code{PCC_BITFIELD_TYPE_MATTERS} to have a nonzero value.
|
|
|
|
|
1999-08-25 09:27:13 +02:00
|
|
|
If your aim is to make GCC use the same conventions for laying out
|
c-tree.texi, [...]: Fix spelling and typos.
* doc/c-tree.texi, doc/contrib.texi, doc/extend.texi,
doc/gcc.texi, doc/install.texi, doc/invoke.texi, doc/md.texi,
doc/objc.texi, doc/rtl.texi, doc/tm.texi: Fix spelling and typos.
Consistently use "built-in" and "bit-field". Minor logical markup
improvements.
* doc/gcc.1: Regenerate.
From-SVN: r43383
2001-06-15 00:51:18 +02:00
|
|
|
bit-fields as are used by another compiler, here is how to investigate
|
1996-09-25 01:21:45 +02:00
|
|
|
what the other compiler does. Compile and run this program:
|
|
|
|
|
c-tree.texi, [...]: Use @smallexample instead of @example.
* doc/c-tree.texi, doc/compat.texi, doc/cpp.texi,
doc/cppopts.texi, doc/extend.texi, doc/install.texi,
doc/interface.texi, doc/invoke.texi, doc/libgcc.texi, doc/md.texi,
doc/objc.texi, doc/rtl.texi, doc/tm.texi, doc/trouble.texi: Use
@smallexample instead of @example.
From-SVN: r76075
2004-01-18 02:20:48 +01:00
|
|
|
@smallexample
|
1996-09-25 01:21:45 +02:00
|
|
|
struct foo1
|
|
|
|
@{
|
|
|
|
char x;
|
|
|
|
char :0;
|
|
|
|
char y;
|
|
|
|
@};
|
|
|
|
|
|
|
|
struct foo2
|
|
|
|
@{
|
|
|
|
char x;
|
|
|
|
int :0;
|
|
|
|
char y;
|
|
|
|
@};
|
|
|
|
|
|
|
|
main ()
|
|
|
|
@{
|
|
|
|
printf ("Size of foo1 is %d\n",
|
|
|
|
sizeof (struct foo1));
|
|
|
|
printf ("Size of foo2 is %d\n",
|
|
|
|
sizeof (struct foo2));
|
|
|
|
exit (0);
|
|
|
|
@}
|
c-tree.texi, [...]: Use @smallexample instead of @example.
* doc/c-tree.texi, doc/compat.texi, doc/cpp.texi,
doc/cppopts.texi, doc/extend.texi, doc/install.texi,
doc/interface.texi, doc/invoke.texi, doc/libgcc.texi, doc/md.texi,
doc/objc.texi, doc/rtl.texi, doc/tm.texi, doc/trouble.texi: Use
@smallexample instead of @example.
From-SVN: r76075
2004-01-18 02:20:48 +01:00
|
|
|
@end smallexample
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
If this prints 2 and 5, then the compiler's behavior is what you would
|
|
|
|
get from @code{PCC_BITFIELD_TYPE_MATTERS}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac BITFIELD_NBYTES_LIMITED
|
2002-02-05 18:56:34 +01:00
|
|
|
Like @code{PCC_BITFIELD_TYPE_MATTERS} except that its effect is limited
|
|
|
|
to aligning a bit-field within the structure.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2004-05-14 14:53:11 +02:00
|
|
|
@deftypefn {Target Hook} bool TARGET_ALIGN_ANON_BITFIELDS (void)
|
|
|
|
When @code{PCC_BITFIELD_TYPE_MATTERS} is true this hook will determine
|
|
|
|
whether unnamed bitfields affect the alignment of the containing
|
|
|
|
structure. The hook should return true if the structure should inherit
|
|
|
|
the alignment requirements of an unnamed bitfield's type.
|
|
|
|
@end deftypefn
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac MEMBER_TYPE_FORCES_BLK (@var{field}, @var{mode})
|
2001-03-03 04:53:44 +01:00
|
|
|
Return 1 if a structure or array containing @var{field} should be accessed using
|
2000-03-19 13:32:32 +01:00
|
|
|
@code{BLKMODE}.
|
|
|
|
|
2002-06-15 11:41:13 +02:00
|
|
|
If @var{field} is the only field in the structure, @var{mode} is its
|
|
|
|
mode, otherwise @var{mode} is VOIDmode. @var{mode} is provided in the
|
|
|
|
case where structures of one field would require the structure's mode to
|
|
|
|
retain the field's mode.
|
|
|
|
|
2000-03-19 13:32:32 +01:00
|
|
|
Normally, this is not needed. See the file @file{c4x.h} for an example
|
|
|
|
of how to use this macro to prevent a structure having a floating point
|
|
|
|
field from being accessed in an integer mode.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2000-03-19 13:32:32 +01:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ROUND_TYPE_ALIGN (@var{type}, @var{computed}, @var{specified})
|
1999-01-21 12:20:09 +01:00
|
|
|
Define this macro as an expression for the alignment of a type (given
|
|
|
|
by @var{type} as a tree node) if the alignment computed in the usual
|
|
|
|
way is @var{computed} and the alignment explicitly specified was
|
1996-09-25 01:21:45 +02:00
|
|
|
@var{specified}.
|
|
|
|
|
|
|
|
The default is to use @var{specified} if it is larger; otherwise, use
|
|
|
|
the smaller of @var{computed} and @code{BIGGEST_ALIGNMENT}
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac MAX_FIXED_MODE_SIZE
|
1996-09-25 01:21:45 +02:00
|
|
|
An integer expression for the size in bits of the largest integer
|
|
|
|
machine mode that should actually be used. All integer machine modes of
|
|
|
|
this size or smaller can be used for structures and unions with the
|
|
|
|
appropriate sizes. If this macro is undefined, @code{GET_MODE_BITSIZE
|
|
|
|
(DImode)} is assumed.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac STACK_SAVEAREA_MODE (@var{save_level})
|
1998-06-30 16:45:56 +02:00
|
|
|
If defined, an expression of type @code{enum machine_mode} that
|
1998-07-02 13:53:24 +02:00
|
|
|
specifies the mode of the save area operand of a
|
|
|
|
@code{save_stack_@var{level}} named pattern (@pxref{Standard Names}).
|
|
|
|
@var{save_level} is one of @code{SAVE_BLOCK}, @code{SAVE_FUNCTION}, or
|
|
|
|
@code{SAVE_NONLOCAL} and selects which of the three named patterns is
|
|
|
|
having its mode specified.
|
1998-06-30 16:45:56 +02:00
|
|
|
|
|
|
|
You need not define this macro if it always returns @code{Pmode}. You
|
|
|
|
would most commonly define this macro if the
|
|
|
|
@code{save_stack_@var{level}} patterns need to support both a 32- and a
|
|
|
|
64-bit mode.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1998-06-30 16:45:56 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac STACK_SIZE_MODE
|
1998-07-02 13:53:24 +02:00
|
|
|
If defined, an expression of type @code{enum machine_mode} that
|
|
|
|
specifies the mode of the size increment operand of an
|
|
|
|
@code{allocate_stack} named pattern (@pxref{Standard Names}).
|
|
|
|
|
|
|
|
You need not define this macro if it always returns @code{word_mode}.
|
|
|
|
You would most commonly define this macro if the @code{allocate_stack}
|
|
|
|
pattern needs to support both a 32- and a 64-bit mode.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1998-07-02 13:53:24 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac TARGET_FLOAT_FORMAT
|
1996-09-25 01:21:45 +02:00
|
|
|
A code distinguishing the floating point format of the target machine.
|
2003-06-20 08:41:12 +02:00
|
|
|
There are four defined values:
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@ftable @code
|
1996-09-25 01:21:45 +02:00
|
|
|
@item IEEE_FLOAT_FORMAT
|
|
|
|
This code indicates IEEE floating point. It is the default; there is no
|
2003-06-20 08:41:12 +02:00
|
|
|
need to define @code{TARGET_FLOAT_FORMAT} when the format is IEEE@.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
@item VAX_FLOAT_FORMAT
|
2002-08-30 21:18:51 +02:00
|
|
|
This code indicates the ``F float'' (for @code{float}) and ``D float''
|
|
|
|
or ``G float'' formats (for @code{double}) used on the VAX and PDP-11@.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2001-07-23 22:33:40 +02:00
|
|
|
@item IBM_FLOAT_FORMAT
|
|
|
|
This code indicates the format used on the IBM System/370.
|
|
|
|
|
|
|
|
@item C4X_FLOAT_FORMAT
|
|
|
|
This code indicates the format used on the TMS320C3x/C4x.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end ftable
|
2001-07-23 22:33:40 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
If your target uses a floating point format other than these, you must
|
|
|
|
define a new @var{name}_FLOAT_FORMAT code for it, and add support for
|
|
|
|
it to @file{real.c}.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
The ordering of the component words of floating point values stored in
|
2002-01-23 18:30:28 +01:00
|
|
|
memory is controlled by @code{FLOAT_WORDS_BIG_ENDIAN}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1997-11-02 22:19:36 +01:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac MODE_HAS_NANS (@var{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
|
|
|
When defined, this macro should be true if @var{mode} has a NaN
|
|
|
|
representation. The compiler assumes that NaNs are not equal to
|
|
|
|
anything (including themselves) and that addition, subtraction,
|
|
|
|
multiplication and division all return NaNs when one operand is
|
|
|
|
NaN@.
|
|
|
|
|
|
|
|
By default, this macro is true if @var{mode} is a floating-point
|
|
|
|
mode and the target floating-point format is IEEE@.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
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
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac MODE_HAS_INFINITIES (@var{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
|
|
|
This macro should be true if @var{mode} can represent infinity. At
|
|
|
|
present, the compiler uses this macro to decide whether @samp{x - x}
|
|
|
|
is always defined. By default, the macro is true when @var{mode}
|
|
|
|
is a floating-point mode and the target format is IEEE@.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
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
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac MODE_HAS_SIGNED_ZEROS (@var{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
|
|
|
True if @var{mode} distinguishes between positive and negative zero.
|
|
|
|
The rules are expected to follow the IEEE standard:
|
|
|
|
|
|
|
|
@itemize @bullet
|
|
|
|
@item
|
|
|
|
@samp{x + x} has the same sign as @samp{x}.
|
|
|
|
|
|
|
|
@item
|
|
|
|
If the sum of two values with opposite sign is zero, the result is
|
|
|
|
positive for all rounding modes expect towards @minus{}infinity, for
|
|
|
|
which it is negative.
|
|
|
|
|
|
|
|
@item
|
|
|
|
The sign of a product or quotient is negative when exactly one
|
|
|
|
of the operands is negative.
|
|
|
|
@end itemize
|
|
|
|
|
|
|
|
The default definition is true if @var{mode} is a floating-point
|
|
|
|
mode and the target format is IEEE@.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
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
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac MODE_HAS_SIGN_DEPENDENT_ROUNDING (@var{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
|
|
|
If defined, this macro should be true for @var{mode} if it has at
|
|
|
|
least one rounding mode in which @samp{x} and @samp{-x} can be
|
|
|
|
rounded to numbers of different magnitude. Two such modes are
|
|
|
|
towards @minus{}infinity and towards +infinity.
|
|
|
|
|
|
|
|
The default definition of this macro is true if @var{mode} is
|
|
|
|
a floating-point mode and the target format is IEEE@.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
defaults.h (LARGEST_EXPONENT_IS_NORMAL, [...]): New.
* defaults.h (LARGEST_EXPONENT_IS_NORMAL, ROUND_TOWARDS_ZERO): New.
(MODE_HAS_NANS, MODE_HAS_INFINITIES): Evaluate to false if
LARGEST_EXPONENT_IS_NORMAL for the given mode.
(MODE_HAS_SIGN_DEPENDENT_ROUNDING): False when ROUND_TOWARDS_ZERO.
* real.c (eadd1): Make rounding dependent on !ROUND_TOWARDS_ZERO.
(ediv, emul, eldexp, esqrt): Likewise.
(etoe113, etoe64, etoe53, etoe24, etodec, etoibm, etoc4x): Likewise.
(e24toe): Only check NaNs & infinities if !LARGEST_EXPONENT_IS_NORMAL.
(saturate): New function.
(toe53, toe24): Saturate on overflow if LARGEST_EXPONENT_IS_NORMAL.
(make_nan): Use a saturation value instead of a NaN if
LARGEST_EXPONENT_IS_NORMAL. Warn when this happens.
* fp-bit.c (pack_d): Saturate on NaN, infinite or overflowing
inputs if LARGEST_EXPONENT_IS_NORMAL. Represent subnormals as
zero if NO_DENORMALS. Only round to nearest if !ROUND_TOWARDS_ZERO.
(unpack_d): No NaNs or infinities if LARGEST_EXPONENT_IS_NORMAL.
(_fpmul_parts, _fpdiv_parts): Only round to nearest if
!ROUND_TOWARDS_ZERO.
* doc/tm.texi (LARGEST_EXPONENT_IS_NORMAL): Document.
(ROUND_TOWARDS_ZERO): Document.
From-SVN: r50569
2002-03-11 12:13:45 +01:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ROUND_TOWARDS_ZERO
|
defaults.h (LARGEST_EXPONENT_IS_NORMAL, [...]): New.
* defaults.h (LARGEST_EXPONENT_IS_NORMAL, ROUND_TOWARDS_ZERO): New.
(MODE_HAS_NANS, MODE_HAS_INFINITIES): Evaluate to false if
LARGEST_EXPONENT_IS_NORMAL for the given mode.
(MODE_HAS_SIGN_DEPENDENT_ROUNDING): False when ROUND_TOWARDS_ZERO.
* real.c (eadd1): Make rounding dependent on !ROUND_TOWARDS_ZERO.
(ediv, emul, eldexp, esqrt): Likewise.
(etoe113, etoe64, etoe53, etoe24, etodec, etoibm, etoc4x): Likewise.
(e24toe): Only check NaNs & infinities if !LARGEST_EXPONENT_IS_NORMAL.
(saturate): New function.
(toe53, toe24): Saturate on overflow if LARGEST_EXPONENT_IS_NORMAL.
(make_nan): Use a saturation value instead of a NaN if
LARGEST_EXPONENT_IS_NORMAL. Warn when this happens.
* fp-bit.c (pack_d): Saturate on NaN, infinite or overflowing
inputs if LARGEST_EXPONENT_IS_NORMAL. Represent subnormals as
zero if NO_DENORMALS. Only round to nearest if !ROUND_TOWARDS_ZERO.
(unpack_d): No NaNs or infinities if LARGEST_EXPONENT_IS_NORMAL.
(_fpmul_parts, _fpdiv_parts): Only round to nearest if
!ROUND_TOWARDS_ZERO.
* doc/tm.texi (LARGEST_EXPONENT_IS_NORMAL): Document.
(ROUND_TOWARDS_ZERO): Document.
From-SVN: r50569
2002-03-11 12:13:45 +01:00
|
|
|
If defined, this macro should be true if the prevailing rounding
|
|
|
|
mode is towards zero. A true value has the following effects:
|
|
|
|
|
|
|
|
@itemize @bullet
|
|
|
|
@item
|
|
|
|
@code{MODE_HAS_SIGN_DEPENDENT_ROUNDING} will be false for all modes.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@file{libgcc.a}'s floating-point emulator will round towards zero
|
|
|
|
rather than towards nearest.
|
|
|
|
|
|
|
|
@item
|
|
|
|
The compiler's floating-point emulator will round towards zero after
|
|
|
|
doing arithmetic, and when converting from the internal float format to
|
|
|
|
the target format.
|
|
|
|
@end itemize
|
|
|
|
|
|
|
|
The macro does not affect the parsing of string literals. When the
|
|
|
|
primary rounding mode is towards zero, library functions like
|
|
|
|
@code{strtod} might still round towards nearest, and the compiler's
|
|
|
|
parser should behave like the target's @code{strtod} where possible.
|
|
|
|
|
|
|
|
Not defining this macro is equivalent to returning zero.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
defaults.h (LARGEST_EXPONENT_IS_NORMAL, [...]): New.
* defaults.h (LARGEST_EXPONENT_IS_NORMAL, ROUND_TOWARDS_ZERO): New.
(MODE_HAS_NANS, MODE_HAS_INFINITIES): Evaluate to false if
LARGEST_EXPONENT_IS_NORMAL for the given mode.
(MODE_HAS_SIGN_DEPENDENT_ROUNDING): False when ROUND_TOWARDS_ZERO.
* real.c (eadd1): Make rounding dependent on !ROUND_TOWARDS_ZERO.
(ediv, emul, eldexp, esqrt): Likewise.
(etoe113, etoe64, etoe53, etoe24, etodec, etoibm, etoc4x): Likewise.
(e24toe): Only check NaNs & infinities if !LARGEST_EXPONENT_IS_NORMAL.
(saturate): New function.
(toe53, toe24): Saturate on overflow if LARGEST_EXPONENT_IS_NORMAL.
(make_nan): Use a saturation value instead of a NaN if
LARGEST_EXPONENT_IS_NORMAL. Warn when this happens.
* fp-bit.c (pack_d): Saturate on NaN, infinite or overflowing
inputs if LARGEST_EXPONENT_IS_NORMAL. Represent subnormals as
zero if NO_DENORMALS. Only round to nearest if !ROUND_TOWARDS_ZERO.
(unpack_d): No NaNs or infinities if LARGEST_EXPONENT_IS_NORMAL.
(_fpmul_parts, _fpdiv_parts): Only round to nearest if
!ROUND_TOWARDS_ZERO.
* doc/tm.texi (LARGEST_EXPONENT_IS_NORMAL): Document.
(ROUND_TOWARDS_ZERO): Document.
From-SVN: r50569
2002-03-11 12:13:45 +01:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac LARGEST_EXPONENT_IS_NORMAL (@var{size})
|
2002-08-30 21:18:51 +02:00
|
|
|
This macro should return true if floats with @var{size}
|
defaults.h (LARGEST_EXPONENT_IS_NORMAL, [...]): New.
* defaults.h (LARGEST_EXPONENT_IS_NORMAL, ROUND_TOWARDS_ZERO): New.
(MODE_HAS_NANS, MODE_HAS_INFINITIES): Evaluate to false if
LARGEST_EXPONENT_IS_NORMAL for the given mode.
(MODE_HAS_SIGN_DEPENDENT_ROUNDING): False when ROUND_TOWARDS_ZERO.
* real.c (eadd1): Make rounding dependent on !ROUND_TOWARDS_ZERO.
(ediv, emul, eldexp, esqrt): Likewise.
(etoe113, etoe64, etoe53, etoe24, etodec, etoibm, etoc4x): Likewise.
(e24toe): Only check NaNs & infinities if !LARGEST_EXPONENT_IS_NORMAL.
(saturate): New function.
(toe53, toe24): Saturate on overflow if LARGEST_EXPONENT_IS_NORMAL.
(make_nan): Use a saturation value instead of a NaN if
LARGEST_EXPONENT_IS_NORMAL. Warn when this happens.
* fp-bit.c (pack_d): Saturate on NaN, infinite or overflowing
inputs if LARGEST_EXPONENT_IS_NORMAL. Represent subnormals as
zero if NO_DENORMALS. Only round to nearest if !ROUND_TOWARDS_ZERO.
(unpack_d): No NaNs or infinities if LARGEST_EXPONENT_IS_NORMAL.
(_fpmul_parts, _fpdiv_parts): Only round to nearest if
!ROUND_TOWARDS_ZERO.
* doc/tm.texi (LARGEST_EXPONENT_IS_NORMAL): Document.
(ROUND_TOWARDS_ZERO): Document.
From-SVN: r50569
2002-03-11 12:13:45 +01:00
|
|
|
bits do not have a NaN or infinity representation, but use the largest
|
|
|
|
exponent for normal numbers instead.
|
|
|
|
|
|
|
|
Defining this macro to true for @var{size} causes @code{MODE_HAS_NANS}
|
|
|
|
and @code{MODE_HAS_INFINITIES} to be false for @var{size}-bit modes.
|
|
|
|
It also affects the way @file{libgcc.a} and @file{real.c} emulate
|
|
|
|
floating-point arithmetic.
|
|
|
|
|
|
|
|
The default definition of this macro returns false for all sizes.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-02-25 18:06:41 +01:00
|
|
|
@deftypefn {Target Hook} bool TARGET_VECTOR_OPAQUE_P (tree @var{type})
|
|
|
|
This target hook should return @code{true} a vector is opaque. That
|
|
|
|
is, if no cast is needed when copying a vector value of type
|
|
|
|
@var{type} into another vector lvalue of the same size. Vector opaque
|
|
|
|
types cannot be initialized. The default is that there are no such
|
|
|
|
types.
|
2003-02-19 01:51:16 +01:00
|
|
|
@end deftypefn
|
|
|
|
|
2002-02-05 18:56:34 +01:00
|
|
|
@deftypefn {Target Hook} bool TARGET_MS_BITFIELD_LAYOUT_P (tree @var{record_type})
|
|
|
|
This target hook returns @code{true} if bit-fields in the given
|
|
|
|
@var{record_type} are to be laid out following the rules of Microsoft
|
|
|
|
Visual C/C++, namely: (i) a bit-field won't share the same storage
|
|
|
|
unit with the previous bit-field if their underlying types have
|
|
|
|
different sizes, and the bit-field will be aligned to the highest
|
|
|
|
alignment of the underlying types of itself and of the previous
|
|
|
|
bit-field; (ii) a zero-sized bit-field will affect the alignment of
|
|
|
|
the whole enclosing structure, even if it is unnamed; except that
|
|
|
|
(iii) a zero-sized bit-field will be disregarded unless it follows
|
2002-09-26 14:29:45 +02:00
|
|
|
another bit-field of nonzero size. If this hook returns @code{true},
|
2002-02-05 18:56:34 +01:00
|
|
|
other macros that control bit-field layout are ignored.
|
2002-09-18 20:51:14 +02:00
|
|
|
|
|
|
|
When a bit-field is inserted into a packed record, the whole size
|
|
|
|
of the underlying type is used by one or more same-size adjacent
|
|
|
|
bit-fields (that is, if its long:3, 32 bits is used in the record,
|
|
|
|
and any additional adjacent long bit-fields are packed into the same
|
c-tree.texi, [...]: Correct end-of-sentence markup and markup of "etc.", "e.g." and "i.e.".
* doc/c-tree.texi, doc/cfg.texi, doc/contrib.texi, doc/cpp.texi,
doc/cppopts.texi, doc/extend.texi, doc/fragments.texi,
doc/frontends.texi, doc/gcov.texi, doc/hostconfig.texi,
doc/implement-c.texi, doc/install.texi, doc/invoke.texi,
doc/libgcc.texi, doc/md.texi, doc/passes.texi,
doc/portability.texi, doc/rtl.texi, doc/sourcebuild.texi,
doc/standards.texi, doc/tm.texi, doc/tree-ssa.texi,
doc/trouble.texi: Correct end-of-sentence markup and markup of
"etc.", "e.g." and "i.e.". Use @code in various places where
appropriate.
From-SVN: r90101
2004-11-05 02:36:57 +01:00
|
|
|
chunk of 32 bits. However, if the size changes, a new field of that
|
|
|
|
size is allocated). In an unpacked record, this is the same as using
|
2002-09-18 20:51:14 +02:00
|
|
|
alignment, but not equivalent when packing.
|
|
|
|
|
|
|
|
If both MS bit-fields and @samp{__attribute__((packed))} are used,
|
c-tree.texi, [...]: Correct end-of-sentence markup and markup of "etc.", "e.g." and "i.e.".
* doc/c-tree.texi, doc/cfg.texi, doc/contrib.texi, doc/cpp.texi,
doc/cppopts.texi, doc/extend.texi, doc/fragments.texi,
doc/frontends.texi, doc/gcov.texi, doc/hostconfig.texi,
doc/implement-c.texi, doc/install.texi, doc/invoke.texi,
doc/libgcc.texi, doc/md.texi, doc/passes.texi,
doc/portability.texi, doc/rtl.texi, doc/sourcebuild.texi,
doc/standards.texi, doc/tm.texi, doc/tree-ssa.texi,
doc/trouble.texi: Correct end-of-sentence markup and markup of
"etc.", "e.g." and "i.e.". Use @code in various places where
appropriate.
From-SVN: r90101
2004-11-05 02:36:57 +01:00
|
|
|
the latter will take precedence. If @samp{__attribute__((packed))} is
|
2002-09-18 20:51:14 +02:00
|
|
|
used on a single field when MS bit-fields are in use, it will take
|
|
|
|
precedence for that field, but the alignment of the rest of the structure
|
|
|
|
may affect its placement.
|
2002-02-05 18:56:34 +01:00
|
|
|
@end deftypefn
|
|
|
|
|
2004-03-24 01:13:33 +01:00
|
|
|
@deftypefn {Target Hook} {const char *} TARGET_MANGLE_FUNDAMENTAL_TYPE (tree @var{type})
|
|
|
|
If your target defines any fundamental types, define this hook to
|
|
|
|
return the appropriate encoding for these types as part of a C++
|
|
|
|
mangled name. The @var{type} argument is the tree structure
|
|
|
|
representing the type to be mangled. The hook may be applied to trees
|
|
|
|
which are not target-specific fundamental types; it should return
|
|
|
|
@code{NULL} for all such types, as well as arguments it does not
|
|
|
|
recognize. If the return value is not @code{NULL}, it must point to
|
|
|
|
a statically-allocated string constant.
|
|
|
|
|
|
|
|
Target-specific fundamental types might be new fundamental types or
|
|
|
|
qualified versions of ordinary fundamental types. Encode new
|
|
|
|
fundamental types as @samp{@w{u @var{n} @var{name}}}, where @var{name}
|
|
|
|
is the name used for the type in source code, and @var{n} is the
|
|
|
|
length of @var{name} in decimal. Encode qualified versions of
|
|
|
|
ordinary types as @samp{@w{U @var{n} @var{name} @var{code}}}, where
|
|
|
|
@var{name} is the name used for the type qualifier in source code,
|
|
|
|
@var{n} is the length of @var{name} as above, and @var{code} is the
|
|
|
|
code used to represent the unqualified version of this type. (See
|
|
|
|
@code{write_builtin_type} in @file{cp/mangle.c} for the list of
|
|
|
|
codes.) In both cases the spaces are for clarity; do not include any
|
|
|
|
spaces in your string.
|
|
|
|
|
|
|
|
The default version of this hook always returns @code{NULL}, which is
|
|
|
|
appropriate for a target that does not define any new fundamental
|
|
|
|
types.
|
|
|
|
@end deftypefn
|
|
|
|
|
1996-09-25 01:21:45 +02:00
|
|
|
@node Type Layout
|
|
|
|
@section Layout of Source Language Data Types
|
|
|
|
|
|
|
|
These macros define the sizes and other characteristics of the standard
|
|
|
|
basic data types used in programs being compiled. Unlike the macros in
|
|
|
|
the previous section, these apply to specific features of C and related
|
|
|
|
languages, rather than to fundamental aspects of storage layout.
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac INT_TYPE_SIZE
|
1996-09-25 01:21:45 +02:00
|
|
|
A C expression for the size in bits of the type @code{int} on the
|
|
|
|
target machine. If you don't define this, the default is one word.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac SHORT_TYPE_SIZE
|
1996-09-25 01:21:45 +02:00
|
|
|
A C expression for the size in bits of the type @code{short} on the
|
|
|
|
target machine. If you don't define this, the default is half a word.
|
|
|
|
(If this would be less than one storage unit, it is rounded up to one
|
|
|
|
unit.)
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac LONG_TYPE_SIZE
|
1996-09-25 01:21:45 +02:00
|
|
|
A C expression for the size in bits of the type @code{long} on the
|
|
|
|
target machine. If you don't define this, the default is one word.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ADA_LONG_TYPE_SIZE
|
2001-12-05 15:41:47 +01:00
|
|
|
On some machines, the size used for the Ada equivalent of the type
|
c-tree.texi, [...]: Correct end-of-sentence markup and markup of "etc.", "e.g." and "i.e.".
* doc/c-tree.texi, doc/cfg.texi, doc/contrib.texi, doc/cpp.texi,
doc/cppopts.texi, doc/extend.texi, doc/fragments.texi,
doc/frontends.texi, doc/gcov.texi, doc/hostconfig.texi,
doc/implement-c.texi, doc/install.texi, doc/invoke.texi,
doc/libgcc.texi, doc/md.texi, doc/passes.texi,
doc/portability.texi, doc/rtl.texi, doc/sourcebuild.texi,
doc/standards.texi, doc/tm.texi, doc/tree-ssa.texi,
doc/trouble.texi: Correct end-of-sentence markup and markup of
"etc.", "e.g." and "i.e.". Use @code in various places where
appropriate.
From-SVN: r90101
2004-11-05 02:36:57 +01:00
|
|
|
@code{long} by a native Ada compiler differs from that used by C@. In
|
2001-12-05 15:41:47 +01:00
|
|
|
that situation, define this macro to be a C expression to be used for
|
|
|
|
the size of that type. If you don't define this, the default is the
|
|
|
|
value of @code{LONG_TYPE_SIZE}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2001-12-05 15:41:47 +01:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac LONG_LONG_TYPE_SIZE
|
1996-09-25 01:21:45 +02:00
|
|
|
A C expression for the size in bits of the type @code{long long} on the
|
|
|
|
target machine. If you don't define this, the default is two
|
2000-09-25 15:50:51 +02:00
|
|
|
words. If you want to support GNU Ada on your machine, the value of this
|
1996-09-25 01:21:45 +02:00
|
|
|
macro must be at least 64.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac CHAR_TYPE_SIZE
|
1996-09-25 01:21:45 +02:00
|
|
|
A C expression for the size in bits of the type @code{char} on the
|
2000-02-01 12:00:43 +01:00
|
|
|
target machine. If you don't define this, the default is
|
|
|
|
@code{BITS_PER_UNIT}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac BOOL_TYPE_SIZE
|
2002-05-03 15:13:13 +02:00
|
|
|
A C expression for the size in bits of the C++ type @code{bool} and
|
|
|
|
C99 type @code{_Bool} on the target machine. If you don't define
|
|
|
|
this, and you probably shouldn't, the default is @code{CHAR_TYPE_SIZE}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2001-07-23 22:33:40 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac FLOAT_TYPE_SIZE
|
1996-09-25 01:21:45 +02:00
|
|
|
A C expression for the size in bits of the type @code{float} on the
|
|
|
|
target machine. If you don't define this, the default is one word.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac DOUBLE_TYPE_SIZE
|
1996-09-25 01:21:45 +02:00
|
|
|
A C expression for the size in bits of the type @code{double} on the
|
|
|
|
target machine. If you don't define this, the default is two
|
|
|
|
words.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac LONG_DOUBLE_TYPE_SIZE
|
1996-09-25 01:21:45 +02:00
|
|
|
A C expression for the size in bits of the type @code{long double} on
|
|
|
|
the target machine. If you don't define this, the default is two
|
|
|
|
words.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac TARGET_FLT_EVAL_METHOD
|
Makefile.in (USER_H): Add ginclude/float.h.
* Makefile.in (USER_H): Add ginclude/float.h.
(FLOAT_H): Remove.
(stmp-int-hdrs, install-mkheaders): Don't handle FLOAT_H.
(mostlyclean): Don't remove float.h intermediate files.
(distclean): Don't remove float.h.
* config.gcc: Remove all float_format references.
* configure.in (float_format, float_h_file): Remove.
* c-common.c: Include tree-inline.h.
(builtin_define_with_int_value): New.
(builtin_define_type_precision): Use it.
(builtin_define_float_constants): New.
(cb_register_builtins): Use it. Define __FLT_RADIX__ and
__FLT_EVAL_METHOD__.
* defaults.h (TARGET_FLT_EVAL_METHOD): New.
* config/i386/i386.h (TARGET_FLT_EVAL_METHOD): New.
* config/m68k/m68k.h (TARGET_FLT_EVAL_METHOD): New.
* doc/tm.texi (INTEL_EXTENDED_IEEE_FORMAT): Mention moto 96-bit format.
(TARGET_FLT_EVAL_METHOD): New.
* config/float-c4x.h, config/float-i128.h, config/float-i32.h,
config/float-i386.h, config/float-i64.h, config/float-m68k.h,
config/float-sh.h, config/float-sparc.h, config/float-vax.h: Remove.
* ginclude/float.h: New.
From-SVN: r56769
2002-09-03 22:21:35 +02:00
|
|
|
A C expression for the value for @code{FLT_EVAL_METHOD} in @file{float.h},
|
|
|
|
assuming, if applicable, that the floating-point control word is in its
|
|
|
|
default state. If you do not define this macro the value of
|
|
|
|
@code{FLT_EVAL_METHOD} will be zero.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2001-06-27 03:09:03 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac WIDEST_HARDWARE_FP_SIZE
|
1997-11-02 22:19:36 +01:00
|
|
|
A C expression for the size in bits of the widest floating-point format
|
|
|
|
supported by the hardware. If you define this macro, you must specify a
|
|
|
|
value less than or equal to the value of @code{LONG_DOUBLE_TYPE_SIZE}.
|
|
|
|
If you do not define this macro, the value of @code{LONG_DOUBLE_TYPE_SIZE}
|
|
|
|
is the default.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1997-11-02 22:19:36 +01:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac DEFAULT_SIGNED_CHAR
|
1996-09-25 01:21:45 +02:00
|
|
|
An expression whose value is 1 or 0, according to whether the type
|
|
|
|
@code{char} should be signed or unsigned by default. The user can
|
c-tree.texi, [...]: Use more logical markup.
* doc/c-tree.texi, doc/contrib.texi, doc/extend.texi,
doc/gcc.texi, doc/gcov.texi, doc/install-old.texi,
doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: Use more
logical markup. Use TeX quotes and dashes. Use @dots{} and
@minus{}. Avoid spaces inside @var. Update last modification
date in gcc.texi.
* doc/gcc.1, doc/gcov.1: Regenerate.
From-SVN: r43369
2001-06-14 13:08:04 +02:00
|
|
|
always override this default with the options @option{-fsigned-char}
|
|
|
|
and @option{-funsigned-char}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2004-02-23 15:10:58 +01:00
|
|
|
@deftypefn {Target Hook} bool TARGET_DEFAULT_SHORT_ENUMS (void)
|
|
|
|
This target hook should return true if the compiler should give an
|
|
|
|
@code{enum} type only as many bytes as it takes to represent the range
|
|
|
|
of possible values of that type. It should return false if all
|
2004-02-20 15:28:13 +01:00
|
|
|
@code{enum} types should be allocated like @code{int}.
|
|
|
|
|
2004-02-23 15:10:58 +01:00
|
|
|
The default is to return false.
|
|
|
|
@end deftypefn
|
2004-02-20 15:28:13 +01:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac SIZE_TYPE
|
1996-09-25 01:21:45 +02:00
|
|
|
A C expression for a string describing the name of the data type to use
|
|
|
|
for size values. The typedef name @code{size_t} is defined using the
|
|
|
|
contents of the string.
|
|
|
|
|
|
|
|
The string can contain more than one keyword. If so, separate them with
|
|
|
|
spaces, and write first any length keyword, then @code{unsigned} if
|
|
|
|
appropriate, and finally @code{int}. The string must exactly match one
|
|
|
|
of the data type names defined in the function
|
|
|
|
@code{init_decl_processing} in the file @file{c-decl.c}. You may not
|
|
|
|
omit @code{int} or change the order---that would cause the compiler to
|
|
|
|
crash on startup.
|
|
|
|
|
|
|
|
If you don't define this macro, the default is @code{"long unsigned
|
|
|
|
int"}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac PTRDIFF_TYPE
|
1996-09-25 01:21:45 +02:00
|
|
|
A C expression for a string describing the name of the data type to use
|
|
|
|
for the result of subtracting two pointers. The typedef name
|
|
|
|
@code{ptrdiff_t} is defined using the contents of the string. See
|
|
|
|
@code{SIZE_TYPE} above for more information.
|
|
|
|
|
|
|
|
If you don't define this macro, the default is @code{"long int"}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac WCHAR_TYPE
|
1996-09-25 01:21:45 +02:00
|
|
|
A C expression for a string describing the name of the data type to use
|
|
|
|
for wide characters. The typedef name @code{wchar_t} is defined using
|
|
|
|
the contents of the string. See @code{SIZE_TYPE} above for more
|
|
|
|
information.
|
|
|
|
|
|
|
|
If you don't define this macro, the default is @code{"int"}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac WCHAR_TYPE_SIZE
|
1996-09-25 01:21:45 +02:00
|
|
|
A C expression for the size in bits of the data type for wide
|
|
|
|
characters. This is used in @code{cpp}, which cannot make use of
|
|
|
|
@code{WCHAR_TYPE}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac WINT_TYPE
|
2000-08-15 17:30:52 +02:00
|
|
|
A C expression for a string describing the name of the data type to
|
|
|
|
use for wide characters passed to @code{printf} and returned from
|
|
|
|
@code{getwc}. The typedef name @code{wint_t} is defined using the
|
|
|
|
contents of the string. See @code{SIZE_TYPE} above for more
|
|
|
|
information.
|
|
|
|
|
|
|
|
If you don't define this macro, the default is @code{"unsigned int"}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2000-08-15 17:30:52 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac INTMAX_TYPE
|
tm.texi (INTMAX_TYPE, [...]): Define.
* tm.texi (INTMAX_TYPE, UINTMAX_TYPE): Define.
* c-common.h (enum c_tree_index): Add CTI_INTMAX_TYPE and
CTI_UINTMAX_TYPE.
(intmax_type_node, uintmax_type_node): Define.
* c-common.c (decl_attributes): If pedantic, warn if `mode'
attributes create a type wider than intmax_t.
(T_IM, T_UIM): Define properly.
* c-decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
defined.
(init_decl_processing): Initialize intmax_type_node and
uintmax_type_node.
* c-lex.c (lex_number): When pedantic and warning for integer
constants that are too large, in C99 mode warn for those that have
a type wider than long long.
cp:
* decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
defined.
(init_decl_processing): Initialize intmax_type_node and
uintmax_type_node.
testsuite:
* gcc.dg/c99-printf-1.c, gcc.dg/c99-scanf-1.c,
gcc.dg/c90-printf-2.c, gcc.dg/c90-scanf-2.c: Define intmax_t and
uintmax_t using <limits.h> to emulate the compiler's internal
logic. No longer XFAIL %j tests.
From-SVN: r36791
2000-10-08 23:20:45 +02:00
|
|
|
A C expression for a string describing the name of the data type that
|
|
|
|
can represent any value of any standard or extended signed integer type.
|
|
|
|
The typedef name @code{intmax_t} is defined using the contents of the
|
|
|
|
string. See @code{SIZE_TYPE} above for more information.
|
|
|
|
|
|
|
|
If you don't define this macro, the default is the first of
|
|
|
|
@code{"int"}, @code{"long int"}, or @code{"long long int"} that has as
|
|
|
|
much precision as @code{long long int}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
tm.texi (INTMAX_TYPE, [...]): Define.
* tm.texi (INTMAX_TYPE, UINTMAX_TYPE): Define.
* c-common.h (enum c_tree_index): Add CTI_INTMAX_TYPE and
CTI_UINTMAX_TYPE.
(intmax_type_node, uintmax_type_node): Define.
* c-common.c (decl_attributes): If pedantic, warn if `mode'
attributes create a type wider than intmax_t.
(T_IM, T_UIM): Define properly.
* c-decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
defined.
(init_decl_processing): Initialize intmax_type_node and
uintmax_type_node.
* c-lex.c (lex_number): When pedantic and warning for integer
constants that are too large, in C99 mode warn for those that have
a type wider than long long.
cp:
* decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
defined.
(init_decl_processing): Initialize intmax_type_node and
uintmax_type_node.
testsuite:
* gcc.dg/c99-printf-1.c, gcc.dg/c99-scanf-1.c,
gcc.dg/c90-printf-2.c, gcc.dg/c90-scanf-2.c: Define intmax_t and
uintmax_t using <limits.h> to emulate the compiler's internal
logic. No longer XFAIL %j tests.
From-SVN: r36791
2000-10-08 23:20:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac UINTMAX_TYPE
|
tm.texi (INTMAX_TYPE, [...]): Define.
* tm.texi (INTMAX_TYPE, UINTMAX_TYPE): Define.
* c-common.h (enum c_tree_index): Add CTI_INTMAX_TYPE and
CTI_UINTMAX_TYPE.
(intmax_type_node, uintmax_type_node): Define.
* c-common.c (decl_attributes): If pedantic, warn if `mode'
attributes create a type wider than intmax_t.
(T_IM, T_UIM): Define properly.
* c-decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
defined.
(init_decl_processing): Initialize intmax_type_node and
uintmax_type_node.
* c-lex.c (lex_number): When pedantic and warning for integer
constants that are too large, in C99 mode warn for those that have
a type wider than long long.
cp:
* decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
defined.
(init_decl_processing): Initialize intmax_type_node and
uintmax_type_node.
testsuite:
* gcc.dg/c99-printf-1.c, gcc.dg/c99-scanf-1.c,
gcc.dg/c90-printf-2.c, gcc.dg/c90-scanf-2.c: Define intmax_t and
uintmax_t using <limits.h> to emulate the compiler's internal
logic. No longer XFAIL %j tests.
From-SVN: r36791
2000-10-08 23:20:45 +02:00
|
|
|
A C expression for a string describing the name of the data type that
|
|
|
|
can represent any value of any standard or extended unsigned integer
|
|
|
|
type. The typedef name @code{uintmax_t} is defined using the contents
|
|
|
|
of the string. See @code{SIZE_TYPE} above for more information.
|
|
|
|
|
|
|
|
If you don't define this macro, the default is the first of
|
|
|
|
@code{"unsigned int"}, @code{"long unsigned int"}, or @code{"long long
|
|
|
|
unsigned int"} that has as much precision as @code{long long unsigned
|
|
|
|
int}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
tm.texi (INTMAX_TYPE, [...]): Define.
* tm.texi (INTMAX_TYPE, UINTMAX_TYPE): Define.
* c-common.h (enum c_tree_index): Add CTI_INTMAX_TYPE and
CTI_UINTMAX_TYPE.
(intmax_type_node, uintmax_type_node): Define.
* c-common.c (decl_attributes): If pedantic, warn if `mode'
attributes create a type wider than intmax_t.
(T_IM, T_UIM): Define properly.
* c-decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
defined.
(init_decl_processing): Initialize intmax_type_node and
uintmax_type_node.
* c-lex.c (lex_number): When pedantic and warning for integer
constants that are too large, in C99 mode warn for those that have
a type wider than long long.
cp:
* decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
defined.
(init_decl_processing): Initialize intmax_type_node and
uintmax_type_node.
testsuite:
* gcc.dg/c99-printf-1.c, gcc.dg/c99-scanf-1.c,
gcc.dg/c90-printf-2.c, gcc.dg/c90-scanf-2.c: Define intmax_t and
uintmax_t using <limits.h> to emulate the compiler's internal
logic. No longer XFAIL %j tests.
From-SVN: r36791
2000-10-08 23:20:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac TARGET_PTRMEMFUNC_VBIT_LOCATION
|
2001-05-12 12:41:21 +02:00
|
|
|
The C++ compiler represents a pointer-to-member-function with a struct
|
|
|
|
that looks like:
|
|
|
|
|
c-tree.texi, [...]: Use @smallexample instead of @example.
* doc/c-tree.texi, doc/compat.texi, doc/cpp.texi,
doc/cppopts.texi, doc/extend.texi, doc/install.texi,
doc/interface.texi, doc/invoke.texi, doc/libgcc.texi, doc/md.texi,
doc/objc.texi, doc/rtl.texi, doc/tm.texi, doc/trouble.texi: Use
@smallexample instead of @example.
From-SVN: r76075
2004-01-18 02:20:48 +01:00
|
|
|
@smallexample
|
2001-05-12 12:41:21 +02:00
|
|
|
struct @{
|
|
|
|
union @{
|
|
|
|
void (*fn)();
|
|
|
|
ptrdiff_t vtable_index;
|
|
|
|
@};
|
|
|
|
ptrdiff_t delta;
|
|
|
|
@};
|
c-tree.texi, [...]: Use @smallexample instead of @example.
* doc/c-tree.texi, doc/compat.texi, doc/cpp.texi,
doc/cppopts.texi, doc/extend.texi, doc/install.texi,
doc/interface.texi, doc/invoke.texi, doc/libgcc.texi, doc/md.texi,
doc/objc.texi, doc/rtl.texi, doc/tm.texi, doc/trouble.texi: Use
@smallexample instead of @example.
From-SVN: r76075
2004-01-18 02:20:48 +01:00
|
|
|
@end smallexample
|
2001-05-12 12:41:21 +02:00
|
|
|
|
|
|
|
@noindent
|
|
|
|
The C++ compiler must use one bit to indicate whether the function that
|
|
|
|
will be called through a pointer-to-member-function is virtual.
|
|
|
|
Normally, we assume that the low-order bit of a function pointer must
|
|
|
|
always be zero. Then, by ensuring that the vtable_index is odd, we can
|
|
|
|
distinguish which variant of the union is in use. But, on some
|
|
|
|
platforms function pointers can be odd, and so this doesn't work. In
|
|
|
|
that case, we use the low-order bit of the @code{delta} field, and shift
|
|
|
|
the remainder of the @code{delta} field to the left.
|
|
|
|
|
|
|
|
GCC will automatically make the right selection about where to store
|
|
|
|
this bit using the @code{FUNCTION_BOUNDARY} setting for your platform.
|
|
|
|
However, some platforms such as ARM/Thumb have @code{FUNCTION_BOUNDARY}
|
|
|
|
set such that functions always start at even addresses, but the lowest
|
|
|
|
bit of pointers to functions indicate whether the function at that
|
|
|
|
address is in ARM or Thumb mode. If this is the case of your
|
|
|
|
architecture, you should define this macro to
|
|
|
|
@code{ptrmemfunc_vbit_in_delta}.
|
|
|
|
|
|
|
|
In general, you should not have to define this macro. On architectures
|
|
|
|
in which function addresses are always even, according to
|
|
|
|
@code{FUNCTION_BOUNDARY}, GCC will automatically define this macro to
|
|
|
|
@code{ptrmemfunc_vbit_in_pfn}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2001-09-21 18:58:22 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac TARGET_VTABLE_USES_DESCRIPTORS
|
2001-09-21 18:58:22 +02:00
|
|
|
Normally, the C++ compiler uses function pointers in vtables. This
|
2002-02-23 13:59:09 +01:00
|
|
|
macro allows the target to change to use ``function descriptors''
|
2001-09-21 18:58:22 +02:00
|
|
|
instead. Function descriptors are found on targets for whom a
|
|
|
|
function pointer is actually a small data structure. Normally the
|
2002-02-23 13:59:09 +01:00
|
|
|
data structure consists of the actual code address plus a data
|
2001-09-21 18:58:22 +02:00
|
|
|
pointer to which the function's data is relative.
|
|
|
|
|
|
|
|
If vtables are used, the value of this macro should be the number
|
|
|
|
of words that the function descriptor occupies.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2002-06-14 02:50:34 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac TARGET_VTABLE_ENTRY_ALIGN
|
2002-06-14 02:50:34 +02:00
|
|
|
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. */
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2002-06-14 02:50:34 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac TARGET_VTABLE_DATA_ENTRY_DISTANCE
|
2002-06-14 02:50:34 +02:00
|
|
|
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 @code{TARGET_VTABLE_ENTRY_ALIGN}), set this to the number
|
|
|
|
of words in each data entry.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2001-06-26 08:36:44 +02:00
|
|
|
|
|
|
|
@node Escape Sequences
|
|
|
|
@section Target Character Escape Sequences
|
|
|
|
@cindex escape sequences
|
2001-05-12 12:41:21 +02:00
|
|
|
|
2004-04-14 16:32:55 +02:00
|
|
|
By default, GCC assumes that the C character escape sequences and other
|
|
|
|
characters take on their ASCII values for the target. If this is not
|
|
|
|
correct, you must explicitly define all of the macros below. All of
|
|
|
|
them must evaluate to constants; they are used in @code{case}
|
|
|
|
statements.
|
2001-06-26 08:36:44 +02:00
|
|
|
|
1996-09-25 01:21:45 +02:00
|
|
|
@findex TARGET_BELL
|
2004-04-14 16:32:55 +02:00
|
|
|
@findex TARGET_BS
|
2003-06-20 08:41:12 +02:00
|
|
|
@findex TARGET_CR
|
2004-04-14 16:32:55 +02:00
|
|
|
@findex TARGET_DIGIT0
|
2001-06-27 08:55:29 +02:00
|
|
|
@findex TARGET_ESC
|
2003-06-20 08:41:12 +02:00
|
|
|
@findex TARGET_FF
|
1996-09-25 01:21:45 +02:00
|
|
|
@findex TARGET_NEWLINE
|
2003-06-20 08:41:12 +02:00
|
|
|
@findex TARGET_TAB
|
1996-09-25 01:21:45 +02:00
|
|
|
@findex TARGET_VT
|
2003-06-20 08:41:12 +02:00
|
|
|
@multitable {@code{TARGET_NEWLINE}} {Escape} {ASCII character}
|
|
|
|
@item Macro @tab Escape @tab ASCII character
|
|
|
|
@item @code{TARGET_BELL} @tab @kbd{\a} @tab @code{07}, @code{BEL}
|
2004-04-14 16:32:55 +02:00
|
|
|
@item @code{TARGET_BS} @tab @kbd{\b} @tab @code{08}, @code{BS}
|
2003-06-20 08:41:12 +02:00
|
|
|
@item @code{TARGET_CR} @tab @kbd{\r} @tab @code{0D}, @code{CR}
|
2004-04-14 16:32:55 +02:00
|
|
|
@item @code{TARGET_DIGIT0} @tab @kbd{0} @tab @code{30}, @code{ZERO}
|
2003-06-20 08:41:12 +02:00
|
|
|
@item @code{TARGET_ESC} @tab @kbd{\e}, @kbd{\E} @tab @code{1B}, @code{ESC}
|
|
|
|
@item @code{TARGET_FF} @tab @kbd{\f} @tab @code{0C}, @code{FF}
|
|
|
|
@item @code{TARGET_NEWLINE} @tab @kbd{\n} @tab @code{0A}, @code{LF}
|
|
|
|
@item @code{TARGET_TAB} @tab @kbd{\t} @tab @code{09}, @code{HT}
|
|
|
|
@item @code{TARGET_VT} @tab @kbd{\v} @tab @code{0B}, @code{VT}
|
|
|
|
@end multitable
|
|
|
|
|
|
|
|
@noindent
|
|
|
|
Note that the @kbd{\e} and @kbd{\E} escapes are GNU extensions, not
|
|
|
|
part of the C standard.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
@node Registers
|
|
|
|
@section Register Usage
|
|
|
|
@cindex register usage
|
|
|
|
|
|
|
|
This section explains how to describe what registers the target machine
|
|
|
|
has, and how (in general) they can be used.
|
|
|
|
|
|
|
|
The description of which registers a specific instruction can use is
|
|
|
|
done with register classes; see @ref{Register Classes}. For information
|
|
|
|
on using registers to access a stack frame, see @ref{Frame Registers}.
|
|
|
|
For passing values in registers, see @ref{Register Arguments}.
|
|
|
|
For returning values in registers, see @ref{Scalar Return}.
|
|
|
|
|
|
|
|
@menu
|
|
|
|
* Register Basics:: Number and kinds of registers.
|
|
|
|
* Allocation Order:: Order in which registers are allocated.
|
|
|
|
* Values in Registers:: What kinds of values each reg can hold.
|
|
|
|
* Leaf Functions:: Renumbering registers for leaf functions.
|
|
|
|
* Stack Registers:: Handling a register stack such as 80387.
|
|
|
|
@end menu
|
|
|
|
|
|
|
|
@node Register Basics
|
|
|
|
@subsection Basic Characteristics of Registers
|
|
|
|
|
|
|
|
@c prevent bad page break with this line
|
|
|
|
Registers have various characteristics.
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac FIRST_PSEUDO_REGISTER
|
1996-09-25 01:21:45 +02:00
|
|
|
Number of hardware registers known to the compiler. They receive
|
|
|
|
numbers 0 through @code{FIRST_PSEUDO_REGISTER-1}; thus, the first
|
|
|
|
pseudo register's number really is assigned the number
|
|
|
|
@code{FIRST_PSEUDO_REGISTER}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac FIXED_REGISTERS
|
1996-09-25 01:21:45 +02:00
|
|
|
@cindex fixed register
|
|
|
|
An initializer that says which registers are used for fixed purposes
|
|
|
|
all throughout the compiled code and are therefore not available for
|
|
|
|
general allocation. These would include the stack pointer, the frame
|
|
|
|
pointer (except on machines where that can be used as a general
|
|
|
|
register when no frame pointer is needed), the program counter on
|
|
|
|
machines where that is considered one of the addressable registers,
|
|
|
|
and any other numbered register with a standard use.
|
|
|
|
|
|
|
|
This information is expressed as a sequence of numbers, separated by
|
|
|
|
commas and surrounded by braces. The @var{n}th number is 1 if
|
|
|
|
register @var{n} is fixed, 0 otherwise.
|
|
|
|
|
|
|
|
The table initialized from this macro, and the table initialized by
|
|
|
|
the following one, may be overridden at run time either automatically,
|
|
|
|
by the actions of the macro @code{CONDITIONAL_REGISTER_USAGE}, or by
|
c-tree.texi, [...]: Use more logical markup.
* doc/c-tree.texi, doc/contrib.texi, doc/extend.texi,
doc/gcc.texi, doc/gcov.texi, doc/install-old.texi,
doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: Use more
logical markup. Use TeX quotes and dashes. Use @dots{} and
@minus{}. Avoid spaces inside @var. Update last modification
date in gcc.texi.
* doc/gcc.1, doc/gcov.1: Regenerate.
From-SVN: r43369
2001-06-14 13:08:04 +02:00
|
|
|
the user with the command options @option{-ffixed-@var{reg}},
|
|
|
|
@option{-fcall-used-@var{reg}} and @option{-fcall-saved-@var{reg}}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac CALL_USED_REGISTERS
|
1996-09-25 01:21:45 +02:00
|
|
|
@cindex call-used register
|
|
|
|
@cindex call-clobbered register
|
|
|
|
@cindex call-saved register
|
|
|
|
Like @code{FIXED_REGISTERS} but has 1 for each register that is
|
|
|
|
clobbered (in general) by function calls as well as for fixed
|
|
|
|
registers. This macro therefore identifies the registers that are not
|
|
|
|
available for general allocation of values that must live across
|
|
|
|
function calls.
|
|
|
|
|
|
|
|
If a register has 0 in @code{CALL_USED_REGISTERS}, the compiler
|
|
|
|
automatically saves it on function entry and restores it on function
|
|
|
|
exit, if the register is used within the function.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac CALL_REALLY_USED_REGISTERS
|
2001-08-01 23:40:43 +02:00
|
|
|
@cindex call-used register
|
|
|
|
@cindex call-clobbered register
|
|
|
|
@cindex call-saved register
|
2002-02-23 13:59:09 +01:00
|
|
|
Like @code{CALL_USED_REGISTERS} except this macro doesn't require
|
|
|
|
that the entire set of @code{FIXED_REGISTERS} be included.
|
2001-08-01 23:40:43 +02:00
|
|
|
(@code{CALL_USED_REGISTERS} must be a superset of @code{FIXED_REGISTERS}).
|
2002-02-23 13:59:09 +01:00
|
|
|
This macro is optional. If not specified, it defaults to the value
|
2001-08-01 23:40:43 +02:00
|
|
|
of @code{CALL_USED_REGISTERS}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2001-08-01 23:40:43 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac HARD_REGNO_CALL_PART_CLOBBERED (@var{regno}, @var{mode})
|
1998-09-30 20:09:47 +02:00
|
|
|
@cindex call-used register
|
|
|
|
@cindex call-clobbered register
|
|
|
|
@cindex call-saved register
|
2001-10-10 01:11:55 +02:00
|
|
|
A C expression that is nonzero if it is not permissible to store a
|
1998-09-30 20:09:47 +02:00
|
|
|
value of mode @var{mode} in hard register number @var{regno} across a
|
|
|
|
call without some part of it being clobbered. For most machines this
|
|
|
|
macro need not be defined. It is only required for machines that do not
|
|
|
|
preserve the entire contents of a register across a call.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1998-09-30 20:09:47 +02:00
|
|
|
|
1996-09-25 01:21:45 +02:00
|
|
|
@findex fixed_regs
|
|
|
|
@findex call_used_regs
|
2003-06-20 08:41:12 +02:00
|
|
|
@findex global_regs
|
|
|
|
@findex reg_names
|
|
|
|
@findex reg_class_contents
|
|
|
|
@defmac CONDITIONAL_REGISTER_USAGE
|
2000-05-28 23:08:51 +02:00
|
|
|
Zero or more C statements that may conditionally modify five variables
|
|
|
|
@code{fixed_regs}, @code{call_used_regs}, @code{global_regs},
|
haifa-sched.c: Convert to target hooks.
* haifa-sched.c: Convert to target hooks. Macros replaced
are ISSUE_RATE, ADJUST_COST, ADJUST_PRIORITY, MD_SCHED_INIT,
MD_SCHED_REORDER, MD_SCHED_REORDER2, MD_SCHED_VARIABLE_ISSUE,
MD_SCHED_FINISH, and HAVE_cycle_display.
* target-def.h (TARGET_SCHED_ADJUST_COST,
TARGET_SCHED_ADJUST_PRIORITY, TARGET_SCHED_ISSUE_RATE,
TARGET_SCHED_VARIABLE_ISSUE, TARGET_SCHED_INIT,
TARGET_SCHED_FINISH, TARGET_SCHED_REORDER,
TARGET_SCHED_REORDER2, TARGET_SCHED_CYCLE_DISPLAY):
New hook #defines to be overridden.
(TARGET_SCHED): Bring them all together.
(TARGET_INITIALIZER): Update.
* target.h: Don't forward declare struct rtx_def. Use 'rtx'
instead of 'struct rtx_def *' throughout.
(struct sched): New set of hooks for the scheduler.
* Makefile.in (haifa-sched.o): Depend on target.h.
* doc/tm.texi: Document the new scheduler hooks, together in
their own section, instead of scattered around.
Fix a bunch of underfull/overfull hboxes.
* a29k.h, alpha.h, arm.h, c4x.h, convex.h, d30v.h, i386.h,
ia64.h, m32r.h, m88k.h, mips.h, pa.h, rs6000.h, s390.h, sh.h,
sparc.h: Don't define any of the old scheduler macros.
* a29k.c, alpha.c, arm.c, c4x.c, convex.c, d30v.c, i386.c,
ia64.c, m32r.c, m88k.c, mips.c, pa.c, rs6000.c, s390.c, sh.c,
sparc.c: Create hook functions from code extracted from
corresponding target header, or make existing hooks static, as
appropriate. Set the appropriate entries in targetm.
* alpha-protos.h, arm-protos.h, c4x-protos.h, d30v-protos.h,
i386-protos.h, ia64-protos.h, m32r-protos.h, pa-protos.h,
rs6000-protos.h, s390-protos.h, sparc-protos.h:
Remove prototypes for functions which are now static.
* d30v.h, d30v.c, m32r.h, m32r.c: Remove #ifdef HAIFA and
related gunk; the Haifa scheduler is now the only choice.
From-SVN: r45009
2001-08-18 22:25:54 +02:00
|
|
|
@code{reg_names}, and @code{reg_class_contents}, to take into account
|
|
|
|
any dependence of these register sets on target flags. The first three
|
|
|
|
of these are of type @code{char []} (interpreted as Boolean vectors).
|
|
|
|
@code{global_regs} is a @code{const char *[]}, and
|
|
|
|
@code{reg_class_contents} is a @code{HARD_REG_SET}. Before the macro is
|
|
|
|
called, @code{fixed_regs}, @code{call_used_regs},
|
|
|
|
@code{reg_class_contents}, and @code{reg_names} have been initialized
|
2000-05-28 23:08:51 +02:00
|
|
|
from @code{FIXED_REGISTERS}, @code{CALL_USED_REGISTERS},
|
haifa-sched.c: Convert to target hooks.
* haifa-sched.c: Convert to target hooks. Macros replaced
are ISSUE_RATE, ADJUST_COST, ADJUST_PRIORITY, MD_SCHED_INIT,
MD_SCHED_REORDER, MD_SCHED_REORDER2, MD_SCHED_VARIABLE_ISSUE,
MD_SCHED_FINISH, and HAVE_cycle_display.
* target-def.h (TARGET_SCHED_ADJUST_COST,
TARGET_SCHED_ADJUST_PRIORITY, TARGET_SCHED_ISSUE_RATE,
TARGET_SCHED_VARIABLE_ISSUE, TARGET_SCHED_INIT,
TARGET_SCHED_FINISH, TARGET_SCHED_REORDER,
TARGET_SCHED_REORDER2, TARGET_SCHED_CYCLE_DISPLAY):
New hook #defines to be overridden.
(TARGET_SCHED): Bring them all together.
(TARGET_INITIALIZER): Update.
* target.h: Don't forward declare struct rtx_def. Use 'rtx'
instead of 'struct rtx_def *' throughout.
(struct sched): New set of hooks for the scheduler.
* Makefile.in (haifa-sched.o): Depend on target.h.
* doc/tm.texi: Document the new scheduler hooks, together in
their own section, instead of scattered around.
Fix a bunch of underfull/overfull hboxes.
* a29k.h, alpha.h, arm.h, c4x.h, convex.h, d30v.h, i386.h,
ia64.h, m32r.h, m88k.h, mips.h, pa.h, rs6000.h, s390.h, sh.h,
sparc.h: Don't define any of the old scheduler macros.
* a29k.c, alpha.c, arm.c, c4x.c, convex.c, d30v.c, i386.c,
ia64.c, m32r.c, m88k.c, mips.c, pa.c, rs6000.c, s390.c, sh.c,
sparc.c: Create hook functions from code extracted from
corresponding target header, or make existing hooks static, as
appropriate. Set the appropriate entries in targetm.
* alpha-protos.h, arm-protos.h, c4x-protos.h, d30v-protos.h,
i386-protos.h, ia64-protos.h, m32r-protos.h, pa-protos.h,
rs6000-protos.h, s390-protos.h, sparc-protos.h:
Remove prototypes for functions which are now static.
* d30v.h, d30v.c, m32r.h, m32r.c: Remove #ifdef HAIFA and
related gunk; the Haifa scheduler is now the only choice.
From-SVN: r45009
2001-08-18 22:25:54 +02:00
|
|
|
@code{REG_CLASS_CONTENTS}, and @code{REGISTER_NAMES}, respectively.
|
c-tree.texi, [...]: Use more logical markup.
* doc/c-tree.texi, doc/contrib.texi, doc/extend.texi,
doc/gcc.texi, doc/gcov.texi, doc/install-old.texi,
doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: Use more
logical markup. Use TeX quotes and dashes. Use @dots{} and
@minus{}. Avoid spaces inside @var. Update last modification
date in gcc.texi.
* doc/gcc.1, doc/gcov.1: Regenerate.
From-SVN: r43369
2001-06-14 13:08:04 +02:00
|
|
|
@code{global_regs} has been cleared, and any @option{-ffixed-@var{reg}},
|
haifa-sched.c: Convert to target hooks.
* haifa-sched.c: Convert to target hooks. Macros replaced
are ISSUE_RATE, ADJUST_COST, ADJUST_PRIORITY, MD_SCHED_INIT,
MD_SCHED_REORDER, MD_SCHED_REORDER2, MD_SCHED_VARIABLE_ISSUE,
MD_SCHED_FINISH, and HAVE_cycle_display.
* target-def.h (TARGET_SCHED_ADJUST_COST,
TARGET_SCHED_ADJUST_PRIORITY, TARGET_SCHED_ISSUE_RATE,
TARGET_SCHED_VARIABLE_ISSUE, TARGET_SCHED_INIT,
TARGET_SCHED_FINISH, TARGET_SCHED_REORDER,
TARGET_SCHED_REORDER2, TARGET_SCHED_CYCLE_DISPLAY):
New hook #defines to be overridden.
(TARGET_SCHED): Bring them all together.
(TARGET_INITIALIZER): Update.
* target.h: Don't forward declare struct rtx_def. Use 'rtx'
instead of 'struct rtx_def *' throughout.
(struct sched): New set of hooks for the scheduler.
* Makefile.in (haifa-sched.o): Depend on target.h.
* doc/tm.texi: Document the new scheduler hooks, together in
their own section, instead of scattered around.
Fix a bunch of underfull/overfull hboxes.
* a29k.h, alpha.h, arm.h, c4x.h, convex.h, d30v.h, i386.h,
ia64.h, m32r.h, m88k.h, mips.h, pa.h, rs6000.h, s390.h, sh.h,
sparc.h: Don't define any of the old scheduler macros.
* a29k.c, alpha.c, arm.c, c4x.c, convex.c, d30v.c, i386.c,
ia64.c, m32r.c, m88k.c, mips.c, pa.c, rs6000.c, s390.c, sh.c,
sparc.c: Create hook functions from code extracted from
corresponding target header, or make existing hooks static, as
appropriate. Set the appropriate entries in targetm.
* alpha-protos.h, arm-protos.h, c4x-protos.h, d30v-protos.h,
i386-protos.h, ia64-protos.h, m32r-protos.h, pa-protos.h,
rs6000-protos.h, s390-protos.h, sparc-protos.h:
Remove prototypes for functions which are now static.
* d30v.h, d30v.c, m32r.h, m32r.c: Remove #ifdef HAIFA and
related gunk; the Haifa scheduler is now the only choice.
From-SVN: r45009
2001-08-18 22:25:54 +02:00
|
|
|
@option{-fcall-used-@var{reg}} and @option{-fcall-saved-@var{reg}}
|
|
|
|
command options have been applied.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
You need not define this macro if it has no work to do.
|
|
|
|
|
|
|
|
@cindex disabling certain registers
|
|
|
|
@cindex controlling register usage
|
|
|
|
If the usage of an entire class of registers depends on the target
|
|
|
|
flags, you may indicate this to GCC by using this macro to modify
|
|
|
|
@code{fixed_regs} and @code{call_used_regs} to 1 for each of the
|
c-tree.texi, [...]: Replace . at end of sentences preceded by a capital letter with @..
* doc/c-tree.texi, doc/contrib.texi, doc/cpp.texi,
doc/cppinternals.texi, doc/extend.texi, doc/gcc.texi,
doc/gcov.texi, doc/install-old.texi, doc/install.texi,
doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: Replace
. at end of sentences preceded by a capital letter with @..
From-SVN: r43611
2001-06-27 17:04:16 +02:00
|
|
|
registers in the classes which should not be used by GCC@. Also define
|
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
|
|
|
the macro @code{REG_CLASS_FROM_LETTER} / @code{REG_CLASS_FROM_CONSTRAINT}
|
|
|
|
to return @code{NO_REGS} if it
|
1996-09-25 01:21:45 +02:00
|
|
|
is called with a letter for a class that shouldn't be used.
|
|
|
|
|
|
|
|
(However, if this class is not included in @code{GENERAL_REGS} and all
|
|
|
|
of the insn patterns whose constraints permit this class are
|
|
|
|
controlled by target switches, then GCC will automatically avoid using
|
|
|
|
these registers when the target switches are opposed to them.)
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac INCOMING_REGNO (@var{out})
|
1996-09-25 01:21:45 +02:00
|
|
|
Define this macro if the target machine has register windows. This C
|
|
|
|
expression returns the register number as seen by the called function
|
|
|
|
corresponding to the register number @var{out} as seen by the calling
|
|
|
|
function. Return @var{out} if register number @var{out} is not an
|
|
|
|
outbound register.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac OUTGOING_REGNO (@var{in})
|
1996-09-25 01:21:45 +02:00
|
|
|
Define this macro if the target machine has register windows. This C
|
|
|
|
expression returns the register number as seen by the calling function
|
|
|
|
corresponding to the register number @var{in} as seen by the called
|
|
|
|
function. Return @var{in} if register number @var{in} is not an inbound
|
|
|
|
register.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac LOCAL_REGNO (@var{regno})
|
2000-08-15 17:33:23 +02:00
|
|
|
Define this macro if the target machine has register windows. This C
|
|
|
|
expression returns true if the register is call-saved but is in the
|
|
|
|
register window. Unlike most call-saved registers, such registers
|
|
|
|
need not be explicitly restored on function exit or during non-local
|
|
|
|
gotos.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2000-08-15 17:33:23 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac PC_REGNUM
|
1996-09-25 01:21:45 +02:00
|
|
|
If the program counter has a register number, define this as that
|
|
|
|
register number. Otherwise, do not define it.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
@node Allocation Order
|
|
|
|
@subsection Order of Allocation of Registers
|
|
|
|
@cindex order of register allocation
|
|
|
|
@cindex register allocation order
|
|
|
|
|
|
|
|
@c prevent bad page break with this line
|
|
|
|
Registers are allocated in order.
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac REG_ALLOC_ORDER
|
1996-09-25 01:21:45 +02:00
|
|
|
If defined, an initializer for a vector of integers, containing the
|
1999-08-25 09:27:13 +02:00
|
|
|
numbers of hard registers in the order in which GCC should prefer
|
1996-09-25 01:21:45 +02:00
|
|
|
to use them (from most preferred to least).
|
|
|
|
|
|
|
|
If this macro is not defined, registers are used lowest numbered first
|
|
|
|
(all else being equal).
|
|
|
|
|
|
|
|
One use of this macro is on machines where the highest numbered
|
|
|
|
registers must always be saved and the save-multiple-registers
|
|
|
|
instruction supports only sequences of consecutive registers. On such
|
|
|
|
machines, define @code{REG_ALLOC_ORDER} to be an initializer that lists
|
1997-12-07 01:31:01 +01:00
|
|
|
the highest numbered allocable register first.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ORDER_REGS_FOR_LOCAL_ALLOC
|
1996-09-25 01:21:45 +02:00
|
|
|
A C statement (sans semicolon) to choose the order in which to allocate
|
|
|
|
hard registers for pseudo-registers local to a basic block.
|
|
|
|
|
|
|
|
Store the desired register order in the array @code{reg_alloc_order}.
|
|
|
|
Element 0 should be the register to allocate first; element 1, the next
|
|
|
|
register; and so on.
|
|
|
|
|
|
|
|
The macro body should not assume anything about the contents of
|
|
|
|
@code{reg_alloc_order} before execution of the macro.
|
|
|
|
|
|
|
|
On most machines, it is not necessary to define this macro.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
@node Values in Registers
|
|
|
|
@subsection How Values Fit in Registers
|
|
|
|
|
|
|
|
This section discusses the macros that describe which kinds of values
|
|
|
|
(specifically, which machine modes) each register can hold, and how many
|
|
|
|
consecutive registers are needed for a given mode.
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac HARD_REGNO_NREGS (@var{regno}, @var{mode})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C expression for the number of consecutive hard registers, starting
|
|
|
|
at register number @var{regno}, required to hold a value of mode
|
|
|
|
@var{mode}.
|
|
|
|
|
|
|
|
On a machine where all registers are exactly one word, a suitable
|
|
|
|
definition of this macro is
|
|
|
|
|
|
|
|
@smallexample
|
|
|
|
#define HARD_REGNO_NREGS(REGNO, MODE) \
|
|
|
|
((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) \
|
2000-02-02 03:26:27 +01:00
|
|
|
/ UNITS_PER_WORD)
|
1996-09-25 01:21:45 +02:00
|
|
|
@end smallexample
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2004-03-12 11:53:15 +01:00
|
|
|
@defmac REGMODE_NATURAL_SIZE (@var{mode})
|
|
|
|
Define this macro if the natural size of registers that hold values
|
|
|
|
of mode @var{mode} is not the word size. It is a C expression that
|
|
|
|
should give the natural size in bytes for the specified mode. It is
|
|
|
|
used by the register allocator to try to optimize its results. This
|
|
|
|
happens for example on SPARC 64-bit where the natural size of
|
|
|
|
floating-point registers is still 32-bit.
|
|
|
|
@end defmac
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac HARD_REGNO_MODE_OK (@var{regno}, @var{mode})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C expression that is nonzero if it is permissible to store a value
|
|
|
|
of mode @var{mode} in hard register number @var{regno} (or in several
|
|
|
|
registers starting with that one). For a machine where all registers
|
|
|
|
are equivalent, a suitable definition is
|
|
|
|
|
|
|
|
@smallexample
|
|
|
|
#define HARD_REGNO_MODE_OK(REGNO, MODE) 1
|
|
|
|
@end smallexample
|
|
|
|
|
1997-11-02 22:19:36 +01:00
|
|
|
You need not include code to check for the numbers of fixed registers,
|
|
|
|
because the allocation mechanism considers them to be always occupied.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
@cindex register pairs
|
|
|
|
On some machines, double-precision values must be kept in even/odd
|
1997-11-02 22:19:36 +01:00
|
|
|
register pairs. You can implement that by defining this macro to reject
|
|
|
|
odd register numbers for such modes.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
The minimum requirement for a mode to be OK in a register is that the
|
|
|
|
@samp{mov@var{mode}} instruction pattern support moves between the
|
1997-11-02 22:19:36 +01:00
|
|
|
register and other hard register in the same class and that moving a
|
|
|
|
value into the register and back out not alter it.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
1997-11-02 22:19:36 +01:00
|
|
|
Since the same instruction used to move @code{word_mode} will work for
|
|
|
|
all narrower integer modes, it is not necessary on any machine for
|
1996-09-25 01:21:45 +02:00
|
|
|
@code{HARD_REGNO_MODE_OK} to distinguish between these modes, provided
|
|
|
|
you define patterns @samp{movhi}, etc., to take advantage of this. This
|
|
|
|
is useful because of the interaction between @code{HARD_REGNO_MODE_OK}
|
|
|
|
and @code{MODES_TIEABLE_P}; it is very desirable for all integer modes
|
|
|
|
to be tieable.
|
|
|
|
|
|
|
|
Many machines have special registers for floating point arithmetic.
|
|
|
|
Often people assume that floating point machine modes are allowed only
|
|
|
|
in floating point registers. This is not true. Any registers that
|
|
|
|
can hold integers can safely @emph{hold} a floating point machine
|
|
|
|
mode, whether or not floating arithmetic can be done on it in those
|
|
|
|
registers. Integer move instructions can be used to move the values.
|
|
|
|
|
|
|
|
On some machines, though, the converse is true: fixed-point machine
|
|
|
|
modes may not go in floating registers. This is true if the floating
|
|
|
|
registers normalize any value stored in them, because storing a
|
|
|
|
non-floating value there would garble it. In this case,
|
|
|
|
@code{HARD_REGNO_MODE_OK} should reject fixed-point machine modes in
|
|
|
|
floating registers. But if the floating registers do not automatically
|
|
|
|
normalize, if you can store any bit pattern in one and retrieve it
|
|
|
|
unchanged without a trap, then any machine mode may go in a floating
|
|
|
|
register, so you can define this macro to say so.
|
|
|
|
|
|
|
|
The primary significance of special floating registers is rather that
|
|
|
|
they are the registers acceptable in floating point arithmetic
|
|
|
|
instructions. However, this is of no concern to
|
|
|
|
@code{HARD_REGNO_MODE_OK}. You handle it by writing the proper
|
|
|
|
constraints for those instructions.
|
|
|
|
|
|
|
|
On some machines, the floating registers are especially slow to access,
|
|
|
|
so that it is better to store a value in a stack frame than in such a
|
|
|
|
register if floating point arithmetic is not being done. As long as the
|
|
|
|
floating registers are not in class @code{GENERAL_REGS}, they will not
|
|
|
|
be used unless some pattern's constraint asks for one.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2004-03-06 00:51:25 +01:00
|
|
|
@defmac HARD_REGNO_RENAME_OK (@var{from}, @var{to})
|
|
|
|
A C expression that is nonzero if it is OK to rename a hard register
|
|
|
|
@var{from} to another hard register @var{to}.
|
|
|
|
|
|
|
|
One common use of this macro is to prevent renaming of a register to
|
|
|
|
another register that is not saved by a prologue in an interrupt
|
|
|
|
handler.
|
|
|
|
|
|
|
|
The default is always nonzero.
|
|
|
|
@end defmac
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac MODES_TIEABLE_P (@var{mode1}, @var{mode2})
|
1997-11-02 22:19:36 +01:00
|
|
|
A C expression that is nonzero if a value of mode
|
1997-12-07 01:31:01 +01:00
|
|
|
@var{mode1} is accessible in mode @var{mode2} without copying.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
If @code{HARD_REGNO_MODE_OK (@var{r}, @var{mode1})} and
|
1997-11-02 22:19:36 +01:00
|
|
|
@code{HARD_REGNO_MODE_OK (@var{r}, @var{mode2})} are always the same for
|
|
|
|
any @var{r}, then @code{MODES_TIEABLE_P (@var{mode1}, @var{mode2})}
|
|
|
|
should be nonzero. If they differ for any @var{r}, you should define
|
|
|
|
this macro to return zero unless some other mechanism ensures the
|
1997-12-07 01:31:01 +01:00
|
|
|
accessibility of the value in a narrower mode.
|
1997-11-02 22:19:36 +01:00
|
|
|
|
|
|
|
You should define this macro to return nonzero in as many cases as
|
1999-08-25 09:27:13 +02:00
|
|
|
possible since doing so will allow GCC to perform better register
|
1997-11-02 22:19:36 +01:00
|
|
|
allocation.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1998-05-20 02:24:32 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac AVOID_CCMODE_COPIES
|
1998-05-20 02:24:32 +02:00
|
|
|
Define this macro if the compiler should avoid copies to/from @code{CCmode}
|
2000-02-04 20:51:57 +01:00
|
|
|
registers. You should only define this macro if support for copying to/from
|
1998-05-20 02:24:32 +02:00
|
|
|
@code{CCmode} is incomplete.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
@node Leaf Functions
|
|
|
|
@subsection Handling Leaf Functions
|
|
|
|
|
|
|
|
@cindex leaf functions
|
|
|
|
@cindex functions, leaf
|
|
|
|
On some machines, a leaf function (i.e., one which makes no calls) can run
|
|
|
|
more efficiently if it does not make its own register window. Often this
|
|
|
|
means it is required to receive its arguments in the registers where they
|
|
|
|
are passed by the caller, instead of the registers where they would
|
|
|
|
normally arrive.
|
|
|
|
|
|
|
|
The special treatment for leaf functions generally applies only when
|
|
|
|
other conditions are met; for example, often they may use only those
|
|
|
|
registers for its own variables and temporaries. We use the term ``leaf
|
|
|
|
function'' to mean a function that is suitable for this special
|
|
|
|
handling, so that functions with no calls are not necessarily ``leaf
|
|
|
|
functions''.
|
|
|
|
|
1999-08-25 09:27:13 +02:00
|
|
|
GCC assigns register numbers before it knows whether the function is
|
1996-09-25 01:21:45 +02:00
|
|
|
suitable for leaf function treatment. So it needs to renumber the
|
|
|
|
registers in order to output a leaf function. The following macros
|
|
|
|
accomplish this.
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac LEAF_REGISTERS
|
sibcall.c (skip_copy_to_return_value): Use OUTGOING_REGNO for comparison if regno's are equal.
* sibcall.c (skip_copy_to_return_value): Use OUTGOING_REGNO for
comparison if regno's are equal.
* calls.c (initialize_argument_informat): Add ecf_flags argument.
Use FUNCTION_INCOMING_ARG if available and ECF_SIBCALL.
(expand_call): Update caller.
Avoid making a sibling call if argument size of the callee is larger
than argument size of the caller.
Call hard_function_value with outgoing set if in sibcall pass.
Use FUNCTION_INCOMING_ARG if available and ECF_SIBCALL.
* final.c (permitted_reg_in_leaf_functions, only_leaf_regs_used):
Change LEAF_REGISTERS from an array initializer to actual array
identifier. Move static global variable into the function.
(leaf_function_p): Allow SIBLING_CALL_P calls even outside of
sequences for leaf functions.
* global.c (global_alloc): Likewise.
* tm.texi (LEAF_REGISTERS): Update documentation.
* config/sparc/sparc.h (CONDITIONAL_REGISTER_USAGE): Remove the ugly
TARGET_FLAT leaf disabling hack.
(LEAF_REGISTERS): Changed from an array initializer to actual array
identifier to avoid duplication and remove the above hack.
(FUNCTION_OK_FOR_SIBCALL): Define.
* config/sparc/sparc.md (sibcall): New attr type. Use it almost
always like call attribute.
(eligible_for_sibcall_delay): New attribute.
(sibcall): New delay type.
(sibcall, sibcall_value, sibcall_epilogue): New expands.
(sibcall_symbolic_sp32, sibcall_symbolic_sp64,
sibcall_value_symbolic_sp32, sibcall_value_symbolic_sp64): New insns.
* config/sparc/sparc.c (sparc_leaf_regs): New array.
(eligible_for_sibcall_delay, output_restore_regs, output_sibcall):
New functions.
(output_function_epilogue): Move part of the code into
output_restore_regs.
(ultra_code_from_mask, ultrasparc_sched_reorder): Handle
TYPE_SIBCALL.
* sparc-protos.h (output_sibcall, eligible_for_sibcall_delay): New
prototypes.
From-SVN: r32730
2000-03-24 22:48:01 +01:00
|
|
|
Name of a char vector, indexed by hard register number, which
|
1996-09-25 01:21:45 +02:00
|
|
|
contains 1 for a register that is allowable in a candidate for leaf
|
|
|
|
function treatment.
|
|
|
|
|
|
|
|
If leaf function treatment involves renumbering the registers, then the
|
|
|
|
registers marked here should be the ones before renumbering---those that
|
1999-08-25 09:27:13 +02:00
|
|
|
GCC would ordinarily allocate. The registers which will actually be
|
1996-09-25 01:21:45 +02:00
|
|
|
used in the assembler code, after renumbering, should not be marked with 1
|
|
|
|
in this vector.
|
|
|
|
|
|
|
|
Define this macro only if the target machine offers a way to optimize
|
|
|
|
the treatment of leaf functions.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac LEAF_REG_REMAP (@var{regno})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C expression whose value is the register number to which @var{regno}
|
|
|
|
should be renumbered, when a function is treated as a leaf function.
|
|
|
|
|
|
|
|
If @var{regno} is a register number which should not appear in a leaf
|
c-tree.texi, [...]: Use more logical markup.
* doc/c-tree.texi, doc/contrib.texi, doc/extend.texi,
doc/gcc.texi, doc/gcov.texi, doc/install-old.texi,
doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: Use more
logical markup. Use TeX quotes and dashes. Use @dots{} and
@minus{}. Avoid spaces inside @var. Update last modification
date in gcc.texi.
* doc/gcc.1, doc/gcov.1: Regenerate.
From-SVN: r43369
2001-06-14 13:08:04 +02:00
|
|
|
function before renumbering, then the expression should yield @minus{}1, which
|
1996-09-25 01:21:45 +02:00
|
|
|
will cause the compiler to abort.
|
|
|
|
|
|
|
|
Define this macro only if the target machine offers a way to optimize the
|
|
|
|
treatment of leaf functions, and registers need to be renumbered to do
|
|
|
|
this.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
1999-04-18 15:09:37 +02:00
|
|
|
@findex current_function_is_leaf
|
|
|
|
@findex current_function_uses_only_leaf_regs
|
haifa-sched.c: Convert to target hooks.
* haifa-sched.c: Convert to target hooks. Macros replaced
are ISSUE_RATE, ADJUST_COST, ADJUST_PRIORITY, MD_SCHED_INIT,
MD_SCHED_REORDER, MD_SCHED_REORDER2, MD_SCHED_VARIABLE_ISSUE,
MD_SCHED_FINISH, and HAVE_cycle_display.
* target-def.h (TARGET_SCHED_ADJUST_COST,
TARGET_SCHED_ADJUST_PRIORITY, TARGET_SCHED_ISSUE_RATE,
TARGET_SCHED_VARIABLE_ISSUE, TARGET_SCHED_INIT,
TARGET_SCHED_FINISH, TARGET_SCHED_REORDER,
TARGET_SCHED_REORDER2, TARGET_SCHED_CYCLE_DISPLAY):
New hook #defines to be overridden.
(TARGET_SCHED): Bring them all together.
(TARGET_INITIALIZER): Update.
* target.h: Don't forward declare struct rtx_def. Use 'rtx'
instead of 'struct rtx_def *' throughout.
(struct sched): New set of hooks for the scheduler.
* Makefile.in (haifa-sched.o): Depend on target.h.
* doc/tm.texi: Document the new scheduler hooks, together in
their own section, instead of scattered around.
Fix a bunch of underfull/overfull hboxes.
* a29k.h, alpha.h, arm.h, c4x.h, convex.h, d30v.h, i386.h,
ia64.h, m32r.h, m88k.h, mips.h, pa.h, rs6000.h, s390.h, sh.h,
sparc.h: Don't define any of the old scheduler macros.
* a29k.c, alpha.c, arm.c, c4x.c, convex.c, d30v.c, i386.c,
ia64.c, m32r.c, m88k.c, mips.c, pa.c, rs6000.c, s390.c, sh.c,
sparc.c: Create hook functions from code extracted from
corresponding target header, or make existing hooks static, as
appropriate. Set the appropriate entries in targetm.
* alpha-protos.h, arm-protos.h, c4x-protos.h, d30v-protos.h,
i386-protos.h, ia64-protos.h, m32r-protos.h, pa-protos.h,
rs6000-protos.h, s390-protos.h, sparc-protos.h:
Remove prototypes for functions which are now static.
* d30v.h, d30v.c, m32r.h, m32r.c: Remove #ifdef HAIFA and
related gunk; the Haifa scheduler is now the only choice.
From-SVN: r45009
2001-08-18 22:25:54 +02:00
|
|
|
@code{TARGET_ASM_FUNCTION_PROLOGUE} and
|
|
|
|
@code{TARGET_ASM_FUNCTION_EPILOGUE} must usually treat leaf functions
|
|
|
|
specially. They can test the C variable @code{current_function_is_leaf}
|
|
|
|
which is nonzero for leaf functions. @code{current_function_is_leaf} is
|
|
|
|
set prior to local register allocation and is valid for the remaining
|
2001-07-06 20:40:17 +02:00
|
|
|
compiler passes. They can also test the C variable
|
|
|
|
@code{current_function_uses_only_leaf_regs} which is nonzero for leaf
|
|
|
|
functions which only use leaf registers.
|
2004-06-30 12:31:30 +02:00
|
|
|
@code{current_function_uses_only_leaf_regs} is valid after all passes
|
|
|
|
that modify the instructions have been run and is only useful if
|
|
|
|
@code{LEAF_REGISTERS} is defined.
|
1996-09-25 01:21:45 +02:00
|
|
|
@c changed this to fix overfull. ALSO: why the "it" at the beginning
|
|
|
|
@c of the next paragraph?! --mew 2feb93
|
|
|
|
|
|
|
|
@node Stack Registers
|
|
|
|
@subsection Registers That Form a Stack
|
|
|
|
|
|
|
|
There are special features to handle computers where some of the
|
2003-06-20 08:41:12 +02:00
|
|
|
``registers'' form a stack. Stack registers are normally written by
|
|
|
|
pushing onto the stack, and are numbered relative to the top of the
|
|
|
|
stack.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
1999-08-25 09:27:13 +02:00
|
|
|
Currently, GCC can only handle one group of stack-like registers, and
|
2003-06-20 08:41:12 +02:00
|
|
|
they must be consecutively numbered. Furthermore, the existing
|
|
|
|
support for stack-like registers is specific to the 80387 floating
|
|
|
|
point coprocessor. If you have a new architecture that uses
|
|
|
|
stack-like registers, you will need to do substantial work on
|
|
|
|
@file{reg-stack.c} and write your machine description to cooperate
|
|
|
|
with it, as well as defining these macros.
|
|
|
|
|
|
|
|
@defmac STACK_REGS
|
1996-09-25 01:21:45 +02:00
|
|
|
Define this if the machine has any stack-like registers.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac FIRST_STACK_REG
|
1996-09-25 01:21:45 +02:00
|
|
|
The number of the first stack-like register. This one is the top
|
|
|
|
of the stack.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac LAST_STACK_REG
|
1996-09-25 01:21:45 +02:00
|
|
|
The number of the last stack-like register. This one is the bottom of
|
|
|
|
the stack.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
@node Register Classes
|
|
|
|
@section Register Classes
|
|
|
|
@cindex register class definitions
|
|
|
|
@cindex class definitions, register
|
|
|
|
|
|
|
|
On many machines, the numbered registers are not all equivalent.
|
|
|
|
For example, certain registers may not be allowed for indexed addressing;
|
|
|
|
certain registers may not be allowed in some instructions. These machine
|
|
|
|
restrictions are described to the compiler using @dfn{register classes}.
|
|
|
|
|
|
|
|
You define a number of register classes, giving each one a name and saying
|
|
|
|
which of the registers belong to it. Then you can specify register classes
|
|
|
|
that are allowed as operands to particular instruction patterns.
|
|
|
|
|
|
|
|
@findex ALL_REGS
|
|
|
|
@findex NO_REGS
|
|
|
|
In general, each register will belong to several classes. In fact, one
|
|
|
|
class must be named @code{ALL_REGS} and contain all the registers. Another
|
|
|
|
class must be named @code{NO_REGS} and contain no registers. Often the
|
|
|
|
union of two classes will be another class; however, this is not required.
|
|
|
|
|
|
|
|
@findex GENERAL_REGS
|
|
|
|
One of the classes must be named @code{GENERAL_REGS}. There is nothing
|
|
|
|
terribly special about the name, but the operand constraint letters
|
|
|
|
@samp{r} and @samp{g} specify this class. If @code{GENERAL_REGS} is
|
|
|
|
the same as @code{ALL_REGS}, just define it as a macro which expands
|
|
|
|
to @code{ALL_REGS}.
|
|
|
|
|
|
|
|
Order the classes so that if class @var{x} is contained in class @var{y}
|
|
|
|
then @var{x} has a lower class number than @var{y}.
|
|
|
|
|
|
|
|
The way classes other than @code{GENERAL_REGS} are specified in operand
|
|
|
|
constraints is through machine-dependent operand constraint letters.
|
|
|
|
You can define such letters to correspond to various classes, then use
|
|
|
|
them in operand constraints.
|
|
|
|
|
|
|
|
You should define a class for the union of two classes whenever some
|
|
|
|
instruction allows both classes. For example, if an instruction allows
|
|
|
|
either a floating point (coprocessor) register or a general register for a
|
|
|
|
certain operand, you should define a class @code{FLOAT_OR_GENERAL_REGS}
|
|
|
|
which includes both of them. Otherwise you will get suboptimal code.
|
|
|
|
|
|
|
|
You must also specify certain redundant information about the register
|
|
|
|
classes: for each class, which classes contain it and which ones are
|
|
|
|
contained in it; for each pair of classes, the largest class contained
|
|
|
|
in their union.
|
|
|
|
|
|
|
|
When a value occupying several consecutive registers is expected in a
|
|
|
|
certain class, all the registers used must belong to that class.
|
|
|
|
Therefore, register classes cannot be used to enforce a requirement for
|
|
|
|
a register pair to start with an even-numbered register. The way to
|
|
|
|
specify this requirement is with @code{HARD_REGNO_MODE_OK}.
|
|
|
|
|
|
|
|
Register classes used for input-operands of bitwise-and or shift
|
|
|
|
instructions have a special requirement: each such class must have, for
|
|
|
|
each fixed-point machine mode, a subclass whose registers can transfer that
|
|
|
|
mode to or from memory. For example, on some machines, the operations for
|
|
|
|
single-byte values (@code{QImode}) are limited to certain registers. When
|
|
|
|
this is so, each register class that is used in a bitwise-and or shift
|
|
|
|
instruction must have a subclass consisting of registers from which
|
|
|
|
single-byte values can be loaded or stored. This is so that
|
|
|
|
@code{PREFERRED_RELOAD_CLASS} can always have a possible value to return.
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@deftp {Data type} {enum reg_class}
|
2004-07-02 00:02:41 +02:00
|
|
|
An enumerated type that must be defined with all the register class names
|
|
|
|
as enumerated values. @code{NO_REGS} must be first. @code{ALL_REGS}
|
|
|
|
must be the last register class, followed by one more enumerated value,
|
1996-09-25 01:21:45 +02:00
|
|
|
@code{LIM_REG_CLASSES}, which is not a register class but rather
|
|
|
|
tells how many classes there are.
|
|
|
|
|
|
|
|
Each register class has a number, which is the value of casting
|
|
|
|
the class name to type @code{int}. The number serves as an index
|
|
|
|
in many of the tables described below.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end deftp
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac N_REG_CLASSES
|
1996-09-25 01:21:45 +02:00
|
|
|
The number of distinct register classes, defined as follows:
|
|
|
|
|
c-tree.texi, [...]: Use @smallexample instead of @example.
* doc/c-tree.texi, doc/compat.texi, doc/cpp.texi,
doc/cppopts.texi, doc/extend.texi, doc/install.texi,
doc/interface.texi, doc/invoke.texi, doc/libgcc.texi, doc/md.texi,
doc/objc.texi, doc/rtl.texi, doc/tm.texi, doc/trouble.texi: Use
@smallexample instead of @example.
From-SVN: r76075
2004-01-18 02:20:48 +01:00
|
|
|
@smallexample
|
1996-09-25 01:21:45 +02:00
|
|
|
#define N_REG_CLASSES (int) LIM_REG_CLASSES
|
c-tree.texi, [...]: Use @smallexample instead of @example.
* doc/c-tree.texi, doc/compat.texi, doc/cpp.texi,
doc/cppopts.texi, doc/extend.texi, doc/install.texi,
doc/interface.texi, doc/invoke.texi, doc/libgcc.texi, doc/md.texi,
doc/objc.texi, doc/rtl.texi, doc/tm.texi, doc/trouble.texi: Use
@smallexample instead of @example.
From-SVN: r76075
2004-01-18 02:20:48 +01:00
|
|
|
@end smallexample
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac REG_CLASS_NAMES
|
1996-09-25 01:21:45 +02:00
|
|
|
An initializer containing the names of the register classes as C string
|
|
|
|
constants. These names are used in writing some of the debugging dumps.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac REG_CLASS_CONTENTS
|
1996-09-25 01:21:45 +02:00
|
|
|
An initializer containing the contents of the register classes, as integers
|
|
|
|
which are bit masks. The @var{n}th integer specifies the contents of class
|
|
|
|
@var{n}. The way the integer @var{mask} is interpreted is that
|
|
|
|
register @var{r} is in the class if @code{@var{mask} & (1 << @var{r})} is 1.
|
|
|
|
|
|
|
|
When the machine has more than 32 registers, an integer does not suffice.
|
|
|
|
Then the integers are replaced by sub-initializers, braced groupings containing
|
|
|
|
several integers. Each sub-initializer must be suitable as an initializer
|
|
|
|
for the type @code{HARD_REG_SET} which is defined in @file{hard-reg-set.h}.
|
2000-08-15 17:29:31 +02:00
|
|
|
In this situation, the first integer in each sub-initializer corresponds to
|
|
|
|
registers 0 through 31, the second integer to registers 32 through 63, and
|
|
|
|
so on.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac REGNO_REG_CLASS (@var{regno})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C expression whose value is a register class containing hard register
|
|
|
|
@var{regno}. In general there is more than one such class; choose a class
|
|
|
|
which is @dfn{minimal}, meaning that no smaller class also contains the
|
|
|
|
register.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac BASE_REG_CLASS
|
1996-09-25 01:21:45 +02:00
|
|
|
A macro whose definition is the name of the class to which a valid
|
|
|
|
base register must belong. A base register is one used in an address
|
|
|
|
which is the register value plus a displacement.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac MODE_BASE_REG_CLASS (@var{mode})
|
2001-12-17 17:46:11 +01:00
|
|
|
This is a variation of the @code{BASE_REG_CLASS} macro which allows
|
2002-12-17 17:47:45 +01:00
|
|
|
the selection of a base register in a mode dependent manner. If
|
2001-12-17 17:46:11 +01:00
|
|
|
@var{mode} is VOIDmode then it should return the same value as
|
|
|
|
@code{BASE_REG_CLASS}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2001-12-17 17:46:11 +01:00
|
|
|
|
2004-10-12 21:28:56 +02:00
|
|
|
@defmac MODE_BASE_REG_REG_CLASS (@var{mode})
|
|
|
|
A C expression whose value is the register class to which a valid
|
|
|
|
base register must belong in order to be used in a base plus index
|
|
|
|
register address. You should define this macro if base plus index
|
|
|
|
addresses have different requirements than other base register uses.
|
|
|
|
@end defmac
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac INDEX_REG_CLASS
|
1996-09-25 01:21:45 +02:00
|
|
|
A macro whose definition is the name of the class to which a valid
|
|
|
|
index register must belong. An index register is one used in an
|
|
|
|
address where its value is either multiplied by a scale factor or
|
|
|
|
added to another register (as well as added to a displacement).
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac CONSTRAINT_LEN (@var{char}, @var{str})
|
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
|
|
|
For the constraint at the start of @var{str}, which starts with the letter
|
|
|
|
@var{c}, return the length. This allows you to have register class /
|
|
|
|
constant / extra constraints that are longer than a single letter;
|
|
|
|
you don't need to define this macro if you can do with single-letter
|
|
|
|
constraints only. The definition of this macro should use
|
|
|
|
DEFAULT_CONSTRAINT_LEN for all the characters that you don't want
|
|
|
|
to handle specially.
|
|
|
|
There are some sanity checks in genoutput.c that check the constraint lengths
|
|
|
|
for the md file, so you can also use this macro to help you while you are
|
|
|
|
transitioning from a byzantine single-letter-constraint scheme: when you
|
|
|
|
return a negative length for a constraint you want to re-use, genoutput
|
|
|
|
will complain about every instance where it is used in the md file.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
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
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac REG_CLASS_FROM_LETTER (@var{char})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C expression which defines the machine-dependent operand constraint
|
|
|
|
letters for register classes. If @var{char} is such a letter, the
|
|
|
|
value should be the register class corresponding to it. Otherwise,
|
|
|
|
the value should be @code{NO_REGS}. The register letter @samp{r},
|
|
|
|
corresponding to class @code{GENERAL_REGS}, will not be passed
|
|
|
|
to this macro; you do not need to handle it.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac REG_CLASS_FROM_CONSTRAINT (@var{char}, @var{str})
|
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
|
|
|
Like @code{REG_CLASS_FROM_LETTER}, but you also get the constraint string
|
|
|
|
passed in @var{str}, so that you can use suffixes to distinguish between
|
|
|
|
different variants.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
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
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac REGNO_OK_FOR_BASE_P (@var{num})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C expression which is nonzero if register number @var{num} is
|
|
|
|
suitable for use as a base register in operand addresses. It may be
|
|
|
|
either a suitable hard register or a pseudo register that has been
|
|
|
|
allocated such a hard register.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac REGNO_MODE_OK_FOR_BASE_P (@var{num}, @var{mode})
|
1997-08-11 17:56:58 +02:00
|
|
|
A C expression that is just like @code{REGNO_OK_FOR_BASE_P}, except that
|
|
|
|
that expression may examine the mode of the memory reference in
|
|
|
|
@var{mode}. You should define this macro if the mode of the memory
|
|
|
|
reference affects whether a register may be used as a base register. If
|
|
|
|
you define this macro, the compiler will use it instead of
|
|
|
|
@code{REGNO_OK_FOR_BASE_P}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1997-08-11 17:56:58 +02:00
|
|
|
|
2004-10-12 21:28:56 +02:00
|
|
|
@defmac REGNO_MODE_OK_FOR_REG_BASE_P (@var{num}, @var{mode})
|
|
|
|
A C expression which is nonzero if register number @var{num} is suitable for
|
|
|
|
use as a base register in base plus index operand addresses, accessing
|
|
|
|
memory in mode @var{mode}. It may be either a suitable hard register or a
|
|
|
|
pseudo register that has been allocated such a hard register. You should
|
|
|
|
define this macro if base plus index addresses have different requirements
|
|
|
|
than other base register uses.
|
|
|
|
@end defmac
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac REGNO_OK_FOR_INDEX_P (@var{num})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C expression which is nonzero if register number @var{num} is
|
|
|
|
suitable for use as an index register in operand addresses. It may be
|
|
|
|
either a suitable hard register or a pseudo register that has been
|
|
|
|
allocated such a hard register.
|
|
|
|
|
|
|
|
The difference between an index register and a base register is that
|
|
|
|
the index register may be scaled. If an address involves the sum of
|
|
|
|
two registers, neither one of them scaled, then either one may be
|
|
|
|
labeled the ``base'' and the other the ``index''; but whichever
|
|
|
|
labeling is used must fit the machine's constraints of which registers
|
|
|
|
may serve in each capacity. The compiler will try both labelings,
|
|
|
|
looking for one that is valid, and will reload one or both registers
|
|
|
|
only if neither labeling works.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac PREFERRED_RELOAD_CLASS (@var{x}, @var{class})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C expression that places additional restrictions on the register class
|
|
|
|
to use when it is necessary to copy value @var{x} into a register in class
|
|
|
|
@var{class}. The value is a register class; perhaps @var{class}, or perhaps
|
|
|
|
another, smaller class. On many machines, the following definition is
|
|
|
|
safe:
|
|
|
|
|
c-tree.texi, [...]: Use @smallexample instead of @example.
* doc/c-tree.texi, doc/compat.texi, doc/cpp.texi,
doc/cppopts.texi, doc/extend.texi, doc/install.texi,
doc/interface.texi, doc/invoke.texi, doc/libgcc.texi, doc/md.texi,
doc/objc.texi, doc/rtl.texi, doc/tm.texi, doc/trouble.texi: Use
@smallexample instead of @example.
From-SVN: r76075
2004-01-18 02:20:48 +01:00
|
|
|
@smallexample
|
1996-09-25 01:21:45 +02:00
|
|
|
#define PREFERRED_RELOAD_CLASS(X,CLASS) CLASS
|
c-tree.texi, [...]: Use @smallexample instead of @example.
* doc/c-tree.texi, doc/compat.texi, doc/cpp.texi,
doc/cppopts.texi, doc/extend.texi, doc/install.texi,
doc/interface.texi, doc/invoke.texi, doc/libgcc.texi, doc/md.texi,
doc/objc.texi, doc/rtl.texi, doc/tm.texi, doc/trouble.texi: Use
@smallexample instead of @example.
From-SVN: r76075
2004-01-18 02:20:48 +01:00
|
|
|
@end smallexample
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
Sometimes returning a more restrictive class makes better code. For
|
|
|
|
example, on the 68000, when @var{x} is an integer constant that is in range
|
|
|
|
for a @samp{moveq} instruction, the value of this macro is always
|
|
|
|
@code{DATA_REGS} as long as @var{class} includes the data registers.
|
|
|
|
Requiring a data register guarantees that a @samp{moveq} will be used.
|
|
|
|
|
2003-12-30 21:27:53 +01:00
|
|
|
One case where @code{PREFERRED_RELOAD_CLASS} must not return
|
|
|
|
@var{class} is if @var{x} is a legitimate constant which cannot be
|
|
|
|
loaded into some register class. By returning @code{NO_REGS} you can
|
|
|
|
force @var{x} into a memory location. For example, rs6000 can load
|
|
|
|
immediate values into general-purpose registers, but does not have an
|
|
|
|
instruction for loading an immediate value into a floating-point
|
|
|
|
register, so @code{PREFERRED_RELOAD_CLASS} returns @code{NO_REGS} when
|
|
|
|
@var{x} is a floating-point constant. If the constant can't be loaded
|
|
|
|
into any kind of register, code generation will be better if
|
|
|
|
@code{LEGITIMATE_CONSTANT_P} makes the constant illegitimate instead
|
|
|
|
of using @code{PREFERRED_RELOAD_CLASS}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac PREFERRED_OUTPUT_RELOAD_CLASS (@var{x}, @var{class})
|
1996-09-25 01:21:45 +02:00
|
|
|
Like @code{PREFERRED_RELOAD_CLASS}, but for output reloads instead of
|
|
|
|
input reloads. If you don't define this macro, the default is to use
|
|
|
|
@var{class}, unchanged.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac LIMIT_RELOAD_CLASS (@var{mode}, @var{class})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C expression that places additional restrictions on the register class
|
|
|
|
to use when it is necessary to be able to hold a value of mode
|
|
|
|
@var{mode} in a reload register for which class @var{class} would
|
|
|
|
ordinarily be used.
|
|
|
|
|
|
|
|
Unlike @code{PREFERRED_RELOAD_CLASS}, this macro should be used when
|
|
|
|
there are certain modes that simply can't go in certain reload classes.
|
|
|
|
|
|
|
|
The value is a register class; perhaps @var{class}, or perhaps another,
|
|
|
|
smaller class.
|
|
|
|
|
|
|
|
Don't define this macro unless the target machine has limitations which
|
|
|
|
require the macro to do something nontrivial.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac SECONDARY_RELOAD_CLASS (@var{class}, @var{mode}, @var{x})
|
|
|
|
@defmacx SECONDARY_INPUT_RELOAD_CLASS (@var{class}, @var{mode}, @var{x})
|
|
|
|
@defmacx SECONDARY_OUTPUT_RELOAD_CLASS (@var{class}, @var{mode}, @var{x})
|
1996-09-25 01:21:45 +02:00
|
|
|
Many machines have some registers that cannot be copied directly to or
|
|
|
|
from memory or even from other types of registers. An example is the
|
|
|
|
@samp{MQ} register, which on most machines, can only be copied to or
|
|
|
|
from general registers, but not memory. Some machines allow copying all
|
|
|
|
registers to and from memory, but require a scratch register for stores
|
|
|
|
to some memory locations (e.g., those with symbolic address on the RT,
|
2002-09-16 00:48:06 +02:00
|
|
|
and those with certain symbolic address on the SPARC when compiling
|
c-tree.texi, [...]: Replace . at end of sentences preceded by a capital letter with @..
* doc/c-tree.texi, doc/contrib.texi, doc/cpp.texi,
doc/cppinternals.texi, doc/extend.texi, doc/gcc.texi,
doc/gcov.texi, doc/install-old.texi, doc/install.texi,
doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: Replace
. at end of sentences preceded by a capital letter with @..
From-SVN: r43611
2001-06-27 17:04:16 +02:00
|
|
|
PIC)@. In some cases, both an intermediate and a scratch register are
|
1996-09-25 01:21:45 +02:00
|
|
|
required.
|
|
|
|
|
|
|
|
You should define these macros to indicate to the reload phase that it may
|
|
|
|
need to allocate at least one register for a reload in addition to the
|
|
|
|
register to contain the data. Specifically, if copying @var{x} to a
|
|
|
|
register @var{class} in @var{mode} requires an intermediate register,
|
|
|
|
you should define @code{SECONDARY_INPUT_RELOAD_CLASS} to return the
|
|
|
|
largest register class all of whose registers can be used as
|
|
|
|
intermediate registers or scratch registers.
|
|
|
|
|
|
|
|
If copying a register @var{class} in @var{mode} to @var{x} requires an
|
|
|
|
intermediate or scratch register, @code{SECONDARY_OUTPUT_RELOAD_CLASS}
|
|
|
|
should be defined to return the largest register class required. If the
|
|
|
|
requirements for input and output reloads are the same, the macro
|
|
|
|
@code{SECONDARY_RELOAD_CLASS} should be used instead of defining both
|
|
|
|
macros identically.
|
|
|
|
|
|
|
|
The values returned by these macros are often @code{GENERAL_REGS}.
|
|
|
|
Return @code{NO_REGS} if no spare register is needed; i.e., if @var{x}
|
|
|
|
can be directly copied to or from a register of @var{class} in
|
|
|
|
@var{mode} without requiring a scratch register. Do not define this
|
|
|
|
macro if it would always return @code{NO_REGS}.
|
|
|
|
|
|
|
|
If a scratch register is required (either with or without an
|
|
|
|
intermediate register), you should define patterns for
|
|
|
|
@samp{reload_in@var{m}} or @samp{reload_out@var{m}}, as required
|
|
|
|
(@pxref{Standard Names}. These patterns, which will normally be
|
|
|
|
implemented with a @code{define_expand}, should be similar to the
|
|
|
|
@samp{mov@var{m}} patterns, except that operand 2 is the scratch
|
|
|
|
register.
|
|
|
|
|
|
|
|
Define constraints for the reload register and scratch register that
|
|
|
|
contain a single register class. If the original reload register (whose
|
|
|
|
class is @var{class}) can meet the constraint given in the pattern, the
|
|
|
|
value returned by these macros is used for the class of the scratch
|
|
|
|
register. Otherwise, two additional reload registers are required.
|
|
|
|
Their classes are obtained from the constraints in the insn pattern.
|
|
|
|
|
|
|
|
@var{x} might be a pseudo-register or a @code{subreg} of a
|
|
|
|
pseudo-register, which could either be in a hard register or in memory.
|
c-tree.texi, [...]: Use more logical markup.
* doc/c-tree.texi, doc/contrib.texi, doc/extend.texi,
doc/gcc.texi, doc/gcov.texi, doc/install-old.texi,
doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: Use more
logical markup. Use TeX quotes and dashes. Use @dots{} and
@minus{}. Avoid spaces inside @var. Update last modification
date in gcc.texi.
* doc/gcc.1, doc/gcov.1: Regenerate.
From-SVN: r43369
2001-06-14 13:08:04 +02:00
|
|
|
Use @code{true_regnum} to find out; it will return @minus{}1 if the pseudo is
|
1996-09-25 01:21:45 +02:00
|
|
|
in memory and the hard register number if it is in a register.
|
|
|
|
|
|
|
|
These macros should not be used in the case where a particular class of
|
|
|
|
registers can only be copied to memory and not to another class of
|
|
|
|
registers. In that case, secondary reload registers are not needed and
|
|
|
|
would not be helpful. Instead, a stack location must be used to perform
|
2002-01-03 01:53:36 +01:00
|
|
|
the copy and the @code{mov@var{m}} pattern should use memory as an
|
1996-09-25 01:21:45 +02:00
|
|
|
intermediate storage. This case often occurs between floating-point and
|
|
|
|
general registers.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac SECONDARY_MEMORY_NEEDED (@var{class1}, @var{class2}, @var{m})
|
1996-09-25 01:21:45 +02:00
|
|
|
Certain machines have the property that some registers cannot be copied
|
|
|
|
to some other registers without using memory. Define this macro on
|
2001-10-10 01:11:55 +02:00
|
|
|
those machines to be a C expression that is nonzero if objects of mode
|
1996-09-25 01:21:45 +02:00
|
|
|
@var{m} in registers of @var{class1} can only be copied to registers of
|
|
|
|
class @var{class2} by storing a register of @var{class1} into memory
|
|
|
|
and loading that memory location into a register of @var{class2}.
|
|
|
|
|
|
|
|
Do not define this macro if its value would always be zero.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac SECONDARY_MEMORY_NEEDED_RTX (@var{mode})
|
1996-09-25 01:21:45 +02:00
|
|
|
Normally when @code{SECONDARY_MEMORY_NEEDED} is defined, the compiler
|
|
|
|
allocates a stack slot for a memory location needed for register copies.
|
|
|
|
If this macro is defined, the compiler instead uses the memory location
|
|
|
|
defined by this macro.
|
|
|
|
|
|
|
|
Do not define this macro if you do not define
|
|
|
|
@code{SECONDARY_MEMORY_NEEDED}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac SECONDARY_MEMORY_NEEDED_MODE (@var{mode})
|
1996-09-25 01:21:45 +02:00
|
|
|
When the compiler needs a secondary memory location to copy between two
|
|
|
|
registers of mode @var{mode}, it normally allocates sufficient memory to
|
|
|
|
hold a quantity of @code{BITS_PER_WORD} bits and performs the store and
|
|
|
|
load operations in a mode that many bits wide and whose class is the
|
|
|
|
same as that of @var{mode}.
|
|
|
|
|
|
|
|
This is right thing to do on most machines because it ensures that all
|
|
|
|
bits of the register are copied and prevents accesses to the registers
|
|
|
|
in a narrower mode, which some machines prohibit for floating-point
|
|
|
|
registers.
|
|
|
|
|
|
|
|
However, this default behavior is not correct on some machines, such as
|
|
|
|
the DEC Alpha, that store short integers in floating-point registers
|
|
|
|
differently than in integer registers. On those machines, the default
|
|
|
|
widening will not work correctly and you must define this macro to
|
|
|
|
suppress that widening in some cases. See the file @file{alpha.h} for
|
|
|
|
details.
|
|
|
|
|
|
|
|
Do not define this macro if you do not define
|
|
|
|
@code{SECONDARY_MEMORY_NEEDED} or if widening @var{mode} to a mode that
|
|
|
|
is @code{BITS_PER_WORD} bits wide is correct for your machine.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac SMALL_REGISTER_CLASSES
|
1998-12-04 14:09:39 +01:00
|
|
|
On some machines, it is risky to let hard registers live across arbitrary
|
|
|
|
insns. Typically, these machines have instructions that require values
|
|
|
|
to be in specific registers (like an accumulator), and reload will fail
|
|
|
|
if the required hard register is used for another purpose across such an
|
|
|
|
insn.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2001-10-10 01:11:55 +02:00
|
|
|
Define @code{SMALL_REGISTER_CLASSES} to be an expression with a nonzero
|
|
|
|
value on these machines. When this macro has a nonzero value, the
|
1998-12-04 14:09:39 +01:00
|
|
|
compiler will try to minimize the lifetime of hard registers.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2001-10-10 01:11:55 +02:00
|
|
|
It is always safe to define this macro with a nonzero value, but if you
|
1997-08-11 17:56:58 +02:00
|
|
|
unnecessarily define it, you will reduce the amount of optimizations
|
|
|
|
that can be performed in some cases. If you do not define this macro
|
2001-10-10 01:11:55 +02:00
|
|
|
with a nonzero value when it is required, the compiler will run out of
|
1997-08-11 17:56:58 +02:00
|
|
|
spill registers and print a fatal error message. For most machines, you
|
|
|
|
should not define this macro at all.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac CLASS_LIKELY_SPILLED_P (@var{class})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C expression whose value is nonzero if pseudos that have been assigned
|
|
|
|
to registers of class @var{class} would likely be spilled because
|
|
|
|
registers of @var{class} are needed for spill registers.
|
|
|
|
|
|
|
|
The default value of this macro returns 1 if @var{class} has exactly one
|
|
|
|
register and zero otherwise. On most machines, this default should be
|
1998-01-23 00:16:12 +01:00
|
|
|
used. Only define this macro to some other expression if pseudos
|
1996-09-25 01:21:45 +02:00
|
|
|
allocated by @file{local-alloc.c} end up in memory because their hard
|
|
|
|
registers were needed for spill registers. If this macro returns nonzero
|
|
|
|
for those classes, those pseudos will only be allocated by
|
|
|
|
@file{global.c}, which knows how to reallocate the pseudo to another
|
|
|
|
register. If there would not be another register available for
|
|
|
|
reallocation, you should not change the definition of this macro since
|
|
|
|
the only effect of such a definition would be to slow down register
|
|
|
|
allocation.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac CLASS_MAX_NREGS (@var{class}, @var{mode})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C expression for the maximum number of consecutive registers
|
|
|
|
of class @var{class} needed to hold a value of mode @var{mode}.
|
|
|
|
|
|
|
|
This is closely related to the macro @code{HARD_REGNO_NREGS}. In fact,
|
|
|
|
the value of the macro @code{CLASS_MAX_NREGS (@var{class}, @var{mode})}
|
|
|
|
should be the maximum value of @code{HARD_REGNO_NREGS (@var{regno},
|
|
|
|
@var{mode})} for all @var{regno} values in the class @var{class}.
|
|
|
|
|
|
|
|
This macro helps control the handling of multiple-word values
|
|
|
|
in the reload pass.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac CANNOT_CHANGE_MODE_CLASS (@var{from}, @var{to}, @var{class})
|
2003-02-01 00:34:17 +01:00
|
|
|
If defined, a C expression that returns nonzero for a @var{class} for which
|
|
|
|
a change from mode @var{from} to mode @var{to} is invalid.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
For the example, loading 32-bit integer or floating-point objects into
|
2002-06-27 19:19:06 +02:00
|
|
|
floating-point registers on the Alpha extends them to 64 bits.
|
1996-09-25 01:21:45 +02:00
|
|
|
Therefore loading a 64-bit object and then storing it as a 32-bit object
|
2002-06-27 19:19:06 +02:00
|
|
|
does not store the low-order 32 bits, as would be the case for a normal
|
2002-11-04 17:58:39 +01:00
|
|
|
register. Therefore, @file{alpha.h} defines @code{CANNOT_CHANGE_MODE_CLASS}
|
|
|
|
as below:
|
2000-06-13 23:47:44 +02:00
|
|
|
|
c-tree.texi, [...]: Use @smallexample instead of @example.
* doc/c-tree.texi, doc/compat.texi, doc/cpp.texi,
doc/cppopts.texi, doc/extend.texi, doc/install.texi,
doc/interface.texi, doc/invoke.texi, doc/libgcc.texi, doc/md.texi,
doc/objc.texi, doc/rtl.texi, doc/tm.texi, doc/trouble.texi: Use
@smallexample instead of @example.
From-SVN: r76075
2004-01-18 02:20:48 +01:00
|
|
|
@smallexample
|
2003-02-01 00:34:17 +01:00
|
|
|
#define CANNOT_CHANGE_MODE_CLASS(FROM, TO, CLASS) \
|
|
|
|
(GET_MODE_SIZE (FROM) != GET_MODE_SIZE (TO) \
|
|
|
|
? reg_classes_intersect_p (FLOAT_REGS, (CLASS)) : 0)
|
c-tree.texi, [...]: Use @smallexample instead of @example.
* doc/c-tree.texi, doc/compat.texi, doc/cpp.texi,
doc/cppopts.texi, doc/extend.texi, doc/install.texi,
doc/interface.texi, doc/invoke.texi, doc/libgcc.texi, doc/md.texi,
doc/objc.texi, doc/rtl.texi, doc/tm.texi, doc/trouble.texi: Use
@smallexample instead of @example.
From-SVN: r76075
2004-01-18 02:20:48 +01:00
|
|
|
@end smallexample
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
Three other special macros describe which operands fit which constraint
|
|
|
|
letters.
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac CONST_OK_FOR_LETTER_P (@var{value}, @var{c})
|
1997-10-28 23:52:51 +01:00
|
|
|
A C expression that defines the machine-dependent operand constraint
|
|
|
|
letters (@samp{I}, @samp{J}, @samp{K}, @dots{} @samp{P}) that specify
|
|
|
|
particular ranges of integer values. If @var{c} is one of those
|
|
|
|
letters, the expression should check that @var{value}, an integer, is in
|
|
|
|
the appropriate range and return 1 if so, 0 otherwise. If @var{c} is
|
|
|
|
not one of those letters, the value should be 0 regardless of
|
|
|
|
@var{value}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac CONST_OK_FOR_CONSTRAINT_P (@var{value}, @var{c}, @var{str})
|
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
|
|
|
Like @code{CONST_OK_FOR_LETTER_P}, but you also get the constraint
|
|
|
|
string passed in @var{str}, so that you can use suffixes to distinguish
|
|
|
|
between different variants.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
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
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac CONST_DOUBLE_OK_FOR_LETTER_P (@var{value}, @var{c})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C expression that defines the machine-dependent operand constraint
|
1997-10-28 23:52:51 +01:00
|
|
|
letters that specify particular ranges of @code{const_double} values
|
|
|
|
(@samp{G} or @samp{H}).
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
If @var{c} is one of those letters, the expression should check that
|
|
|
|
@var{value}, an RTX of code @code{const_double}, is in the appropriate
|
|
|
|
range and return 1 if so, 0 otherwise. If @var{c} is not one of those
|
|
|
|
letters, the value should be 0 regardless of @var{value}.
|
|
|
|
|
|
|
|
@code{const_double} is used for all floating-point constants and for
|
|
|
|
@code{DImode} fixed-point constants. A given letter can accept either
|
|
|
|
or both kinds of values. It can use @code{GET_MODE} to distinguish
|
|
|
|
between these kinds.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac CONST_DOUBLE_OK_FOR_CONSTRAINT_P (@var{value}, @var{c}, @var{str})
|
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
|
|
|
Like @code{CONST_DOUBLE_OK_FOR_LETTER_P}, but you also get the constraint
|
|
|
|
string passed in @var{str}, so that you can use suffixes to distinguish
|
|
|
|
between different variants.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
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
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac EXTRA_CONSTRAINT (@var{value}, @var{c})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C expression that defines the optional machine-dependent constraint
|
2000-08-29 02:44:21 +02:00
|
|
|
letters that can be used to segregate specific types of operands, usually
|
|
|
|
memory references, for the target machine. Any letter that is not
|
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
|
|
|
elsewhere defined and not matched by @code{REG_CLASS_FROM_LETTER} /
|
|
|
|
@code{REG_CLASS_FROM_CONSTRAINT}
|
2000-08-29 02:44:21 +02:00
|
|
|
may be used. Normally this macro will not be defined.
|
|
|
|
|
|
|
|
If it is required for a particular target machine, it should return 1
|
|
|
|
if @var{value} corresponds to the operand type represented by the
|
|
|
|
constraint letter @var{c}. If @var{c} is not defined as an extra
|
1997-10-28 23:52:51 +01:00
|
|
|
constraint, the value returned should be 0 regardless of @var{value}.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2000-08-29 02:44:21 +02:00
|
|
|
For example, on the ROMP, load instructions cannot have their output
|
|
|
|
in r0 if the memory reference contains a symbolic address. Constraint
|
|
|
|
letter @samp{Q} is defined as representing a memory address that does
|
1996-09-25 01:21:45 +02:00
|
|
|
@emph{not} contain a symbolic address. An alternative is specified with
|
|
|
|
a @samp{Q} constraint on the input and @samp{r} on the output. The next
|
|
|
|
alternative specifies @samp{m} on the input and a register class that
|
|
|
|
does not include r0 on the output.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2002-08-14 12:04:51 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac EXTRA_CONSTRAINT_STR (@var{value}, @var{c}, @var{str})
|
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
|
|
|
Like @code{EXTRA_CONSTRAINT}, but you also get the constraint string passed
|
|
|
|
in @var{str}, so that you can use suffixes to distinguish between different
|
|
|
|
variants.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
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
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac EXTRA_MEMORY_CONSTRAINT (@var{c}, @var{str})
|
2002-08-14 12:04:51 +02:00
|
|
|
A C expression that defines the optional machine-dependent constraint
|
|
|
|
letters, amongst those accepted by @code{EXTRA_CONSTRAINT}, that should
|
|
|
|
be treated like memory constraints by the reload pass.
|
|
|
|
|
2003-10-10 23:28:56 +02:00
|
|
|
It should return 1 if the operand type represented by the 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
|
|
|
at the start of @var{str}, the first letter of which is the letter @var{c},
|
|
|
|
comprises a subset of all memory references including
|
2003-10-10 23:28:56 +02:00
|
|
|
all those whose address is simply a base register. This allows the reload
|
|
|
|
pass to reload an operand, if it does not directly correspond to the operand
|
2002-08-14 12:04:51 +02:00
|
|
|
type of @var{c}, by copying its address into a base register.
|
|
|
|
|
|
|
|
For example, on the S/390, some instructions do not accept arbitrary
|
|
|
|
memory references, but only those that do not make use of an index
|
|
|
|
register. The constraint letter @samp{Q} is defined via
|
|
|
|
@code{EXTRA_CONSTRAINT} as representing a memory address of this type.
|
|
|
|
If the letter @samp{Q} is marked as @code{EXTRA_MEMORY_CONSTRAINT},
|
|
|
|
a @samp{Q} constraint can handle any memory operand, because the
|
|
|
|
reload pass knows it can be reloaded by copying the memory address
|
|
|
|
into a base register if required. This is analogous to the way
|
|
|
|
a @samp{o} constraint can handle any memory operand.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2002-08-14 12:04:51 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac EXTRA_ADDRESS_CONSTRAINT (@var{c}, @var{str})
|
2002-08-14 12:04:51 +02:00
|
|
|
A C expression that defines the optional machine-dependent 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
|
|
|
letters, amongst those accepted by @code{EXTRA_CONSTRAINT} /
|
|
|
|
@code{EXTRA_CONSTRAINT_STR}, that should
|
2002-08-14 12:04:51 +02:00
|
|
|
be treated like address constraints by the reload pass.
|
|
|
|
|
2003-10-10 23:28:56 +02:00
|
|
|
It should return 1 if the operand type represented by the constraint
|
2003-01-09 21:02:51 +01:00
|
|
|
at the start of @var{str}, which starts with the letter @var{c}, comprises
|
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
|
|
|
a subset of all memory addresses including
|
2003-10-10 23:28:56 +02:00
|
|
|
all those that consist of just a base register. This allows the reload
|
|
|
|
pass to reload an operand, if it does not directly correspond to the operand
|
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
|
|
|
type of @var{str}, by copying it into a base register.
|
2002-08-14 12:04:51 +02:00
|
|
|
|
|
|
|
Any constraint marked as @code{EXTRA_ADDRESS_CONSTRAINT} can only
|
2003-10-10 23:28:56 +02:00
|
|
|
be used with the @code{address_operand} predicate. It is treated
|
2002-08-14 12:04:51 +02:00
|
|
|
analogously to the @samp{p} constraint.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
@node Stack and Calling
|
|
|
|
@section Stack Layout and Calling Conventions
|
|
|
|
@cindex calling conventions
|
|
|
|
|
|
|
|
@c prevent bad page break with this line
|
|
|
|
This describes the stack layout and calling conventions.
|
|
|
|
|
|
|
|
@menu
|
|
|
|
* Frame Layout::
|
2001-07-08 09:07:11 +02:00
|
|
|
* Exception Handling::
|
1997-08-11 17:56:58 +02:00
|
|
|
* Stack Checking::
|
1996-09-25 01:21:45 +02:00
|
|
|
* Frame Registers::
|
|
|
|
* Elimination::
|
|
|
|
* Stack Arguments::
|
|
|
|
* Register Arguments::
|
|
|
|
* Scalar Return::
|
|
|
|
* Aggregate Return::
|
|
|
|
* Caller Saves::
|
|
|
|
* Function Entry::
|
|
|
|
* Profiling::
|
Table-driven attributes.
* c-decl.c, config/alpha/alpha.c, config/arc/arc.c,
config/arm/arm.c, config/arm/pe.c, config/avr/avr.c,
config/avr/avr.h, config/d30v/d30v.h, config/fr30/fr30.h,
config/h8300/h8300.c, config/i386/cygwin.h, config/i386/winnt.c,
config/m32r/m32r.c, config/mcore/mcore.c, config/sh/sh.c,
config/stormy16/stormy16.h, config/v850/v850.c, doc/c-tree.texi,
doc/tm.texi, ggc-common.c, integrate.c, print-tree.c, tree.c,
tree.h: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
* tree.h (struct tree_decl): Change machine_attributes to
attributes.
* doc/c-tree.texi: Document that all attributes are now attached
to decls and types.
* c-common.c (add_attribute, attrtab, attrtab_idx,
default_valid_lang_attribute, valid_lang_attribute): Remove.
(attribute_tables, attributes_initialized,
c_common_attribute_table, default_lang_attribute_table): New
variables.
(handle_packed_attribute, handle_nocommon_attribute,
handle_common_attribute, handle_noreturn_attribute,
handle_unused_attribute, handle_const_attribute,
handle_transparent_union_attribute, handle_constructor_attribute,
handle_destructor_attribute, handle_mode_attribute,
handle_section_attribute, handle_aligned_attribute,
handle_weak_attribute, handle_alias_attribute,
handle_no_instrument_function_attribute,
handle_no_check_memory_usage_attribute, handle_malloc_attribute,
handle_no_limit_stack_attribute, handle_pure_attribute): New
functions.
(init_attributes, decl_attributes): Rewrite to implement
table-driven attributes.
* c-common.h (enum attribute_flags): Move to tree.h.
* c-format.c (decl_handle_format_attribute,
decl_handle_format_arg_attribute): Rename to
handle_format_attribute and handle_format_arg_attribute. Update
for table-driven attributes.
* c-common.h (decl_handle_format_attribute,
decl_handle_format_arg_attribute): Remove prototypes.
(handle_format_attribute, handle_format_arg_attribute): Add
prototypes.
* c-decl.c (grokdeclarator): Handle attributes nested inside
declarators.
* c-parse.in (setattrs, maybe_setattrs): Remove.
(maybe_type_quals_setattrs): Rename to maybe_type_quals_attrs.
Update to handle nested attributes properly.
(maybe_resetattrs, after_type_declarator,
parm_declarator_nostarttypename, notype_declarator, absdcl1_noea,
absdcl1_ea, direct_absdcl1): Update to handle nested attributes
properly.
(make_pointer_declarator): Update to handle nested attributes
properly.
* doc/extend.texi: Update documentation of limits of attributes
syntax. Warn about problems with attribute semantics in C++.
* target.h (struct target): Remove valid_decl_attribute and
valid_type_attribute. Add attribute_table and
function_attribute_inlinable_p.
* target-def.h (TARGET_VALID_DECL_ATTRIBUTE,
TARGET_VALID_TYPE_ATTRIBUTE): Remove.
(TARGET_ATTRIBUTE_TABLE, TARGET_FUNCTION_ATTRIBUTE_INLINABLE_P):
Add.
(TARGET_INITIALIZER): Update.
* integrate.c (FUNCTION_ATTRIBUTE_INLINABLE_P): Remove default
definition.
(function_attribute_inlinable_p): New function. Check for the
presence of any machine attributes before using
targetm.function_attribute_inlinable_p.
(function_cannot_inline_p): Update.
* Makefile.in (integrate.o): Update dependencies.
* doc/tm.texi: Update documentation of target attributes and
example definition of TARGET_VALID_TYPE_ATTRIBUTE.
* tree.c (default_valid_attribute_p, valid_machine_attribute):
Remove.
(default_target_attribute_table,
default_function_attribute_inlinable_p): New.
(lookup_attribute): Update comment to clarify handling of multiple
attributes with the same name.
(merge_attributes, attribute_list_contained): Allow multiple
attributes with the same name but different arguments to appear in
the same attribute list.
* tree.h (default_valid_attribute_p): Remove prototype.
(struct attribute_spec): New.
(default_target_attribute_table): Declare.
(enum attribute_flags): Move from c-common.h. Add
ATTR_FLAG_TYPE_IN_PLACE.
(default_function_attribute_inlinable_p): Declare.
* config/alpha/alpha.c (vms_valid_decl_attribute_p): Remove.
(TARGET_VALID_DECL_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(vms_attribute_table): New.
* config/arc/arc.c (arc_valid_decl_attribute): Remove.
(TARGET_VALID_DECL_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(arc_attribute_table, arc_handle_interrupt_attribute): New.
* config/arm/arm.c (arm_valid_type_attribute_p,
arm_valid_decl_attribute_p, arm_pe_valid_decl_attribute_p):
Remove.
(TARGET_VALID_TYPE_ATTRIBUTE, TARGET_VALID_DECL_ATTRIBUTE): Don't
define.
(TARGET_ATTRIBUTE_TABLE): Define.
(arm_attribute_table, arm_handle_fndecl_attribute,
arm_handle_isr_attribute): New.
* config/avr/avr.c (avr_valid_type_attribute,
avr_valid_decl_attribute): Remove.
(TARGET_VALID_DECL_ATTRIBUTE, TARGET_VALID_TYPE_ATTRIBUTE): Don't
define.
(TARGET_ATTRIBUTE_TABLE): Define.
(avr_attribute_table, avr_handle_progmem_attribute,
avr_handle_fndecl_attribute): New.
* config/c4x/c4x.c (c4x_valid_type_attribute_p): Remove.
(TARGET_VALID_TYPE_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(c4x_attribute_table, c4x_handle_fntype_attribute): New.
* config/h8300/h8300.c (h8300_valid_decl_attribute): Remove.
(TARGET_VALID_DECL_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(h8300_attribute_table, h8300_handle_fndecl_attribute,
h8300_handle_eightbit_data_attribute,
h8300_handle_tiny_data_attribute): New.
* config/i386/i386-protos.h (ix86_valid_type_attribute_p,
i386_pe_valid_decl_attribute_p, i386_pe_valid_type_attribute_p):
Remove prototypes.
(ix86_handle_dll_attribute, ix86_handle_shared_attribute): New
declarations.
* config/i386/i386.c (ix86_valid_type_attribute_p: Remove.
(TARGET_VALID_TYPE_ATTRIBUTE, TARGET_VALID_DECL_ATTRIBUTE): Don't
define.
(TARGET_ATTRIBUTE_TABLE): Define.
(ix86_attribute_table, ix86_handle_cdecl_attribute,
ix86_handle_regparm_attribute): New.
* config/i386/winnt.c (i386_pe_valid_decl_attribute_p,
i386_pe_valid_type_attribute_p): Remove.
(ix86_handle_dll_attribute, ix86_handle_shared_attribute): New.
* config/ia64/ia64.c (ia64_valid_type_attribute): Remove.
(TARGET_VALID_TYPE_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(ia64_attribute_table): New.
* config/m32r/m32r.c (m32r_valid_decl_attribute, interrupt_ident1,
interrupt_ident2, model_ident1, model_ident2): Remove.
(TARGET_VALID_DECL_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(init_idents): Update.
(m32r_attribute_table, m32r_handle_model_attribute): New.
* config/m68hc11/m68hc11.c (m68hc11_valid_type_attribute_p):
Remove.
(TARGET_VALID_TYPE_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(m68hc11_attribute_table, m68hc11_handle_fntype_attribute): New.
* config/mcore/mcore.c (mcore_valid_decl_attribute): Remove.
(TARGET_VALID_DECL_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(mcore_attribute_table, mcore_handle_naked_attribute): New.
* config/ns32k/ns32k.c (ns32k_valid_type_attribute_p): Remove.
(TARGET_VALID_TYPE_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(ns32k_attribute_table, ns32k_handle_fntype_attribute): New.
* config/rs6000/rs6000.c (rs6000_valid_type_attribute_p): Remove.
(TARGET_VALID_TYPE_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(rs6000_attribute_table, rs6000_handle_longcall_attribute): New.
* config/sh/sh.c (sh_valid_decl_attribute): Remove.
(TARGET_VALID_DECL_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(sh_attribute_table, sh_handle_interrupt_handler_attribute,
sh_handle_sp_switch_attribute, sh_handle_trap_exit_attribute):
New.
* config/stormy16/stormy16.c (stormy16_valid_type_attribute):
Remove.
(TARGET_VALID_TYPE_ATTRIBUTE): Don't define
(TARGET_ATTRIBUTE_TABLE): Define.
(stormy16_attribute_table, stormy16_handle_interrupt_attribute):
New.
* config/v850/v850.c (v850_valid_decl_attribute): Remove.
(TARGET_VALID_DECL_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(v850_attribute_table, v850_handle_interrupt_attribute,
v850_handle_data_area_attribute): New.
* config/v850/v850-c.c (mark_current_function_as_interrupt):
Return void. Call decl_attributes instead of
valid_machine_attribute.
cp:
Table-driven attributes.
* decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
* decl2.c (cplus_decl_attributes): Only take one attributes
parameter.
* cp-tree.c (cplus_decl_attributes): Update prototype.
* class.c (finish_struct), decl.c (start_decl, start_function),
decl2.c (grokfield), friend.c (do_friend), parse.y
(parse_bitfield): Update calls to cplus_decl_attributes.
* decl.c (grokdeclarator): Take a pointer to a single ordinary
attribute list.
* decl.h (grokdeclarator): Update prototype.
* decl2.c (grokfield): Take a single ordinary attribute list.
* friend.c (do_friend): Likewise.
* decl.c (shadow_tag, groktypename, start_decl,
start_handler_parms, grokdeclarator, grokparms, start_function,
start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
(process_template_parm, do_decl_instantiation): Pass single
ordinary attribute lists around.
* decl.c (grokdeclarator): Correct handling of nested attributes.
Revert the patch
1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
* decl.c (grokdeclarator): Embedded attrs bind to the right,
not the left.
.
* cp-tree.h (cp_valid_lang_attribute): Remove declaration
(cp_attribute_table): Declare.
* decl.c (valid_lang_attribute): Don't define.
(lang_attribute_table): Define.
(init_decl_processing): Initialize lang_attribute_table instead of
valid_lang_attribute.
* tree.c (cp_valid_lang_attribute): Remove.
(handle_java_interface_attribute, handle_com_interface_attribute,
handle_init_priority_attribute): New functions.
(cp_attribute_table): New array.
* decl2.c (import_export_class): Don't use
targetm.valid_type_attribute.
testsuite:
Table-driven attributes.
* g++.dg/ext/attrib1.C: New test.
From-SVN: r45718
2001-09-21 03:27:06 +02:00
|
|
|
* Tail Calls::
|
1996-09-25 01:21:45 +02:00
|
|
|
@end menu
|
|
|
|
|
|
|
|
@node Frame Layout
|
|
|
|
@subsection Basic Stack Layout
|
|
|
|
@cindex stack frame layout
|
|
|
|
@cindex frame layout
|
|
|
|
|
|
|
|
@c prevent bad page break with this line
|
|
|
|
Here is the basic stack layout.
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac STACK_GROWS_DOWNWARD
|
1996-09-25 01:21:45 +02:00
|
|
|
Define this macro if pushing a word onto the stack moves the stack
|
|
|
|
pointer to a smaller address.
|
|
|
|
|
2004-10-28 02:20:42 +02:00
|
|
|
When we say, ``define this macro if @dots{}'', it means that the
|
1996-09-25 01:21:45 +02:00
|
|
|
compiler checks this macro only with @code{#ifdef} so the precise
|
|
|
|
definition used does not matter.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac STACK_PUSH_CODE
|
2001-07-02 22:02:54 +02:00
|
|
|
This macro defines the operation used when something is pushed
|
|
|
|
on the stack. In RTL, a push operation will be
|
2002-06-24 18:45:21 +02:00
|
|
|
@code{(set (mem (STACK_PUSH_CODE (reg sp))) @dots{})}
|
2001-07-02 22:02:54 +02:00
|
|
|
|
|
|
|
The choices are @code{PRE_DEC}, @code{POST_DEC}, @code{PRE_INC},
|
|
|
|
and @code{POST_INC}. Which of these is correct depends on
|
|
|
|
the stack direction and on whether the stack pointer points
|
|
|
|
to the last item on the stack or whether it points to the
|
|
|
|
space for the next item on the stack.
|
|
|
|
|
|
|
|
The default is @code{PRE_DEC} when @code{STACK_GROWS_DOWNWARD} is
|
|
|
|
defined, which is almost always right, and @code{PRE_INC} otherwise,
|
|
|
|
which is often wrong.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2001-07-02 22:02:54 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac FRAME_GROWS_DOWNWARD
|
1996-09-25 01:21:45 +02:00
|
|
|
Define this macro if the addresses of local variable slots are at negative
|
|
|
|
offsets from the frame pointer.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ARGS_GROW_DOWNWARD
|
1996-09-25 01:21:45 +02:00
|
|
|
Define this macro if successive arguments to a function occupy decreasing
|
|
|
|
addresses on the stack.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac STARTING_FRAME_OFFSET
|
1996-09-25 01:21:45 +02:00
|
|
|
Offset from the frame pointer to the first local variable slot to be allocated.
|
|
|
|
|
|
|
|
If @code{FRAME_GROWS_DOWNWARD}, find the next slot's offset by
|
|
|
|
subtracting the first slot's length from @code{STARTING_FRAME_OFFSET}.
|
|
|
|
Otherwise, it is found by adding the length of the first slot to the
|
|
|
|
value @code{STARTING_FRAME_OFFSET}.
|
|
|
|
@c i'm not sure if the above is still correct.. had to change it to get
|
|
|
|
@c rid of an overfull. --mew 2feb93
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac STACK_ALIGNMENT_NEEDED
|
2003-03-04 07:20:17 +01:00
|
|
|
Define to zero to disable final alignment of the stack during reload.
|
2003-06-15 06:00:48 +02:00
|
|
|
The nonzero default for this macro is suitable for most ports.
|
2003-03-04 07:20:17 +01:00
|
|
|
|
2003-06-15 06:00:48 +02:00
|
|
|
On ports where @code{STARTING_FRAME_OFFSET} is nonzero or where there
|
2003-03-04 07:20:17 +01:00
|
|
|
is a register save block following the local block that doesn't require
|
|
|
|
alignment to @code{STACK_BOUNDARY}, it may be beneficial to disable
|
|
|
|
stack alignment and do it in the backend.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2003-03-04 07:20:17 +01:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac STACK_POINTER_OFFSET
|
1996-09-25 01:21:45 +02:00
|
|
|
Offset from the stack pointer register to the first location at which
|
|
|
|
outgoing arguments are placed. If not specified, the default value of
|
|
|
|
zero is used. This is the proper value for most machines.
|
|
|
|
|
|
|
|
If @code{ARGS_GROW_DOWNWARD}, this is the offset to the location above
|
|
|
|
the first location at which outgoing arguments are placed.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac FIRST_PARM_OFFSET (@var{fundecl})
|
1996-09-25 01:21:45 +02:00
|
|
|
Offset from the argument pointer register to the first argument's
|
|
|
|
address. On some machines it may depend on the data type of the
|
|
|
|
function.
|
|
|
|
|
|
|
|
If @code{ARGS_GROW_DOWNWARD}, this is the offset to the location above
|
|
|
|
the first argument's address.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac STACK_DYNAMIC_OFFSET (@var{fundecl})
|
1996-09-25 01:21:45 +02:00
|
|
|
Offset from the stack pointer register to an item dynamically allocated
|
|
|
|
on the stack, e.g., by @code{alloca}.
|
|
|
|
|
|
|
|
The default value for this macro is @code{STACK_POINTER_OFFSET} plus the
|
|
|
|
length of the outgoing arguments. The default is correct for most
|
|
|
|
machines. See @file{function.c} for details.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac DYNAMIC_CHAIN_ADDRESS (@var{frameaddr})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C expression whose value is RTL representing the address in a stack
|
|
|
|
frame where the pointer to the caller's frame is stored. Assume that
|
|
|
|
@var{frameaddr} is an RTL expression for the address of the stack frame
|
|
|
|
itself.
|
|
|
|
|
|
|
|
If you don't define this macro, the default is to return the value
|
|
|
|
of @var{frameaddr}---that is, the stack frame address is also the
|
|
|
|
address of the stack word that points to the previous frame.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac SETUP_FRAME_ADDRESSES
|
1996-09-25 01:21:45 +02:00
|
|
|
If defined, a C expression that produces the machine-specific code to
|
|
|
|
setup the stack so that arbitrary frames can be accessed. For example,
|
2002-09-16 00:48:06 +02:00
|
|
|
on the SPARC, we must flush all of the register windows to the stack
|
1998-06-02 22:11:21 +02:00
|
|
|
before we can access arbitrary stack frames. You will seldom need to
|
|
|
|
define this macro.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1998-06-02 22:11:21 +02:00
|
|
|
|
2004-03-02 23:32:27 +01:00
|
|
|
@deftypefn {Target Hook} bool TARGET_BUILTIN_SETJMP_FRAME_VALUE ()
|
|
|
|
This target hook should return an rtx that is used to store
|
1998-06-02 22:11:21 +02:00
|
|
|
the address of the current frame into the built in @code{setjmp} buffer.
|
|
|
|
The default value, @code{virtual_stack_vars_rtx}, is correct for most
|
2004-03-02 23:32:27 +01:00
|
|
|
machines. One reason you may need to define this target hook is if
|
1998-06-02 22:11:21 +02:00
|
|
|
@code{hard_frame_pointer_rtx} is the appropriate value on your machine.
|
2004-03-02 23:32:27 +01:00
|
|
|
@end deftypefn
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac RETURN_ADDR_RTX (@var{count}, @var{frameaddr})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C expression whose value is RTL representing the value of the return
|
1997-08-11 17:56:58 +02:00
|
|
|
address for the frame @var{count} steps up from the current frame, after
|
|
|
|
the prologue. @var{frameaddr} is the frame pointer of the @var{count}
|
|
|
|
frame, or the frame pointer of the @var{count} @minus{} 1 frame if
|
1996-09-25 01:21:45 +02:00
|
|
|
@code{RETURN_ADDR_IN_PREVIOUS_FRAME} is defined.
|
|
|
|
|
1997-11-02 22:19:36 +01:00
|
|
|
The value of the expression must always be the correct address when
|
|
|
|
@var{count} is zero, but may be @code{NULL_RTX} if there is not way to
|
|
|
|
determine the return address of other frames.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1997-11-02 22:19:36 +01:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac RETURN_ADDR_IN_PREVIOUS_FRAME
|
1996-09-25 01:21:45 +02:00
|
|
|
Define this if the return address of a particular stack frame is accessed
|
|
|
|
from the frame pointer of the previous stack frame.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1997-08-11 17:56:58 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac INCOMING_RETURN_ADDR_RTX
|
1997-08-11 17:56:58 +02:00
|
|
|
A C expression whose value is RTL representing the location of the
|
|
|
|
incoming return address at the beginning of any function, before the
|
|
|
|
prologue. This RTL is either a @code{REG}, indicating that the return
|
|
|
|
value is saved in @samp{REG}, or a @code{MEM} representing a location in
|
|
|
|
the stack.
|
|
|
|
|
|
|
|
You only need to define this macro if you want to support call frame
|
|
|
|
debugging information like that provided by DWARF 2.
|
|
|
|
|
2000-03-23 01:29:55 +01:00
|
|
|
If this RTL is a @code{REG}, you should also define
|
2001-07-03 02:46:05 +02:00
|
|
|
@code{DWARF_FRAME_RETURN_COLUMN} to @code{DWARF_FRAME_REGNUM (REGNO)}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2000-03-23 01:29:55 +01:00
|
|
|
|
2003-10-01 08:01:47 +02:00
|
|
|
@defmac DWARF_ALT_FRAME_RETURN_COLUMN
|
2003-10-10 23:28:56 +02:00
|
|
|
A C expression whose value is an integer giving a DWARF 2 column
|
2003-10-01 08:01:47 +02:00
|
|
|
number that may be used as an alternate return column. This should
|
2003-10-10 23:28:56 +02:00
|
|
|
be defined only if @code{DWARF_FRAME_RETURN_COLUMN} is set to a
|
2003-10-01 08:01:47 +02:00
|
|
|
general register, but an alternate column needs to be used for
|
|
|
|
signal frames.
|
|
|
|
@end defmac
|
|
|
|
|
2004-09-30 10:21:27 +02:00
|
|
|
@defmac DWARF_ZERO_REG
|
|
|
|
A C expression whose value is an integer giving a DWARF 2 register
|
|
|
|
number that is considered to always have the value zero. This should
|
|
|
|
only be defined if the target has an architected zero register, and
|
|
|
|
someone decided it was a good idea to use that register number to
|
|
|
|
terminate the stack backtrace. New ports should avoid this.
|
|
|
|
@end defmac
|
|
|
|
|
2004-11-26 20:21:16 +01:00
|
|
|
@deftypefn {Target Hook} void TARGET_DWARF_HANDLE_FRAME_UNSPEC (const char *@var{label}, rtx @var{pattern}, int @var{index})
|
|
|
|
This target hook allows the backend to emit frame-related insns that
|
|
|
|
contain UNSPECs or UNSPEC_VOLATILEs. The DWARF 2 call frame debugging
|
|
|
|
info engine will invoke it on insns of the form
|
|
|
|
@smallexample
|
|
|
|
(set (reg) (unspec [...] UNSPEC_INDEX))
|
|
|
|
@end smallexample
|
|
|
|
and
|
|
|
|
@smallexample
|
|
|
|
(set (reg) (unspec_volatile [...] UNSPECV_INDEX)).
|
|
|
|
@end smallexample
|
|
|
|
to let the backend emit the call frame instructions. @var{label} is
|
|
|
|
the CFI label attached to the insn, @var{pattern} is the pattern of
|
|
|
|
the insn and @var{index} is @code{UNSPEC_INDEX} or @code{UNSPECV_INDEX}.
|
|
|
|
@end deftypefn
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac INCOMING_FRAME_SP_OFFSET
|
1997-08-11 17:56:58 +02:00
|
|
|
A C expression whose value is an integer giving the offset, in bytes,
|
|
|
|
from the value of the stack pointer register to the top of the stack
|
|
|
|
frame at the beginning of any function, before the prologue. The top of
|
|
|
|
the frame is defined to be the value of the stack pointer in the
|
|
|
|
previous frame, just before the call instruction.
|
|
|
|
|
tree.h (BUILT_IN_CALLER_RETURN_ADDRESS): Unused.
* tree.h (BUILT_IN_CALLER_RETURN_ADDRESS): Unused. Kill.
(BUILT_IN_FP, BUILT_IN_SP, BUILT_IN_SET_RETURN_ADDR_REG): Kill.
(BUILT_IN_EH_STUB_OLD, BUILT_IN_EH_STUB, BUILT_IN_SET_EH_REGS): Kill.
(BUILT_IN_EH_RETURN, BUILT_IN_DWARF_CFA): New.
* c-decl.c (init_decl_processing): Update accordingly.
* expr.c (expand_builtin): Likewise.
* cp/decl.c (init_decl_processing): Likewise.
* rtl.h (global_rtl): Add cfa entry.
(virtual_cfa_rtx, VIRTUAL_CFA_REGNUM): New.
(LAST_VIRTUAL_REGISTER): Update.
* emit-rtl.c (global_rtl): Add cfa entry.
(init_emit): Initialize it.
* function.c (cfa_offset): New.
(instantiate_virtual_regs): Initialize it.
(instantiate_virtual_regs_1): Instantiate virtual_cfa_rtx.
(expand_function_end): Call expand_eh_return.
* tm.texi (ARG_POINTER_CFA_OFFSET): New.
* except.c (current_function_eh_stub_label): Kill.
(current_function_eh_old_stub_label): Likwise; update all references.
(expand_builtin_set_return_addr_reg): Kill.
(expand_builtin_eh_stub_old, expand_builtin_eh_stub): Kill.
(expand_builtin_set_eh_regs): Kill.
(eh_regs): Produce a third reg for the actual handler address.
(eh_return_context, eh_return_stack_adjust): New.
(eh_return_handler, eh_return_stub_label): New.
(init_eh_for_function): Initialize them.
(expand_builtin_eh_return, expand_eh_return): New.
* except.h: Update prototypes.
* flow.c (find_basic_blocks_1): Update references to the stub label.
* function.h (struct function): Kill stub label elements.
* libgcc2.c (in_reg_window): For REG_SAVED_REG, check that the
register number is one that would be in the previous window.
Provide a dummy definition for non-windowed targets.
(get_reg_addr): New function.
(get_reg, put_reg, copy_reg): Use it.
(__throw): Rely on in_reg_window, not INCOMING_REGNO. Kill stub
generating code and use __builtin_eh_return. Use __builtin_dwarf_cfa.
* alpha.c (alpha_eh_epilogue_sp_ofs): New.
(alpha_init_expanders): Initialize it.
(alpha_expand_epilogue): Use it.
* alpha.h: Declare it.
* alpha.md (eh_epilogue): New.
* m68h.h (ARG_POINTER_CFA_OFFSET): New.
* sparc.h (ARG_POINTER_CFA_OFFSET): New.
From-SVN: r22436
1998-09-15 21:19:12 +02:00
|
|
|
You only need to define this macro if you want to support call frame
|
|
|
|
debugging information like that provided by DWARF 2.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
tree.h (BUILT_IN_CALLER_RETURN_ADDRESS): Unused.
* tree.h (BUILT_IN_CALLER_RETURN_ADDRESS): Unused. Kill.
(BUILT_IN_FP, BUILT_IN_SP, BUILT_IN_SET_RETURN_ADDR_REG): Kill.
(BUILT_IN_EH_STUB_OLD, BUILT_IN_EH_STUB, BUILT_IN_SET_EH_REGS): Kill.
(BUILT_IN_EH_RETURN, BUILT_IN_DWARF_CFA): New.
* c-decl.c (init_decl_processing): Update accordingly.
* expr.c (expand_builtin): Likewise.
* cp/decl.c (init_decl_processing): Likewise.
* rtl.h (global_rtl): Add cfa entry.
(virtual_cfa_rtx, VIRTUAL_CFA_REGNUM): New.
(LAST_VIRTUAL_REGISTER): Update.
* emit-rtl.c (global_rtl): Add cfa entry.
(init_emit): Initialize it.
* function.c (cfa_offset): New.
(instantiate_virtual_regs): Initialize it.
(instantiate_virtual_regs_1): Instantiate virtual_cfa_rtx.
(expand_function_end): Call expand_eh_return.
* tm.texi (ARG_POINTER_CFA_OFFSET): New.
* except.c (current_function_eh_stub_label): Kill.
(current_function_eh_old_stub_label): Likwise; update all references.
(expand_builtin_set_return_addr_reg): Kill.
(expand_builtin_eh_stub_old, expand_builtin_eh_stub): Kill.
(expand_builtin_set_eh_regs): Kill.
(eh_regs): Produce a third reg for the actual handler address.
(eh_return_context, eh_return_stack_adjust): New.
(eh_return_handler, eh_return_stub_label): New.
(init_eh_for_function): Initialize them.
(expand_builtin_eh_return, expand_eh_return): New.
* except.h: Update prototypes.
* flow.c (find_basic_blocks_1): Update references to the stub label.
* function.h (struct function): Kill stub label elements.
* libgcc2.c (in_reg_window): For REG_SAVED_REG, check that the
register number is one that would be in the previous window.
Provide a dummy definition for non-windowed targets.
(get_reg_addr): New function.
(get_reg, put_reg, copy_reg): Use it.
(__throw): Rely on in_reg_window, not INCOMING_REGNO. Kill stub
generating code and use __builtin_eh_return. Use __builtin_dwarf_cfa.
* alpha.c (alpha_eh_epilogue_sp_ofs): New.
(alpha_init_expanders): Initialize it.
(alpha_expand_epilogue): Use it.
* alpha.h: Declare it.
* alpha.md (eh_epilogue): New.
* m68h.h (ARG_POINTER_CFA_OFFSET): New.
* sparc.h (ARG_POINTER_CFA_OFFSET): New.
From-SVN: r22436
1998-09-15 21:19:12 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ARG_POINTER_CFA_OFFSET (@var{fundecl})
|
tree.h (BUILT_IN_CALLER_RETURN_ADDRESS): Unused.
* tree.h (BUILT_IN_CALLER_RETURN_ADDRESS): Unused. Kill.
(BUILT_IN_FP, BUILT_IN_SP, BUILT_IN_SET_RETURN_ADDR_REG): Kill.
(BUILT_IN_EH_STUB_OLD, BUILT_IN_EH_STUB, BUILT_IN_SET_EH_REGS): Kill.
(BUILT_IN_EH_RETURN, BUILT_IN_DWARF_CFA): New.
* c-decl.c (init_decl_processing): Update accordingly.
* expr.c (expand_builtin): Likewise.
* cp/decl.c (init_decl_processing): Likewise.
* rtl.h (global_rtl): Add cfa entry.
(virtual_cfa_rtx, VIRTUAL_CFA_REGNUM): New.
(LAST_VIRTUAL_REGISTER): Update.
* emit-rtl.c (global_rtl): Add cfa entry.
(init_emit): Initialize it.
* function.c (cfa_offset): New.
(instantiate_virtual_regs): Initialize it.
(instantiate_virtual_regs_1): Instantiate virtual_cfa_rtx.
(expand_function_end): Call expand_eh_return.
* tm.texi (ARG_POINTER_CFA_OFFSET): New.
* except.c (current_function_eh_stub_label): Kill.
(current_function_eh_old_stub_label): Likwise; update all references.
(expand_builtin_set_return_addr_reg): Kill.
(expand_builtin_eh_stub_old, expand_builtin_eh_stub): Kill.
(expand_builtin_set_eh_regs): Kill.
(eh_regs): Produce a third reg for the actual handler address.
(eh_return_context, eh_return_stack_adjust): New.
(eh_return_handler, eh_return_stub_label): New.
(init_eh_for_function): Initialize them.
(expand_builtin_eh_return, expand_eh_return): New.
* except.h: Update prototypes.
* flow.c (find_basic_blocks_1): Update references to the stub label.
* function.h (struct function): Kill stub label elements.
* libgcc2.c (in_reg_window): For REG_SAVED_REG, check that the
register number is one that would be in the previous window.
Provide a dummy definition for non-windowed targets.
(get_reg_addr): New function.
(get_reg, put_reg, copy_reg): Use it.
(__throw): Rely on in_reg_window, not INCOMING_REGNO. Kill stub
generating code and use __builtin_eh_return. Use __builtin_dwarf_cfa.
* alpha.c (alpha_eh_epilogue_sp_ofs): New.
(alpha_init_expanders): Initialize it.
(alpha_expand_epilogue): Use it.
* alpha.h: Declare it.
* alpha.md (eh_epilogue): New.
* m68h.h (ARG_POINTER_CFA_OFFSET): New.
* sparc.h (ARG_POINTER_CFA_OFFSET): New.
From-SVN: r22436
1998-09-15 21:19:12 +02:00
|
|
|
A C expression whose value is an integer giving the offset, in bytes,
|
|
|
|
from the argument pointer to the canonical frame address (cfa). The
|
2001-04-28 13:35:04 +02:00
|
|
|
final value should coincide with that calculated by
|
tree.h (BUILT_IN_CALLER_RETURN_ADDRESS): Unused.
* tree.h (BUILT_IN_CALLER_RETURN_ADDRESS): Unused. Kill.
(BUILT_IN_FP, BUILT_IN_SP, BUILT_IN_SET_RETURN_ADDR_REG): Kill.
(BUILT_IN_EH_STUB_OLD, BUILT_IN_EH_STUB, BUILT_IN_SET_EH_REGS): Kill.
(BUILT_IN_EH_RETURN, BUILT_IN_DWARF_CFA): New.
* c-decl.c (init_decl_processing): Update accordingly.
* expr.c (expand_builtin): Likewise.
* cp/decl.c (init_decl_processing): Likewise.
* rtl.h (global_rtl): Add cfa entry.
(virtual_cfa_rtx, VIRTUAL_CFA_REGNUM): New.
(LAST_VIRTUAL_REGISTER): Update.
* emit-rtl.c (global_rtl): Add cfa entry.
(init_emit): Initialize it.
* function.c (cfa_offset): New.
(instantiate_virtual_regs): Initialize it.
(instantiate_virtual_regs_1): Instantiate virtual_cfa_rtx.
(expand_function_end): Call expand_eh_return.
* tm.texi (ARG_POINTER_CFA_OFFSET): New.
* except.c (current_function_eh_stub_label): Kill.
(current_function_eh_old_stub_label): Likwise; update all references.
(expand_builtin_set_return_addr_reg): Kill.
(expand_builtin_eh_stub_old, expand_builtin_eh_stub): Kill.
(expand_builtin_set_eh_regs): Kill.
(eh_regs): Produce a third reg for the actual handler address.
(eh_return_context, eh_return_stack_adjust): New.
(eh_return_handler, eh_return_stub_label): New.
(init_eh_for_function): Initialize them.
(expand_builtin_eh_return, expand_eh_return): New.
* except.h: Update prototypes.
* flow.c (find_basic_blocks_1): Update references to the stub label.
* function.h (struct function): Kill stub label elements.
* libgcc2.c (in_reg_window): For REG_SAVED_REG, check that the
register number is one that would be in the previous window.
Provide a dummy definition for non-windowed targets.
(get_reg_addr): New function.
(get_reg, put_reg, copy_reg): Use it.
(__throw): Rely on in_reg_window, not INCOMING_REGNO. Kill stub
generating code and use __builtin_eh_return. Use __builtin_dwarf_cfa.
* alpha.c (alpha_eh_epilogue_sp_ofs): New.
(alpha_init_expanders): Initialize it.
(alpha_expand_epilogue): Use it.
* alpha.h: Declare it.
* alpha.md (eh_epilogue): New.
* m68h.h (ARG_POINTER_CFA_OFFSET): New.
* sparc.h (ARG_POINTER_CFA_OFFSET): New.
From-SVN: r22436
1998-09-15 21:19:12 +02:00
|
|
|
@code{INCOMING_FRAME_SP_OFFSET}. Which is unfortunately not usable
|
|
|
|
during virtual register instantiation.
|
|
|
|
|
2000-03-23 01:29:55 +01:00
|
|
|
The default value for this macro is @code{FIRST_PARM_OFFSET (fundecl)},
|
|
|
|
which is correct for most machines; in general, the arguments are found
|
2000-03-27 07:58:16 +02:00
|
|
|
immediately before the stack frame. Note that this is not the case on
|
|
|
|
some targets that save registers into the caller's frame, such as SPARC
|
|
|
|
and rs6000, and so such targets need to define this macro.
|
2000-03-23 01:29:55 +01:00
|
|
|
|
2000-03-27 07:58:16 +02:00
|
|
|
You only need to define this macro if the default is incorrect, and you
|
2000-03-23 01:29:55 +01:00
|
|
|
want to support call frame debugging information like that provided by
|
|
|
|
DWARF 2.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
configure.in (i?86-*-beos{pe,elf,}*): Recognize.
* configure.in (i?86-*-beos{pe,elf,}*): Recognize.
* i386/t-beos, i386/x-beos, i386/xm-beos.h: New files.
* i386/beos-elf.h, i386/beos-pe.h: New files.
* Makefile.in (CROSS_SYSTEM_HEADER_DIR): New.
* cross-make (SYSTEM_HEADER_DIR): Define using
CROSS_SYSTEM_HEADER_DIR.
* gcc.c (LIBRARY_PATH_ENV): Provide default.
(process_command): Use it.
(main): Likewise. Kill trailing = from env vars.
(build_search_list): Put it back.
* collect2.c (main): Use LIBRARY_PATH_ENV.
* configure.in (GCC_NEED_DECLARATIONS): Add environ.
* toplev.c: Use NEED_DECLARATION_ENVIRON.
* tm.texi (Frame Layout): Document SMALL_STACK.
* c-common.c (c_common_nodes_and_builtins): Check it.
* system.h: Undef alloca after including glibc's <stdlib.h>,
if USE_C_ALLOCA is defined.
* gcc.c (set_input): New fn.
(main): After all input files are compiled, reset the input file
info to the first.
* aclocal.m4 (rindex, index): If already defined, don't attempt
to redefine.
* ginclude/varargs.h: (__va_list__): Define ifndef.
* ginclude/stdarg.h: Likewise.
* ginclude/stddef.h (__WCHAR_TYPE__) [BEOS]: Use int
instead of unsigned char.
* hash.h (true, false, boolean): Undef before enum.
From-SVN: r31366
2000-01-13 01:37:06 +01:00
|
|
|
|
2001-07-08 09:07:11 +02:00
|
|
|
@node Exception Handling
|
|
|
|
@subsection Exception Handling Support
|
|
|
|
@cindex exception handling
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac EH_RETURN_DATA_REGNO (@var{N})
|
2001-03-28 13:04:51 +02:00
|
|
|
A C expression whose value is the @var{N}th register number used for
|
|
|
|
data by exception handlers, or @code{INVALID_REGNUM} if fewer than
|
|
|
|
@var{N} registers are usable.
|
|
|
|
|
|
|
|
The exception handling library routines communicate with the exception
|
|
|
|
handlers via a set of agreed upon registers. Ideally these registers
|
|
|
|
should be call-clobbered; it is possible to use call-saved registers,
|
|
|
|
but may negatively impact code size. The target must support at least
|
|
|
|
2 data registers, but should define 4 if there are enough free registers.
|
|
|
|
|
|
|
|
You must define this macro if you want to support call frame exception
|
|
|
|
handling like that provided by DWARF 2.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2001-03-28 13:04:51 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac EH_RETURN_STACKADJ_RTX
|
2001-03-28 13:04:51 +02:00
|
|
|
A C expression whose value is RTL representing a location in which
|
|
|
|
to store a stack adjustment to be applied before function return.
|
|
|
|
This is used to unwind the stack to an exception handler's call frame.
|
|
|
|
It will be assigned zero on code paths that return normally.
|
|
|
|
|
2001-04-28 13:35:04 +02:00
|
|
|
Typically this is a call-clobbered hard register that is otherwise
|
2001-03-28 13:04:51 +02:00
|
|
|
untouched by the epilogue, but could also be a stack slot.
|
|
|
|
|
2003-05-11 00:59:04 +02:00
|
|
|
Do not define this macro if the stack pointer is saved and restored
|
2003-10-10 23:28:56 +02:00
|
|
|
by the regular prolog and epilog code in the call frame itself; in
|
|
|
|
this case, the exception handling library routines will update the
|
|
|
|
stack location to be restored in place. Otherwise, you must define
|
|
|
|
this macro if you want to support call frame exception handling like
|
2003-05-11 00:59:04 +02:00
|
|
|
that provided by DWARF 2.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2001-03-28 13:04:51 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac EH_RETURN_HANDLER_RTX
|
2001-03-28 13:04:51 +02:00
|
|
|
A C expression whose value is RTL representing a location in which
|
2001-04-28 13:35:04 +02:00
|
|
|
to store the address of an exception handler to which we should
|
2001-03-28 13:04:51 +02:00
|
|
|
return. It will not be assigned on code paths that return normally.
|
|
|
|
|
|
|
|
Typically this is the location in the call frame at which the normal
|
2001-04-28 13:35:04 +02:00
|
|
|
return address is stored. For targets that return by popping an
|
|
|
|
address off the stack, this might be a memory address just below
|
2001-03-28 13:04:51 +02:00
|
|
|
the @emph{target} call frame rather than inside the current call
|
2003-10-10 23:28:56 +02:00
|
|
|
frame. If defined, @code{EH_RETURN_STACKADJ_RTX} will have already
|
|
|
|
been assigned, so it may be used to calculate the location of the
|
2003-05-11 00:59:04 +02:00
|
|
|
target call frame.
|
2001-03-28 13:04:51 +02:00
|
|
|
|
|
|
|
Some targets have more complex requirements than storing to an
|
|
|
|
address calculable during initial code generation. In that case
|
|
|
|
the @code{eh_return} instruction pattern should be used instead.
|
|
|
|
|
|
|
|
If you want to support call frame exception handling, you must
|
|
|
|
define either this macro or the @code{eh_return} instruction pattern.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2001-03-28 13:04:51 +02:00
|
|
|
|
2003-07-10 16:56:33 +02:00
|
|
|
@defmac RETURN_ADDR_OFFSET
|
|
|
|
If defined, an integer-valued C expression for which rtl will be generated
|
|
|
|
to add it to the exception handler address before it is searched in the
|
|
|
|
exception handling tables, and to subtract it again from the address before
|
|
|
|
using it to return to the exception handler.
|
|
|
|
@end defmac
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ASM_PREFERRED_EH_DATA_FORMAT (@var{code}, @var{global})
|
2001-05-12 08:03:20 +02:00
|
|
|
This macro chooses the encoding of pointers embedded in the exception
|
|
|
|
handling sections. If at all possible, this should be defined such
|
|
|
|
that the exception handling section will not require dynamic relocations,
|
|
|
|
and so may be read-only.
|
|
|
|
|
2001-07-03 02:46:05 +02:00
|
|
|
@var{code} is 0 for data, 1 for code labels, 2 for function pointers.
|
|
|
|
@var{global} is true if the symbol may be affected by dynamic relocations.
|
2001-05-12 08:03:20 +02:00
|
|
|
The macro should return a combination of the @code{DW_EH_PE_*} defines
|
|
|
|
as found in @file{dwarf2.h}.
|
|
|
|
|
c-tree.texi, [...]: Remove trailing whitespace.
* c-tree.texi, contrib.texi, cpp.texi, extend.texi, gcc.texi,
gcov.texi, install.texi, md.texi, objc.texi, rtl.texi, tm.texi:
Remove trailing whitespace.
From-SVN: r42678
2001-05-28 22:57:50 +02:00
|
|
|
If this macro is not defined, pointers will not be encoded but
|
2001-05-12 08:03:20 +02:00
|
|
|
represented directly.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2001-05-12 08:03:20 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX (@var{file}, @var{encoding}, @var{size}, @var{addr}, @var{done})
|
2001-05-12 08:03:20 +02:00
|
|
|
This macro allows the target to emit whatever special magic is required
|
|
|
|
to represent the encoding chosen by @code{ASM_PREFERRED_EH_DATA_FORMAT}.
|
|
|
|
Generic code takes care of pc-relative and indirect encodings; this must
|
|
|
|
be defined if the target uses text-relative or data-relative encodings.
|
|
|
|
|
2001-07-03 02:46:05 +02:00
|
|
|
This is a C statement that branches to @var{done} if the format was
|
|
|
|
handled. @var{encoding} is the format chosen, @var{size} is the number
|
|
|
|
of bytes that the format occupies, @var{addr} is the @code{SYMBOL_REF}
|
2001-05-12 08:03:20 +02:00
|
|
|
to be emitted.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2001-05-12 08:03:20 +02:00
|
|
|
|
tm.texi (MD_UNWIND_SUPPORT): Document.
* doc/tm.texi (MD_UNWIND_SUPPORT): Document.
(MD_FALLBACK_FRAME_STATE_FOR): Update.
* unwind-dw2.c (MD_UNWIND_SUPPORT): #include if defined.
(uw_frame_state_for): Adjust MD_FALLBACK_FRAME_STATE_FOR invocation.
(MD_FROB_UPDATE_CONTEXT): Remove default.
(uw_update_context_1): Instead #ifdef invocation.
* config/ia64/unwind-ia64.c (MD_UNWIND_SUPPORT): #include if defined.
(uw_frame_state_for): Adjust MD_FALLBACK_FRAME_STATE_FOR invocation.
* config/alpha/gnu.h (MD_FALLBACK_FRAME_STATE_FOR): Don't undef.
(MD_UNWIND_SUPPORT): Undefine this instead.
* config/i386/gnu.h: Likewise.
* config/alpha/linux-unwind.h: New file, macro converted to
function, extracted from..
* config/alpha/linux.h (MD_FALLBACK_FRAME_STATE_FOR): ..this.
(MD_UNWIND_SUPPORT): Define.
* config/alpha/vms-unwind.h, config/alpha/vms.h: Likewise.
* config/i386/linux-unwind.h, config/i386/linux.h,
config/i386/linux64.h: Likewise.
* config/ia64/linux-unwind.h, config/ia64/linux.h: Likewise.
MD_HANDLE_UNWABI too.
* config/mips/linux-unwind.h, config/mips/linux.h: Likewise.
* config/pa/linux-unwind.h, config/pa/pa32-linux.h: Likewise.
* config/rs6000/darwin-unwind.h, config/rs6000/darwin.h: Likewise.
* config/s390/linux-unwind.h, config/s390/linux.h: Likewise.
* config/sparc/linux-unwind.h, config/sparc/linux.h,
config/sparc/linux64.h: Likewise.
* config/sh/linux-unwind.h, config/sh/linux.h: Likewise, but merge
SH_FALLBACK_FRAME_FLOAT_STATE into sh_fallback_frame_state.
* config/rs6000/linux-unwind.h, config/rs6000/linux.h,
config/rs6000/linux64.h: Likewise. Split out get_sigcontext
function. Use ARG_POINTER_REGNUM for 32-bit temp reg too.
From-SVN: r87167
2004-09-08 02:17:19 +02:00
|
|
|
@defmac MD_UNWIND_SUPPORT
|
|
|
|
A string specifying a file to be #include'd in unwind-dw2.c. The file
|
|
|
|
so included typically defines @code{MD_FALLBACK_FRAME_STATE_FOR}.
|
|
|
|
@end defmac
|
|
|
|
|
|
|
|
@defmac MD_FALLBACK_FRAME_STATE_FOR (@var{context}, @var{fs})
|
2001-07-08 09:07:11 +02:00
|
|
|
This macro allows the target to add cpu and operating system specific
|
|
|
|
code to the call-frame unwinder for use when there is no unwind data
|
|
|
|
available. The most common reason to implement this macro is to unwind
|
|
|
|
through signal frames.
|
|
|
|
|
|
|
|
This macro is called from @code{uw_frame_state_for} in @file{unwind-dw2.c}
|
|
|
|
and @file{unwind-ia64.c}. @var{context} is an @code{_Unwind_Context};
|
|
|
|
@var{fs} is an @code{_Unwind_FrameState}. Examine @code{context->ra}
|
|
|
|
for the address of the code being executed and @code{context->cfa} for
|
|
|
|
the stack pointer value. If the frame can be decoded, the register save
|
tm.texi (MD_UNWIND_SUPPORT): Document.
* doc/tm.texi (MD_UNWIND_SUPPORT): Document.
(MD_FALLBACK_FRAME_STATE_FOR): Update.
* unwind-dw2.c (MD_UNWIND_SUPPORT): #include if defined.
(uw_frame_state_for): Adjust MD_FALLBACK_FRAME_STATE_FOR invocation.
(MD_FROB_UPDATE_CONTEXT): Remove default.
(uw_update_context_1): Instead #ifdef invocation.
* config/ia64/unwind-ia64.c (MD_UNWIND_SUPPORT): #include if defined.
(uw_frame_state_for): Adjust MD_FALLBACK_FRAME_STATE_FOR invocation.
* config/alpha/gnu.h (MD_FALLBACK_FRAME_STATE_FOR): Don't undef.
(MD_UNWIND_SUPPORT): Undefine this instead.
* config/i386/gnu.h: Likewise.
* config/alpha/linux-unwind.h: New file, macro converted to
function, extracted from..
* config/alpha/linux.h (MD_FALLBACK_FRAME_STATE_FOR): ..this.
(MD_UNWIND_SUPPORT): Define.
* config/alpha/vms-unwind.h, config/alpha/vms.h: Likewise.
* config/i386/linux-unwind.h, config/i386/linux.h,
config/i386/linux64.h: Likewise.
* config/ia64/linux-unwind.h, config/ia64/linux.h: Likewise.
MD_HANDLE_UNWABI too.
* config/mips/linux-unwind.h, config/mips/linux.h: Likewise.
* config/pa/linux-unwind.h, config/pa/pa32-linux.h: Likewise.
* config/rs6000/darwin-unwind.h, config/rs6000/darwin.h: Likewise.
* config/s390/linux-unwind.h, config/s390/linux.h: Likewise.
* config/sparc/linux-unwind.h, config/sparc/linux.h,
config/sparc/linux64.h: Likewise.
* config/sh/linux-unwind.h, config/sh/linux.h: Likewise, but merge
SH_FALLBACK_FRAME_FLOAT_STATE into sh_fallback_frame_state.
* config/rs6000/linux-unwind.h, config/rs6000/linux.h,
config/rs6000/linux64.h: Likewise. Split out get_sigcontext
function. Use ARG_POINTER_REGNUM for 32-bit temp reg too.
From-SVN: r87167
2004-09-08 02:17:19 +02:00
|
|
|
addresses should be updated in @var{fs} and the macro should evaluate to
|
|
|
|
@code{_URC_NO_REASON}. If the frame cannot be decoded, the macro should
|
|
|
|
evaluate to @code{_URC_END_OF_STACK}.
|
2003-06-17 18:47:06 +02:00
|
|
|
|
|
|
|
For proper signal handling in Java this macro is accompanied by
|
|
|
|
@code{MAKE_THROW_FRAME}, defined in @file{libjava/include/*-signal.h} headers.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1997-08-11 17:56:58 +02:00
|
|
|
|
2003-12-12 17:45:51 +01:00
|
|
|
@defmac MD_HANDLE_UNWABI (@var{context}, @var{fs})
|
|
|
|
This macro allows the target to add operating system specific code to the
|
|
|
|
call-frame unwinder to handle the IA-64 @code{.unwabi} unwinding directive,
|
|
|
|
usually used for signal or interrupt frames.
|
|
|
|
|
|
|
|
This macro is called from @code{uw_update_context} in @file{unwind-ia64.c}.
|
|
|
|
@var{context} is an @code{_Unwind_Context};
|
|
|
|
@var{fs} is an @code{_Unwind_FrameState}. Examine @code{fs->unwabi}
|
|
|
|
for the abi and context in the @code{.unwabi} directive. If the
|
|
|
|
@code{.unwabi} directive can be handled, the register save addresses should
|
|
|
|
be updated in @var{fs}.
|
|
|
|
@end defmac
|
|
|
|
|
2004-03-12 18:09:03 +01:00
|
|
|
@defmac TARGET_USES_WEAK_UNWIND_INFO
|
|
|
|
A C expression that evaluates to true if the target requires unwind
|
|
|
|
info to be given comdat linkage. Define it to be @code{1} if comdat
|
|
|
|
linkage is necessary. The default is @code{0}.
|
|
|
|
@end defmac
|
|
|
|
|
1997-08-11 17:56:58 +02:00
|
|
|
@node Stack Checking
|
|
|
|
@subsection Specifying How Stack Checking is Done
|
|
|
|
|
1999-08-25 09:27:13 +02:00
|
|
|
GCC will check that stack references are within the boundaries of
|
c-tree.texi, [...]: Use more logical markup.
* doc/c-tree.texi, doc/contrib.texi, doc/extend.texi,
doc/gcc.texi, doc/gcov.texi, doc/install-old.texi,
doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: Use more
logical markup. Use TeX quotes and dashes. Use @dots{} and
@minus{}. Avoid spaces inside @var. Update last modification
date in gcc.texi.
* doc/gcc.1, doc/gcov.1: Regenerate.
From-SVN: r43369
2001-06-14 13:08:04 +02:00
|
|
|
the stack, if the @option{-fstack-check} is specified, in one of three ways:
|
1997-08-11 17:56:58 +02:00
|
|
|
|
|
|
|
@enumerate
|
|
|
|
@item
|
1999-08-25 09:27:13 +02:00
|
|
|
If the value of the @code{STACK_CHECK_BUILTIN} macro is nonzero, GCC
|
1997-08-11 17:56:58 +02:00
|
|
|
will assume that you have arranged for stack checking to be done at
|
|
|
|
appropriate places in the configuration files, e.g., in
|
2001-07-06 20:40:17 +02:00
|
|
|
@code{TARGET_ASM_FUNCTION_PROLOGUE}. GCC will do not other special
|
|
|
|
processing.
|
1997-08-11 17:56:58 +02:00
|
|
|
|
|
|
|
@item
|
|
|
|
If @code{STACK_CHECK_BUILTIN} is zero and you defined a named pattern
|
1999-08-25 09:27:13 +02:00
|
|
|
called @code{check_stack} in your @file{md} file, GCC will call that
|
1997-08-11 17:56:58 +02:00
|
|
|
pattern with one argument which is the address to compare the stack
|
|
|
|
value against. You must arrange for this pattern to report an error if
|
|
|
|
the stack pointer is out of range.
|
|
|
|
|
|
|
|
@item
|
1999-08-25 09:27:13 +02:00
|
|
|
If neither of the above are true, GCC will generate code to periodically
|
1997-08-11 17:56:58 +02:00
|
|
|
``probe'' the stack pointer using the values of the macros defined below.
|
|
|
|
@end enumerate
|
|
|
|
|
1999-08-25 09:27:13 +02:00
|
|
|
Normally, you will use the default values of these macros, so GCC
|
1997-08-11 17:56:58 +02:00
|
|
|
will use the third approach.
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac STACK_CHECK_BUILTIN
|
1997-08-11 17:56:58 +02:00
|
|
|
A nonzero value if stack checking is done by the configuration files in a
|
2001-04-28 13:35:04 +02:00
|
|
|
machine-dependent manner. You should define this macro if stack checking
|
|
|
|
is require by the ABI of your machine or if you would like to have to stack
|
1999-08-25 09:27:13 +02:00
|
|
|
checking in some more efficient way than GCC's portable approach.
|
1997-08-11 17:56:58 +02:00
|
|
|
The default value of this macro is zero.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1997-08-11 17:56:58 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac STACK_CHECK_PROBE_INTERVAL
|
1999-08-25 09:27:13 +02:00
|
|
|
An integer representing the interval at which GCC must generate stack
|
1997-08-11 17:56:58 +02:00
|
|
|
probe instructions. You will normally define this macro to be no larger
|
|
|
|
than the size of the ``guard pages'' at the end of a stack area. The
|
|
|
|
default value of 4096 is suitable for most systems.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1997-08-11 17:56:58 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac STACK_CHECK_PROBE_LOAD
|
2001-04-28 13:35:04 +02:00
|
|
|
A integer which is nonzero if GCC should perform the stack probe
|
1999-08-25 09:27:13 +02:00
|
|
|
as a load instruction and zero if GCC should use a store instruction.
|
1997-08-11 17:56:58 +02:00
|
|
|
The default is zero, which is the most efficient choice on most systems.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1997-08-11 17:56:58 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac STACK_CHECK_PROTECT
|
1997-08-11 17:56:58 +02:00
|
|
|
The number of bytes of stack needed to recover from a stack overflow,
|
|
|
|
for languages where such a recovery is supported. The default value of
|
|
|
|
75 words should be adequate for most machines.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1997-08-11 17:56:58 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac STACK_CHECK_MAX_FRAME_SIZE
|
1999-08-25 09:27:13 +02:00
|
|
|
The maximum size of a stack frame, in bytes. GCC will generate probe
|
1997-08-11 17:56:58 +02:00
|
|
|
instructions in non-leaf functions to ensure at least this many bytes of
|
|
|
|
stack are available. If a stack frame is larger than this size, stack
|
1999-08-25 09:27:13 +02:00
|
|
|
checking will not be reliable and GCC will issue a warning. The
|
|
|
|
default is chosen so that GCC only generates one instruction on most
|
1997-08-11 17:56:58 +02:00
|
|
|
systems. You should normally not change the default value of this macro.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1997-08-11 17:56:58 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac STACK_CHECK_FIXED_FRAME_SIZE
|
1999-08-25 09:27:13 +02:00
|
|
|
GCC uses this value to generate the above warning message. It
|
1997-08-11 17:56:58 +02:00
|
|
|
represents the amount of fixed frame used by a function, not including
|
|
|
|
space for any callee-saved registers, temporaries and user variables.
|
|
|
|
You need only specify an upper bound for this amount and will normally
|
|
|
|
use the default of four words.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1997-08-11 17:56:58 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac STACK_CHECK_MAX_VAR_SIZE
|
1999-08-25 09:27:13 +02:00
|
|
|
The maximum size, in bytes, of an object that GCC will place in the
|
1997-08-11 17:56:58 +02:00
|
|
|
fixed area of the stack frame when the user specifies
|
c-tree.texi, [...]: Use more logical markup.
* doc/c-tree.texi, doc/contrib.texi, doc/extend.texi,
doc/gcc.texi, doc/gcov.texi, doc/install-old.texi,
doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: Use more
logical markup. Use TeX quotes and dashes. Use @dots{} and
@minus{}. Avoid spaces inside @var. Update last modification
date in gcc.texi.
* doc/gcc.1, doc/gcov.1: Regenerate.
From-SVN: r43369
2001-06-14 13:08:04 +02:00
|
|
|
@option{-fstack-check}.
|
1999-08-25 09:27:13 +02:00
|
|
|
GCC computed the default from the values of the above macros and you will
|
1997-08-11 17:56:58 +02:00
|
|
|
normally not need to override that default.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
@need 2000
|
|
|
|
@node Frame Registers
|
|
|
|
@subsection Registers That Address the Stack Frame
|
|
|
|
|
|
|
|
@c prevent bad page break with this line
|
|
|
|
This discusses registers that address the stack frame.
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac STACK_POINTER_REGNUM
|
1996-09-25 01:21:45 +02:00
|
|
|
The register number of the stack pointer register, which must also be a
|
|
|
|
fixed register according to @code{FIXED_REGISTERS}. On most machines,
|
|
|
|
the hardware determines which register this is.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac FRAME_POINTER_REGNUM
|
1996-09-25 01:21:45 +02:00
|
|
|
The register number of the frame pointer register, which is used to
|
|
|
|
access automatic variables in the stack frame. On some machines, the
|
|
|
|
hardware determines which register this is. On other machines, you can
|
|
|
|
choose any register you wish for this purpose.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac HARD_FRAME_POINTER_REGNUM
|
1996-09-25 01:21:45 +02:00
|
|
|
On some machines the offset between the frame pointer and starting
|
|
|
|
offset of the automatic variables is not known until after register
|
|
|
|
allocation has been done (for example, because the saved registers are
|
|
|
|
between these two locations). On those machines, define
|
|
|
|
@code{FRAME_POINTER_REGNUM} the number of a special, fixed register to
|
|
|
|
be used internally until the offset is known, and define
|
1998-02-19 01:04:36 +01:00
|
|
|
@code{HARD_FRAME_POINTER_REGNUM} to be the actual hard register number
|
1996-09-25 01:21:45 +02:00
|
|
|
used for the frame pointer.
|
|
|
|
|
|
|
|
You should define this macro only in the very rare circumstances when it
|
|
|
|
is not possible to calculate the offset between the frame pointer and
|
|
|
|
the automatic variables until after register allocation has been
|
|
|
|
completed. When this macro is defined, you must also indicate in your
|
|
|
|
definition of @code{ELIMINABLE_REGS} how to eliminate
|
|
|
|
@code{FRAME_POINTER_REGNUM} into either @code{HARD_FRAME_POINTER_REGNUM}
|
|
|
|
or @code{STACK_POINTER_REGNUM}.
|
|
|
|
|
|
|
|
Do not define this macro if it would be the same as
|
|
|
|
@code{FRAME_POINTER_REGNUM}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ARG_POINTER_REGNUM
|
1996-09-25 01:21:45 +02:00
|
|
|
The register number of the arg pointer register, which is used to access
|
|
|
|
the function's argument list. On some machines, this is the same as the
|
|
|
|
frame pointer register. On some machines, the hardware determines which
|
|
|
|
register this is. On other machines, you can choose any register you
|
|
|
|
wish for this purpose. If this is not the same register as the frame
|
|
|
|
pointer register, then you must mark it as a fixed register according to
|
|
|
|
@code{FIXED_REGISTERS}, or arrange to be able to eliminate it
|
|
|
|
(@pxref{Elimination}).
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac RETURN_ADDRESS_POINTER_REGNUM
|
1996-09-25 01:21:45 +02:00
|
|
|
The register number of the return address pointer register, which is used to
|
|
|
|
access the current function's return address from the stack. On some
|
|
|
|
machines, the return address is not at a fixed offset from the frame
|
|
|
|
pointer or stack pointer or argument pointer. This register can be defined
|
|
|
|
to point to the return address on the stack, and then be converted by
|
|
|
|
@code{ELIMINABLE_REGS} into either the frame pointer or stack pointer.
|
|
|
|
|
|
|
|
Do not define this macro unless there is no other way to get the return
|
|
|
|
address from the stack.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac STATIC_CHAIN_REGNUM
|
|
|
|
@defmacx STATIC_CHAIN_INCOMING_REGNUM
|
1996-09-25 01:21:45 +02:00
|
|
|
Register numbers used for passing a function's static chain pointer. If
|
|
|
|
register windows are used, the register number as seen by the called
|
|
|
|
function is @code{STATIC_CHAIN_INCOMING_REGNUM}, while the register
|
|
|
|
number as seen by the calling function is @code{STATIC_CHAIN_REGNUM}. If
|
|
|
|
these registers are the same, @code{STATIC_CHAIN_INCOMING_REGNUM} need
|
2001-06-25 01:04:49 +02:00
|
|
|
not be defined.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
The static chain register need not be a fixed register.
|
|
|
|
|
|
|
|
If the static chain is passed in memory, these macros should not be
|
|
|
|
defined; instead, the next two macros should be defined.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac STATIC_CHAIN
|
|
|
|
@defmacx STATIC_CHAIN_INCOMING
|
1996-09-25 01:21:45 +02:00
|
|
|
If the static chain is passed in memory, these macros provide rtx giving
|
|
|
|
@code{mem} expressions that denote where they are stored.
|
|
|
|
@code{STATIC_CHAIN} and @code{STATIC_CHAIN_INCOMING} give the locations
|
|
|
|
as seen by the calling and called functions, respectively. Often the former
|
|
|
|
will be at an offset from the stack pointer and the latter at an offset from
|
2001-06-25 01:04:49 +02:00
|
|
|
the frame pointer.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
@findex stack_pointer_rtx
|
|
|
|
@findex frame_pointer_rtx
|
|
|
|
@findex arg_pointer_rtx
|
|
|
|
The variables @code{stack_pointer_rtx}, @code{frame_pointer_rtx}, and
|
|
|
|
@code{arg_pointer_rtx} will have been initialized prior to the use of these
|
|
|
|
macros and should be used to refer to those items.
|
|
|
|
|
|
|
|
If the static chain is passed in a register, the two previous macros should
|
|
|
|
be defined instead.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2001-12-06 22:38:03 +01:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac DWARF_FRAME_REGISTERS
|
2001-12-06 22:38:03 +01:00
|
|
|
This macro specifies the maximum number of hard registers that can be
|
|
|
|
saved in a call frame. This is used to size data structures used in
|
|
|
|
DWARF2 exception handling.
|
|
|
|
|
|
|
|
Prior to GCC 3.0, this macro was needed in order to establish a stable
|
|
|
|
exception handling ABI in the face of adding new hard registers for ISA
|
|
|
|
extensions. In GCC 3.0 and later, the EH ABI is insulated from changes
|
|
|
|
in the number of hard registers. Nevertheless, this macro can still be
|
|
|
|
used to reduce the runtime memory requirements of the exception handling
|
|
|
|
routines, which can be substantial if the ISA contains a lot of
|
|
|
|
registers that are not call-saved.
|
|
|
|
|
|
|
|
If this macro is not defined, it defaults to
|
|
|
|
@code{FIRST_PSEUDO_REGISTER}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2001-12-06 22:38:03 +01:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac PRE_GCC3_DWARF_FRAME_REGISTERS
|
2001-12-06 22:38:03 +01:00
|
|
|
|
|
|
|
This macro is similar to @code{DWARF_FRAME_REGISTERS}, but is provided
|
|
|
|
for backward compatibility in pre GCC 3.0 compiled code.
|
|
|
|
|
|
|
|
If this macro is not defined, it defaults to
|
|
|
|
@code{DWARF_FRAME_REGISTERS}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2001-12-06 22:38:03 +01:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac DWARF_REG_TO_UNWIND_COLUMN (@var{regno})
|
2003-03-11 21:40:54 +01:00
|
|
|
|
|
|
|
Define this macro if the target's representation for dwarf registers
|
|
|
|
is different than the internal representation for unwind column.
|
2003-07-05 02:19:47 +02:00
|
|
|
Given a dwarf register, this macro should return the internal unwind
|
2003-03-11 21:40:54 +01:00
|
|
|
column number to use instead.
|
|
|
|
|
2003-10-10 23:28:56 +02:00
|
|
|
See the PowerPC's SPE target for an example.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2004-01-20 23:29:24 +01:00
|
|
|
@defmac DWARF_FRAME_REGNUM (@var{regno})
|
|
|
|
|
|
|
|
Define this macro if the target's representation for dwarf registers
|
|
|
|
used in .eh_frame or .debug_frame is different from that used in other
|
contrib.texi, [...]: Capitalize "gcc", "g++" and "g77" or mark up with appropriate markup.
* doc/contrib.texi, doc/extend.texi, doc/gcov.texi,
doc/install.texi, doc/invoke.texi, doc/makefile.texi,
doc/sourcebuild.texi, doc/tm.texi, doc/trouble.texi: Capitalize
"gcc", "g++" and "g77" or mark up with appropriate markup. Adjust
wording and grammar.
From-SVN: r79482
2004-03-14 23:29:38 +01:00
|
|
|
debug info sections. Given a GCC hard register number, this macro
|
2004-01-20 23:29:24 +01:00
|
|
|
should return the .eh_frame register number. The default is
|
|
|
|
@code{DBX_REGISTER_NUMBER (@var{regno})}.
|
|
|
|
|
|
|
|
@end defmac
|
|
|
|
|
|
|
|
@defmac DWARF2_FRAME_REG_OUT (@var{regno}, @var{for_eh})
|
|
|
|
|
|
|
|
Define this macro to map register numbers held in the call frame info
|
contrib.texi, [...]: Capitalize "gcc", "g++" and "g77" or mark up with appropriate markup.
* doc/contrib.texi, doc/extend.texi, doc/gcov.texi,
doc/install.texi, doc/invoke.texi, doc/makefile.texi,
doc/sourcebuild.texi, doc/tm.texi, doc/trouble.texi: Capitalize
"gcc", "g++" and "g77" or mark up with appropriate markup. Adjust
wording and grammar.
From-SVN: r79482
2004-03-14 23:29:38 +01:00
|
|
|
that GCC has collected using @code{DWARF_FRAME_REGNUM} to those that
|
2004-01-20 23:29:24 +01:00
|
|
|
should be output in .debug_frame (@code{@var{for_eh}} is zero) and
|
2004-08-24 02:30:52 +02:00
|
|
|
.eh_frame (@code{@var{for_eh}} is nonzero). The default is to
|
2004-01-20 23:29:24 +01:00
|
|
|
return @code{@var{regno}}.
|
|
|
|
|
|
|
|
@end defmac
|
|
|
|
|
1996-09-25 01:21:45 +02:00
|
|
|
@node Elimination
|
|
|
|
@subsection Eliminating Frame Pointer and Arg Pointer
|
|
|
|
|
|
|
|
@c prevent bad page break with this line
|
|
|
|
This is about eliminating the frame pointer and arg pointer.
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac FRAME_POINTER_REQUIRED
|
1996-09-25 01:21:45 +02:00
|
|
|
A C expression which is nonzero if a function must have and use a frame
|
|
|
|
pointer. This expression is evaluated in the reload pass. If its value is
|
|
|
|
nonzero the function will have a frame pointer.
|
|
|
|
|
|
|
|
The expression can in principle examine the current function and decide
|
|
|
|
according to the facts, but on most machines the constant 0 or the
|
|
|
|
constant 1 suffices. Use 0 when the machine allows code to be generated
|
|
|
|
with no frame pointer, and doing so saves some time or space. Use 1
|
|
|
|
when there is no possible advantage to avoiding a frame pointer.
|
|
|
|
|
|
|
|
In certain cases, the compiler does not know how to produce valid code
|
|
|
|
without a frame pointer. The compiler recognizes those cases and
|
|
|
|
automatically gives the function a frame pointer regardless of what
|
|
|
|
@code{FRAME_POINTER_REQUIRED} says. You don't need to worry about
|
2001-06-25 01:04:49 +02:00
|
|
|
them.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
In a function that does not require a frame pointer, the frame pointer
|
|
|
|
register can be allocated for ordinary usage, unless you mark it as a
|
|
|
|
fixed register. See @code{FIXED_REGISTERS} for more information.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
@findex get_frame_size
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac INITIAL_FRAME_POINTER_OFFSET (@var{depth-var})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C statement to store in the variable @var{depth-var} the difference
|
|
|
|
between the frame pointer and the stack pointer values immediately after
|
|
|
|
the function prologue. The value would be computed from information
|
|
|
|
such as the result of @code{get_frame_size ()} and the tables of
|
|
|
|
registers @code{regs_ever_live} and @code{call_used_regs}.
|
|
|
|
|
|
|
|
If @code{ELIMINABLE_REGS} is defined, this macro will be not be used and
|
|
|
|
need not be defined. Otherwise, it must be defined even if
|
|
|
|
@code{FRAME_POINTER_REQUIRED} is defined to always be true; in that
|
|
|
|
case, you may set @var{depth-var} to anything.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ELIMINABLE_REGS
|
1996-09-25 01:21:45 +02:00
|
|
|
If defined, this macro specifies a table of register pairs used to
|
|
|
|
eliminate unneeded registers that point into the stack frame. If it is not
|
|
|
|
defined, the only elimination attempted by the compiler is to replace
|
|
|
|
references to the frame pointer with references to the stack pointer.
|
|
|
|
|
|
|
|
The definition of this macro is a list of structure initializations, each
|
|
|
|
of which specifies an original and replacement register.
|
|
|
|
|
|
|
|
On some machines, the position of the argument pointer is not known until
|
|
|
|
the compilation is completed. In such a case, a separate hard register
|
|
|
|
must be used for the argument pointer. This register can be eliminated by
|
|
|
|
replacing it with either the frame pointer or the argument pointer,
|
|
|
|
depending on whether or not the frame pointer has been eliminated.
|
|
|
|
|
|
|
|
In this case, you might specify:
|
c-tree.texi, [...]: Use @smallexample instead of @example.
* doc/c-tree.texi, doc/compat.texi, doc/cpp.texi,
doc/cppopts.texi, doc/extend.texi, doc/install.texi,
doc/interface.texi, doc/invoke.texi, doc/libgcc.texi, doc/md.texi,
doc/objc.texi, doc/rtl.texi, doc/tm.texi, doc/trouble.texi: Use
@smallexample instead of @example.
From-SVN: r76075
2004-01-18 02:20:48 +01:00
|
|
|
@smallexample
|
1996-09-25 01:21:45 +02:00
|
|
|
#define ELIMINABLE_REGS \
|
|
|
|
@{@{ARG_POINTER_REGNUM, STACK_POINTER_REGNUM@}, \
|
|
|
|
@{ARG_POINTER_REGNUM, FRAME_POINTER_REGNUM@}, \
|
|
|
|
@{FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM@}@}
|
c-tree.texi, [...]: Use @smallexample instead of @example.
* doc/c-tree.texi, doc/compat.texi, doc/cpp.texi,
doc/cppopts.texi, doc/extend.texi, doc/install.texi,
doc/interface.texi, doc/invoke.texi, doc/libgcc.texi, doc/md.texi,
doc/objc.texi, doc/rtl.texi, doc/tm.texi, doc/trouble.texi: Use
@smallexample instead of @example.
From-SVN: r76075
2004-01-18 02:20:48 +01:00
|
|
|
@end smallexample
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
Note that the elimination of the argument pointer with the stack pointer is
|
|
|
|
specified first since that is the preferred elimination.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac CAN_ELIMINATE (@var{from-reg}, @var{to-reg})
|
2001-10-10 01:11:55 +02:00
|
|
|
A C expression that returns nonzero if the compiler is allowed to try
|
1996-09-25 01:21:45 +02:00
|
|
|
to replace register number @var{from-reg} with register number
|
|
|
|
@var{to-reg}. This macro need only be defined if @code{ELIMINABLE_REGS}
|
|
|
|
is defined, and will usually be the constant 1, since most of the cases
|
|
|
|
preventing register elimination are things that the compiler already
|
|
|
|
knows about.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac INITIAL_ELIMINATION_OFFSET (@var{from-reg}, @var{to-reg}, @var{offset-var})
|
1996-09-25 01:21:45 +02:00
|
|
|
This macro is similar to @code{INITIAL_FRAME_POINTER_OFFSET}. It
|
|
|
|
specifies the initial difference between the specified pair of
|
|
|
|
registers. This macro must be defined if @code{ELIMINABLE_REGS} is
|
|
|
|
defined.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
@node Stack Arguments
|
|
|
|
@subsection Passing Function Arguments on the Stack
|
|
|
|
@cindex arguments on stack
|
|
|
|
@cindex stack arguments
|
|
|
|
|
|
|
|
The macros in this section control how arguments are passed
|
|
|
|
on the stack. See the following section for other macros that
|
|
|
|
control passing certain arguments in registers.
|
|
|
|
|
targhooks.c: New file.
* targhooks.c: New file.
* targhooks.h: New file.
* Makefile.in: Add targhooks.o support.
(function.o): Depend on$(TARGET_H).
(stmt.o): Likewise.
(combine.o): Depend on $(TREE_H) and $(TARGET_H).
* builtins.c (apply_args_size, expand_builtin_apply_args_1,
expand_builtin_apply): Convert to calls.struct_value_rtx hook.
(expand_builtin_saveregs): Convert to
calls.expand_builtin_saveregs hook.
* c-decl.c (start_decl): Handle new calls.promote_prototypes hook
here, instead of ...
(get_parm_info) ... here.
(store_parm_decls_oldstyle): Convert to calls.promote_prototypes
hook.
(finish_function): Handle calls.promote_prototypes hook here too.
* c-typeck.c (convert_arguments): Convert to
calls.promote_prototypes hook.
(c_convert_parm_for_inlining): Likewise.
* calls.c (initialize_argument_information): Convert to
calls.promote_function_args hook.
(expand_call): Convert to calls.struct_value_rtx,
calls.strict_argument_naming,
calls.pretend_outgoing_varargs_named, and
calls.promote_function_return hooks. Pass fndecl to
aggregate_value_p. Initialize CUMULATIVE_ARGS before calling
hooks, so they can use that.
(emit_library_call_value_1): Likewise.
* combine.c (setup_incoming_promotions): Convert to
calls.promote_function_args hook.
* emit-rtl.c: Convert to calls.struct_value_rtx hook.
* expr.c (expand_assignment): Pass call to aggregate_value_p.
(expand_expr): Likewise.
* expr.h: Remove support for SETUP_INCOMING_VARARGS,
STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED,
RETURN_IN_MEMORY macro defaults.
* final.c (profile_function): Convert to calls.struct_value_rtx
hook.
* function.c (aggregate_value_p): Accept function type tree as
second parameter; try to deduce fntype from it. Convert to
calls.return_in_memory hook.
(assign_parms): Convert to calls.setup_incoming_varargs,
calls.strict_argument_naming, calls.promote_function_args,
calls.pretend_outgoing_varargs_named hooks. Pass fndecl to
aggregate_value_p.
(expand_function_start): Likewise. Convert to
calls.struct_value_rtx hook.
(expand_function_end): Convert to calls.promote_function_return hook.
(allocate_struct_function): Pass fndecl to aggregate_value_p.
* hard-reg-set.h: Update comments to new hook names.
* integrate.c (expand_inline_function): Pass fndecl to aggregate_value_p.
* reg-stack.c (stack_result): Likewise.
* rtl.h (struct_value_rtx, struct_value_incoming_rtx): Delete.
* stmt.c (expand_value_return): Convert to
calls.promote_function_return hook.
* target-def.h: Add TARGET_PROMOTE_FUNCTION_ARGS,
TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES,
TARGET_STRUCT_VALUE_RTX, TARGET_RETURN_IN_MEMORY,
TARGET_EXPAND_BUILTIN_SAVEREGS, TARGET_SETUP_INCOMING_VARARGS,
TARGET_STRICT_ARGUMENT_NAMING,
TARGET_PRETEND_OUTGOING_VARARGS_NAMED, and TARGET_CALLS.
* target.h: Likewise.
* tree.h (aggregate_value_p): Also takes a tree to deduce function
attributes from (for target hooks).
* doc/tm.texi (PROMOTE_FUNCTION_ARGS, PROMOTE_FUNCTION_RETURN,
PROMOTE_PROTOTYPES, RETURN_IN_MEMORY, STRUCT_VALUE_REGNUM,
STRUCT_VALUE, STRUCT_VALUE_INCOMING_REGNUM, STRUCT_VALUE_INCOMING,
EXPAND_BUILTIN_SAVEREGS, SETUP_INCOMING_VARARGS,
STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED): Convert
to hooks.
* config/alpha/alpha.c (alpha_output_mi_thunk_osf): Pass function
to aggregate_value_p.
* config/arm/arm.c (arm_init_cumulative_args,
arm_output_mi_thunk): Likewise.
* config/i386/i386.c (ix86_return_pops_args, x86_this_parameter):
Likewise.
* config/mips/mips.c (mips_save_reg_p, mips_expand_prologue,
mips_can_use_return_insn): Likewise.
* config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise.
* config/s390/s390.c (s390_output_mi_thunk): Likewise.
* config/sparc/sparc.c (sparc_output_mi_thunk): Pass function to
aggregate_value_p.
* config/story16/stormy16.c (xstormy16_asm_output_mi_thunk): Pass
function to aggregate_value_p.
* objc/objc-act.c (generate_struct_by_value_array): Pass NULL to
aggregate_value_p.
* config/sh/sh-protos.h (sh_builtin_saveregs): Remove.
(sh_attr_renesas_p, sh_cfun_attr_renesas_p, sh_function_arg,
sh_function_arg_advance, sh_pass_in_reg_p): New. * config/sh/sh.c
(sh_handle_renesas_attribute, sh_promote_prototypes,
sh_struct_value_rtx, sh_return_in_memory, sh_builtin_saveregs,
sh_setup_incoming_varargs, sh_strict_argument_naming,
sh_pretend_outgoing_varargs_named): New decls.
(targetm): Add new hooks.
(calc_live_regs): Save MACL and MACH if the function has the
renesas attribute.
(sh_expand_prologue): Support renesas attribute.
(sh_builtin_saveregs): Make static.
(sh_build_va_list): Support renesas attribute.
(sh_va_start): Likewise.
(sh_va_arg): Likewise.
(sh_promote_prototypes): New.
(sh_function_arg): New, moved from sh.h. Support renesas
attribute.
(sh_function_arg_advance): Likewise.
(sh_return_in_memory): Likewise.
(sh_strict_argument_naming): Likewise.
(sh_pretend_outgoing_varargs_named): Likewise.
(sh_struct_value_rtx): New.
(sh_attribute): Add renesas attribute.
(sh_handle_renesas_attribute): New.
(sh_attr_renesas_p, sh_cfun_attr_renesas_p): New.
(sh_ms_bitfield_layout_p): Support renesas attribute also.
(sh_output_mi_thunk): Pass function to aggregate_value_p. *
config/sh/sh.h (TARGET_SWITCHES): Add -mrenesas as an alias for
-mhitachi.
(STRUCT_VALUE_REGNUM, STRUCT_VALUE, RETURN_IN_MEMORY): Moved to
target hooks.
(sh_args): Add renesas_abi flag.
(INIT_CUMULATIVE_ARGS): Set it. Pass fndecl to aggregate_value_p.
(FUNCTION_ARG_ADVANCE, FUNCTION_ARG): Move to sh.c.
(PASS_IN_REG_P): Support renesas attribute. Pass DF and TF on the
stack for the renesas abi.
(STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED,
SETUP_INCOMING_VARARGS, EXPAND_BUILTIN_SAVEREGS,
PROMOTE_PROTOTYPES): Moved to sh.c. * config/sh/sh.md (call): Set
call cookie to indicate renesas calls.
* decl.c (finish_function): Pass fndecl to aggregate_value_p.
* misc.c (default_pass_by_ref): Convert to calls.return_in_memory
hook.
From-SVN: r71048
2003-09-04 05:18:05 +02:00
|
|
|
@deftypefn {Target Hook} bool TARGET_PROMOTE_PROTOTYPES (tree @var{fntype})
|
|
|
|
This target hook returns @code{true} if an argument declared in a
|
|
|
|
prototype as an integral type smaller than @code{int} should actually be
|
|
|
|
passed as an @code{int}. In addition to avoiding errors in certain
|
|
|
|
cases of mismatch, it also makes for better code on certain machines.
|
|
|
|
The default is to not promote prototypes.
|
|
|
|
@end deftypefn
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac PUSH_ARGS
|
2001-06-27 00:47:11 +02:00
|
|
|
A C expression. If nonzero, push insns will be used to pass
|
Convert ACCUMULATE_OUTGOING_ARGS to an expression.
* calls.c (PUSH_ARGS_REVERSED) Change to expression.
(ACCUMULATE_OUTGOING_ARGS, PUSH_ARGS): Provide default value.
(struct arg_data): Remove #ifdef ACCUMULATE_OUTGOING_ARGS.
(save_fixed_argument_area, restore_fixed_argument_area):
conditionize by #ifdef REG_PARM_STACK_SPACE only.
(emit_call): Change #ifdefs on ACCUMULATE_OUTGOING_ARGS
to conditions, handle RETURN_POPS_ARGS on ACCUMULATE_OUTGOING_ARGS.
(precompute_register_parameters): Avoid #ifdefs on
ACCUMULATE_OUTGOING_ARGS and PUSH_ARGS_REVERSED.
(stire_one_args): Likewise.
(expand_call): Likewise; conditionize PUSH_ROUNDING code by PUSH_ARGS.
(emit_library_call_value_1): Likewise.
(compute_argument_block_size): Align to STACK_BOUNDARY only for
ACCUMULATE_OUTGOING_ARGS.
* combine.c (ACCUMULATE_OUTGOING_ARGS, PUSH_ARGS): Provide default
value.
(nonzero_bits): Conditionize PUSH_ROUNDING code by USE_PUSH.
(use_crosses_set_p): Likewise.
* all targets (ACCUMULATE_OUTGOING_ARGS define): Change to
#define ACCUMULATE_OUTGOING_ARGS 1.
* i386.c (ix86_compute_frame_size): Handle ACCUMULATE_OUTGOING_ARGS
frames.
* i386.h (MASK_NO_PUSH_ARGS, MASK_ACCUMULATE_OUTGOING_ARGS): New
constants.
(TARGET_PUSH_ARGS, TARGET_ACCUMULATE_OUTGOING_ARGS): New macros.
(TARGET_SWITCHES): Add push-args, no-push-args,
accumulate-outgoing-args and no-accumulate-outgoing-args.
(ACCUMULATE_OUTGOING_ARGS, PUSH_ARGS): New macro.
* expr.c (ACCUMULATE_OUTGONG_ARGS, PUSH_ARGS): Provide default.
(push_block): Avoid ifdefs on ACCUMULATE_OUTGONG_ARGS
and PUSH_ROUNDING.
(emit_push_insn): Likewise.
* final.c (ACCUMULATE_OUTGOING_ARGS): Provide default.
(final_scan_insn): Avoid ifdefs on ACCUMULATE_OUTGOING_ARGS.
* function.c (ACCUMULATE_OUTGOING_ARGS): Provide default.
(STACK_DYNAMIC_OFFSET): Define correctly for both
ACCUMULATE_OUTGOING_ARGS and normal mode.
* invoke.texi (-mpush_args, -maccumulate-outgoing-args): Document.
* tm.texi (PUSH_ARGS): Document.
(ACCUMULATE_OUTGOING_ARGS, PUSH_ROUNDING): Update documentation.
From-SVN: r32803
2000-03-29 15:10:44 +02:00
|
|
|
outgoing arguments.
|
|
|
|
If the target machine does not have a push instruction, set it to zero.
|
|
|
|
That directs GCC to use an alternate strategy: to
|
|
|
|
allocate the entire argument block and then store the arguments into
|
2001-07-03 02:46:05 +02:00
|
|
|
it. When @code{PUSH_ARGS} is nonzero, @code{PUSH_ROUNDING} must be defined too.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
Convert ACCUMULATE_OUTGOING_ARGS to an expression.
* calls.c (PUSH_ARGS_REVERSED) Change to expression.
(ACCUMULATE_OUTGOING_ARGS, PUSH_ARGS): Provide default value.
(struct arg_data): Remove #ifdef ACCUMULATE_OUTGOING_ARGS.
(save_fixed_argument_area, restore_fixed_argument_area):
conditionize by #ifdef REG_PARM_STACK_SPACE only.
(emit_call): Change #ifdefs on ACCUMULATE_OUTGOING_ARGS
to conditions, handle RETURN_POPS_ARGS on ACCUMULATE_OUTGOING_ARGS.
(precompute_register_parameters): Avoid #ifdefs on
ACCUMULATE_OUTGOING_ARGS and PUSH_ARGS_REVERSED.
(stire_one_args): Likewise.
(expand_call): Likewise; conditionize PUSH_ROUNDING code by PUSH_ARGS.
(emit_library_call_value_1): Likewise.
(compute_argument_block_size): Align to STACK_BOUNDARY only for
ACCUMULATE_OUTGOING_ARGS.
* combine.c (ACCUMULATE_OUTGOING_ARGS, PUSH_ARGS): Provide default
value.
(nonzero_bits): Conditionize PUSH_ROUNDING code by USE_PUSH.
(use_crosses_set_p): Likewise.
* all targets (ACCUMULATE_OUTGOING_ARGS define): Change to
#define ACCUMULATE_OUTGOING_ARGS 1.
* i386.c (ix86_compute_frame_size): Handle ACCUMULATE_OUTGOING_ARGS
frames.
* i386.h (MASK_NO_PUSH_ARGS, MASK_ACCUMULATE_OUTGOING_ARGS): New
constants.
(TARGET_PUSH_ARGS, TARGET_ACCUMULATE_OUTGOING_ARGS): New macros.
(TARGET_SWITCHES): Add push-args, no-push-args,
accumulate-outgoing-args and no-accumulate-outgoing-args.
(ACCUMULATE_OUTGOING_ARGS, PUSH_ARGS): New macro.
* expr.c (ACCUMULATE_OUTGONG_ARGS, PUSH_ARGS): Provide default.
(push_block): Avoid ifdefs on ACCUMULATE_OUTGONG_ARGS
and PUSH_ROUNDING.
(emit_push_insn): Likewise.
* final.c (ACCUMULATE_OUTGOING_ARGS): Provide default.
(final_scan_insn): Avoid ifdefs on ACCUMULATE_OUTGOING_ARGS.
* function.c (ACCUMULATE_OUTGOING_ARGS): Provide default.
(STACK_DYNAMIC_OFFSET): Define correctly for both
ACCUMULATE_OUTGOING_ARGS and normal mode.
* invoke.texi (-mpush_args, -maccumulate-outgoing-args): Document.
* tm.texi (PUSH_ARGS): Document.
(ACCUMULATE_OUTGOING_ARGS, PUSH_ROUNDING): Update documentation.
From-SVN: r32803
2000-03-29 15:10:44 +02:00
|
|
|
|
2003-06-30 15:16:26 +02:00
|
|
|
@defmac PUSH_ARGS_REVERSED
|
|
|
|
A C expression. If nonzero, function arguments will be evaluated from
|
|
|
|
last to first, rather than from first to last. If this macro is not
|
|
|
|
defined, it defaults to @code{PUSH_ARGS} on targets where the stack
|
|
|
|
and args grow in opposite directions, and 0 otherwise.
|
|
|
|
@end defmac
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac PUSH_ROUNDING (@var{npushed})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C expression that is the number of bytes actually pushed onto the
|
|
|
|
stack when an instruction attempts to push @var{npushed} bytes.
|
|
|
|
|
|
|
|
On some machines, the definition
|
|
|
|
|
c-tree.texi, [...]: Use @smallexample instead of @example.
* doc/c-tree.texi, doc/compat.texi, doc/cpp.texi,
doc/cppopts.texi, doc/extend.texi, doc/install.texi,
doc/interface.texi, doc/invoke.texi, doc/libgcc.texi, doc/md.texi,
doc/objc.texi, doc/rtl.texi, doc/tm.texi, doc/trouble.texi: Use
@smallexample instead of @example.
From-SVN: r76075
2004-01-18 02:20:48 +01:00
|
|
|
@smallexample
|
1996-09-25 01:21:45 +02:00
|
|
|
#define PUSH_ROUNDING(BYTES) (BYTES)
|
c-tree.texi, [...]: Use @smallexample instead of @example.
* doc/c-tree.texi, doc/compat.texi, doc/cpp.texi,
doc/cppopts.texi, doc/extend.texi, doc/install.texi,
doc/interface.texi, doc/invoke.texi, doc/libgcc.texi, doc/md.texi,
doc/objc.texi, doc/rtl.texi, doc/tm.texi, doc/trouble.texi: Use
@smallexample instead of @example.
From-SVN: r76075
2004-01-18 02:20:48 +01:00
|
|
|
@end smallexample
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
@noindent
|
|
|
|
will suffice. But on other machines, instructions that appear
|
|
|
|
to push one byte actually push two bytes in an attempt to maintain
|
|
|
|
alignment. Then the definition should be
|
|
|
|
|
c-tree.texi, [...]: Use @smallexample instead of @example.
* doc/c-tree.texi, doc/compat.texi, doc/cpp.texi,
doc/cppopts.texi, doc/extend.texi, doc/install.texi,
doc/interface.texi, doc/invoke.texi, doc/libgcc.texi, doc/md.texi,
doc/objc.texi, doc/rtl.texi, doc/tm.texi, doc/trouble.texi: Use
@smallexample instead of @example.
From-SVN: r76075
2004-01-18 02:20:48 +01:00
|
|
|
@smallexample
|
1996-09-25 01:21:45 +02:00
|
|
|
#define PUSH_ROUNDING(BYTES) (((BYTES) + 1) & ~1)
|
c-tree.texi, [...]: Use @smallexample instead of @example.
* doc/c-tree.texi, doc/compat.texi, doc/cpp.texi,
doc/cppopts.texi, doc/extend.texi, doc/install.texi,
doc/interface.texi, doc/invoke.texi, doc/libgcc.texi, doc/md.texi,
doc/objc.texi, doc/rtl.texi, doc/tm.texi, doc/trouble.texi: Use
@smallexample instead of @example.
From-SVN: r76075
2004-01-18 02:20:48 +01:00
|
|
|
@end smallexample
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
@findex current_function_outgoing_args_size
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ACCUMULATE_OUTGOING_ARGS
|
2001-06-27 00:47:11 +02:00
|
|
|
A C expression. If nonzero, the maximum amount of space required for outgoing arguments
|
1996-09-25 01:21:45 +02:00
|
|
|
will be computed and placed into the variable
|
|
|
|
@code{current_function_outgoing_args_size}. No space will be pushed
|
|
|
|
onto the stack for each call; instead, the function prologue should
|
|
|
|
increase the stack frame size by this amount.
|
|
|
|
|
Convert ACCUMULATE_OUTGOING_ARGS to an expression.
* calls.c (PUSH_ARGS_REVERSED) Change to expression.
(ACCUMULATE_OUTGOING_ARGS, PUSH_ARGS): Provide default value.
(struct arg_data): Remove #ifdef ACCUMULATE_OUTGOING_ARGS.
(save_fixed_argument_area, restore_fixed_argument_area):
conditionize by #ifdef REG_PARM_STACK_SPACE only.
(emit_call): Change #ifdefs on ACCUMULATE_OUTGOING_ARGS
to conditions, handle RETURN_POPS_ARGS on ACCUMULATE_OUTGOING_ARGS.
(precompute_register_parameters): Avoid #ifdefs on
ACCUMULATE_OUTGOING_ARGS and PUSH_ARGS_REVERSED.
(stire_one_args): Likewise.
(expand_call): Likewise; conditionize PUSH_ROUNDING code by PUSH_ARGS.
(emit_library_call_value_1): Likewise.
(compute_argument_block_size): Align to STACK_BOUNDARY only for
ACCUMULATE_OUTGOING_ARGS.
* combine.c (ACCUMULATE_OUTGOING_ARGS, PUSH_ARGS): Provide default
value.
(nonzero_bits): Conditionize PUSH_ROUNDING code by USE_PUSH.
(use_crosses_set_p): Likewise.
* all targets (ACCUMULATE_OUTGOING_ARGS define): Change to
#define ACCUMULATE_OUTGOING_ARGS 1.
* i386.c (ix86_compute_frame_size): Handle ACCUMULATE_OUTGOING_ARGS
frames.
* i386.h (MASK_NO_PUSH_ARGS, MASK_ACCUMULATE_OUTGOING_ARGS): New
constants.
(TARGET_PUSH_ARGS, TARGET_ACCUMULATE_OUTGOING_ARGS): New macros.
(TARGET_SWITCHES): Add push-args, no-push-args,
accumulate-outgoing-args and no-accumulate-outgoing-args.
(ACCUMULATE_OUTGOING_ARGS, PUSH_ARGS): New macro.
* expr.c (ACCUMULATE_OUTGONG_ARGS, PUSH_ARGS): Provide default.
(push_block): Avoid ifdefs on ACCUMULATE_OUTGONG_ARGS
and PUSH_ROUNDING.
(emit_push_insn): Likewise.
* final.c (ACCUMULATE_OUTGOING_ARGS): Provide default.
(final_scan_insn): Avoid ifdefs on ACCUMULATE_OUTGOING_ARGS.
* function.c (ACCUMULATE_OUTGOING_ARGS): Provide default.
(STACK_DYNAMIC_OFFSET): Define correctly for both
ACCUMULATE_OUTGOING_ARGS and normal mode.
* invoke.texi (-mpush_args, -maccumulate-outgoing-args): Document.
* tm.texi (PUSH_ARGS): Document.
(ACCUMULATE_OUTGOING_ARGS, PUSH_ROUNDING): Update documentation.
From-SVN: r32803
2000-03-29 15:10:44 +02:00
|
|
|
Setting both @code{PUSH_ARGS} and @code{ACCUMULATE_OUTGOING_ARGS}
|
1996-09-25 01:21:45 +02:00
|
|
|
is not proper.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac REG_PARM_STACK_SPACE (@var{fndecl})
|
1996-09-25 01:21:45 +02:00
|
|
|
Define this macro if functions should assume that stack space has been
|
|
|
|
allocated for arguments even when their values are passed in
|
|
|
|
registers.
|
|
|
|
|
|
|
|
The value of this macro is the size, in bytes, of the area reserved for
|
1999-01-27 02:43:17 +01:00
|
|
|
arguments passed in registers for the function represented by @var{fndecl},
|
1999-08-25 09:27:13 +02:00
|
|
|
which can be zero if GCC is calling a library function.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
This space can be allocated by the caller, or be a part of the
|
|
|
|
machine-dependent stack frame: @code{OUTGOING_REG_PARM_STACK_SPACE} says
|
|
|
|
which.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
@c above is overfull. not sure what to do. --mew 5feb93 did
|
|
|
|
@c something, not sure if it looks good. --mew 10feb93
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac OUTGOING_REG_PARM_STACK_SPACE
|
1996-09-25 01:21:45 +02:00
|
|
|
Define this if it is the responsibility of the caller to allocate the area
|
|
|
|
reserved for arguments passed in registers.
|
|
|
|
|
|
|
|
If @code{ACCUMULATE_OUTGOING_ARGS} is defined, this macro controls
|
|
|
|
whether the space for these arguments counts in the value of
|
|
|
|
@code{current_function_outgoing_args_size}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac STACK_PARMS_IN_REG_PARM_AREA
|
1996-09-25 01:21:45 +02:00
|
|
|
Define this macro if @code{REG_PARM_STACK_SPACE} is defined, but the
|
|
|
|
stack parameters don't skip the area specified by it.
|
|
|
|
@c i changed this, makes more sens and it should have taken care of the
|
|
|
|
@c overfull.. not as specific, tho. --mew 5feb93
|
|
|
|
|
|
|
|
Normally, when a parameter is not passed in registers, it is placed on the
|
|
|
|
stack beyond the @code{REG_PARM_STACK_SPACE} area. Defining this macro
|
|
|
|
suppresses this behavior and causes the parameter to be passed on the
|
|
|
|
stack in its natural location.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac RETURN_POPS_ARGS (@var{fundecl}, @var{funtype}, @var{stack-size})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C expression that should indicate the number of bytes of its own
|
|
|
|
arguments that a function pops on returning, or 0 if the
|
|
|
|
function pops no arguments and the caller must therefore pop them all
|
|
|
|
after the function returns.
|
|
|
|
|
|
|
|
@var{fundecl} is a C variable whose value is a tree node that describes
|
|
|
|
the function in question. Normally it is a node of type
|
|
|
|
@code{FUNCTION_DECL} that describes the declaration of the function.
|
Table-driven attributes.
* c-decl.c, config/alpha/alpha.c, config/arc/arc.c,
config/arm/arm.c, config/arm/pe.c, config/avr/avr.c,
config/avr/avr.h, config/d30v/d30v.h, config/fr30/fr30.h,
config/h8300/h8300.c, config/i386/cygwin.h, config/i386/winnt.c,
config/m32r/m32r.c, config/mcore/mcore.c, config/sh/sh.c,
config/stormy16/stormy16.h, config/v850/v850.c, doc/c-tree.texi,
doc/tm.texi, ggc-common.c, integrate.c, print-tree.c, tree.c,
tree.h: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
* tree.h (struct tree_decl): Change machine_attributes to
attributes.
* doc/c-tree.texi: Document that all attributes are now attached
to decls and types.
* c-common.c (add_attribute, attrtab, attrtab_idx,
default_valid_lang_attribute, valid_lang_attribute): Remove.
(attribute_tables, attributes_initialized,
c_common_attribute_table, default_lang_attribute_table): New
variables.
(handle_packed_attribute, handle_nocommon_attribute,
handle_common_attribute, handle_noreturn_attribute,
handle_unused_attribute, handle_const_attribute,
handle_transparent_union_attribute, handle_constructor_attribute,
handle_destructor_attribute, handle_mode_attribute,
handle_section_attribute, handle_aligned_attribute,
handle_weak_attribute, handle_alias_attribute,
handle_no_instrument_function_attribute,
handle_no_check_memory_usage_attribute, handle_malloc_attribute,
handle_no_limit_stack_attribute, handle_pure_attribute): New
functions.
(init_attributes, decl_attributes): Rewrite to implement
table-driven attributes.
* c-common.h (enum attribute_flags): Move to tree.h.
* c-format.c (decl_handle_format_attribute,
decl_handle_format_arg_attribute): Rename to
handle_format_attribute and handle_format_arg_attribute. Update
for table-driven attributes.
* c-common.h (decl_handle_format_attribute,
decl_handle_format_arg_attribute): Remove prototypes.
(handle_format_attribute, handle_format_arg_attribute): Add
prototypes.
* c-decl.c (grokdeclarator): Handle attributes nested inside
declarators.
* c-parse.in (setattrs, maybe_setattrs): Remove.
(maybe_type_quals_setattrs): Rename to maybe_type_quals_attrs.
Update to handle nested attributes properly.
(maybe_resetattrs, after_type_declarator,
parm_declarator_nostarttypename, notype_declarator, absdcl1_noea,
absdcl1_ea, direct_absdcl1): Update to handle nested attributes
properly.
(make_pointer_declarator): Update to handle nested attributes
properly.
* doc/extend.texi: Update documentation of limits of attributes
syntax. Warn about problems with attribute semantics in C++.
* target.h (struct target): Remove valid_decl_attribute and
valid_type_attribute. Add attribute_table and
function_attribute_inlinable_p.
* target-def.h (TARGET_VALID_DECL_ATTRIBUTE,
TARGET_VALID_TYPE_ATTRIBUTE): Remove.
(TARGET_ATTRIBUTE_TABLE, TARGET_FUNCTION_ATTRIBUTE_INLINABLE_P):
Add.
(TARGET_INITIALIZER): Update.
* integrate.c (FUNCTION_ATTRIBUTE_INLINABLE_P): Remove default
definition.
(function_attribute_inlinable_p): New function. Check for the
presence of any machine attributes before using
targetm.function_attribute_inlinable_p.
(function_cannot_inline_p): Update.
* Makefile.in (integrate.o): Update dependencies.
* doc/tm.texi: Update documentation of target attributes and
example definition of TARGET_VALID_TYPE_ATTRIBUTE.
* tree.c (default_valid_attribute_p, valid_machine_attribute):
Remove.
(default_target_attribute_table,
default_function_attribute_inlinable_p): New.
(lookup_attribute): Update comment to clarify handling of multiple
attributes with the same name.
(merge_attributes, attribute_list_contained): Allow multiple
attributes with the same name but different arguments to appear in
the same attribute list.
* tree.h (default_valid_attribute_p): Remove prototype.
(struct attribute_spec): New.
(default_target_attribute_table): Declare.
(enum attribute_flags): Move from c-common.h. Add
ATTR_FLAG_TYPE_IN_PLACE.
(default_function_attribute_inlinable_p): Declare.
* config/alpha/alpha.c (vms_valid_decl_attribute_p): Remove.
(TARGET_VALID_DECL_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(vms_attribute_table): New.
* config/arc/arc.c (arc_valid_decl_attribute): Remove.
(TARGET_VALID_DECL_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(arc_attribute_table, arc_handle_interrupt_attribute): New.
* config/arm/arm.c (arm_valid_type_attribute_p,
arm_valid_decl_attribute_p, arm_pe_valid_decl_attribute_p):
Remove.
(TARGET_VALID_TYPE_ATTRIBUTE, TARGET_VALID_DECL_ATTRIBUTE): Don't
define.
(TARGET_ATTRIBUTE_TABLE): Define.
(arm_attribute_table, arm_handle_fndecl_attribute,
arm_handle_isr_attribute): New.
* config/avr/avr.c (avr_valid_type_attribute,
avr_valid_decl_attribute): Remove.
(TARGET_VALID_DECL_ATTRIBUTE, TARGET_VALID_TYPE_ATTRIBUTE): Don't
define.
(TARGET_ATTRIBUTE_TABLE): Define.
(avr_attribute_table, avr_handle_progmem_attribute,
avr_handle_fndecl_attribute): New.
* config/c4x/c4x.c (c4x_valid_type_attribute_p): Remove.
(TARGET_VALID_TYPE_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(c4x_attribute_table, c4x_handle_fntype_attribute): New.
* config/h8300/h8300.c (h8300_valid_decl_attribute): Remove.
(TARGET_VALID_DECL_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(h8300_attribute_table, h8300_handle_fndecl_attribute,
h8300_handle_eightbit_data_attribute,
h8300_handle_tiny_data_attribute): New.
* config/i386/i386-protos.h (ix86_valid_type_attribute_p,
i386_pe_valid_decl_attribute_p, i386_pe_valid_type_attribute_p):
Remove prototypes.
(ix86_handle_dll_attribute, ix86_handle_shared_attribute): New
declarations.
* config/i386/i386.c (ix86_valid_type_attribute_p: Remove.
(TARGET_VALID_TYPE_ATTRIBUTE, TARGET_VALID_DECL_ATTRIBUTE): Don't
define.
(TARGET_ATTRIBUTE_TABLE): Define.
(ix86_attribute_table, ix86_handle_cdecl_attribute,
ix86_handle_regparm_attribute): New.
* config/i386/winnt.c (i386_pe_valid_decl_attribute_p,
i386_pe_valid_type_attribute_p): Remove.
(ix86_handle_dll_attribute, ix86_handle_shared_attribute): New.
* config/ia64/ia64.c (ia64_valid_type_attribute): Remove.
(TARGET_VALID_TYPE_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(ia64_attribute_table): New.
* config/m32r/m32r.c (m32r_valid_decl_attribute, interrupt_ident1,
interrupt_ident2, model_ident1, model_ident2): Remove.
(TARGET_VALID_DECL_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(init_idents): Update.
(m32r_attribute_table, m32r_handle_model_attribute): New.
* config/m68hc11/m68hc11.c (m68hc11_valid_type_attribute_p):
Remove.
(TARGET_VALID_TYPE_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(m68hc11_attribute_table, m68hc11_handle_fntype_attribute): New.
* config/mcore/mcore.c (mcore_valid_decl_attribute): Remove.
(TARGET_VALID_DECL_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(mcore_attribute_table, mcore_handle_naked_attribute): New.
* config/ns32k/ns32k.c (ns32k_valid_type_attribute_p): Remove.
(TARGET_VALID_TYPE_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(ns32k_attribute_table, ns32k_handle_fntype_attribute): New.
* config/rs6000/rs6000.c (rs6000_valid_type_attribute_p): Remove.
(TARGET_VALID_TYPE_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(rs6000_attribute_table, rs6000_handle_longcall_attribute): New.
* config/sh/sh.c (sh_valid_decl_attribute): Remove.
(TARGET_VALID_DECL_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(sh_attribute_table, sh_handle_interrupt_handler_attribute,
sh_handle_sp_switch_attribute, sh_handle_trap_exit_attribute):
New.
* config/stormy16/stormy16.c (stormy16_valid_type_attribute):
Remove.
(TARGET_VALID_TYPE_ATTRIBUTE): Don't define
(TARGET_ATTRIBUTE_TABLE): Define.
(stormy16_attribute_table, stormy16_handle_interrupt_attribute):
New.
* config/v850/v850.c (v850_valid_decl_attribute): Remove.
(TARGET_VALID_DECL_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(v850_attribute_table, v850_handle_interrupt_attribute,
v850_handle_data_area_attribute): New.
* config/v850/v850-c.c (mark_current_function_as_interrupt):
Return void. Call decl_attributes instead of
valid_machine_attribute.
cp:
Table-driven attributes.
* decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
* decl2.c (cplus_decl_attributes): Only take one attributes
parameter.
* cp-tree.c (cplus_decl_attributes): Update prototype.
* class.c (finish_struct), decl.c (start_decl, start_function),
decl2.c (grokfield), friend.c (do_friend), parse.y
(parse_bitfield): Update calls to cplus_decl_attributes.
* decl.c (grokdeclarator): Take a pointer to a single ordinary
attribute list.
* decl.h (grokdeclarator): Update prototype.
* decl2.c (grokfield): Take a single ordinary attribute list.
* friend.c (do_friend): Likewise.
* decl.c (shadow_tag, groktypename, start_decl,
start_handler_parms, grokdeclarator, grokparms, start_function,
start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
(process_template_parm, do_decl_instantiation): Pass single
ordinary attribute lists around.
* decl.c (grokdeclarator): Correct handling of nested attributes.
Revert the patch
1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
* decl.c (grokdeclarator): Embedded attrs bind to the right,
not the left.
.
* cp-tree.h (cp_valid_lang_attribute): Remove declaration
(cp_attribute_table): Declare.
* decl.c (valid_lang_attribute): Don't define.
(lang_attribute_table): Define.
(init_decl_processing): Initialize lang_attribute_table instead of
valid_lang_attribute.
* tree.c (cp_valid_lang_attribute): Remove.
(handle_java_interface_attribute, handle_com_interface_attribute,
handle_init_priority_attribute): New functions.
(cp_attribute_table): New array.
* decl2.c (import_export_class): Don't use
targetm.valid_type_attribute.
testsuite:
Table-driven attributes.
* g++.dg/ext/attrib1.C: New test.
From-SVN: r45718
2001-09-21 03:27:06 +02:00
|
|
|
From this you can obtain the @code{DECL_ATTRIBUTES} of the function.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
@var{funtype} is a C variable whose value is a tree node that
|
|
|
|
describes the function in question. Normally it is a node of type
|
|
|
|
@code{FUNCTION_TYPE} that describes the data type of the function.
|
|
|
|
From this it is possible to obtain the data types of the value and
|
|
|
|
arguments (if known).
|
|
|
|
|
1997-08-11 17:56:58 +02:00
|
|
|
When a call to a library function is being considered, @var{fundecl}
|
1996-09-25 01:21:45 +02:00
|
|
|
will contain an identifier node for the library function. Thus, if
|
|
|
|
you need to distinguish among various library functions, you can do so
|
|
|
|
by their names. Note that ``library function'' in this context means
|
|
|
|
a function used to perform arithmetic, whose name is known specially
|
|
|
|
in the compiler and was not mentioned in the C code being compiled.
|
|
|
|
|
|
|
|
@var{stack-size} is the number of bytes of arguments passed on the
|
|
|
|
stack. If a variable number of bytes is passed, it is zero, and
|
|
|
|
argument popping will always be the responsibility of the calling function.
|
|
|
|
|
combine.c, [...]: consistently use "VAX", "VAXen", and "MicroVAX" in comments and documentation.
* combine.c, config.gcc, cse.c, defaults.h, real.c, reload.c,
simplify-rtx.c, config/alpha/alpha.h, config/avr/avr.h,
config/convex/convex.h, config/d30v/d30v.c,
config/d30v/d30v.h, config/dsp16xx/dsp16xx.h,
config/elxsi/elxsi.h, config/fr30/fr30.h, config/m88k/m88k.c,
config/mips/mips.h, config/mn10200/mn10200.h,
config/mn10300/mn10300.h, config/pdp11/pdp11.md,
config/v850/v850.h, config/vax/openbsd.h,
config/vax/openbsd1.h, config/vax/ultrix.h,
config/vax/vax-protos.h, config/vax/vax.c, config/vax/vax.h,
config/vax/vax.md, config/vax/vaxv.h, config/vax/xm-vms.h,
cp/decl2.c, doc/contrib.texi, doc/cpp.texi, doc/gcc.texi,
doc/install.texi, doc/invoke.texi, doc/md.texi, doc/rtl.texi,
doc/tm.texi: consistently use "VAX", "VAXen", and "MicroVAX"
in comments and documentation.
From-SVN: r44589
2001-08-03 03:19:20 +02:00
|
|
|
On the VAX, all functions always pop their arguments, so the definition
|
1996-09-25 01:21:45 +02:00
|
|
|
of this macro is @var{stack-size}. On the 68000, using the standard
|
|
|
|
calling convention, no functions pop their arguments, so the value of
|
|
|
|
the macro is always 0 in this case. But an alternative calling
|
|
|
|
convention is available in which functions that take a fixed number of
|
|
|
|
arguments pop them but other functions (such as @code{printf}) pop
|
|
|
|
nothing (the caller pops all). When this convention is in use,
|
|
|
|
@var{funtype} is examined to determine whether a function takes a fixed
|
|
|
|
number of arguments.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
Contribute sh64-elf.
2002-02-09 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.c (TARGET_CANNOT_MODIFY_JUMPS_P): Define to...
(sh_cannot_modify_jumps_p): New function.
2002-02-05 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.c (TARGET_MS_BITFIELD_LAYOUT_P): Define to...
(sh_ms_bitfield_layout_p): New function.
2002-02-04 Alexandre Oliva <aoliva@redhat.com>
Zack Weinberg <zack@codesourcery.com>
* config/sh/sh.h (TRAMPOLINE_ADJUST_ADDRESS): Use
expand_simple_binop instead of expand_binop.
2002-02-03 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.h (OVERRIDE_OPTIONS) [! TARGET_SH5]: Disable
use of .quad and .uaquad.
* config/sh/sh.c (TARGET_ASM_UNALIGNED_DI_OP,
TARGET_ASM_ALIGNED_DI_OP): Add comment pointing to the above.
2002-01-24 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.md (movdi_const, movdi_const_32bit,
movdi_const_16bit): Make sure all CONSTs have modes.
(sym2PIC): Ditto, but by adjusting all callers.
* config/sh/sh.c (calc_live_regs) [TARGET_SHCOMPACT]: Set pr_live
if the prologue calls the SHmedia argument decoder or register
saver.
2002-01-24 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.c (TARGET_ASM_UNALIGNED_DI_OP): Define.
(TARGET_ASM_ALIGNED_DI_OP): Likewise.
(sh_expand_epilogue): Don't emit USE of return target register.
(prepare_move_operands): Legitimize DImode PIC addresses.
(sh_media_register_for_return): Skip tr0, used to initialize the
PIC register.
(sh_expand_prologue): Remove explicit USE of return register.
(nonpic_symbol_mentioned_p): PC is non-PIC. Don't recurse in
CONST_DOUBLEs. UNSPEC_GOTPLT is PIC.
* config/sh/sh.h (ASM_OUTPUT_DOUBLE_INT): Removed, obsolete.
(OVERRIDE_OPTIONS): Don't disable PIC on SH5.
(EXTRA_CONSTRAINT_S): Use MOVI_SHORI_BASE_OPERAND_P instead of
EXTRA_CONSTRAINT_T.
(GOT_ENTRY_P, GOTPLT_ENTRY_P, GOTOFF_P, PIC_ADDR_P): New.
(MOVI_SHORI_BASE_OPERAND_P): New.
(NON_PIC_REFERENCE_P, PIC_REFERENCE_P): New.
(EXTRA_CONSTRAINT_T): Define in terms of them.
(OUTPUT_ADDR_CONST_EXTRA): Handle UNSPEC_GOTPLT.
* config/sh/sh.md (movsi_media, movsi_media_nofpu,
movdi_media, movdi_media_nofpu): Add SIBCALL_REGS class to
alternatives supporting TARGET_REGS.
(UNSPEC_GOTPLT): New constant.
(movdi split): Move incrementing of LABEL_NUSES...
(movdi_const, movdi_const_32bit): Here. Use
MOVI_SHORI_BASE_OPERAND_P instead of EXTRA_CONSTRAINT_T.
(movdi_const_16bit): New.
(call, call_value) [flag_pic]: Use GOTPLT.
(call_pop, call_value_pop): New expands.
(call_pop_compact, call_pop_rettramp): New insns.
(call_value_pop_compact, call_value_pop_rettramp): New insns.
(sibcall) [flag_pic]: Use GOT.
(builtint_setjmp_receiver): Remove bogus, unused expand.
(GOTaddr2picreg): Implement for SHcompact and SHmedia.
(*pt, *ptb, ptrel): New insns.
(sym2GOT): Handle DImode GOT.
(sym2GOTPLT, symGOTPLT2reg): New expands.
(sym2PIC): New expand.
(shcompact_return_tramp): Use GOTPLT to return trampoline.
(shcompact_return_tramp_i): Use return register explicitly.
* config/sh/sh.h (OVERRIDE_OPTIONS) [TARGET_SHMEDIA]: Don't
disable flag_reorder_blocks.
2002-01-19 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.md (sibcall_compact): Reorder return, uses and
clobbers, for clarity.
(sibcall_epilogue) [TARGET_SHCOMPACT]: Mark saving and
restoring of r0 in macl as MAYBE_DEAD.
2002-01-18 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.h (LONG_DOUBLE_TYPE_SIZE): Define.
* config/sh/sh.md (movv4sf_i, movv16sf_i): Fix uses of
alter_subreg all over.
(jump) [TARGET_SHMEDIA]: FAIL to create new jumps after
reload, instead of emitting instructions that would require
reloading.
(casesi_load_media): Add missing modes.
2001-11-09 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.c (sh_expand_prologue): Mark the PIC register
as used if the argument decoder is called.
2001-08-28 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.md (udivsi3, divsi3): Load libcall symbol name in
Pmode, then extend it to DImode if necessary.
2001-08-28 Stephen Clarke <Stephen.Clarke@st.com>
* config/sh/sh.h (LEGITIMATE_CONSTANT_P): Don't accept DFmode
constants in FPU-enabled SHmedia, let them be loaded from memory.
2001-08-28 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.md (cmpeqdi_media, cmpgtdi_media, cmpgtudi_media):
Adjust whitespace in assembly output templates.
2001-08-28 Stephen Clarke <Stephen.Clarke@st.com>
* config/sh/sh.md (movdicc_false, movdicc_true, movdicc): Adjust
mode of if_then_else.
2001-08-04 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh64.h (CPP_DEFAULT_CPU_SPEC): Override definition in
sh.h.
2001-07-26 Andrew Haley <aph@cambridge.redhat.com>
Joern Rennecke <amylaar@redhat.com>
* config/sh/sh64.h (CPP_DEFAULT_CPU_SPEC): New.
(SUBTARGET_CPP_PTR_SPEC): New.
(SUBTARGET_CPP_SPEC): Remove.
2001-07-06 Chandrakala Chavva <cchavva@redhat.com>
* config/sh/sh.md (movsf_media_nofpu+1, movdf_media_nofpu+1):
Fix typo in previous checkin.
2001-07-11 Chandrakala Chavva <cchavva@redhat.com>
* config/sh/sh.h (MODES_TIEABLE_P): Fix redact indentations.
2001-07-10 Chandrakala Chavva <cchavva@cygnus.com>
Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.h (MODES_TIEABLE_P): Don't tie modes wider than
what single FP register can hold for SHmedia target.
2001-07-06 Chandrakala Chavva <cchavva@redhat.com>
Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.md (movsf_media_nofpu+1, movdf_media_nofpu+1):
Do not split into SUBREG.
2001-06-14 Alexandre Oliva <aoliva@redhat.com>
* config/sh/ushmedia.h, config/sh/sshmedia.h: Updated signatures
and added new functions as specified in SH5 ABI r9.
2001-06-04 Alexandre Oliva <aoliva@redhat.com>
* config/sh/lib1funcs.asm (GCC_nested_trampoline): Align to an
8-byte boundary.
2001-06-03 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.c (dump_table): Add const0_rtx in calls of
gen_consttable_4 and gen_consttable_8. Emit multiple labels
and consttable_window_ends.
2001-06-03 Graham Stott <grahams@redhat,com>
* config/sh/sh.md (movdi split): Remove unused variable last_insn.
2001-05-16 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.c (print_operand): Handle floating-point pair,
vector and matrix registers.
* config/sh/sh.h (REGISTER_MOVE_COST): Take floating-pointer
vector modes into account.
* config/sh/sh.md (movv2sf): Split move between registers into
movdf.
(movv4sf, movv16sf): Introduce insns that get split only after
reload.
* config/sh/shmedia.h: Fix Copyright dates.
* config/sh/ushmedia.h: Likewise. Move loop counter
declarations into conditionals that uses them.
(sh_media_FVADD_S, sh_media_FVSUB_S): Fix off-by-one error in
loop boundary.
* config/sh/sshmedia.h: Fix Copyright dates.
(sh_media_PUTCFG): Fix constraints.
2001-05-12 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.h (TARGET_PTRMEMFUNC_VBIT_LOCATION): Define to
ptrmemfunc_vbit_in_delta for SH5.
2001-05-08 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.h (TARGET_SWITCHES): Document -m5-*.
* invoke.texi: Likewise.
2001-04-14 Alexandre Oliva <aoliva@redhat.com>
* config/sh/lib1funcs.asm (GCC_push_shmedia_regs,
GCC_push_shmedia_regs_nofpu, GCC_pop_shmedia_regs,
GCC_pop_shmedia_regs_nofpu): New global symbols.
* config/sh/t-sh64 (LIB1ASMFUNCS): Add them.
* config/sh/sh.h (SHMEDIA_REGS_STACK_ADJUST): New macro.
* config/sh/sh.c (calc_live_regs): Account for PR's saving in
compact function with nonlocal labels.
(sh_expand_prologue) [SHcompact]: Push SHmedia regs if needed.
(sh_expand_epilogue) [SHcompact]: Pop them when appropriate.
(initial_elimination_offset): Account for their stack space.
* config/sh/sh.md (shmedia_save_restore_regs_compact): New insn.
* config/sh/sh.md (movsi_media, movsi_media_nofpu, movqi_media,
movhi_media, movdi_media, movdi_media_nofpu, movdf_media,
movdf_media_nofpu, movsf_media, movsf_media_nofpu): Require at
least one of the operands to be a register.
(movv2sf): Likewise. Renamed to movv2sf_i.
(movdi, movdf, movv2sf, movv4sf, movv16sf, movsf):
prepare_move_operands() before emitting SHmedia insns.
2001-04-03 Alexandre Oliva <aoliva@redhat.com>
* config/sh/crti.asm (init, fini) [__SH5__ && ! __SHMEDIA__]:
Don't save nor initialize r12. Don't mis-align the stack.
Pad the code with a nop.
* config/sh/crti.asm: Don't restore r12. Don't mis-align the
stack.
2001-03-13 Alexandre Oliva <aoliva@redhat.com>
* gcc/longlong.h (__umulsidi3, count_leading_zeros)
[__SHMEDIA__]: Implement.
2001-03-11 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.md: Set latency of `pt' closer to reality.
(movsi_media, movsi_media_nofpu, movdi_media, movdi_media_nofpu,
movdf_media, movdf_media_nofpu, movsf_media, movsf_media_nofpu):
Set move, load and store type attributes.
* config/sh/sh.c (sh_loop_align) [TARGET_SH5]: Set to 3.
* config/sh/sh.h (OVERRIDE_OPTIONS) [TARGET_SH5]: Disable
profiling.
* config/sh/sh.h (PROMOTE_MODE): Sign-extend SImode to DImode.
* config/sh/sh-protos.h (sh_media_register_for_return): Declare.
* config/sh/sh.c (sh_media_register_for_return): New function.
(sh_expand_prologue) [TARGET_SHMEDIA]: Copy r18 to an available
branch-target register.
(sh_expand_epilogue) [TARGET_SHMEDIA]: Explicitly USE it.
* config/sh/sh.md (return_media_i): Use any call-clobbered
branch-target register.
(return_media): If r18 wasn't copied in the prologue, copy it
here.
* config/sh/sh.h (CONDITIONAL_REGISTER_USAGE) [TARGET_SHMEDIA]:
Clear class FP0_REGS.
* config/sh/sh64.h (LINK_SPEC): Removed incorrect default copied
from elf.h.
2001-03-08 DJ Delorie <dj@redhat.com>
* config/sh/sh.h (OVERRIDE_OPTIONS): Disable relaxing for SHMEDIA.
2001-02-09 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.md (sibcall_compact): Set fp_mode to single.
2001-02-07 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.h (INT_ASM_OP) [SHMEDIA64]: Use `.quad'.
2001-02-03 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.h (INIT_CUMULATIVE_ARGS): Compute size of BLKmode
return value correctly for call_cookie.
2001-02-01 Alexandre Oliva <aoliva@redhat.com>
* config/sh/crt1.asm (start): Modified so as to call
___setup_argv_and_call_main.
2001-01-26 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.h (FUNCTION_ARG_ADVANCE): Don't count stack_regs in
SHmedia mode.
2001-01-20 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.h (STRIP_DATALABEL_ENCODING): New macro.
(STRIP_NAME_ENCODING): Use it.
(ASM_OUTPUT_LABELREF): Likewise. Don't call assemble_name().
2001-01-19 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.md (sgeu) [! SHMEDIA]: Fix invocation of
prepare_scc_operands().
* config/sh/sh.h (SH_DATALABEL_ENCODING): Change to "#"...
(DATALABEL_SYMNAME_P): ... so that we don't need memcmp here.
2001-01-17 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.h (STRIP_NAME_ENCODING): Strip leading `*'.
2001-01-13 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.md (shcompact_incoming_args): Use R0_REG.
* config/sh/sh.md (R7_REG, R8_REG, R9_REG): Define as constants,
used in shcompact_incoming_args.
* config/sh/sh.c (sh_expand_epilogue): Fix thinko in previous
change.
* config/sh/crt1.asm (start) [SH5]: Switch to single-precision
mode.
* config/sh/lib1funcs.asm (sdivsi3_i4, udivsi3_i4, set_fpscr):
Adjust accordingly.
* config/sh/sh.c (sh_expand_prologue, sh_expand_epilogue):
Simplify. Adjust. Add sanity check.
* config/sh/sh.h (TARGET_SWITCHES) [5-compact]: Set
FPU_SINGLE_BIT.
* config/sh/sh.md (udivsi3_i4_single, divsi3_i4_single): Match
TARGET_SHCOMPACT.
(udivsi3, divsi3): Use them.
(force_mode_for_call): New insn.
(call, call_value, sibcall_value): Emit it before SHcompact
calls.
2001-01-11 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.md (call, call_value, sibcall): Make sure the
call cookie is non-NULL before taking its value.
2001-01-10 Alexandre Oliva <aoliva@redhat.com>
* config.gcc (sh64): Set target_requires_64bit_host_wide_int.
2001-01-09 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.md (shcompact_incoming_args): Set argument memory
block.
* config/sh/sh.h (STATIC_CHAIN_REGNUM) [SH5]: Use r1.
* config/sh/sh.c (sh_expand_prologue) [SH5]: Use r0 as
temporary for stack adjusts. Use MACL and MACH to pass
arguments to shcompact_incoming_args.
* config/sh/sh.md (shcompact_incoming_args): Adjust. Don't
clobber r1.
* config/sh/lib1funcs.asm (shcompact_incoming_args): Likewise.
(nested_trampoline): Load static chain address into r1.
* config/sh/sh.md (movdi_media splits): Fix sign-extension.
2001-01-07 Alexandre Oliva <aoliva@redhat.com
* config/sh/sh.c (fpul_operand) [SHMEDIA]: Just call
fp_arith_reg_operand().
2001-01-06 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.md (casesi): Sign-extend the first two operands,
and use signed compares for them.
* config/sh/sh.c (dump_table): Don't emit 8-byte constants after
4-byte ones. Instead, inter-leave them, maintaining the 8-byte
ones properly aligned.
(find_barrier): Account for extra alignment needed for 8-byte wide
constants.
(machine_dependent_reorg): Require a label for the second 4-byte
constant after an 8-byte one.
* config/sh/lib1funcs.asm (sdivsi3): Fix typo in yesterday's
change.
2001-01-05 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.c (machine_dependent_reorg) [SHCOMPACT]: Reset
last_float when switching float modes.
* config/sh/sh.md (movdf) [SH5]: Don't use stack-pointer
auto-increment for general-purpose registers.
* config/sh/lib1funcs.asm (sdivsi3) [SHMEDIA]: Sign-extend the
result.
* config/sh/sh.c (sh_expand_prologue) [SH5]: Use r1 as temporary
for stack adjust.
* config/sh/sh.c (sh_builtin_saveregs): Support using all
registers for varargs.
2001-01-01 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.h (FUNCTION_ARG_ADVANCE): Simplify.
* config/sh/sh.h (CALL_COOKIE_STACKSEQ,
CALL_COOKIE_STACKSEQ_SHIFT, CALL_COOKIE_STACKSEQ_GET): New macros.
(CALL_COOKIE_INT_REG_SHIFT): Adjust.
(FUNCTION_ARG_ADVANCE): Use SHCOMPACT_FORCE_ON_STACK. Adjust
call_cookie accordingly.
(FUNCTION_ARG): Test SHCOMPACT_FORCE_ON_STACK.
(SHCOMPACT_BYREF): Likewise.
(SHCOMPACT_FORCE_ON_STACK): New macro.
* config/sh/sh.c (sh_expand_prologue): Use new call_cookie format.
(sh_builtin_saveregs): Likewise.
* config/sh/lib1funcs.asm (shcompact_call_trampoline,
shcompact_incoming_args): Use new shift values. Support
sequences of consecutive and non-consecutive pushes/pops.
* config/sh/sh.md (return): Don't explicitly use PR_REG.
2001-01-05 Hans-Peter Nilsson <hpn@cygnus.com>
* config/sh/sh.h (TEXT_SECTION): Define.
* config/sh/elf.h (ASM_FILE_START): Output TEXT_SECTION_ASM_OP.
2001-01-05 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.h (INIT_CUMULATIVE_LIBCALL_ARGS): New macro.
* config/sh/sh.h (BASE_RETURN_VALUE_REG): Use FP regs for
return values on FPU-enabled SHmedia.
(FUNCTION_VALUE_REGNO_P): Mark FIRST_FP_RET_REG as used on
FPU-enabled SHmedia.
(INIT_CUMULATIVE_ARGS): Set up return trampoline only if
value is returned in a non-FP reg and is not returned by
reference.
* config/sh/sh.md (shcompact_return_tramp_i): Change type to
jump_ind.
2000-01-04 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.h (SH_MIN_ALIGN_FOR_CALLEE_COPY): New.
(FUNCTION_ARG_CALLEE_COPIES): Require argument to be
quad-aligned to be passed by callee-copy reference.
2001-01-03 Alexandre Oliva <aoliva@redhat.com>
* config/sh/elf.h (MAX_WCHAR_TYPE_SIZE): Define.
* config/sh/sh64.h (MAX_WCHAR_TYPE_SIZE): Undefine.
2001-01-02 Alexandre Oliva <aoliva@redhat.com>
* config/sh/lib1funcs.asm (shcompact_call_trampoline): Fix error in
copying low-numbered FP regs to r7 and r8.
* config/sh/sh.h (FUNCTION_ARG_ADVANCE): Don't request copying of
FP regs to general-purpose regs only if the copy was passed on the
stack.
* config/sh/lib1funcs.asm (shcompact_call_trampoline): Fix typo in
copying FP reg to r9.
* config/sh/sh.h (FUNCTION_ARG_ADVANCE): Use trampoline to
copy FP regs to general-purpose regs only in outgoing calls.
* config/sh/sh.md (movdf_media, movsf_media): Revert incorrect
change from 2000-10-30. Adjust for 64-bit (or 32-bit)
HOST_WIDE_INT.
* config/sh/sh.h (struct sh_args): Document all fields.
(FUNCTION_OK_FOR_SIBCALL): Functions that receive arguments
passed partially on the stack should not consider making
sibcalls.
* config/sh/sh.h (FUNCTION_ARG_ADVANCE): Add byref regs to
stack_regs only for incoming calls. When passing FP args,
make sure there are FP regs available before modifying
call_cookie.
(SHCOMPACT_BYREF): Pass double args in general-purpose
registers by reference.
2000-12-30 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.h (FUNCTION_OK_FOR_SIBCALL) [SHCOMPACT]: Don't
attempt to generate sibcalls if the caller got any arguments
by reference.
* config/sh/lib1funcs.asm (set_fpscr) [SH5]: Default to double.
* config/sh/sh.c (dump_table) [SHCOMPACT]: Align DImode and DFmode
to 8-byte boundaries.
* config/sh/sh.md (shcompact_preserve_incoming_args): New insn.
* config/sh/sh.h (CALL_COOKIE_INT_REG_GET): New macro.
* config/sh/sh.c (sh_expand_prologue): Preserve args that will be
stored in the stack.
* config/sh/lib1funcs.asm (ct_main_table, ia_main_table): Arrange
for the offsets to have the ISA bit set.
(shcompact_call_trampoline): Document. Swap r0 and r1, to match
invocation. Use beq instead of bgt to mark end of sequence of
loads.
(shcompact_incoming_args): Fix store of r2. Use beq instead of
bgt to mark end of sequence of stores.
* config/sh/sh.c (arith_operand): Don't check whether
CONST_OK_FOR_J for now.
* config/sh/sh.md (movdf_media, movsf_media): Use HOST_WIDE_INT
instead of long for conversion.
2000-12-29 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.c (print_operand_address): Convert INTVAL to int
before passing it to fprintf.
2000-12-28 Alexandre Oliva <aoliva@redhat.com>
* config/sh/crt1.asm (start): Reset SR.FD, to enable the FP unit.
Call set_fpscr before reading/writing SR.
* config/sh/crt1.asm (start): Set SR.SZ and SR.PR, but not SR.FR.
Call set_fpscr.
* config/sh/lib1funcs.asm: Add `.align 2' directives before
SHmedia code.
(FMOVD_WORKS): Define on SH5 with FPU.
(set_fpscr): Define on SH5. Remove separate _fpscr_values
setting.
* config/sh/t-sh64 (LIB1ASMFUNCS): Add _set_fpscr instead of
_fpscr_values.
2000-12-28 Hans-Peter Nilsson <hpn@cygnus.com>
* config/sh/lib1funcs.asm (ct_main_table): Align contents to even
address.
(ia_main_table): Ditto.
2000-12-27 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.h (MAX_WCHAR_TYPE_SIZE): Don't define.
* config/sh/sh64.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Reinstate
the definitions from sh.h.
* config/sh/sh.h (PTRDIFF_TYPE): Define as conditional on
TARGET_SH5.
(SUBTARGET_CPP_SPEC): Arrange for __PTRDIFF_TYPE__ to be defined.
* config/sh/elf.h (PTRDIFF_TYPE): Likewise.
* config/sh/sh64.h (SUBTARGET_CPP_SPEC): Likewise.
2000-12-26 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.md (movdi_media split): Don't add REG_LABEL notes.
Increment LABEL_NUSES.
From-SVN: r49630
2002-02-09 04:08:08 +01:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac CALL_POPS_ARGS (@var{cum})
|
Contribute sh64-elf.
2002-02-09 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.c (TARGET_CANNOT_MODIFY_JUMPS_P): Define to...
(sh_cannot_modify_jumps_p): New function.
2002-02-05 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.c (TARGET_MS_BITFIELD_LAYOUT_P): Define to...
(sh_ms_bitfield_layout_p): New function.
2002-02-04 Alexandre Oliva <aoliva@redhat.com>
Zack Weinberg <zack@codesourcery.com>
* config/sh/sh.h (TRAMPOLINE_ADJUST_ADDRESS): Use
expand_simple_binop instead of expand_binop.
2002-02-03 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.h (OVERRIDE_OPTIONS) [! TARGET_SH5]: Disable
use of .quad and .uaquad.
* config/sh/sh.c (TARGET_ASM_UNALIGNED_DI_OP,
TARGET_ASM_ALIGNED_DI_OP): Add comment pointing to the above.
2002-01-24 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.md (movdi_const, movdi_const_32bit,
movdi_const_16bit): Make sure all CONSTs have modes.
(sym2PIC): Ditto, but by adjusting all callers.
* config/sh/sh.c (calc_live_regs) [TARGET_SHCOMPACT]: Set pr_live
if the prologue calls the SHmedia argument decoder or register
saver.
2002-01-24 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.c (TARGET_ASM_UNALIGNED_DI_OP): Define.
(TARGET_ASM_ALIGNED_DI_OP): Likewise.
(sh_expand_epilogue): Don't emit USE of return target register.
(prepare_move_operands): Legitimize DImode PIC addresses.
(sh_media_register_for_return): Skip tr0, used to initialize the
PIC register.
(sh_expand_prologue): Remove explicit USE of return register.
(nonpic_symbol_mentioned_p): PC is non-PIC. Don't recurse in
CONST_DOUBLEs. UNSPEC_GOTPLT is PIC.
* config/sh/sh.h (ASM_OUTPUT_DOUBLE_INT): Removed, obsolete.
(OVERRIDE_OPTIONS): Don't disable PIC on SH5.
(EXTRA_CONSTRAINT_S): Use MOVI_SHORI_BASE_OPERAND_P instead of
EXTRA_CONSTRAINT_T.
(GOT_ENTRY_P, GOTPLT_ENTRY_P, GOTOFF_P, PIC_ADDR_P): New.
(MOVI_SHORI_BASE_OPERAND_P): New.
(NON_PIC_REFERENCE_P, PIC_REFERENCE_P): New.
(EXTRA_CONSTRAINT_T): Define in terms of them.
(OUTPUT_ADDR_CONST_EXTRA): Handle UNSPEC_GOTPLT.
* config/sh/sh.md (movsi_media, movsi_media_nofpu,
movdi_media, movdi_media_nofpu): Add SIBCALL_REGS class to
alternatives supporting TARGET_REGS.
(UNSPEC_GOTPLT): New constant.
(movdi split): Move incrementing of LABEL_NUSES...
(movdi_const, movdi_const_32bit): Here. Use
MOVI_SHORI_BASE_OPERAND_P instead of EXTRA_CONSTRAINT_T.
(movdi_const_16bit): New.
(call, call_value) [flag_pic]: Use GOTPLT.
(call_pop, call_value_pop): New expands.
(call_pop_compact, call_pop_rettramp): New insns.
(call_value_pop_compact, call_value_pop_rettramp): New insns.
(sibcall) [flag_pic]: Use GOT.
(builtint_setjmp_receiver): Remove bogus, unused expand.
(GOTaddr2picreg): Implement for SHcompact and SHmedia.
(*pt, *ptb, ptrel): New insns.
(sym2GOT): Handle DImode GOT.
(sym2GOTPLT, symGOTPLT2reg): New expands.
(sym2PIC): New expand.
(shcompact_return_tramp): Use GOTPLT to return trampoline.
(shcompact_return_tramp_i): Use return register explicitly.
* config/sh/sh.h (OVERRIDE_OPTIONS) [TARGET_SHMEDIA]: Don't
disable flag_reorder_blocks.
2002-01-19 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.md (sibcall_compact): Reorder return, uses and
clobbers, for clarity.
(sibcall_epilogue) [TARGET_SHCOMPACT]: Mark saving and
restoring of r0 in macl as MAYBE_DEAD.
2002-01-18 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.h (LONG_DOUBLE_TYPE_SIZE): Define.
* config/sh/sh.md (movv4sf_i, movv16sf_i): Fix uses of
alter_subreg all over.
(jump) [TARGET_SHMEDIA]: FAIL to create new jumps after
reload, instead of emitting instructions that would require
reloading.
(casesi_load_media): Add missing modes.
2001-11-09 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.c (sh_expand_prologue): Mark the PIC register
as used if the argument decoder is called.
2001-08-28 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.md (udivsi3, divsi3): Load libcall symbol name in
Pmode, then extend it to DImode if necessary.
2001-08-28 Stephen Clarke <Stephen.Clarke@st.com>
* config/sh/sh.h (LEGITIMATE_CONSTANT_P): Don't accept DFmode
constants in FPU-enabled SHmedia, let them be loaded from memory.
2001-08-28 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.md (cmpeqdi_media, cmpgtdi_media, cmpgtudi_media):
Adjust whitespace in assembly output templates.
2001-08-28 Stephen Clarke <Stephen.Clarke@st.com>
* config/sh/sh.md (movdicc_false, movdicc_true, movdicc): Adjust
mode of if_then_else.
2001-08-04 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh64.h (CPP_DEFAULT_CPU_SPEC): Override definition in
sh.h.
2001-07-26 Andrew Haley <aph@cambridge.redhat.com>
Joern Rennecke <amylaar@redhat.com>
* config/sh/sh64.h (CPP_DEFAULT_CPU_SPEC): New.
(SUBTARGET_CPP_PTR_SPEC): New.
(SUBTARGET_CPP_SPEC): Remove.
2001-07-06 Chandrakala Chavva <cchavva@redhat.com>
* config/sh/sh.md (movsf_media_nofpu+1, movdf_media_nofpu+1):
Fix typo in previous checkin.
2001-07-11 Chandrakala Chavva <cchavva@redhat.com>
* config/sh/sh.h (MODES_TIEABLE_P): Fix redact indentations.
2001-07-10 Chandrakala Chavva <cchavva@cygnus.com>
Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.h (MODES_TIEABLE_P): Don't tie modes wider than
what single FP register can hold for SHmedia target.
2001-07-06 Chandrakala Chavva <cchavva@redhat.com>
Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.md (movsf_media_nofpu+1, movdf_media_nofpu+1):
Do not split into SUBREG.
2001-06-14 Alexandre Oliva <aoliva@redhat.com>
* config/sh/ushmedia.h, config/sh/sshmedia.h: Updated signatures
and added new functions as specified in SH5 ABI r9.
2001-06-04 Alexandre Oliva <aoliva@redhat.com>
* config/sh/lib1funcs.asm (GCC_nested_trampoline): Align to an
8-byte boundary.
2001-06-03 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.c (dump_table): Add const0_rtx in calls of
gen_consttable_4 and gen_consttable_8. Emit multiple labels
and consttable_window_ends.
2001-06-03 Graham Stott <grahams@redhat,com>
* config/sh/sh.md (movdi split): Remove unused variable last_insn.
2001-05-16 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.c (print_operand): Handle floating-point pair,
vector and matrix registers.
* config/sh/sh.h (REGISTER_MOVE_COST): Take floating-pointer
vector modes into account.
* config/sh/sh.md (movv2sf): Split move between registers into
movdf.
(movv4sf, movv16sf): Introduce insns that get split only after
reload.
* config/sh/shmedia.h: Fix Copyright dates.
* config/sh/ushmedia.h: Likewise. Move loop counter
declarations into conditionals that uses them.
(sh_media_FVADD_S, sh_media_FVSUB_S): Fix off-by-one error in
loop boundary.
* config/sh/sshmedia.h: Fix Copyright dates.
(sh_media_PUTCFG): Fix constraints.
2001-05-12 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.h (TARGET_PTRMEMFUNC_VBIT_LOCATION): Define to
ptrmemfunc_vbit_in_delta for SH5.
2001-05-08 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.h (TARGET_SWITCHES): Document -m5-*.
* invoke.texi: Likewise.
2001-04-14 Alexandre Oliva <aoliva@redhat.com>
* config/sh/lib1funcs.asm (GCC_push_shmedia_regs,
GCC_push_shmedia_regs_nofpu, GCC_pop_shmedia_regs,
GCC_pop_shmedia_regs_nofpu): New global symbols.
* config/sh/t-sh64 (LIB1ASMFUNCS): Add them.
* config/sh/sh.h (SHMEDIA_REGS_STACK_ADJUST): New macro.
* config/sh/sh.c (calc_live_regs): Account for PR's saving in
compact function with nonlocal labels.
(sh_expand_prologue) [SHcompact]: Push SHmedia regs if needed.
(sh_expand_epilogue) [SHcompact]: Pop them when appropriate.
(initial_elimination_offset): Account for their stack space.
* config/sh/sh.md (shmedia_save_restore_regs_compact): New insn.
* config/sh/sh.md (movsi_media, movsi_media_nofpu, movqi_media,
movhi_media, movdi_media, movdi_media_nofpu, movdf_media,
movdf_media_nofpu, movsf_media, movsf_media_nofpu): Require at
least one of the operands to be a register.
(movv2sf): Likewise. Renamed to movv2sf_i.
(movdi, movdf, movv2sf, movv4sf, movv16sf, movsf):
prepare_move_operands() before emitting SHmedia insns.
2001-04-03 Alexandre Oliva <aoliva@redhat.com>
* config/sh/crti.asm (init, fini) [__SH5__ && ! __SHMEDIA__]:
Don't save nor initialize r12. Don't mis-align the stack.
Pad the code with a nop.
* config/sh/crti.asm: Don't restore r12. Don't mis-align the
stack.
2001-03-13 Alexandre Oliva <aoliva@redhat.com>
* gcc/longlong.h (__umulsidi3, count_leading_zeros)
[__SHMEDIA__]: Implement.
2001-03-11 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.md: Set latency of `pt' closer to reality.
(movsi_media, movsi_media_nofpu, movdi_media, movdi_media_nofpu,
movdf_media, movdf_media_nofpu, movsf_media, movsf_media_nofpu):
Set move, load and store type attributes.
* config/sh/sh.c (sh_loop_align) [TARGET_SH5]: Set to 3.
* config/sh/sh.h (OVERRIDE_OPTIONS) [TARGET_SH5]: Disable
profiling.
* config/sh/sh.h (PROMOTE_MODE): Sign-extend SImode to DImode.
* config/sh/sh-protos.h (sh_media_register_for_return): Declare.
* config/sh/sh.c (sh_media_register_for_return): New function.
(sh_expand_prologue) [TARGET_SHMEDIA]: Copy r18 to an available
branch-target register.
(sh_expand_epilogue) [TARGET_SHMEDIA]: Explicitly USE it.
* config/sh/sh.md (return_media_i): Use any call-clobbered
branch-target register.
(return_media): If r18 wasn't copied in the prologue, copy it
here.
* config/sh/sh.h (CONDITIONAL_REGISTER_USAGE) [TARGET_SHMEDIA]:
Clear class FP0_REGS.
* config/sh/sh64.h (LINK_SPEC): Removed incorrect default copied
from elf.h.
2001-03-08 DJ Delorie <dj@redhat.com>
* config/sh/sh.h (OVERRIDE_OPTIONS): Disable relaxing for SHMEDIA.
2001-02-09 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.md (sibcall_compact): Set fp_mode to single.
2001-02-07 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.h (INT_ASM_OP) [SHMEDIA64]: Use `.quad'.
2001-02-03 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.h (INIT_CUMULATIVE_ARGS): Compute size of BLKmode
return value correctly for call_cookie.
2001-02-01 Alexandre Oliva <aoliva@redhat.com>
* config/sh/crt1.asm (start): Modified so as to call
___setup_argv_and_call_main.
2001-01-26 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.h (FUNCTION_ARG_ADVANCE): Don't count stack_regs in
SHmedia mode.
2001-01-20 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.h (STRIP_DATALABEL_ENCODING): New macro.
(STRIP_NAME_ENCODING): Use it.
(ASM_OUTPUT_LABELREF): Likewise. Don't call assemble_name().
2001-01-19 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.md (sgeu) [! SHMEDIA]: Fix invocation of
prepare_scc_operands().
* config/sh/sh.h (SH_DATALABEL_ENCODING): Change to "#"...
(DATALABEL_SYMNAME_P): ... so that we don't need memcmp here.
2001-01-17 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.h (STRIP_NAME_ENCODING): Strip leading `*'.
2001-01-13 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.md (shcompact_incoming_args): Use R0_REG.
* config/sh/sh.md (R7_REG, R8_REG, R9_REG): Define as constants,
used in shcompact_incoming_args.
* config/sh/sh.c (sh_expand_epilogue): Fix thinko in previous
change.
* config/sh/crt1.asm (start) [SH5]: Switch to single-precision
mode.
* config/sh/lib1funcs.asm (sdivsi3_i4, udivsi3_i4, set_fpscr):
Adjust accordingly.
* config/sh/sh.c (sh_expand_prologue, sh_expand_epilogue):
Simplify. Adjust. Add sanity check.
* config/sh/sh.h (TARGET_SWITCHES) [5-compact]: Set
FPU_SINGLE_BIT.
* config/sh/sh.md (udivsi3_i4_single, divsi3_i4_single): Match
TARGET_SHCOMPACT.
(udivsi3, divsi3): Use them.
(force_mode_for_call): New insn.
(call, call_value, sibcall_value): Emit it before SHcompact
calls.
2001-01-11 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.md (call, call_value, sibcall): Make sure the
call cookie is non-NULL before taking its value.
2001-01-10 Alexandre Oliva <aoliva@redhat.com>
* config.gcc (sh64): Set target_requires_64bit_host_wide_int.
2001-01-09 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.md (shcompact_incoming_args): Set argument memory
block.
* config/sh/sh.h (STATIC_CHAIN_REGNUM) [SH5]: Use r1.
* config/sh/sh.c (sh_expand_prologue) [SH5]: Use r0 as
temporary for stack adjusts. Use MACL and MACH to pass
arguments to shcompact_incoming_args.
* config/sh/sh.md (shcompact_incoming_args): Adjust. Don't
clobber r1.
* config/sh/lib1funcs.asm (shcompact_incoming_args): Likewise.
(nested_trampoline): Load static chain address into r1.
* config/sh/sh.md (movdi_media splits): Fix sign-extension.
2001-01-07 Alexandre Oliva <aoliva@redhat.com
* config/sh/sh.c (fpul_operand) [SHMEDIA]: Just call
fp_arith_reg_operand().
2001-01-06 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.md (casesi): Sign-extend the first two operands,
and use signed compares for them.
* config/sh/sh.c (dump_table): Don't emit 8-byte constants after
4-byte ones. Instead, inter-leave them, maintaining the 8-byte
ones properly aligned.
(find_barrier): Account for extra alignment needed for 8-byte wide
constants.
(machine_dependent_reorg): Require a label for the second 4-byte
constant after an 8-byte one.
* config/sh/lib1funcs.asm (sdivsi3): Fix typo in yesterday's
change.
2001-01-05 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.c (machine_dependent_reorg) [SHCOMPACT]: Reset
last_float when switching float modes.
* config/sh/sh.md (movdf) [SH5]: Don't use stack-pointer
auto-increment for general-purpose registers.
* config/sh/lib1funcs.asm (sdivsi3) [SHMEDIA]: Sign-extend the
result.
* config/sh/sh.c (sh_expand_prologue) [SH5]: Use r1 as temporary
for stack adjust.
* config/sh/sh.c (sh_builtin_saveregs): Support using all
registers for varargs.
2001-01-01 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.h (FUNCTION_ARG_ADVANCE): Simplify.
* config/sh/sh.h (CALL_COOKIE_STACKSEQ,
CALL_COOKIE_STACKSEQ_SHIFT, CALL_COOKIE_STACKSEQ_GET): New macros.
(CALL_COOKIE_INT_REG_SHIFT): Adjust.
(FUNCTION_ARG_ADVANCE): Use SHCOMPACT_FORCE_ON_STACK. Adjust
call_cookie accordingly.
(FUNCTION_ARG): Test SHCOMPACT_FORCE_ON_STACK.
(SHCOMPACT_BYREF): Likewise.
(SHCOMPACT_FORCE_ON_STACK): New macro.
* config/sh/sh.c (sh_expand_prologue): Use new call_cookie format.
(sh_builtin_saveregs): Likewise.
* config/sh/lib1funcs.asm (shcompact_call_trampoline,
shcompact_incoming_args): Use new shift values. Support
sequences of consecutive and non-consecutive pushes/pops.
* config/sh/sh.md (return): Don't explicitly use PR_REG.
2001-01-05 Hans-Peter Nilsson <hpn@cygnus.com>
* config/sh/sh.h (TEXT_SECTION): Define.
* config/sh/elf.h (ASM_FILE_START): Output TEXT_SECTION_ASM_OP.
2001-01-05 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.h (INIT_CUMULATIVE_LIBCALL_ARGS): New macro.
* config/sh/sh.h (BASE_RETURN_VALUE_REG): Use FP regs for
return values on FPU-enabled SHmedia.
(FUNCTION_VALUE_REGNO_P): Mark FIRST_FP_RET_REG as used on
FPU-enabled SHmedia.
(INIT_CUMULATIVE_ARGS): Set up return trampoline only if
value is returned in a non-FP reg and is not returned by
reference.
* config/sh/sh.md (shcompact_return_tramp_i): Change type to
jump_ind.
2000-01-04 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.h (SH_MIN_ALIGN_FOR_CALLEE_COPY): New.
(FUNCTION_ARG_CALLEE_COPIES): Require argument to be
quad-aligned to be passed by callee-copy reference.
2001-01-03 Alexandre Oliva <aoliva@redhat.com>
* config/sh/elf.h (MAX_WCHAR_TYPE_SIZE): Define.
* config/sh/sh64.h (MAX_WCHAR_TYPE_SIZE): Undefine.
2001-01-02 Alexandre Oliva <aoliva@redhat.com>
* config/sh/lib1funcs.asm (shcompact_call_trampoline): Fix error in
copying low-numbered FP regs to r7 and r8.
* config/sh/sh.h (FUNCTION_ARG_ADVANCE): Don't request copying of
FP regs to general-purpose regs only if the copy was passed on the
stack.
* config/sh/lib1funcs.asm (shcompact_call_trampoline): Fix typo in
copying FP reg to r9.
* config/sh/sh.h (FUNCTION_ARG_ADVANCE): Use trampoline to
copy FP regs to general-purpose regs only in outgoing calls.
* config/sh/sh.md (movdf_media, movsf_media): Revert incorrect
change from 2000-10-30. Adjust for 64-bit (or 32-bit)
HOST_WIDE_INT.
* config/sh/sh.h (struct sh_args): Document all fields.
(FUNCTION_OK_FOR_SIBCALL): Functions that receive arguments
passed partially on the stack should not consider making
sibcalls.
* config/sh/sh.h (FUNCTION_ARG_ADVANCE): Add byref regs to
stack_regs only for incoming calls. When passing FP args,
make sure there are FP regs available before modifying
call_cookie.
(SHCOMPACT_BYREF): Pass double args in general-purpose
registers by reference.
2000-12-30 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.h (FUNCTION_OK_FOR_SIBCALL) [SHCOMPACT]: Don't
attempt to generate sibcalls if the caller got any arguments
by reference.
* config/sh/lib1funcs.asm (set_fpscr) [SH5]: Default to double.
* config/sh/sh.c (dump_table) [SHCOMPACT]: Align DImode and DFmode
to 8-byte boundaries.
* config/sh/sh.md (shcompact_preserve_incoming_args): New insn.
* config/sh/sh.h (CALL_COOKIE_INT_REG_GET): New macro.
* config/sh/sh.c (sh_expand_prologue): Preserve args that will be
stored in the stack.
* config/sh/lib1funcs.asm (ct_main_table, ia_main_table): Arrange
for the offsets to have the ISA bit set.
(shcompact_call_trampoline): Document. Swap r0 and r1, to match
invocation. Use beq instead of bgt to mark end of sequence of
loads.
(shcompact_incoming_args): Fix store of r2. Use beq instead of
bgt to mark end of sequence of stores.
* config/sh/sh.c (arith_operand): Don't check whether
CONST_OK_FOR_J for now.
* config/sh/sh.md (movdf_media, movsf_media): Use HOST_WIDE_INT
instead of long for conversion.
2000-12-29 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.c (print_operand_address): Convert INTVAL to int
before passing it to fprintf.
2000-12-28 Alexandre Oliva <aoliva@redhat.com>
* config/sh/crt1.asm (start): Reset SR.FD, to enable the FP unit.
Call set_fpscr before reading/writing SR.
* config/sh/crt1.asm (start): Set SR.SZ and SR.PR, but not SR.FR.
Call set_fpscr.
* config/sh/lib1funcs.asm: Add `.align 2' directives before
SHmedia code.
(FMOVD_WORKS): Define on SH5 with FPU.
(set_fpscr): Define on SH5. Remove separate _fpscr_values
setting.
* config/sh/t-sh64 (LIB1ASMFUNCS): Add _set_fpscr instead of
_fpscr_values.
2000-12-28 Hans-Peter Nilsson <hpn@cygnus.com>
* config/sh/lib1funcs.asm (ct_main_table): Align contents to even
address.
(ia_main_table): Ditto.
2000-12-27 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.h (MAX_WCHAR_TYPE_SIZE): Don't define.
* config/sh/sh64.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Reinstate
the definitions from sh.h.
* config/sh/sh.h (PTRDIFF_TYPE): Define as conditional on
TARGET_SH5.
(SUBTARGET_CPP_SPEC): Arrange for __PTRDIFF_TYPE__ to be defined.
* config/sh/elf.h (PTRDIFF_TYPE): Likewise.
* config/sh/sh64.h (SUBTARGET_CPP_SPEC): Likewise.
2000-12-26 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.md (movdi_media split): Don't add REG_LABEL notes.
Increment LABEL_NUSES.
From-SVN: r49630
2002-02-09 04:08:08 +01:00
|
|
|
A C expression that should indicate the number of bytes a call sequence
|
|
|
|
pops off the stack. It is added to the value of @code{RETURN_POPS_ARGS}
|
|
|
|
when compiling a function call.
|
|
|
|
|
|
|
|
@var{cum} is the variable in which all arguments to the called function
|
|
|
|
have been accumulated.
|
|
|
|
|
|
|
|
On certain architectures, such as the SH5, a call trampoline is used
|
|
|
|
that pops certain registers off the stack, depending on the arguments
|
|
|
|
that have been passed to the function. Since this is a property of the
|
|
|
|
call site, not of the called function, @code{RETURN_POPS_ARGS} is not
|
|
|
|
appropriate.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
@node Register Arguments
|
|
|
|
@subsection Passing Arguments in Registers
|
|
|
|
@cindex arguments in registers
|
|
|
|
@cindex registers arguments
|
|
|
|
|
|
|
|
This section describes the macros which let you control how various
|
|
|
|
types of arguments are passed in registers or how they are arranged in
|
|
|
|
the stack.
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac FUNCTION_ARG (@var{cum}, @var{mode}, @var{type}, @var{named})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C expression that controls whether a function argument is passed
|
|
|
|
in a register, and which register.
|
|
|
|
|
|
|
|
The arguments are @var{cum}, which summarizes all the previous
|
|
|
|
arguments; @var{mode}, the machine mode of the argument; @var{type},
|
|
|
|
the data type of the argument as a tree node or 0 if that is not known
|
|
|
|
(which happens for C support library functions); and @var{named},
|
|
|
|
which is 1 for an ordinary argument and 0 for nameless arguments that
|
|
|
|
correspond to @samp{@dots{}} in the called function's prototype.
|
2001-01-02 17:03:50 +01:00
|
|
|
@var{type} can be an incomplete type if a syntax error has previously
|
|
|
|
occurred.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
The value of the expression is usually either a @code{reg} RTX for the
|
|
|
|
hard register in which to pass the argument, or zero to pass the
|
|
|
|
argument on the stack.
|
|
|
|
|
combine.c, [...]: consistently use "VAX", "VAXen", and "MicroVAX" in comments and documentation.
* combine.c, config.gcc, cse.c, defaults.h, real.c, reload.c,
simplify-rtx.c, config/alpha/alpha.h, config/avr/avr.h,
config/convex/convex.h, config/d30v/d30v.c,
config/d30v/d30v.h, config/dsp16xx/dsp16xx.h,
config/elxsi/elxsi.h, config/fr30/fr30.h, config/m88k/m88k.c,
config/mips/mips.h, config/mn10200/mn10200.h,
config/mn10300/mn10300.h, config/pdp11/pdp11.md,
config/v850/v850.h, config/vax/openbsd.h,
config/vax/openbsd1.h, config/vax/ultrix.h,
config/vax/vax-protos.h, config/vax/vax.c, config/vax/vax.h,
config/vax/vax.md, config/vax/vaxv.h, config/vax/xm-vms.h,
cp/decl2.c, doc/contrib.texi, doc/cpp.texi, doc/gcc.texi,
doc/install.texi, doc/invoke.texi, doc/md.texi, doc/rtl.texi,
doc/tm.texi: consistently use "VAX", "VAXen", and "MicroVAX"
in comments and documentation.
From-SVN: r44589
2001-08-03 03:19:20 +02:00
|
|
|
For machines like the VAX and 68000, where normally all arguments are
|
1996-09-25 01:21:45 +02:00
|
|
|
pushed, zero suffices as a definition.
|
|
|
|
|
c-tree.texi, [...]: Replace . at end of sentences preceded by a capital letter with @..
* doc/c-tree.texi, doc/contrib.texi, doc/cpp.texi,
doc/cppinternals.texi, doc/extend.texi, doc/gcc.texi,
doc/gcov.texi, doc/install-old.texi, doc/install.texi,
doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: Replace
. at end of sentences preceded by a capital letter with @..
From-SVN: r43611
2001-06-27 17:04:16 +02:00
|
|
|
The value of the expression can also be a @code{parallel} RTX@. This is
|
1996-09-25 01:21:45 +02:00
|
|
|
used when an argument is passed in multiple locations. The mode of the
|
2003-05-19 22:03:42 +02:00
|
|
|
@code{parallel} should be the mode of the entire argument. The
|
1996-09-25 01:21:45 +02:00
|
|
|
@code{parallel} holds any number of @code{expr_list} pairs; each one
|
1999-05-11 08:27:30 +02:00
|
|
|
describes where part of the argument is passed. In each
|
|
|
|
@code{expr_list} the first operand must be a @code{reg} RTX for the hard
|
|
|
|
register in which to pass this part of the argument, and the mode of the
|
|
|
|
register RTX indicates how large this part of the argument is. The
|
|
|
|
second operand of the @code{expr_list} is a @code{const_int} which gives
|
|
|
|
the offset in bytes into the entire argument of where this part starts.
|
2001-04-28 13:35:04 +02:00
|
|
|
As a special exception the first @code{expr_list} in the @code{parallel}
|
1999-05-22 09:18:02 +02:00
|
|
|
RTX may have a first operand of zero. This indicates that the entire
|
|
|
|
argument is also stored on the stack.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2001-07-02 01:21:11 +02:00
|
|
|
The last time this macro is called, it is called with @code{MODE ==
|
|
|
|
VOIDmode}, and its result is passed to the @code{call} or @code{call_value}
|
|
|
|
pattern as operands 2 and 3 respectively.
|
|
|
|
|
1996-09-25 01:21:45 +02:00
|
|
|
@cindex @file{stdarg.h} and register arguments
|
2001-01-12 19:51:27 +01:00
|
|
|
The usual way to make the ISO library @file{stdarg.h} work on a machine
|
1996-09-25 01:21:45 +02:00
|
|
|
where some arguments are usually passed in registers, is to cause
|
|
|
|
nameless arguments to be passed on the stack instead. This is done
|
|
|
|
by making @code{FUNCTION_ARG} return 0 whenever @var{named} is 0.
|
|
|
|
|
target-def.h (TARGET_MUST_PASS_IN_STACK): New.
* target-def.h (TARGET_MUST_PASS_IN_STACK): New.
* target.h (struct gcc_target): Add calls.must_pass_in_stack.
* expr.h (MUST_PASS_IN_STACK): Remove.
* system.h (MUST_PASS_IN_STACK): Poison.
* tree.h (must_pass_in_stack_var_size): Declare.
(must_pass_in_stack_var_size_or_pad): Declare.
* calls.c (must_pass_in_stack_var_size): New.
(must_pass_in_stack_var_size_or_pad): Rename from
default_must_pass_in_stack.
* config/alpha/alpha.c (unicosmk_must_pass_in_stack): New.
(TARGET_MUST_PASS_IN_STACK): New.
* config/alpha/unicosmk.h (MUST_PASS_IN_STACK): Remove.
* config/fr30/fr30.c (fr30_must_pass_in_stack): New.
(TARGET_MUST_PASS_IN_STACK): New.
* config/fr30/fr30.h (MUST_PASS_IN_STACK): Remove.
* config/frv/frv.c (frv_must_pass_in_stack): New.
(TARGET_MUST_PASS_IN_STACK): New.
* config/frv/frv.h (MUST_PASS_IN_STACK): Remove.
* config/i386/i386-protos.h (ix86_must_pass_in_stack): Remove.
* config/i386/i386.c (TARGET_MUST_PASS_IN_STACK): New.
(ix86_must_pass_in_stack): Make static.
* config/i386/i386.h (MUST_PASS_IN_STACK): Remove.
* config/ia64/ia64.c (TARGET_MUST_PASS_IN_STACK): New.
* config/ia64/ia64.h (MUST_PASS_IN_STACK): Remove.
* config/m32r/m32r.c (TARGET_MUST_PASS_IN_STACK): New.
* config/m32r/m32r.h (MUST_PASS_IN_STACK): Remove.
* config/mcore/mcore-protos.h (mcore_must_pass_on_stack): Remove.
* config/mcore/mcore.c (TARGET_MUST_PASS_IN_STACK): New.
(mcore_must_pass_on_stack): Remove.
* config/mcore/mcore.h (MUST_PASS_IN_STACK): Remove.
* config/mips/mips.c (TARGET_MUST_PASS_IN_STACK): New.
* config/mips/mips.h (MUST_PASS_IN_STACK): Remove.
* config/pa/pa.c (TARGET_MUST_PASS_IN_STACK): New.
* config/pa/pa.h (MUST_PASS_IN_STACK): Remove.
* config/rs6000/aix.h (MUST_PASS_IN_STACK): Remove.
* config/rs6000/linux64.h (MUST_PASS_IN_STACK): Remove.
* config/rs6000/rs6000.c (rs6000_must_pass_in_stack): New.
(TARGET_MUST_PASS_IN_STACK): New.
* config/sh/sh.c (TARGET_MUST_PASS_IN_STACK): New.
* config/sh/sh.h (MUST_PASS_IN_STACK): Remove.
* config/sparc/sparc.c (TARGET_MUST_PASS_IN_STACK): New.
* config/sparc/sparc.h (MUST_PASS_IN_STACK): Remove.
* config/xtensa/xtensa.c (TARGET_MUST_PASS_IN_STACK): New.
* config/xtensa/xtensa.h (MUST_PASS_IN_STACK): Remove.
* doc/tm.texi (TARGET_MUST_PASS_IN_STACK): Update from
MUST_PASS_IN_STACK.
* calls.c, function.c, config/alpha/alpha.c, config/alpha/alpha.h,
config/alpha/unicosmk.h, config/alpha/vms.h, config/c4x/c4x.c,
config/cris/cris.h, config/fr30/fr30.c, config/fr30/fr30.h,
config/frv/frv.c, config/i386/i386.c, config/iq2000/iq2000.c,
config/mcore/mcore.c, config/mcore/mcore.h, config/mips/mips.c,
config/mmix/mmix.c, config/mmix/mmix.h, config/rs6000/rs6000.c,
config/sh/sh.c, config/sh/sh.h, config/stormy16/stormy16.c,
config/xtensa/xtensa.c: Use target hook.
From-SVN: r84606
2004-07-13 09:45:09 +02:00
|
|
|
@cindex @code{TARGET_MUST_PASS_IN_STACK}, and @code{FUNCTION_ARG}
|
1996-09-25 01:21:45 +02:00
|
|
|
@cindex @code{REG_PARM_STACK_SPACE}, and @code{FUNCTION_ARG}
|
target-def.h (TARGET_MUST_PASS_IN_STACK): New.
* target-def.h (TARGET_MUST_PASS_IN_STACK): New.
* target.h (struct gcc_target): Add calls.must_pass_in_stack.
* expr.h (MUST_PASS_IN_STACK): Remove.
* system.h (MUST_PASS_IN_STACK): Poison.
* tree.h (must_pass_in_stack_var_size): Declare.
(must_pass_in_stack_var_size_or_pad): Declare.
* calls.c (must_pass_in_stack_var_size): New.
(must_pass_in_stack_var_size_or_pad): Rename from
default_must_pass_in_stack.
* config/alpha/alpha.c (unicosmk_must_pass_in_stack): New.
(TARGET_MUST_PASS_IN_STACK): New.
* config/alpha/unicosmk.h (MUST_PASS_IN_STACK): Remove.
* config/fr30/fr30.c (fr30_must_pass_in_stack): New.
(TARGET_MUST_PASS_IN_STACK): New.
* config/fr30/fr30.h (MUST_PASS_IN_STACK): Remove.
* config/frv/frv.c (frv_must_pass_in_stack): New.
(TARGET_MUST_PASS_IN_STACK): New.
* config/frv/frv.h (MUST_PASS_IN_STACK): Remove.
* config/i386/i386-protos.h (ix86_must_pass_in_stack): Remove.
* config/i386/i386.c (TARGET_MUST_PASS_IN_STACK): New.
(ix86_must_pass_in_stack): Make static.
* config/i386/i386.h (MUST_PASS_IN_STACK): Remove.
* config/ia64/ia64.c (TARGET_MUST_PASS_IN_STACK): New.
* config/ia64/ia64.h (MUST_PASS_IN_STACK): Remove.
* config/m32r/m32r.c (TARGET_MUST_PASS_IN_STACK): New.
* config/m32r/m32r.h (MUST_PASS_IN_STACK): Remove.
* config/mcore/mcore-protos.h (mcore_must_pass_on_stack): Remove.
* config/mcore/mcore.c (TARGET_MUST_PASS_IN_STACK): New.
(mcore_must_pass_on_stack): Remove.
* config/mcore/mcore.h (MUST_PASS_IN_STACK): Remove.
* config/mips/mips.c (TARGET_MUST_PASS_IN_STACK): New.
* config/mips/mips.h (MUST_PASS_IN_STACK): Remove.
* config/pa/pa.c (TARGET_MUST_PASS_IN_STACK): New.
* config/pa/pa.h (MUST_PASS_IN_STACK): Remove.
* config/rs6000/aix.h (MUST_PASS_IN_STACK): Remove.
* config/rs6000/linux64.h (MUST_PASS_IN_STACK): Remove.
* config/rs6000/rs6000.c (rs6000_must_pass_in_stack): New.
(TARGET_MUST_PASS_IN_STACK): New.
* config/sh/sh.c (TARGET_MUST_PASS_IN_STACK): New.
* config/sh/sh.h (MUST_PASS_IN_STACK): Remove.
* config/sparc/sparc.c (TARGET_MUST_PASS_IN_STACK): New.
* config/sparc/sparc.h (MUST_PASS_IN_STACK): Remove.
* config/xtensa/xtensa.c (TARGET_MUST_PASS_IN_STACK): New.
* config/xtensa/xtensa.h (MUST_PASS_IN_STACK): Remove.
* doc/tm.texi (TARGET_MUST_PASS_IN_STACK): Update from
MUST_PASS_IN_STACK.
* calls.c, function.c, config/alpha/alpha.c, config/alpha/alpha.h,
config/alpha/unicosmk.h, config/alpha/vms.h, config/c4x/c4x.c,
config/cris/cris.h, config/fr30/fr30.c, config/fr30/fr30.h,
config/frv/frv.c, config/i386/i386.c, config/iq2000/iq2000.c,
config/mcore/mcore.c, config/mcore/mcore.h, config/mips/mips.c,
config/mmix/mmix.c, config/mmix/mmix.h, config/rs6000/rs6000.c,
config/sh/sh.c, config/sh/sh.h, config/stormy16/stormy16.c,
config/xtensa/xtensa.c: Use target hook.
From-SVN: r84606
2004-07-13 09:45:09 +02:00
|
|
|
You may use the hook @code{targetm.calls.must_pass_in_stack}
|
1996-09-25 01:21:45 +02:00
|
|
|
in the definition of this macro to determine if this argument is of a
|
|
|
|
type that must be passed in the stack. If @code{REG_PARM_STACK_SPACE}
|
2001-10-10 01:11:55 +02:00
|
|
|
is not defined and @code{FUNCTION_ARG} returns nonzero for such an
|
1996-09-25 01:21:45 +02:00
|
|
|
argument, the compiler will abort. If @code{REG_PARM_STACK_SPACE} is
|
|
|
|
defined, the argument will be computed in the stack and then loaded into
|
|
|
|
a register.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
target-def.h (TARGET_MUST_PASS_IN_STACK): New.
* target-def.h (TARGET_MUST_PASS_IN_STACK): New.
* target.h (struct gcc_target): Add calls.must_pass_in_stack.
* expr.h (MUST_PASS_IN_STACK): Remove.
* system.h (MUST_PASS_IN_STACK): Poison.
* tree.h (must_pass_in_stack_var_size): Declare.
(must_pass_in_stack_var_size_or_pad): Declare.
* calls.c (must_pass_in_stack_var_size): New.
(must_pass_in_stack_var_size_or_pad): Rename from
default_must_pass_in_stack.
* config/alpha/alpha.c (unicosmk_must_pass_in_stack): New.
(TARGET_MUST_PASS_IN_STACK): New.
* config/alpha/unicosmk.h (MUST_PASS_IN_STACK): Remove.
* config/fr30/fr30.c (fr30_must_pass_in_stack): New.
(TARGET_MUST_PASS_IN_STACK): New.
* config/fr30/fr30.h (MUST_PASS_IN_STACK): Remove.
* config/frv/frv.c (frv_must_pass_in_stack): New.
(TARGET_MUST_PASS_IN_STACK): New.
* config/frv/frv.h (MUST_PASS_IN_STACK): Remove.
* config/i386/i386-protos.h (ix86_must_pass_in_stack): Remove.
* config/i386/i386.c (TARGET_MUST_PASS_IN_STACK): New.
(ix86_must_pass_in_stack): Make static.
* config/i386/i386.h (MUST_PASS_IN_STACK): Remove.
* config/ia64/ia64.c (TARGET_MUST_PASS_IN_STACK): New.
* config/ia64/ia64.h (MUST_PASS_IN_STACK): Remove.
* config/m32r/m32r.c (TARGET_MUST_PASS_IN_STACK): New.
* config/m32r/m32r.h (MUST_PASS_IN_STACK): Remove.
* config/mcore/mcore-protos.h (mcore_must_pass_on_stack): Remove.
* config/mcore/mcore.c (TARGET_MUST_PASS_IN_STACK): New.
(mcore_must_pass_on_stack): Remove.
* config/mcore/mcore.h (MUST_PASS_IN_STACK): Remove.
* config/mips/mips.c (TARGET_MUST_PASS_IN_STACK): New.
* config/mips/mips.h (MUST_PASS_IN_STACK): Remove.
* config/pa/pa.c (TARGET_MUST_PASS_IN_STACK): New.
* config/pa/pa.h (MUST_PASS_IN_STACK): Remove.
* config/rs6000/aix.h (MUST_PASS_IN_STACK): Remove.
* config/rs6000/linux64.h (MUST_PASS_IN_STACK): Remove.
* config/rs6000/rs6000.c (rs6000_must_pass_in_stack): New.
(TARGET_MUST_PASS_IN_STACK): New.
* config/sh/sh.c (TARGET_MUST_PASS_IN_STACK): New.
* config/sh/sh.h (MUST_PASS_IN_STACK): Remove.
* config/sparc/sparc.c (TARGET_MUST_PASS_IN_STACK): New.
* config/sparc/sparc.h (MUST_PASS_IN_STACK): Remove.
* config/xtensa/xtensa.c (TARGET_MUST_PASS_IN_STACK): New.
* config/xtensa/xtensa.h (MUST_PASS_IN_STACK): Remove.
* doc/tm.texi (TARGET_MUST_PASS_IN_STACK): Update from
MUST_PASS_IN_STACK.
* calls.c, function.c, config/alpha/alpha.c, config/alpha/alpha.h,
config/alpha/unicosmk.h, config/alpha/vms.h, config/c4x/c4x.c,
config/cris/cris.h, config/fr30/fr30.c, config/fr30/fr30.h,
config/frv/frv.c, config/i386/i386.c, config/iq2000/iq2000.c,
config/mcore/mcore.c, config/mcore/mcore.h, config/mips/mips.c,
config/mmix/mmix.c, config/mmix/mmix.h, config/rs6000/rs6000.c,
config/sh/sh.c, config/sh/sh.h, config/stormy16/stormy16.c,
config/xtensa/xtensa.c: Use target hook.
From-SVN: r84606
2004-07-13 09:45:09 +02:00
|
|
|
@deftypefn {Target Hook} bool TARGET_MUST_PASS_IN_STACK (enum machine_mode @var{mode}, tree @var{type})
|
|
|
|
This target hook should return @code{true} if we should not pass @var{type}
|
|
|
|
solely in registers. The file @file{expr.h} defines a
|
1997-12-24 23:31:54 +01:00
|
|
|
definition that is usually appropriate, refer to @file{expr.h} for additional
|
|
|
|
documentation.
|
target-def.h (TARGET_MUST_PASS_IN_STACK): New.
* target-def.h (TARGET_MUST_PASS_IN_STACK): New.
* target.h (struct gcc_target): Add calls.must_pass_in_stack.
* expr.h (MUST_PASS_IN_STACK): Remove.
* system.h (MUST_PASS_IN_STACK): Poison.
* tree.h (must_pass_in_stack_var_size): Declare.
(must_pass_in_stack_var_size_or_pad): Declare.
* calls.c (must_pass_in_stack_var_size): New.
(must_pass_in_stack_var_size_or_pad): Rename from
default_must_pass_in_stack.
* config/alpha/alpha.c (unicosmk_must_pass_in_stack): New.
(TARGET_MUST_PASS_IN_STACK): New.
* config/alpha/unicosmk.h (MUST_PASS_IN_STACK): Remove.
* config/fr30/fr30.c (fr30_must_pass_in_stack): New.
(TARGET_MUST_PASS_IN_STACK): New.
* config/fr30/fr30.h (MUST_PASS_IN_STACK): Remove.
* config/frv/frv.c (frv_must_pass_in_stack): New.
(TARGET_MUST_PASS_IN_STACK): New.
* config/frv/frv.h (MUST_PASS_IN_STACK): Remove.
* config/i386/i386-protos.h (ix86_must_pass_in_stack): Remove.
* config/i386/i386.c (TARGET_MUST_PASS_IN_STACK): New.
(ix86_must_pass_in_stack): Make static.
* config/i386/i386.h (MUST_PASS_IN_STACK): Remove.
* config/ia64/ia64.c (TARGET_MUST_PASS_IN_STACK): New.
* config/ia64/ia64.h (MUST_PASS_IN_STACK): Remove.
* config/m32r/m32r.c (TARGET_MUST_PASS_IN_STACK): New.
* config/m32r/m32r.h (MUST_PASS_IN_STACK): Remove.
* config/mcore/mcore-protos.h (mcore_must_pass_on_stack): Remove.
* config/mcore/mcore.c (TARGET_MUST_PASS_IN_STACK): New.
(mcore_must_pass_on_stack): Remove.
* config/mcore/mcore.h (MUST_PASS_IN_STACK): Remove.
* config/mips/mips.c (TARGET_MUST_PASS_IN_STACK): New.
* config/mips/mips.h (MUST_PASS_IN_STACK): Remove.
* config/pa/pa.c (TARGET_MUST_PASS_IN_STACK): New.
* config/pa/pa.h (MUST_PASS_IN_STACK): Remove.
* config/rs6000/aix.h (MUST_PASS_IN_STACK): Remove.
* config/rs6000/linux64.h (MUST_PASS_IN_STACK): Remove.
* config/rs6000/rs6000.c (rs6000_must_pass_in_stack): New.
(TARGET_MUST_PASS_IN_STACK): New.
* config/sh/sh.c (TARGET_MUST_PASS_IN_STACK): New.
* config/sh/sh.h (MUST_PASS_IN_STACK): Remove.
* config/sparc/sparc.c (TARGET_MUST_PASS_IN_STACK): New.
* config/sparc/sparc.h (MUST_PASS_IN_STACK): Remove.
* config/xtensa/xtensa.c (TARGET_MUST_PASS_IN_STACK): New.
* config/xtensa/xtensa.h (MUST_PASS_IN_STACK): Remove.
* doc/tm.texi (TARGET_MUST_PASS_IN_STACK): Update from
MUST_PASS_IN_STACK.
* calls.c, function.c, config/alpha/alpha.c, config/alpha/alpha.h,
config/alpha/unicosmk.h, config/alpha/vms.h, config/c4x/c4x.c,
config/cris/cris.h, config/fr30/fr30.c, config/fr30/fr30.h,
config/frv/frv.c, config/i386/i386.c, config/iq2000/iq2000.c,
config/mcore/mcore.c, config/mcore/mcore.h, config/mips/mips.c,
config/mmix/mmix.c, config/mmix/mmix.h, config/rs6000/rs6000.c,
config/sh/sh.c, config/sh/sh.h, config/stormy16/stormy16.c,
config/xtensa/xtensa.c: Use target hook.
From-SVN: r84606
2004-07-13 09:45:09 +02:00
|
|
|
@end deftypefn
|
1997-12-24 23:31:54 +01:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac FUNCTION_INCOMING_ARG (@var{cum}, @var{mode}, @var{type}, @var{named})
|
1996-09-25 01:21:45 +02:00
|
|
|
Define this macro if the target machine has ``register windows'', so
|
|
|
|
that the register in which a function sees an arguments is not
|
|
|
|
necessarily the same as the one in which the caller passed the
|
|
|
|
argument.
|
|
|
|
|
|
|
|
For such machines, @code{FUNCTION_ARG} computes the register in which
|
|
|
|
the caller passes the value, and @code{FUNCTION_INCOMING_ARG} should
|
|
|
|
be defined in a similar fashion to tell the function being called
|
|
|
|
where the arguments will arrive.
|
|
|
|
|
|
|
|
If @code{FUNCTION_INCOMING_ARG} is not defined, @code{FUNCTION_ARG}
|
2001-06-25 01:04:49 +02:00
|
|
|
serves both purposes.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
target.h (targetm.calls.arg_partial_bytes): New.
* target.h (targetm.calls.arg_partial_bytes): New.
* target-def.h (TARGET_ARG_PARTIAL_BYTES): New.
* calls.c (store_unaligned_arguments_into_pseudos): Update for
partial in bytes.
(load_register_parameters): Likewise.
(store_one_arg): Likewise.
(initialize_argument_information): Use targetm.calls.arg_partial_bytes.
(emit_library_call_value_1): Likewise.
* expr.c (block_move_libcall_safe_for_call_parm): Likewise.
(emit_push_insn): Update for partial in bytes.
* expr.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
* function.c (assign_parm_find_entry_rtl): Use
targetm.calls.arg_partial_bytes. Update for result in bytes.
(locate_and_pad_parm): Update for partial in bytes.
* system.h (FUNCTION_ARG_PARTIAL_NREGS): Poison.
* targhooks.c (hook_int_CUMULATIVE_ARGS_mode_tree_bool_0): New.
* targhooks.h (hook_int_CUMULATIVE_ARGS_mode_tree_bool_0): Declare.
* doc/tm.texi (TARGET_ARG_PARTIAL_BYTES): Rename and update from
FUNCTION_ARG_PARTIAL_NREGS.
* config/arc/arc.h, config/c4x/c4x.h, config/i386/i386.h,
config/i860/i860.h, config/m68hc11/m68hc11.h, config/m68k/m68k.h,
config/pdp11/pdp11.h, config/s390/s390.h, config/stormy16/stormy16.h,
config/xtensa/xtensa.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
* config/alpha/alpha.c (alpha_arg_partial_bytes): New.
(TARGET_ARG_PARTIAL_BYTES): New.
* config/alpha/alpha.h, config/alpha/unicosmk.h,
config/alpha/vms.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
* config/arm/arm.h (FUNCTION_ARG_PARTIAL_NREGS): Move ...
* config/arm/arm.c (arm_arg_partial_bytes): ... here.
(TARGET_ARG_PARTIAL_BYTES): New.
* config/cris/cris.h (FUNCTION_ARG_PARTIAL_NREGS): Move ...
* config/cris/cris.c (cris_arg_partial_bytes): ... here.
(TARGET_ARG_PARTIAL_BYTES): New.
* config/fr30/fr30.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
* config/fr30/fr30.c (fr30_arg_partial_bytes): Rename from
fr30_function_arg_partial_nregs. Adjust to return bytes.
(TARGET_ARG_PARTIAL_BYTES): New.
* config/fr30/fr30-protos.h: Update.
* config/frv/frv.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
* config/frv/frv.c (frv_arg_partial_bytes): Rename from
frv_function_arg_partial_nregs. Adjust to return bytes.
(TARGET_ARG_PARTIAL_BYTES): New.
* config/frv/frv-protos.h: Update.
* config/ia64/ia64.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
* config/ia64/ia64.c (ia64_arg_partial_bytes): Rename from
ia64_function_arg_partial_nregs. Adjust to return bytes.
(TARGET_ARG_PARTIAL_BYTES): New.
* config/ia64/ia64-protos.h: Update.
* config/iq2000/iq2000.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
* config/iq2000/iq2000.c (iq2000_arg_partial_bytes): Rename from
function_arg_partial_nregs. Adjust to return bytes.
(TARGET_ARG_PARTIAL_BYTES): New.
* config/iq2000/iq2000-protos.h: Update.
* config/m32r/m32r.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
* config/m32r/m32r.c (m32r_arg_partial_bytes): Rename from
function_arg_partial_nregs. Adjust to return bytes.
(TARGET_ARG_PARTIAL_BYTES): New.
* config/m32r/m32r-protos.h: Update.
* config/mcore/mcore.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
* config/mcore/mcore.c (mcore_arg_partial_bytes): Rename from
mcore_function_arg_partial_nregs. Adjust to return bytes.
(TARGET_ARG_PARTIAL_BYTES): New.
* config/mcore/mcore-protos.h: Update.
* config/mips/mips.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
* config/mips/mips.c (mips_arg_partial_bytes): Rename from
function_arg_partial_nregs. Adjust to return bytes.
(TARGET_ARG_PARTIAL_BYTES): New.
* config/mips/mips-protos.h: Update.
* config/mn10300/mn10300.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
* config/mn10300/mn10300.c (mn10300_arg_partial_bytes): Rename from
function_arg_partial_nregs. Adjust to return bytes.
(TARGET_ARG_PARTIAL_BYTES): New.
* config/mn10300/mn10300-protos.h: Update.
* config/ns32k/ns32k.h (FUNCTION_ARG_PARTIAL_NREGS): Move ...
* config/ns32k/ns32k.c (ns32k_arg_partial_bytes): ... here.
(TARGET_ARG_PARTIAL_BYTES): New.
* config/pa/pa.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
* config/pa/pa.c (pa_arg_partial_bytes): Rename from
function_arg_partial_nregs. Handle 32-bit. Adjust to return bytes.
(TARGET_ARG_PARTIAL_BYTES): New.
* config/pa/pa-protos.h: Update.
* config/rs6000/rs6000.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
* config/rs6000/rs6000.c (rs6000_arg_partial_bytes): Rename from
function_arg_partial_nregs. Adjust to return bytes.
(TARGET_ARG_PARTIAL_BYTES): New.
* config/rs6000/rs6000-protos.h: Update.
* config/sh/sh.h (FUNCTION_ARG_PARTIAL_NREGS): Move ...
* config/sh/sh.c (sh_arg_partial_bytes): ... here.
(TARGET_ARG_PARTIAL_BYTES): New.
* config/sparc/sparc.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
* config/sparc/sparc.c (sparc_arg_partial_bytes): Rename from
function_arg_partial_nregs. Adjust to return bytes.
(TARGET_ARG_PARTIAL_BYTES): New.
* config/sparc/sparc-protos.h: Update.
* config/v850/v850.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
* config/v850/v850.c (v850_arg_partial_bytes): Rename from
function_arg_partial_nregs. Adjust to return bytes.
(TARGET_ARG_PARTIAL_BYTES): New.
* config/v850/v850-protos.h: Update.
From-SVN: r92726
2004-12-30 04:08:18 +01:00
|
|
|
@deftypefn {Target Hook} int TARGET_ARG_PARTIAL_BYTES (CUMULATIVE_ARGS *@var{cum}, enum machine_mode @var{mode}, tree @var{type}, bool @var{named})
|
|
|
|
This target hook returns the number of bytes at the beginning of an
|
|
|
|
argument that must be put in registers. The value must be zero for
|
1996-09-25 01:21:45 +02:00
|
|
|
arguments that are passed entirely in registers or that are entirely
|
|
|
|
pushed on the stack.
|
|
|
|
|
|
|
|
On some machines, certain arguments must be passed partially in
|
|
|
|
registers and partially in memory. On these machines, typically the
|
target.h (targetm.calls.arg_partial_bytes): New.
* target.h (targetm.calls.arg_partial_bytes): New.
* target-def.h (TARGET_ARG_PARTIAL_BYTES): New.
* calls.c (store_unaligned_arguments_into_pseudos): Update for
partial in bytes.
(load_register_parameters): Likewise.
(store_one_arg): Likewise.
(initialize_argument_information): Use targetm.calls.arg_partial_bytes.
(emit_library_call_value_1): Likewise.
* expr.c (block_move_libcall_safe_for_call_parm): Likewise.
(emit_push_insn): Update for partial in bytes.
* expr.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
* function.c (assign_parm_find_entry_rtl): Use
targetm.calls.arg_partial_bytes. Update for result in bytes.
(locate_and_pad_parm): Update for partial in bytes.
* system.h (FUNCTION_ARG_PARTIAL_NREGS): Poison.
* targhooks.c (hook_int_CUMULATIVE_ARGS_mode_tree_bool_0): New.
* targhooks.h (hook_int_CUMULATIVE_ARGS_mode_tree_bool_0): Declare.
* doc/tm.texi (TARGET_ARG_PARTIAL_BYTES): Rename and update from
FUNCTION_ARG_PARTIAL_NREGS.
* config/arc/arc.h, config/c4x/c4x.h, config/i386/i386.h,
config/i860/i860.h, config/m68hc11/m68hc11.h, config/m68k/m68k.h,
config/pdp11/pdp11.h, config/s390/s390.h, config/stormy16/stormy16.h,
config/xtensa/xtensa.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
* config/alpha/alpha.c (alpha_arg_partial_bytes): New.
(TARGET_ARG_PARTIAL_BYTES): New.
* config/alpha/alpha.h, config/alpha/unicosmk.h,
config/alpha/vms.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
* config/arm/arm.h (FUNCTION_ARG_PARTIAL_NREGS): Move ...
* config/arm/arm.c (arm_arg_partial_bytes): ... here.
(TARGET_ARG_PARTIAL_BYTES): New.
* config/cris/cris.h (FUNCTION_ARG_PARTIAL_NREGS): Move ...
* config/cris/cris.c (cris_arg_partial_bytes): ... here.
(TARGET_ARG_PARTIAL_BYTES): New.
* config/fr30/fr30.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
* config/fr30/fr30.c (fr30_arg_partial_bytes): Rename from
fr30_function_arg_partial_nregs. Adjust to return bytes.
(TARGET_ARG_PARTIAL_BYTES): New.
* config/fr30/fr30-protos.h: Update.
* config/frv/frv.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
* config/frv/frv.c (frv_arg_partial_bytes): Rename from
frv_function_arg_partial_nregs. Adjust to return bytes.
(TARGET_ARG_PARTIAL_BYTES): New.
* config/frv/frv-protos.h: Update.
* config/ia64/ia64.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
* config/ia64/ia64.c (ia64_arg_partial_bytes): Rename from
ia64_function_arg_partial_nregs. Adjust to return bytes.
(TARGET_ARG_PARTIAL_BYTES): New.
* config/ia64/ia64-protos.h: Update.
* config/iq2000/iq2000.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
* config/iq2000/iq2000.c (iq2000_arg_partial_bytes): Rename from
function_arg_partial_nregs. Adjust to return bytes.
(TARGET_ARG_PARTIAL_BYTES): New.
* config/iq2000/iq2000-protos.h: Update.
* config/m32r/m32r.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
* config/m32r/m32r.c (m32r_arg_partial_bytes): Rename from
function_arg_partial_nregs. Adjust to return bytes.
(TARGET_ARG_PARTIAL_BYTES): New.
* config/m32r/m32r-protos.h: Update.
* config/mcore/mcore.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
* config/mcore/mcore.c (mcore_arg_partial_bytes): Rename from
mcore_function_arg_partial_nregs. Adjust to return bytes.
(TARGET_ARG_PARTIAL_BYTES): New.
* config/mcore/mcore-protos.h: Update.
* config/mips/mips.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
* config/mips/mips.c (mips_arg_partial_bytes): Rename from
function_arg_partial_nregs. Adjust to return bytes.
(TARGET_ARG_PARTIAL_BYTES): New.
* config/mips/mips-protos.h: Update.
* config/mn10300/mn10300.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
* config/mn10300/mn10300.c (mn10300_arg_partial_bytes): Rename from
function_arg_partial_nregs. Adjust to return bytes.
(TARGET_ARG_PARTIAL_BYTES): New.
* config/mn10300/mn10300-protos.h: Update.
* config/ns32k/ns32k.h (FUNCTION_ARG_PARTIAL_NREGS): Move ...
* config/ns32k/ns32k.c (ns32k_arg_partial_bytes): ... here.
(TARGET_ARG_PARTIAL_BYTES): New.
* config/pa/pa.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
* config/pa/pa.c (pa_arg_partial_bytes): Rename from
function_arg_partial_nregs. Handle 32-bit. Adjust to return bytes.
(TARGET_ARG_PARTIAL_BYTES): New.
* config/pa/pa-protos.h: Update.
* config/rs6000/rs6000.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
* config/rs6000/rs6000.c (rs6000_arg_partial_bytes): Rename from
function_arg_partial_nregs. Adjust to return bytes.
(TARGET_ARG_PARTIAL_BYTES): New.
* config/rs6000/rs6000-protos.h: Update.
* config/sh/sh.h (FUNCTION_ARG_PARTIAL_NREGS): Move ...
* config/sh/sh.c (sh_arg_partial_bytes): ... here.
(TARGET_ARG_PARTIAL_BYTES): New.
* config/sparc/sparc.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
* config/sparc/sparc.c (sparc_arg_partial_bytes): Rename from
function_arg_partial_nregs. Adjust to return bytes.
(TARGET_ARG_PARTIAL_BYTES): New.
* config/sparc/sparc-protos.h: Update.
* config/v850/v850.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
* config/v850/v850.c (v850_arg_partial_bytes): Rename from
function_arg_partial_nregs. Adjust to return bytes.
(TARGET_ARG_PARTIAL_BYTES): New.
* config/v850/v850-protos.h: Update.
From-SVN: r92726
2004-12-30 04:08:18 +01:00
|
|
|
first few words of arguments are passed in registers, and the rest
|
1996-09-25 01:21:45 +02:00
|
|
|
on the stack. If a multi-word argument (a @code{double} or a
|
|
|
|
structure) crosses that boundary, its first few words must be passed
|
|
|
|
in registers and the rest must be pushed. This macro tells the
|
target.h (targetm.calls.arg_partial_bytes): New.
* target.h (targetm.calls.arg_partial_bytes): New.
* target-def.h (TARGET_ARG_PARTIAL_BYTES): New.
* calls.c (store_unaligned_arguments_into_pseudos): Update for
partial in bytes.
(load_register_parameters): Likewise.
(store_one_arg): Likewise.
(initialize_argument_information): Use targetm.calls.arg_partial_bytes.
(emit_library_call_value_1): Likewise.
* expr.c (block_move_libcall_safe_for_call_parm): Likewise.
(emit_push_insn): Update for partial in bytes.
* expr.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
* function.c (assign_parm_find_entry_rtl): Use
targetm.calls.arg_partial_bytes. Update for result in bytes.
(locate_and_pad_parm): Update for partial in bytes.
* system.h (FUNCTION_ARG_PARTIAL_NREGS): Poison.
* targhooks.c (hook_int_CUMULATIVE_ARGS_mode_tree_bool_0): New.
* targhooks.h (hook_int_CUMULATIVE_ARGS_mode_tree_bool_0): Declare.
* doc/tm.texi (TARGET_ARG_PARTIAL_BYTES): Rename and update from
FUNCTION_ARG_PARTIAL_NREGS.
* config/arc/arc.h, config/c4x/c4x.h, config/i386/i386.h,
config/i860/i860.h, config/m68hc11/m68hc11.h, config/m68k/m68k.h,
config/pdp11/pdp11.h, config/s390/s390.h, config/stormy16/stormy16.h,
config/xtensa/xtensa.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
* config/alpha/alpha.c (alpha_arg_partial_bytes): New.
(TARGET_ARG_PARTIAL_BYTES): New.
* config/alpha/alpha.h, config/alpha/unicosmk.h,
config/alpha/vms.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
* config/arm/arm.h (FUNCTION_ARG_PARTIAL_NREGS): Move ...
* config/arm/arm.c (arm_arg_partial_bytes): ... here.
(TARGET_ARG_PARTIAL_BYTES): New.
* config/cris/cris.h (FUNCTION_ARG_PARTIAL_NREGS): Move ...
* config/cris/cris.c (cris_arg_partial_bytes): ... here.
(TARGET_ARG_PARTIAL_BYTES): New.
* config/fr30/fr30.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
* config/fr30/fr30.c (fr30_arg_partial_bytes): Rename from
fr30_function_arg_partial_nregs. Adjust to return bytes.
(TARGET_ARG_PARTIAL_BYTES): New.
* config/fr30/fr30-protos.h: Update.
* config/frv/frv.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
* config/frv/frv.c (frv_arg_partial_bytes): Rename from
frv_function_arg_partial_nregs. Adjust to return bytes.
(TARGET_ARG_PARTIAL_BYTES): New.
* config/frv/frv-protos.h: Update.
* config/ia64/ia64.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
* config/ia64/ia64.c (ia64_arg_partial_bytes): Rename from
ia64_function_arg_partial_nregs. Adjust to return bytes.
(TARGET_ARG_PARTIAL_BYTES): New.
* config/ia64/ia64-protos.h: Update.
* config/iq2000/iq2000.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
* config/iq2000/iq2000.c (iq2000_arg_partial_bytes): Rename from
function_arg_partial_nregs. Adjust to return bytes.
(TARGET_ARG_PARTIAL_BYTES): New.
* config/iq2000/iq2000-protos.h: Update.
* config/m32r/m32r.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
* config/m32r/m32r.c (m32r_arg_partial_bytes): Rename from
function_arg_partial_nregs. Adjust to return bytes.
(TARGET_ARG_PARTIAL_BYTES): New.
* config/m32r/m32r-protos.h: Update.
* config/mcore/mcore.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
* config/mcore/mcore.c (mcore_arg_partial_bytes): Rename from
mcore_function_arg_partial_nregs. Adjust to return bytes.
(TARGET_ARG_PARTIAL_BYTES): New.
* config/mcore/mcore-protos.h: Update.
* config/mips/mips.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
* config/mips/mips.c (mips_arg_partial_bytes): Rename from
function_arg_partial_nregs. Adjust to return bytes.
(TARGET_ARG_PARTIAL_BYTES): New.
* config/mips/mips-protos.h: Update.
* config/mn10300/mn10300.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
* config/mn10300/mn10300.c (mn10300_arg_partial_bytes): Rename from
function_arg_partial_nregs. Adjust to return bytes.
(TARGET_ARG_PARTIAL_BYTES): New.
* config/mn10300/mn10300-protos.h: Update.
* config/ns32k/ns32k.h (FUNCTION_ARG_PARTIAL_NREGS): Move ...
* config/ns32k/ns32k.c (ns32k_arg_partial_bytes): ... here.
(TARGET_ARG_PARTIAL_BYTES): New.
* config/pa/pa.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
* config/pa/pa.c (pa_arg_partial_bytes): Rename from
function_arg_partial_nregs. Handle 32-bit. Adjust to return bytes.
(TARGET_ARG_PARTIAL_BYTES): New.
* config/pa/pa-protos.h: Update.
* config/rs6000/rs6000.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
* config/rs6000/rs6000.c (rs6000_arg_partial_bytes): Rename from
function_arg_partial_nregs. Adjust to return bytes.
(TARGET_ARG_PARTIAL_BYTES): New.
* config/rs6000/rs6000-protos.h: Update.
* config/sh/sh.h (FUNCTION_ARG_PARTIAL_NREGS): Move ...
* config/sh/sh.c (sh_arg_partial_bytes): ... here.
(TARGET_ARG_PARTIAL_BYTES): New.
* config/sparc/sparc.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
* config/sparc/sparc.c (sparc_arg_partial_bytes): Rename from
function_arg_partial_nregs. Adjust to return bytes.
(TARGET_ARG_PARTIAL_BYTES): New.
* config/sparc/sparc-protos.h: Update.
* config/v850/v850.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
* config/v850/v850.c (v850_arg_partial_bytes): Rename from
function_arg_partial_nregs. Adjust to return bytes.
(TARGET_ARG_PARTIAL_BYTES): New.
* config/v850/v850-protos.h: Update.
From-SVN: r92726
2004-12-30 04:08:18 +01:00
|
|
|
compiler when this occurs, and how many bytes should go in registers.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
@code{FUNCTION_ARG} for these arguments should return the first
|
|
|
|
register to be used by the caller for this argument; likewise
|
|
|
|
@code{FUNCTION_INCOMING_ARG}, for the called function.
|
target.h (targetm.calls.arg_partial_bytes): New.
* target.h (targetm.calls.arg_partial_bytes): New.
* target-def.h (TARGET_ARG_PARTIAL_BYTES): New.
* calls.c (store_unaligned_arguments_into_pseudos): Update for
partial in bytes.
(load_register_parameters): Likewise.
(store_one_arg): Likewise.
(initialize_argument_information): Use targetm.calls.arg_partial_bytes.
(emit_library_call_value_1): Likewise.
* expr.c (block_move_libcall_safe_for_call_parm): Likewise.
(emit_push_insn): Update for partial in bytes.
* expr.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
* function.c (assign_parm_find_entry_rtl): Use
targetm.calls.arg_partial_bytes. Update for result in bytes.
(locate_and_pad_parm): Update for partial in bytes.
* system.h (FUNCTION_ARG_PARTIAL_NREGS): Poison.
* targhooks.c (hook_int_CUMULATIVE_ARGS_mode_tree_bool_0): New.
* targhooks.h (hook_int_CUMULATIVE_ARGS_mode_tree_bool_0): Declare.
* doc/tm.texi (TARGET_ARG_PARTIAL_BYTES): Rename and update from
FUNCTION_ARG_PARTIAL_NREGS.
* config/arc/arc.h, config/c4x/c4x.h, config/i386/i386.h,
config/i860/i860.h, config/m68hc11/m68hc11.h, config/m68k/m68k.h,
config/pdp11/pdp11.h, config/s390/s390.h, config/stormy16/stormy16.h,
config/xtensa/xtensa.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
* config/alpha/alpha.c (alpha_arg_partial_bytes): New.
(TARGET_ARG_PARTIAL_BYTES): New.
* config/alpha/alpha.h, config/alpha/unicosmk.h,
config/alpha/vms.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
* config/arm/arm.h (FUNCTION_ARG_PARTIAL_NREGS): Move ...
* config/arm/arm.c (arm_arg_partial_bytes): ... here.
(TARGET_ARG_PARTIAL_BYTES): New.
* config/cris/cris.h (FUNCTION_ARG_PARTIAL_NREGS): Move ...
* config/cris/cris.c (cris_arg_partial_bytes): ... here.
(TARGET_ARG_PARTIAL_BYTES): New.
* config/fr30/fr30.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
* config/fr30/fr30.c (fr30_arg_partial_bytes): Rename from
fr30_function_arg_partial_nregs. Adjust to return bytes.
(TARGET_ARG_PARTIAL_BYTES): New.
* config/fr30/fr30-protos.h: Update.
* config/frv/frv.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
* config/frv/frv.c (frv_arg_partial_bytes): Rename from
frv_function_arg_partial_nregs. Adjust to return bytes.
(TARGET_ARG_PARTIAL_BYTES): New.
* config/frv/frv-protos.h: Update.
* config/ia64/ia64.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
* config/ia64/ia64.c (ia64_arg_partial_bytes): Rename from
ia64_function_arg_partial_nregs. Adjust to return bytes.
(TARGET_ARG_PARTIAL_BYTES): New.
* config/ia64/ia64-protos.h: Update.
* config/iq2000/iq2000.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
* config/iq2000/iq2000.c (iq2000_arg_partial_bytes): Rename from
function_arg_partial_nregs. Adjust to return bytes.
(TARGET_ARG_PARTIAL_BYTES): New.
* config/iq2000/iq2000-protos.h: Update.
* config/m32r/m32r.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
* config/m32r/m32r.c (m32r_arg_partial_bytes): Rename from
function_arg_partial_nregs. Adjust to return bytes.
(TARGET_ARG_PARTIAL_BYTES): New.
* config/m32r/m32r-protos.h: Update.
* config/mcore/mcore.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
* config/mcore/mcore.c (mcore_arg_partial_bytes): Rename from
mcore_function_arg_partial_nregs. Adjust to return bytes.
(TARGET_ARG_PARTIAL_BYTES): New.
* config/mcore/mcore-protos.h: Update.
* config/mips/mips.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
* config/mips/mips.c (mips_arg_partial_bytes): Rename from
function_arg_partial_nregs. Adjust to return bytes.
(TARGET_ARG_PARTIAL_BYTES): New.
* config/mips/mips-protos.h: Update.
* config/mn10300/mn10300.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
* config/mn10300/mn10300.c (mn10300_arg_partial_bytes): Rename from
function_arg_partial_nregs. Adjust to return bytes.
(TARGET_ARG_PARTIAL_BYTES): New.
* config/mn10300/mn10300-protos.h: Update.
* config/ns32k/ns32k.h (FUNCTION_ARG_PARTIAL_NREGS): Move ...
* config/ns32k/ns32k.c (ns32k_arg_partial_bytes): ... here.
(TARGET_ARG_PARTIAL_BYTES): New.
* config/pa/pa.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
* config/pa/pa.c (pa_arg_partial_bytes): Rename from
function_arg_partial_nregs. Handle 32-bit. Adjust to return bytes.
(TARGET_ARG_PARTIAL_BYTES): New.
* config/pa/pa-protos.h: Update.
* config/rs6000/rs6000.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
* config/rs6000/rs6000.c (rs6000_arg_partial_bytes): Rename from
function_arg_partial_nregs. Adjust to return bytes.
(TARGET_ARG_PARTIAL_BYTES): New.
* config/rs6000/rs6000-protos.h: Update.
* config/sh/sh.h (FUNCTION_ARG_PARTIAL_NREGS): Move ...
* config/sh/sh.c (sh_arg_partial_bytes): ... here.
(TARGET_ARG_PARTIAL_BYTES): New.
* config/sparc/sparc.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
* config/sparc/sparc.c (sparc_arg_partial_bytes): Rename from
function_arg_partial_nregs. Adjust to return bytes.
(TARGET_ARG_PARTIAL_BYTES): New.
* config/sparc/sparc-protos.h: Update.
* config/v850/v850.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
* config/v850/v850.c (v850_arg_partial_bytes): Rename from
function_arg_partial_nregs. Adjust to return bytes.
(TARGET_ARG_PARTIAL_BYTES): New.
* config/v850/v850-protos.h: Update.
From-SVN: r92726
2004-12-30 04:08:18 +01:00
|
|
|
@end deftypefn
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2004-07-14 08:24:27 +02:00
|
|
|
@deftypefn {Target Hook} bool TARGET_PASS_BY_REFERENCE (CUMULATIVE_ARGS *@var{cum}, enum machine_mode @var{mode}, tree @var{type}, bool @var{named})
|
2004-08-24 02:30:52 +02:00
|
|
|
This target hook should return @code{true} if an argument at the
|
2004-07-14 08:24:27 +02:00
|
|
|
position indicated by @var{cum} should be passed by reference. This
|
2004-08-24 02:30:52 +02:00
|
|
|
predicate is queried after target independent reasons for being
|
2004-07-14 08:24:27 +02:00
|
|
|
passed by reference, such as @code{TREE_ADDRESSABLE (type)}.
|
|
|
|
|
|
|
|
If the hook returns true, a copy of that argument is made in memory and a
|
1996-09-25 01:21:45 +02:00
|
|
|
pointer to the argument is passed instead of the argument itself.
|
|
|
|
The pointer is passed in whatever way is appropriate for passing a pointer
|
|
|
|
to that type.
|
2004-07-14 08:24:27 +02:00
|
|
|
@end deftypefn
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2004-09-08 20:45:21 +02:00
|
|
|
@deftypefn {Target Hook} bool TARGET_CALLEE_COPIES (CUMULATIVE_ARGS *@var{cum}, enum machine_mode @var{mode}, tree @var{type}, bool @var{named})
|
|
|
|
The function argument described by the parameters to this hook is
|
|
|
|
known to be passed by reference. The hook should return true if the
|
|
|
|
function argument should be copied by the callee instead of copied
|
|
|
|
by the caller.
|
|
|
|
|
2004-10-01 07:08:59 +02:00
|
|
|
For any argument for which the hook returns true, if it can be
|
2004-09-08 20:45:21 +02:00
|
|
|
determined that the argument is not modified, then a copy need
|
|
|
|
not be generated.
|
|
|
|
|
|
|
|
The default version of this hook always returns false.
|
|
|
|
@end deftypefn
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac CUMULATIVE_ARGS
|
1996-09-25 01:21:45 +02:00
|
|
|
A C type for declaring a variable that is used as the first argument of
|
|
|
|
@code{FUNCTION_ARG} and other related values. For some target machines,
|
|
|
|
the type @code{int} suffices and can hold the number of bytes of
|
|
|
|
argument so far.
|
|
|
|
|
|
|
|
There is no need to record in @code{CUMULATIVE_ARGS} anything about the
|
|
|
|
arguments that have been passed on the stack. The compiler has other
|
|
|
|
variables to keep track of that. For target machines on which all
|
|
|
|
arguments are passed on the stack, there is no need to store anything in
|
|
|
|
@code{CUMULATIVE_ARGS}; however, the data structure must exist and
|
|
|
|
should not be empty, so use @code{int}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
tm.texi (INIT_CUMULATIVE_ARGS): Update doco.
* doc/tm.texi (INIT_CUMULATIVE_ARGS): Update doco.
* calls.c (expand_call): Pass n_named_args to INIT_CUMULATIVE_ARGS.
(emit_library_call_value_1): Likewise pass nargs.
* expr.c (block_move_libcall_safe_for_call_parm): Pass 3 here.
* function.c (assign_parms): Pass -1 to INIT_CUMULATIVE_ARGS.
* config/rs6000/rs6000.c (init_cumulative_args): Use n_named_args
parameter instead of scanning TYPE_ARGS_TYPES to count args.
* config/rs6000/rs6000-protos.h (init_cumulative_args): Update
prototype.
* config/rs6000/rs6000.h (INIT_CUMULATIVE_ARGS): Pass extra arg.
(INIT_CUMULATIVE_INCOMING_ARGS): Set extra arg to 1000.
(INIT_CUMULATIVE_LIBCALL_ARGS): Set extra arg to 0.
* config/sh/sh.c (sh_output_mi_thunk): Pass 1 as n_named_args to
INIT_CUMULATIVE_ARGS.
* config/alpha/alpha.h (INIT_CUMULATIVE_ARGS): Update.
* config/alpha/unicosmk.h, config/alpha/vms.h, config/arc/arc.h,
config/arm/arm.h, config/avr/avr.h, config/c4x/c4x.h,
config/cris/cris.h, config/fr30/fr30.h, config/frv/frv.h,
config/h8300/h8300.h, config/i386/i386.h, config/i860/i860.h,
config/ia64/ia64.h, config/ip2k/ip2k.h, config/iq2000/iq2000.h,
config/iq2000/iq2000.c, config/m32r/m32r.h, config/m68hc11/m68hc11.h,
config/m68k/m68k.h, config/mcore/mcore.h, config/mips/mips.h,
config/mmix/mmix.h, config/mn10300/mn10300.h, config/ns32k/ns32k.h,
config/pa/pa.h, config/pdp11/pdp11.h config/s390/s390.h,
config/sh/sh.h, config/sparc/sparc.h, config/stormy16/stormy16.h,
config/v850/v850.h, config/vax/vax.h, config/xtensa/xtensa.h: Likewise.
From-SVN: r77380
2004-02-06 07:18:36 +01:00
|
|
|
@defmac INIT_CUMULATIVE_ARGS (@var{cum}, @var{fntype}, @var{libname}, @var{fndecl}, @var{n_named_args})
|
2003-06-20 08:41:12 +02:00
|
|
|
A C statement (sans semicolon) for initializing the variable
|
|
|
|
@var{cum} for the state at the beginning of the argument list. The
|
|
|
|
variable has type @code{CUMULATIVE_ARGS}. The value of @var{fntype}
|
|
|
|
is the tree node for the data type of the function which will receive
|
|
|
|
the args, or 0 if the args are to a compiler support library function.
|
|
|
|
For direct calls that are not libcalls, @var{fndecl} contain the
|
|
|
|
declaration node of the function. @var{fndecl} is also set when
|
|
|
|
@code{INIT_CUMULATIVE_ARGS} is used to find arguments for the function
|
tm.texi (INIT_CUMULATIVE_ARGS): Update doco.
* doc/tm.texi (INIT_CUMULATIVE_ARGS): Update doco.
* calls.c (expand_call): Pass n_named_args to INIT_CUMULATIVE_ARGS.
(emit_library_call_value_1): Likewise pass nargs.
* expr.c (block_move_libcall_safe_for_call_parm): Pass 3 here.
* function.c (assign_parms): Pass -1 to INIT_CUMULATIVE_ARGS.
* config/rs6000/rs6000.c (init_cumulative_args): Use n_named_args
parameter instead of scanning TYPE_ARGS_TYPES to count args.
* config/rs6000/rs6000-protos.h (init_cumulative_args): Update
prototype.
* config/rs6000/rs6000.h (INIT_CUMULATIVE_ARGS): Pass extra arg.
(INIT_CUMULATIVE_INCOMING_ARGS): Set extra arg to 1000.
(INIT_CUMULATIVE_LIBCALL_ARGS): Set extra arg to 0.
* config/sh/sh.c (sh_output_mi_thunk): Pass 1 as n_named_args to
INIT_CUMULATIVE_ARGS.
* config/alpha/alpha.h (INIT_CUMULATIVE_ARGS): Update.
* config/alpha/unicosmk.h, config/alpha/vms.h, config/arc/arc.h,
config/arm/arm.h, config/avr/avr.h, config/c4x/c4x.h,
config/cris/cris.h, config/fr30/fr30.h, config/frv/frv.h,
config/h8300/h8300.h, config/i386/i386.h, config/i860/i860.h,
config/ia64/ia64.h, config/ip2k/ip2k.h, config/iq2000/iq2000.h,
config/iq2000/iq2000.c, config/m32r/m32r.h, config/m68hc11/m68hc11.h,
config/m68k/m68k.h, config/mcore/mcore.h, config/mips/mips.h,
config/mmix/mmix.h, config/mn10300/mn10300.h, config/ns32k/ns32k.h,
config/pa/pa.h, config/pdp11/pdp11.h config/s390/s390.h,
config/sh/sh.h, config/sparc/sparc.h, config/stormy16/stormy16.h,
config/v850/v850.h, config/vax/vax.h, config/xtensa/xtensa.h: Likewise.
From-SVN: r77380
2004-02-06 07:18:36 +01:00
|
|
|
being compiled. @var{n_named_args} is set to the number of named
|
|
|
|
arguments, including a structure return address if it is passed as a
|
|
|
|
parameter, when making a call. When processing incoming arguments,
|
contrib.texi, [...]: Improve Texinfo formatting.
* doc/contrib.texi, doc/cpp.texi, doc/cppopts.texi,
doc/extend.texi, doc/gcov.texi, doc/install.texi, doc/invoke.texi,
doc/libgcc.texi, doc/md.texi, doc/passes.texi,
doc/sourcebuild.texi, doc/tm.texi: Improve Texinfo formatting.
From-SVN: r89725
2004-10-28 03:00:31 +02:00
|
|
|
@var{n_named_args} is set to @minus{}1.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
When processing a call to a compiler support library function,
|
|
|
|
@var{libname} identifies which one. It is a @code{symbol_ref} rtx which
|
|
|
|
contains the name of the function, as a string. @var{libname} is 0 when
|
|
|
|
an ordinary C function call is being processed. Thus, each time this
|
|
|
|
macro is called, either @var{libname} or @var{fntype} is nonzero, but
|
|
|
|
never both of them at once.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac INIT_CUMULATIVE_LIBCALL_ARGS (@var{cum}, @var{mode}, @var{libname})
|
2001-01-05 08:38:47 +01:00
|
|
|
Like @code{INIT_CUMULATIVE_ARGS} but only used for outgoing libcalls,
|
|
|
|
it gets a @code{MODE} argument instead of @var{fntype}, that would be
|
|
|
|
@code{NULL}. @var{indirect} would always be zero, too. If this macro
|
|
|
|
is not defined, @code{INIT_CUMULATIVE_ARGS (cum, NULL_RTX, libname,
|
|
|
|
0)} is used instead.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2001-01-05 08:38:47 +01:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac INIT_CUMULATIVE_INCOMING_ARGS (@var{cum}, @var{fntype}, @var{libname})
|
1996-09-25 01:21:45 +02:00
|
|
|
Like @code{INIT_CUMULATIVE_ARGS} but overrides it for the purposes of
|
|
|
|
finding the arguments for the function being compiled. If this macro is
|
|
|
|
undefined, @code{INIT_CUMULATIVE_ARGS} is used instead.
|
|
|
|
|
|
|
|
The value passed for @var{libname} is always 0, since library routines
|
c-tree.texi, [...]: Replace . at end of sentences preceded by a capital letter with @..
* doc/c-tree.texi, doc/contrib.texi, doc/cpp.texi,
doc/cppinternals.texi, doc/extend.texi, doc/gcc.texi,
doc/gcov.texi, doc/install-old.texi, doc/install.texi,
doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: Replace
. at end of sentences preceded by a capital letter with @..
From-SVN: r43611
2001-06-27 17:04:16 +02:00
|
|
|
with special calling conventions are never compiled with GCC@. The
|
1996-09-25 01:21:45 +02:00
|
|
|
argument @var{libname} exists for symmetry with
|
|
|
|
@code{INIT_CUMULATIVE_ARGS}.
|
|
|
|
@c could use "this macro" in place of @code{INIT_CUMULATIVE_ARGS}, maybe.
|
|
|
|
@c --mew 5feb93 i switched the order of the sentences. --mew 10feb93
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac FUNCTION_ARG_ADVANCE (@var{cum}, @var{mode}, @var{type}, @var{named})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C statement (sans semicolon) to update the summarizer variable
|
|
|
|
@var{cum} to advance past an argument in the argument list. The
|
|
|
|
values @var{mode}, @var{type} and @var{named} describe that argument.
|
|
|
|
Once this is done, the variable @var{cum} is suitable for analyzing
|
2001-06-25 01:04:49 +02:00
|
|
|
the @emph{following} argument with @code{FUNCTION_ARG}, etc.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
This macro need not do anything if the argument in question was passed
|
|
|
|
on the stack. The compiler knows how to track the amount of stack space
|
|
|
|
used for arguments without any special help.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac FUNCTION_ARG_PADDING (@var{mode}, @var{type})
|
1996-09-25 01:21:45 +02:00
|
|
|
If defined, a C expression which determines whether, and in which direction,
|
|
|
|
to pad out an argument with extra space. The value should be of type
|
|
|
|
@code{enum direction}: either @code{upward} to pad above the argument,
|
|
|
|
@code{downward} to pad below, or @code{none} to inhibit padding.
|
|
|
|
|
|
|
|
The @emph{amount} of padding is always just enough to reach the next
|
|
|
|
multiple of @code{FUNCTION_ARG_BOUNDARY}; this macro does not control
|
|
|
|
it.
|
|
|
|
|
|
|
|
This macro has a default definition which is right for most systems.
|
|
|
|
For little-endian machines, the default is to pad upward. For
|
|
|
|
big-endian machines, the default is to pad downward for an argument of
|
|
|
|
constant size shorter than an @code{int}, and upward otherwise.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac PAD_VARARGS_DOWN
|
2001-04-28 13:35:04 +02:00
|
|
|
If defined, a C expression which determines whether the default
|
|
|
|
implementation of va_arg will attempt to pad down before reading the
|
2000-01-14 22:19:51 +01:00
|
|
|
next argument, if that argument is smaller than its aligned space as
|
|
|
|
controlled by @code{PARM_BOUNDARY}. If this macro is not defined, all such
|
|
|
|
arguments are padded down if @code{BYTES_BIG_ENDIAN} is true.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2000-01-14 22:19:51 +01:00
|
|
|
|
2003-07-14 07:17:18 +02:00
|
|
|
@defmac BLOCK_REG_PADDING (@var{mode}, @var{type}, @var{first})
|
|
|
|
Specify padding for the last element of a block move between registers and
|
|
|
|
memory. @var{first} is nonzero if this is the only element. Defining this
|
|
|
|
macro allows better control of register function parameters on big-endian
|
|
|
|
machines, without using @code{PARALLEL} rtl. In particular,
|
|
|
|
@code{MUST_PASS_IN_STACK} need not test padding and mode of types in
|
|
|
|
registers, as there is no longer a "wrong" part of a register; For example,
|
|
|
|
a three byte aggregate may be passed in the high part of a register if so
|
|
|
|
required.
|
|
|
|
@end defmac
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac FUNCTION_ARG_BOUNDARY (@var{mode}, @var{type})
|
1996-09-25 01:21:45 +02:00
|
|
|
If defined, a C expression that gives the alignment boundary, in bits,
|
|
|
|
of an argument with the specified mode and type. If it is not defined,
|
|
|
|
@code{PARM_BOUNDARY} is used for all arguments.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac FUNCTION_ARG_REGNO_P (@var{regno})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C expression that is nonzero if @var{regno} is the number of a hard
|
|
|
|
register in which function arguments are sometimes passed. This does
|
|
|
|
@emph{not} include implicit arguments such as the static chain and
|
|
|
|
the structure-value address. On many machines, no registers can be
|
|
|
|
used for this purpose since all function arguments are pushed on the
|
|
|
|
stack.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1997-12-18 16:00:06 +01:00
|
|
|
|
2004-03-12 11:03:32 +01:00
|
|
|
@deftypefn {Target Hook} bool TARGET_SPLIT_COMPLEX_ARG (tree @var{type})
|
|
|
|
This hook should return true if parameter of type @var{type} are passed
|
|
|
|
as two scalar parameters. By default, GCC will attempt to pack complex
|
|
|
|
arguments into the target's word size. Some ABIs require complex arguments
|
|
|
|
to be split and treated as their individual components. For example, on
|
|
|
|
AIX64, complex floats should be passed in a pair of floating point
|
|
|
|
registers, even though a complex float would fit in one 64-bit floating
|
|
|
|
point register.
|
|
|
|
|
|
|
|
The default value of this hook is @code{NULL}, which is treated as always
|
|
|
|
false.
|
|
|
|
@end deftypefn
|
2003-06-03 13:14:07 +02:00
|
|
|
|
2004-12-04 00:15:15 +01:00
|
|
|
@deftypefn {Target Hook} tree TARGET_BUILD_BUILTIN_VA_LIST (void)
|
|
|
|
This hook returns a type node for @code{va_list} for the target.
|
|
|
|
The default version of the hook returns @code{void*}.
|
|
|
|
@end deftypefn
|
|
|
|
|
2004-06-10 17:49:49 +02:00
|
|
|
@deftypefn {Target Hook} tree TARGET_GIMPLIFY_VA_ARG_EXPR (tree @var{valist}, tree @var{type}, tree *@var{pre_p}, tree *@var{post_p})
|
|
|
|
This hook performs target-specific gimplification of
|
|
|
|
@code{VA_ARG_EXPR}. The first two parameters correspond to the
|
|
|
|
arguments to @code{va_arg}; the latter two are as in
|
|
|
|
@code{gimplify.c:gimplify_expr}.
|
|
|
|
@end deftypefn
|
|
|
|
|
2004-12-07 01:53:27 +01:00
|
|
|
@deftypefn {Target Hook} bool TARGET_VALID_POINTER_MODE (enum machine_mode @var{mode})
|
|
|
|
Define this to return nonzero if the port can handle pointers
|
|
|
|
with machine mode @var{mode}. The default version of this
|
|
|
|
hook returns true for both @code{ptr_mode} and @code{Pmode}.
|
|
|
|
@end deftypefn
|
|
|
|
|
2004-08-26 02:24:37 +02:00
|
|
|
@deftypefn {Target Hook} bool TARGET_SCALAR_MODE_SUPPORTED_P (enum machine_mode @var{mode})
|
|
|
|
Define this to return nonzero if the port is prepared to handle
|
|
|
|
insns involving scalar mode @var{mode}. For a scalar mode to be
|
|
|
|
considered supported, all the basic arithmetic and comparisons
|
|
|
|
must work.
|
|
|
|
|
|
|
|
The default version of this hook returns true for any mode
|
|
|
|
required to handle the basic C types (as defined by the port).
|
|
|
|
Included here are the double-word arithmetic supported by the
|
|
|
|
code in @file{optabs.c}.
|
|
|
|
@end deftypefn
|
|
|
|
|
2004-08-24 02:30:52 +02:00
|
|
|
@deftypefn {Target Hook} bool TARGET_VECTOR_MODE_SUPPORTED_P (enum machine_mode @var{mode})
|
|
|
|
Define this to return nonzero if the port is prepared to handle
|
|
|
|
insns involving vector mode @var{mode}. At the very least, it
|
|
|
|
must have move patterns for this mode.
|
|
|
|
@end deftypefn
|
|
|
|
|
1996-09-25 01:21:45 +02:00
|
|
|
@node Scalar Return
|
|
|
|
@subsection How Scalar Function Values Are Returned
|
|
|
|
@cindex return values in registers
|
|
|
|
@cindex values, returned by functions
|
|
|
|
@cindex scalars, returned as values
|
|
|
|
|
|
|
|
This section discusses the macros that control returning scalars as
|
|
|
|
values---values that can fit in registers.
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac FUNCTION_VALUE (@var{valtype}, @var{func})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C expression to create an RTX representing the place where a
|
|
|
|
function returns a value of data type @var{valtype}. @var{valtype} is
|
|
|
|
a tree node representing a data type. Write @code{TYPE_MODE
|
|
|
|
(@var{valtype})} to get the machine mode used to represent that type.
|
|
|
|
On many machines, only the mode is relevant. (Actually, on most
|
|
|
|
machines, scalar values are returned in the same place regardless of
|
2001-06-25 01:04:49 +02:00
|
|
|
mode).
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
The value of the expression is usually a @code{reg} RTX for the hard
|
|
|
|
register where the return value is stored. The value can also be a
|
|
|
|
@code{parallel} RTX, if the return value is in multiple places. See
|
|
|
|
@code{FUNCTION_ARG} for an explanation of the @code{parallel} form.
|
|
|
|
|
2004-01-15 04:44:19 +01:00
|
|
|
If @code{TARGET_PROMOTE_FUNCTION_RETURN} returns true, you must apply the same
|
1996-09-25 01:21:45 +02:00
|
|
|
promotion rules specified in @code{PROMOTE_MODE} if @var{valtype} is a
|
|
|
|
scalar type.
|
|
|
|
|
|
|
|
If the precise function being called is known, @var{func} is a tree
|
|
|
|
node (@code{FUNCTION_DECL}) for it; otherwise, @var{func} is a null
|
|
|
|
pointer. This makes it possible to use a different value-returning
|
|
|
|
convention for specific functions when all their calls are
|
2001-06-25 01:04:49 +02:00
|
|
|
known.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
@code{FUNCTION_VALUE} is not used for return vales with aggregate data
|
|
|
|
types, because these are returned in another way. See
|
2004-02-04 06:33:13 +01:00
|
|
|
@code{TARGET_STRUCT_VALUE_RTX} and related macros, below.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac FUNCTION_OUTGOING_VALUE (@var{valtype}, @var{func})
|
1996-09-25 01:21:45 +02:00
|
|
|
Define this macro if the target machine has ``register windows''
|
|
|
|
so that the register in which a function returns its value is not
|
|
|
|
the same as the one in which the caller sees the value.
|
|
|
|
|
|
|
|
For such machines, @code{FUNCTION_VALUE} computes the register in which
|
|
|
|
the caller will see the value. @code{FUNCTION_OUTGOING_VALUE} should be
|
|
|
|
defined in a similar fashion to tell the function where to put the
|
2001-06-25 01:04:49 +02:00
|
|
|
value.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
If @code{FUNCTION_OUTGOING_VALUE} is not defined,
|
2001-06-25 01:04:49 +02:00
|
|
|
@code{FUNCTION_VALUE} serves both purposes.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
@code{FUNCTION_OUTGOING_VALUE} is not used for return vales with
|
|
|
|
aggregate data types, because these are returned in another way. See
|
2004-02-04 06:33:13 +01:00
|
|
|
@code{TARGET_STRUCT_VALUE_RTX} and related macros, below.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac LIBCALL_VALUE (@var{mode})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C expression to create an RTX representing the place where a library
|
|
|
|
function returns a value of mode @var{mode}. If the precise function
|
|
|
|
being called is known, @var{func} is a tree node
|
|
|
|
(@code{FUNCTION_DECL}) for it; otherwise, @var{func} is a null
|
|
|
|
pointer. This makes it possible to use a different value-returning
|
|
|
|
convention for specific functions when all their calls are
|
2001-06-25 01:04:49 +02:00
|
|
|
known.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
Note that ``library function'' in this context means a compiler
|
|
|
|
support routine, used to perform arithmetic, whose name is known
|
|
|
|
specially by the compiler and was not mentioned in the C code being
|
|
|
|
compiled.
|
|
|
|
|
|
|
|
The definition of @code{LIBRARY_VALUE} need not be concerned aggregate
|
|
|
|
data types, because none of the library functions returns such types.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac FUNCTION_VALUE_REGNO_P (@var{regno})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C expression that is nonzero if @var{regno} is the number of a hard
|
|
|
|
register in which the values of called function may come back.
|
|
|
|
|
|
|
|
A register whose use for returning values is limited to serving as the
|
|
|
|
second of a pair (for a value of type @code{double}, say) need not be
|
|
|
|
recognized by this macro. So for most machines, this definition
|
|
|
|
suffices:
|
|
|
|
|
c-tree.texi, [...]: Use @smallexample instead of @example.
* doc/c-tree.texi, doc/compat.texi, doc/cpp.texi,
doc/cppopts.texi, doc/extend.texi, doc/install.texi,
doc/interface.texi, doc/invoke.texi, doc/libgcc.texi, doc/md.texi,
doc/objc.texi, doc/rtl.texi, doc/tm.texi, doc/trouble.texi: Use
@smallexample instead of @example.
From-SVN: r76075
2004-01-18 02:20:48 +01:00
|
|
|
@smallexample
|
1996-09-25 01:21:45 +02:00
|
|
|
#define FUNCTION_VALUE_REGNO_P(N) ((N) == 0)
|
c-tree.texi, [...]: Use @smallexample instead of @example.
* doc/c-tree.texi, doc/compat.texi, doc/cpp.texi,
doc/cppopts.texi, doc/extend.texi, doc/install.texi,
doc/interface.texi, doc/invoke.texi, doc/libgcc.texi, doc/md.texi,
doc/objc.texi, doc/rtl.texi, doc/tm.texi, doc/trouble.texi: Use
@smallexample instead of @example.
From-SVN: r76075
2004-01-18 02:20:48 +01:00
|
|
|
@end smallexample
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
If the machine has register windows, so that the caller and the called
|
|
|
|
function use different registers for the return value, this macro
|
|
|
|
should recognize only the caller's register numbers.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac APPLY_RESULT_SIZE
|
1996-09-25 01:21:45 +02:00
|
|
|
Define this macro if @samp{untyped_call} and @samp{untyped_return}
|
|
|
|
need more space than is implied by @code{FUNCTION_VALUE_REGNO_P} for
|
|
|
|
saving and restoring an arbitrary return value.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-11-16 20:10:09 +01:00
|
|
|
@deftypefn {Target Hook} bool TARGET_RETURN_IN_MSB (tree @var{type})
|
|
|
|
This hook should return true if values of type @var{type} are returned
|
|
|
|
at the most significant end of a register (in other words, if they are
|
|
|
|
padded at the least significant end). You can assume that @var{type}
|
|
|
|
is returned in a register; the caller is required to check this.
|
|
|
|
|
|
|
|
Note that the register provided by @code{FUNCTION_VALUE} must be able
|
|
|
|
to hold the complete return value. For example, if a 1-, 2- or 3-byte
|
|
|
|
structure is returned at the most significant end of a 4-byte register,
|
|
|
|
@code{FUNCTION_VALUE} should provide an @code{SImode} rtx.
|
|
|
|
@end deftypefn
|
|
|
|
|
1996-09-25 01:21:45 +02:00
|
|
|
@node Aggregate Return
|
|
|
|
@subsection How Large Values Are Returned
|
|
|
|
@cindex aggregates as return values
|
|
|
|
@cindex large return values
|
|
|
|
@cindex returning aggregate values
|
|
|
|
@cindex structure value address
|
|
|
|
|
|
|
|
When a function value's mode is @code{BLKmode} (and in some other
|
|
|
|
cases), the value is not returned according to @code{FUNCTION_VALUE}
|
|
|
|
(@pxref{Scalar Return}). Instead, the caller passes the address of a
|
|
|
|
block of memory in which the value should be stored. This address
|
|
|
|
is called the @dfn{structure value address}.
|
|
|
|
|
|
|
|
This section describes how to control returning structure values in
|
|
|
|
memory.
|
|
|
|
|
2004-01-15 04:33:11 +01:00
|
|
|
@deftypefn {Target Hook} bool TARGET_RETURN_IN_MEMORY (tree @var{type}, tree @var{fntype})
|
targhooks.c: New file.
* targhooks.c: New file.
* targhooks.h: New file.
* Makefile.in: Add targhooks.o support.
(function.o): Depend on$(TARGET_H).
(stmt.o): Likewise.
(combine.o): Depend on $(TREE_H) and $(TARGET_H).
* builtins.c (apply_args_size, expand_builtin_apply_args_1,
expand_builtin_apply): Convert to calls.struct_value_rtx hook.
(expand_builtin_saveregs): Convert to
calls.expand_builtin_saveregs hook.
* c-decl.c (start_decl): Handle new calls.promote_prototypes hook
here, instead of ...
(get_parm_info) ... here.
(store_parm_decls_oldstyle): Convert to calls.promote_prototypes
hook.
(finish_function): Handle calls.promote_prototypes hook here too.
* c-typeck.c (convert_arguments): Convert to
calls.promote_prototypes hook.
(c_convert_parm_for_inlining): Likewise.
* calls.c (initialize_argument_information): Convert to
calls.promote_function_args hook.
(expand_call): Convert to calls.struct_value_rtx,
calls.strict_argument_naming,
calls.pretend_outgoing_varargs_named, and
calls.promote_function_return hooks. Pass fndecl to
aggregate_value_p. Initialize CUMULATIVE_ARGS before calling
hooks, so they can use that.
(emit_library_call_value_1): Likewise.
* combine.c (setup_incoming_promotions): Convert to
calls.promote_function_args hook.
* emit-rtl.c: Convert to calls.struct_value_rtx hook.
* expr.c (expand_assignment): Pass call to aggregate_value_p.
(expand_expr): Likewise.
* expr.h: Remove support for SETUP_INCOMING_VARARGS,
STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED,
RETURN_IN_MEMORY macro defaults.
* final.c (profile_function): Convert to calls.struct_value_rtx
hook.
* function.c (aggregate_value_p): Accept function type tree as
second parameter; try to deduce fntype from it. Convert to
calls.return_in_memory hook.
(assign_parms): Convert to calls.setup_incoming_varargs,
calls.strict_argument_naming, calls.promote_function_args,
calls.pretend_outgoing_varargs_named hooks. Pass fndecl to
aggregate_value_p.
(expand_function_start): Likewise. Convert to
calls.struct_value_rtx hook.
(expand_function_end): Convert to calls.promote_function_return hook.
(allocate_struct_function): Pass fndecl to aggregate_value_p.
* hard-reg-set.h: Update comments to new hook names.
* integrate.c (expand_inline_function): Pass fndecl to aggregate_value_p.
* reg-stack.c (stack_result): Likewise.
* rtl.h (struct_value_rtx, struct_value_incoming_rtx): Delete.
* stmt.c (expand_value_return): Convert to
calls.promote_function_return hook.
* target-def.h: Add TARGET_PROMOTE_FUNCTION_ARGS,
TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES,
TARGET_STRUCT_VALUE_RTX, TARGET_RETURN_IN_MEMORY,
TARGET_EXPAND_BUILTIN_SAVEREGS, TARGET_SETUP_INCOMING_VARARGS,
TARGET_STRICT_ARGUMENT_NAMING,
TARGET_PRETEND_OUTGOING_VARARGS_NAMED, and TARGET_CALLS.
* target.h: Likewise.
* tree.h (aggregate_value_p): Also takes a tree to deduce function
attributes from (for target hooks).
* doc/tm.texi (PROMOTE_FUNCTION_ARGS, PROMOTE_FUNCTION_RETURN,
PROMOTE_PROTOTYPES, RETURN_IN_MEMORY, STRUCT_VALUE_REGNUM,
STRUCT_VALUE, STRUCT_VALUE_INCOMING_REGNUM, STRUCT_VALUE_INCOMING,
EXPAND_BUILTIN_SAVEREGS, SETUP_INCOMING_VARARGS,
STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED): Convert
to hooks.
* config/alpha/alpha.c (alpha_output_mi_thunk_osf): Pass function
to aggregate_value_p.
* config/arm/arm.c (arm_init_cumulative_args,
arm_output_mi_thunk): Likewise.
* config/i386/i386.c (ix86_return_pops_args, x86_this_parameter):
Likewise.
* config/mips/mips.c (mips_save_reg_p, mips_expand_prologue,
mips_can_use_return_insn): Likewise.
* config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise.
* config/s390/s390.c (s390_output_mi_thunk): Likewise.
* config/sparc/sparc.c (sparc_output_mi_thunk): Pass function to
aggregate_value_p.
* config/story16/stormy16.c (xstormy16_asm_output_mi_thunk): Pass
function to aggregate_value_p.
* objc/objc-act.c (generate_struct_by_value_array): Pass NULL to
aggregate_value_p.
* config/sh/sh-protos.h (sh_builtin_saveregs): Remove.
(sh_attr_renesas_p, sh_cfun_attr_renesas_p, sh_function_arg,
sh_function_arg_advance, sh_pass_in_reg_p): New. * config/sh/sh.c
(sh_handle_renesas_attribute, sh_promote_prototypes,
sh_struct_value_rtx, sh_return_in_memory, sh_builtin_saveregs,
sh_setup_incoming_varargs, sh_strict_argument_naming,
sh_pretend_outgoing_varargs_named): New decls.
(targetm): Add new hooks.
(calc_live_regs): Save MACL and MACH if the function has the
renesas attribute.
(sh_expand_prologue): Support renesas attribute.
(sh_builtin_saveregs): Make static.
(sh_build_va_list): Support renesas attribute.
(sh_va_start): Likewise.
(sh_va_arg): Likewise.
(sh_promote_prototypes): New.
(sh_function_arg): New, moved from sh.h. Support renesas
attribute.
(sh_function_arg_advance): Likewise.
(sh_return_in_memory): Likewise.
(sh_strict_argument_naming): Likewise.
(sh_pretend_outgoing_varargs_named): Likewise.
(sh_struct_value_rtx): New.
(sh_attribute): Add renesas attribute.
(sh_handle_renesas_attribute): New.
(sh_attr_renesas_p, sh_cfun_attr_renesas_p): New.
(sh_ms_bitfield_layout_p): Support renesas attribute also.
(sh_output_mi_thunk): Pass function to aggregate_value_p. *
config/sh/sh.h (TARGET_SWITCHES): Add -mrenesas as an alias for
-mhitachi.
(STRUCT_VALUE_REGNUM, STRUCT_VALUE, RETURN_IN_MEMORY): Moved to
target hooks.
(sh_args): Add renesas_abi flag.
(INIT_CUMULATIVE_ARGS): Set it. Pass fndecl to aggregate_value_p.
(FUNCTION_ARG_ADVANCE, FUNCTION_ARG): Move to sh.c.
(PASS_IN_REG_P): Support renesas attribute. Pass DF and TF on the
stack for the renesas abi.
(STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED,
SETUP_INCOMING_VARARGS, EXPAND_BUILTIN_SAVEREGS,
PROMOTE_PROTOTYPES): Moved to sh.c. * config/sh/sh.md (call): Set
call cookie to indicate renesas calls.
* decl.c (finish_function): Pass fndecl to aggregate_value_p.
* misc.c (default_pass_by_ref): Convert to calls.return_in_memory
hook.
From-SVN: r71048
2003-09-04 05:18:05 +02:00
|
|
|
This target hook should return a nonzero value to say to return the
|
|
|
|
function value in memory, just as large structures are always returned.
|
|
|
|
Here @var{type} will be the data type of the value, and @var{fntype}
|
|
|
|
will be the type of the function doing the returning, or @code{NULL} for
|
|
|
|
libcalls.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
Note that values of mode @code{BLKmode} must be explicitly handled
|
targhooks.c: New file.
* targhooks.c: New file.
* targhooks.h: New file.
* Makefile.in: Add targhooks.o support.
(function.o): Depend on$(TARGET_H).
(stmt.o): Likewise.
(combine.o): Depend on $(TREE_H) and $(TARGET_H).
* builtins.c (apply_args_size, expand_builtin_apply_args_1,
expand_builtin_apply): Convert to calls.struct_value_rtx hook.
(expand_builtin_saveregs): Convert to
calls.expand_builtin_saveregs hook.
* c-decl.c (start_decl): Handle new calls.promote_prototypes hook
here, instead of ...
(get_parm_info) ... here.
(store_parm_decls_oldstyle): Convert to calls.promote_prototypes
hook.
(finish_function): Handle calls.promote_prototypes hook here too.
* c-typeck.c (convert_arguments): Convert to
calls.promote_prototypes hook.
(c_convert_parm_for_inlining): Likewise.
* calls.c (initialize_argument_information): Convert to
calls.promote_function_args hook.
(expand_call): Convert to calls.struct_value_rtx,
calls.strict_argument_naming,
calls.pretend_outgoing_varargs_named, and
calls.promote_function_return hooks. Pass fndecl to
aggregate_value_p. Initialize CUMULATIVE_ARGS before calling
hooks, so they can use that.
(emit_library_call_value_1): Likewise.
* combine.c (setup_incoming_promotions): Convert to
calls.promote_function_args hook.
* emit-rtl.c: Convert to calls.struct_value_rtx hook.
* expr.c (expand_assignment): Pass call to aggregate_value_p.
(expand_expr): Likewise.
* expr.h: Remove support for SETUP_INCOMING_VARARGS,
STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED,
RETURN_IN_MEMORY macro defaults.
* final.c (profile_function): Convert to calls.struct_value_rtx
hook.
* function.c (aggregate_value_p): Accept function type tree as
second parameter; try to deduce fntype from it. Convert to
calls.return_in_memory hook.
(assign_parms): Convert to calls.setup_incoming_varargs,
calls.strict_argument_naming, calls.promote_function_args,
calls.pretend_outgoing_varargs_named hooks. Pass fndecl to
aggregate_value_p.
(expand_function_start): Likewise. Convert to
calls.struct_value_rtx hook.
(expand_function_end): Convert to calls.promote_function_return hook.
(allocate_struct_function): Pass fndecl to aggregate_value_p.
* hard-reg-set.h: Update comments to new hook names.
* integrate.c (expand_inline_function): Pass fndecl to aggregate_value_p.
* reg-stack.c (stack_result): Likewise.
* rtl.h (struct_value_rtx, struct_value_incoming_rtx): Delete.
* stmt.c (expand_value_return): Convert to
calls.promote_function_return hook.
* target-def.h: Add TARGET_PROMOTE_FUNCTION_ARGS,
TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES,
TARGET_STRUCT_VALUE_RTX, TARGET_RETURN_IN_MEMORY,
TARGET_EXPAND_BUILTIN_SAVEREGS, TARGET_SETUP_INCOMING_VARARGS,
TARGET_STRICT_ARGUMENT_NAMING,
TARGET_PRETEND_OUTGOING_VARARGS_NAMED, and TARGET_CALLS.
* target.h: Likewise.
* tree.h (aggregate_value_p): Also takes a tree to deduce function
attributes from (for target hooks).
* doc/tm.texi (PROMOTE_FUNCTION_ARGS, PROMOTE_FUNCTION_RETURN,
PROMOTE_PROTOTYPES, RETURN_IN_MEMORY, STRUCT_VALUE_REGNUM,
STRUCT_VALUE, STRUCT_VALUE_INCOMING_REGNUM, STRUCT_VALUE_INCOMING,
EXPAND_BUILTIN_SAVEREGS, SETUP_INCOMING_VARARGS,
STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED): Convert
to hooks.
* config/alpha/alpha.c (alpha_output_mi_thunk_osf): Pass function
to aggregate_value_p.
* config/arm/arm.c (arm_init_cumulative_args,
arm_output_mi_thunk): Likewise.
* config/i386/i386.c (ix86_return_pops_args, x86_this_parameter):
Likewise.
* config/mips/mips.c (mips_save_reg_p, mips_expand_prologue,
mips_can_use_return_insn): Likewise.
* config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise.
* config/s390/s390.c (s390_output_mi_thunk): Likewise.
* config/sparc/sparc.c (sparc_output_mi_thunk): Pass function to
aggregate_value_p.
* config/story16/stormy16.c (xstormy16_asm_output_mi_thunk): Pass
function to aggregate_value_p.
* objc/objc-act.c (generate_struct_by_value_array): Pass NULL to
aggregate_value_p.
* config/sh/sh-protos.h (sh_builtin_saveregs): Remove.
(sh_attr_renesas_p, sh_cfun_attr_renesas_p, sh_function_arg,
sh_function_arg_advance, sh_pass_in_reg_p): New. * config/sh/sh.c
(sh_handle_renesas_attribute, sh_promote_prototypes,
sh_struct_value_rtx, sh_return_in_memory, sh_builtin_saveregs,
sh_setup_incoming_varargs, sh_strict_argument_naming,
sh_pretend_outgoing_varargs_named): New decls.
(targetm): Add new hooks.
(calc_live_regs): Save MACL and MACH if the function has the
renesas attribute.
(sh_expand_prologue): Support renesas attribute.
(sh_builtin_saveregs): Make static.
(sh_build_va_list): Support renesas attribute.
(sh_va_start): Likewise.
(sh_va_arg): Likewise.
(sh_promote_prototypes): New.
(sh_function_arg): New, moved from sh.h. Support renesas
attribute.
(sh_function_arg_advance): Likewise.
(sh_return_in_memory): Likewise.
(sh_strict_argument_naming): Likewise.
(sh_pretend_outgoing_varargs_named): Likewise.
(sh_struct_value_rtx): New.
(sh_attribute): Add renesas attribute.
(sh_handle_renesas_attribute): New.
(sh_attr_renesas_p, sh_cfun_attr_renesas_p): New.
(sh_ms_bitfield_layout_p): Support renesas attribute also.
(sh_output_mi_thunk): Pass function to aggregate_value_p. *
config/sh/sh.h (TARGET_SWITCHES): Add -mrenesas as an alias for
-mhitachi.
(STRUCT_VALUE_REGNUM, STRUCT_VALUE, RETURN_IN_MEMORY): Moved to
target hooks.
(sh_args): Add renesas_abi flag.
(INIT_CUMULATIVE_ARGS): Set it. Pass fndecl to aggregate_value_p.
(FUNCTION_ARG_ADVANCE, FUNCTION_ARG): Move to sh.c.
(PASS_IN_REG_P): Support renesas attribute. Pass DF and TF on the
stack for the renesas abi.
(STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED,
SETUP_INCOMING_VARARGS, EXPAND_BUILTIN_SAVEREGS,
PROMOTE_PROTOTYPES): Moved to sh.c. * config/sh/sh.md (call): Set
call cookie to indicate renesas calls.
* decl.c (finish_function): Pass fndecl to aggregate_value_p.
* misc.c (default_pass_by_ref): Convert to calls.return_in_memory
hook.
From-SVN: r71048
2003-09-04 05:18:05 +02:00
|
|
|
by this function. Also, the option @option{-fpcc-struct-return}
|
1996-09-25 01:21:45 +02:00
|
|
|
takes effect regardless of this macro. On most systems, it is
|
targhooks.c: New file.
* targhooks.c: New file.
* targhooks.h: New file.
* Makefile.in: Add targhooks.o support.
(function.o): Depend on$(TARGET_H).
(stmt.o): Likewise.
(combine.o): Depend on $(TREE_H) and $(TARGET_H).
* builtins.c (apply_args_size, expand_builtin_apply_args_1,
expand_builtin_apply): Convert to calls.struct_value_rtx hook.
(expand_builtin_saveregs): Convert to
calls.expand_builtin_saveregs hook.
* c-decl.c (start_decl): Handle new calls.promote_prototypes hook
here, instead of ...
(get_parm_info) ... here.
(store_parm_decls_oldstyle): Convert to calls.promote_prototypes
hook.
(finish_function): Handle calls.promote_prototypes hook here too.
* c-typeck.c (convert_arguments): Convert to
calls.promote_prototypes hook.
(c_convert_parm_for_inlining): Likewise.
* calls.c (initialize_argument_information): Convert to
calls.promote_function_args hook.
(expand_call): Convert to calls.struct_value_rtx,
calls.strict_argument_naming,
calls.pretend_outgoing_varargs_named, and
calls.promote_function_return hooks. Pass fndecl to
aggregate_value_p. Initialize CUMULATIVE_ARGS before calling
hooks, so they can use that.
(emit_library_call_value_1): Likewise.
* combine.c (setup_incoming_promotions): Convert to
calls.promote_function_args hook.
* emit-rtl.c: Convert to calls.struct_value_rtx hook.
* expr.c (expand_assignment): Pass call to aggregate_value_p.
(expand_expr): Likewise.
* expr.h: Remove support for SETUP_INCOMING_VARARGS,
STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED,
RETURN_IN_MEMORY macro defaults.
* final.c (profile_function): Convert to calls.struct_value_rtx
hook.
* function.c (aggregate_value_p): Accept function type tree as
second parameter; try to deduce fntype from it. Convert to
calls.return_in_memory hook.
(assign_parms): Convert to calls.setup_incoming_varargs,
calls.strict_argument_naming, calls.promote_function_args,
calls.pretend_outgoing_varargs_named hooks. Pass fndecl to
aggregate_value_p.
(expand_function_start): Likewise. Convert to
calls.struct_value_rtx hook.
(expand_function_end): Convert to calls.promote_function_return hook.
(allocate_struct_function): Pass fndecl to aggregate_value_p.
* hard-reg-set.h: Update comments to new hook names.
* integrate.c (expand_inline_function): Pass fndecl to aggregate_value_p.
* reg-stack.c (stack_result): Likewise.
* rtl.h (struct_value_rtx, struct_value_incoming_rtx): Delete.
* stmt.c (expand_value_return): Convert to
calls.promote_function_return hook.
* target-def.h: Add TARGET_PROMOTE_FUNCTION_ARGS,
TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES,
TARGET_STRUCT_VALUE_RTX, TARGET_RETURN_IN_MEMORY,
TARGET_EXPAND_BUILTIN_SAVEREGS, TARGET_SETUP_INCOMING_VARARGS,
TARGET_STRICT_ARGUMENT_NAMING,
TARGET_PRETEND_OUTGOING_VARARGS_NAMED, and TARGET_CALLS.
* target.h: Likewise.
* tree.h (aggregate_value_p): Also takes a tree to deduce function
attributes from (for target hooks).
* doc/tm.texi (PROMOTE_FUNCTION_ARGS, PROMOTE_FUNCTION_RETURN,
PROMOTE_PROTOTYPES, RETURN_IN_MEMORY, STRUCT_VALUE_REGNUM,
STRUCT_VALUE, STRUCT_VALUE_INCOMING_REGNUM, STRUCT_VALUE_INCOMING,
EXPAND_BUILTIN_SAVEREGS, SETUP_INCOMING_VARARGS,
STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED): Convert
to hooks.
* config/alpha/alpha.c (alpha_output_mi_thunk_osf): Pass function
to aggregate_value_p.
* config/arm/arm.c (arm_init_cumulative_args,
arm_output_mi_thunk): Likewise.
* config/i386/i386.c (ix86_return_pops_args, x86_this_parameter):
Likewise.
* config/mips/mips.c (mips_save_reg_p, mips_expand_prologue,
mips_can_use_return_insn): Likewise.
* config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise.
* config/s390/s390.c (s390_output_mi_thunk): Likewise.
* config/sparc/sparc.c (sparc_output_mi_thunk): Pass function to
aggregate_value_p.
* config/story16/stormy16.c (xstormy16_asm_output_mi_thunk): Pass
function to aggregate_value_p.
* objc/objc-act.c (generate_struct_by_value_array): Pass NULL to
aggregate_value_p.
* config/sh/sh-protos.h (sh_builtin_saveregs): Remove.
(sh_attr_renesas_p, sh_cfun_attr_renesas_p, sh_function_arg,
sh_function_arg_advance, sh_pass_in_reg_p): New. * config/sh/sh.c
(sh_handle_renesas_attribute, sh_promote_prototypes,
sh_struct_value_rtx, sh_return_in_memory, sh_builtin_saveregs,
sh_setup_incoming_varargs, sh_strict_argument_naming,
sh_pretend_outgoing_varargs_named): New decls.
(targetm): Add new hooks.
(calc_live_regs): Save MACL and MACH if the function has the
renesas attribute.
(sh_expand_prologue): Support renesas attribute.
(sh_builtin_saveregs): Make static.
(sh_build_va_list): Support renesas attribute.
(sh_va_start): Likewise.
(sh_va_arg): Likewise.
(sh_promote_prototypes): New.
(sh_function_arg): New, moved from sh.h. Support renesas
attribute.
(sh_function_arg_advance): Likewise.
(sh_return_in_memory): Likewise.
(sh_strict_argument_naming): Likewise.
(sh_pretend_outgoing_varargs_named): Likewise.
(sh_struct_value_rtx): New.
(sh_attribute): Add renesas attribute.
(sh_handle_renesas_attribute): New.
(sh_attr_renesas_p, sh_cfun_attr_renesas_p): New.
(sh_ms_bitfield_layout_p): Support renesas attribute also.
(sh_output_mi_thunk): Pass function to aggregate_value_p. *
config/sh/sh.h (TARGET_SWITCHES): Add -mrenesas as an alias for
-mhitachi.
(STRUCT_VALUE_REGNUM, STRUCT_VALUE, RETURN_IN_MEMORY): Moved to
target hooks.
(sh_args): Add renesas_abi flag.
(INIT_CUMULATIVE_ARGS): Set it. Pass fndecl to aggregate_value_p.
(FUNCTION_ARG_ADVANCE, FUNCTION_ARG): Move to sh.c.
(PASS_IN_REG_P): Support renesas attribute. Pass DF and TF on the
stack for the renesas abi.
(STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED,
SETUP_INCOMING_VARARGS, EXPAND_BUILTIN_SAVEREGS,
PROMOTE_PROTOTYPES): Moved to sh.c. * config/sh/sh.md (call): Set
call cookie to indicate renesas calls.
* decl.c (finish_function): Pass fndecl to aggregate_value_p.
* misc.c (default_pass_by_ref): Convert to calls.return_in_memory
hook.
From-SVN: r71048
2003-09-04 05:18:05 +02:00
|
|
|
possible to leave the hook undefined; this causes a default
|
1996-09-25 01:21:45 +02:00
|
|
|
definition to be used, whose value is the constant 1 for @code{BLKmode}
|
|
|
|
values, and 0 otherwise.
|
|
|
|
|
targhooks.c: New file.
* targhooks.c: New file.
* targhooks.h: New file.
* Makefile.in: Add targhooks.o support.
(function.o): Depend on$(TARGET_H).
(stmt.o): Likewise.
(combine.o): Depend on $(TREE_H) and $(TARGET_H).
* builtins.c (apply_args_size, expand_builtin_apply_args_1,
expand_builtin_apply): Convert to calls.struct_value_rtx hook.
(expand_builtin_saveregs): Convert to
calls.expand_builtin_saveregs hook.
* c-decl.c (start_decl): Handle new calls.promote_prototypes hook
here, instead of ...
(get_parm_info) ... here.
(store_parm_decls_oldstyle): Convert to calls.promote_prototypes
hook.
(finish_function): Handle calls.promote_prototypes hook here too.
* c-typeck.c (convert_arguments): Convert to
calls.promote_prototypes hook.
(c_convert_parm_for_inlining): Likewise.
* calls.c (initialize_argument_information): Convert to
calls.promote_function_args hook.
(expand_call): Convert to calls.struct_value_rtx,
calls.strict_argument_naming,
calls.pretend_outgoing_varargs_named, and
calls.promote_function_return hooks. Pass fndecl to
aggregate_value_p. Initialize CUMULATIVE_ARGS before calling
hooks, so they can use that.
(emit_library_call_value_1): Likewise.
* combine.c (setup_incoming_promotions): Convert to
calls.promote_function_args hook.
* emit-rtl.c: Convert to calls.struct_value_rtx hook.
* expr.c (expand_assignment): Pass call to aggregate_value_p.
(expand_expr): Likewise.
* expr.h: Remove support for SETUP_INCOMING_VARARGS,
STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED,
RETURN_IN_MEMORY macro defaults.
* final.c (profile_function): Convert to calls.struct_value_rtx
hook.
* function.c (aggregate_value_p): Accept function type tree as
second parameter; try to deduce fntype from it. Convert to
calls.return_in_memory hook.
(assign_parms): Convert to calls.setup_incoming_varargs,
calls.strict_argument_naming, calls.promote_function_args,
calls.pretend_outgoing_varargs_named hooks. Pass fndecl to
aggregate_value_p.
(expand_function_start): Likewise. Convert to
calls.struct_value_rtx hook.
(expand_function_end): Convert to calls.promote_function_return hook.
(allocate_struct_function): Pass fndecl to aggregate_value_p.
* hard-reg-set.h: Update comments to new hook names.
* integrate.c (expand_inline_function): Pass fndecl to aggregate_value_p.
* reg-stack.c (stack_result): Likewise.
* rtl.h (struct_value_rtx, struct_value_incoming_rtx): Delete.
* stmt.c (expand_value_return): Convert to
calls.promote_function_return hook.
* target-def.h: Add TARGET_PROMOTE_FUNCTION_ARGS,
TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES,
TARGET_STRUCT_VALUE_RTX, TARGET_RETURN_IN_MEMORY,
TARGET_EXPAND_BUILTIN_SAVEREGS, TARGET_SETUP_INCOMING_VARARGS,
TARGET_STRICT_ARGUMENT_NAMING,
TARGET_PRETEND_OUTGOING_VARARGS_NAMED, and TARGET_CALLS.
* target.h: Likewise.
* tree.h (aggregate_value_p): Also takes a tree to deduce function
attributes from (for target hooks).
* doc/tm.texi (PROMOTE_FUNCTION_ARGS, PROMOTE_FUNCTION_RETURN,
PROMOTE_PROTOTYPES, RETURN_IN_MEMORY, STRUCT_VALUE_REGNUM,
STRUCT_VALUE, STRUCT_VALUE_INCOMING_REGNUM, STRUCT_VALUE_INCOMING,
EXPAND_BUILTIN_SAVEREGS, SETUP_INCOMING_VARARGS,
STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED): Convert
to hooks.
* config/alpha/alpha.c (alpha_output_mi_thunk_osf): Pass function
to aggregate_value_p.
* config/arm/arm.c (arm_init_cumulative_args,
arm_output_mi_thunk): Likewise.
* config/i386/i386.c (ix86_return_pops_args, x86_this_parameter):
Likewise.
* config/mips/mips.c (mips_save_reg_p, mips_expand_prologue,
mips_can_use_return_insn): Likewise.
* config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise.
* config/s390/s390.c (s390_output_mi_thunk): Likewise.
* config/sparc/sparc.c (sparc_output_mi_thunk): Pass function to
aggregate_value_p.
* config/story16/stormy16.c (xstormy16_asm_output_mi_thunk): Pass
function to aggregate_value_p.
* objc/objc-act.c (generate_struct_by_value_array): Pass NULL to
aggregate_value_p.
* config/sh/sh-protos.h (sh_builtin_saveregs): Remove.
(sh_attr_renesas_p, sh_cfun_attr_renesas_p, sh_function_arg,
sh_function_arg_advance, sh_pass_in_reg_p): New. * config/sh/sh.c
(sh_handle_renesas_attribute, sh_promote_prototypes,
sh_struct_value_rtx, sh_return_in_memory, sh_builtin_saveregs,
sh_setup_incoming_varargs, sh_strict_argument_naming,
sh_pretend_outgoing_varargs_named): New decls.
(targetm): Add new hooks.
(calc_live_regs): Save MACL and MACH if the function has the
renesas attribute.
(sh_expand_prologue): Support renesas attribute.
(sh_builtin_saveregs): Make static.
(sh_build_va_list): Support renesas attribute.
(sh_va_start): Likewise.
(sh_va_arg): Likewise.
(sh_promote_prototypes): New.
(sh_function_arg): New, moved from sh.h. Support renesas
attribute.
(sh_function_arg_advance): Likewise.
(sh_return_in_memory): Likewise.
(sh_strict_argument_naming): Likewise.
(sh_pretend_outgoing_varargs_named): Likewise.
(sh_struct_value_rtx): New.
(sh_attribute): Add renesas attribute.
(sh_handle_renesas_attribute): New.
(sh_attr_renesas_p, sh_cfun_attr_renesas_p): New.
(sh_ms_bitfield_layout_p): Support renesas attribute also.
(sh_output_mi_thunk): Pass function to aggregate_value_p. *
config/sh/sh.h (TARGET_SWITCHES): Add -mrenesas as an alias for
-mhitachi.
(STRUCT_VALUE_REGNUM, STRUCT_VALUE, RETURN_IN_MEMORY): Moved to
target hooks.
(sh_args): Add renesas_abi flag.
(INIT_CUMULATIVE_ARGS): Set it. Pass fndecl to aggregate_value_p.
(FUNCTION_ARG_ADVANCE, FUNCTION_ARG): Move to sh.c.
(PASS_IN_REG_P): Support renesas attribute. Pass DF and TF on the
stack for the renesas abi.
(STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED,
SETUP_INCOMING_VARARGS, EXPAND_BUILTIN_SAVEREGS,
PROMOTE_PROTOTYPES): Moved to sh.c. * config/sh/sh.md (call): Set
call cookie to indicate renesas calls.
* decl.c (finish_function): Pass fndecl to aggregate_value_p.
* misc.c (default_pass_by_ref): Convert to calls.return_in_memory
hook.
From-SVN: r71048
2003-09-04 05:18:05 +02:00
|
|
|
Do not use this hook to indicate that structures and unions should always
|
1996-09-25 01:21:45 +02:00
|
|
|
be returned in memory. You should instead use @code{DEFAULT_PCC_STRUCT_RETURN}
|
|
|
|
to indicate this.
|
targhooks.c: New file.
* targhooks.c: New file.
* targhooks.h: New file.
* Makefile.in: Add targhooks.o support.
(function.o): Depend on$(TARGET_H).
(stmt.o): Likewise.
(combine.o): Depend on $(TREE_H) and $(TARGET_H).
* builtins.c (apply_args_size, expand_builtin_apply_args_1,
expand_builtin_apply): Convert to calls.struct_value_rtx hook.
(expand_builtin_saveregs): Convert to
calls.expand_builtin_saveregs hook.
* c-decl.c (start_decl): Handle new calls.promote_prototypes hook
here, instead of ...
(get_parm_info) ... here.
(store_parm_decls_oldstyle): Convert to calls.promote_prototypes
hook.
(finish_function): Handle calls.promote_prototypes hook here too.
* c-typeck.c (convert_arguments): Convert to
calls.promote_prototypes hook.
(c_convert_parm_for_inlining): Likewise.
* calls.c (initialize_argument_information): Convert to
calls.promote_function_args hook.
(expand_call): Convert to calls.struct_value_rtx,
calls.strict_argument_naming,
calls.pretend_outgoing_varargs_named, and
calls.promote_function_return hooks. Pass fndecl to
aggregate_value_p. Initialize CUMULATIVE_ARGS before calling
hooks, so they can use that.
(emit_library_call_value_1): Likewise.
* combine.c (setup_incoming_promotions): Convert to
calls.promote_function_args hook.
* emit-rtl.c: Convert to calls.struct_value_rtx hook.
* expr.c (expand_assignment): Pass call to aggregate_value_p.
(expand_expr): Likewise.
* expr.h: Remove support for SETUP_INCOMING_VARARGS,
STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED,
RETURN_IN_MEMORY macro defaults.
* final.c (profile_function): Convert to calls.struct_value_rtx
hook.
* function.c (aggregate_value_p): Accept function type tree as
second parameter; try to deduce fntype from it. Convert to
calls.return_in_memory hook.
(assign_parms): Convert to calls.setup_incoming_varargs,
calls.strict_argument_naming, calls.promote_function_args,
calls.pretend_outgoing_varargs_named hooks. Pass fndecl to
aggregate_value_p.
(expand_function_start): Likewise. Convert to
calls.struct_value_rtx hook.
(expand_function_end): Convert to calls.promote_function_return hook.
(allocate_struct_function): Pass fndecl to aggregate_value_p.
* hard-reg-set.h: Update comments to new hook names.
* integrate.c (expand_inline_function): Pass fndecl to aggregate_value_p.
* reg-stack.c (stack_result): Likewise.
* rtl.h (struct_value_rtx, struct_value_incoming_rtx): Delete.
* stmt.c (expand_value_return): Convert to
calls.promote_function_return hook.
* target-def.h: Add TARGET_PROMOTE_FUNCTION_ARGS,
TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES,
TARGET_STRUCT_VALUE_RTX, TARGET_RETURN_IN_MEMORY,
TARGET_EXPAND_BUILTIN_SAVEREGS, TARGET_SETUP_INCOMING_VARARGS,
TARGET_STRICT_ARGUMENT_NAMING,
TARGET_PRETEND_OUTGOING_VARARGS_NAMED, and TARGET_CALLS.
* target.h: Likewise.
* tree.h (aggregate_value_p): Also takes a tree to deduce function
attributes from (for target hooks).
* doc/tm.texi (PROMOTE_FUNCTION_ARGS, PROMOTE_FUNCTION_RETURN,
PROMOTE_PROTOTYPES, RETURN_IN_MEMORY, STRUCT_VALUE_REGNUM,
STRUCT_VALUE, STRUCT_VALUE_INCOMING_REGNUM, STRUCT_VALUE_INCOMING,
EXPAND_BUILTIN_SAVEREGS, SETUP_INCOMING_VARARGS,
STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED): Convert
to hooks.
* config/alpha/alpha.c (alpha_output_mi_thunk_osf): Pass function
to aggregate_value_p.
* config/arm/arm.c (arm_init_cumulative_args,
arm_output_mi_thunk): Likewise.
* config/i386/i386.c (ix86_return_pops_args, x86_this_parameter):
Likewise.
* config/mips/mips.c (mips_save_reg_p, mips_expand_prologue,
mips_can_use_return_insn): Likewise.
* config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise.
* config/s390/s390.c (s390_output_mi_thunk): Likewise.
* config/sparc/sparc.c (sparc_output_mi_thunk): Pass function to
aggregate_value_p.
* config/story16/stormy16.c (xstormy16_asm_output_mi_thunk): Pass
function to aggregate_value_p.
* objc/objc-act.c (generate_struct_by_value_array): Pass NULL to
aggregate_value_p.
* config/sh/sh-protos.h (sh_builtin_saveregs): Remove.
(sh_attr_renesas_p, sh_cfun_attr_renesas_p, sh_function_arg,
sh_function_arg_advance, sh_pass_in_reg_p): New. * config/sh/sh.c
(sh_handle_renesas_attribute, sh_promote_prototypes,
sh_struct_value_rtx, sh_return_in_memory, sh_builtin_saveregs,
sh_setup_incoming_varargs, sh_strict_argument_naming,
sh_pretend_outgoing_varargs_named): New decls.
(targetm): Add new hooks.
(calc_live_regs): Save MACL and MACH if the function has the
renesas attribute.
(sh_expand_prologue): Support renesas attribute.
(sh_builtin_saveregs): Make static.
(sh_build_va_list): Support renesas attribute.
(sh_va_start): Likewise.
(sh_va_arg): Likewise.
(sh_promote_prototypes): New.
(sh_function_arg): New, moved from sh.h. Support renesas
attribute.
(sh_function_arg_advance): Likewise.
(sh_return_in_memory): Likewise.
(sh_strict_argument_naming): Likewise.
(sh_pretend_outgoing_varargs_named): Likewise.
(sh_struct_value_rtx): New.
(sh_attribute): Add renesas attribute.
(sh_handle_renesas_attribute): New.
(sh_attr_renesas_p, sh_cfun_attr_renesas_p): New.
(sh_ms_bitfield_layout_p): Support renesas attribute also.
(sh_output_mi_thunk): Pass function to aggregate_value_p. *
config/sh/sh.h (TARGET_SWITCHES): Add -mrenesas as an alias for
-mhitachi.
(STRUCT_VALUE_REGNUM, STRUCT_VALUE, RETURN_IN_MEMORY): Moved to
target hooks.
(sh_args): Add renesas_abi flag.
(INIT_CUMULATIVE_ARGS): Set it. Pass fndecl to aggregate_value_p.
(FUNCTION_ARG_ADVANCE, FUNCTION_ARG): Move to sh.c.
(PASS_IN_REG_P): Support renesas attribute. Pass DF and TF on the
stack for the renesas abi.
(STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED,
SETUP_INCOMING_VARARGS, EXPAND_BUILTIN_SAVEREGS,
PROMOTE_PROTOTYPES): Moved to sh.c. * config/sh/sh.md (call): Set
call cookie to indicate renesas calls.
* decl.c (finish_function): Pass fndecl to aggregate_value_p.
* misc.c (default_pass_by_ref): Convert to calls.return_in_memory
hook.
From-SVN: r71048
2003-09-04 05:18:05 +02:00
|
|
|
@end deftypefn
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac DEFAULT_PCC_STRUCT_RETURN
|
1996-09-25 01:21:45 +02:00
|
|
|
Define this macro to be 1 if all structure and union return values must be
|
|
|
|
in memory. Since this results in slower code, this should be defined
|
c-tree.texi, [...]: Replace . at end of sentences preceded by a capital letter with @..
* doc/c-tree.texi, doc/contrib.texi, doc/cpp.texi,
doc/cppinternals.texi, doc/extend.texi, doc/gcc.texi,
doc/gcov.texi, doc/install-old.texi, doc/install.texi,
doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: Replace
. at end of sentences preceded by a capital letter with @..
From-SVN: r43611
2001-06-27 17:04:16 +02:00
|
|
|
only if needed for compatibility with other compilers or with an ABI@.
|
1996-09-25 01:21:45 +02:00
|
|
|
If you define this macro to be 0, then the conventions used for structure
|
2004-01-15 04:33:11 +01:00
|
|
|
and union return values are decided by the @code{TARGET_RETURN_IN_MEMORY}
|
|
|
|
target hook.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
If not defined, this defaults to the value 1.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
targhooks.c: New file.
* targhooks.c: New file.
* targhooks.h: New file.
* Makefile.in: Add targhooks.o support.
(function.o): Depend on$(TARGET_H).
(stmt.o): Likewise.
(combine.o): Depend on $(TREE_H) and $(TARGET_H).
* builtins.c (apply_args_size, expand_builtin_apply_args_1,
expand_builtin_apply): Convert to calls.struct_value_rtx hook.
(expand_builtin_saveregs): Convert to
calls.expand_builtin_saveregs hook.
* c-decl.c (start_decl): Handle new calls.promote_prototypes hook
here, instead of ...
(get_parm_info) ... here.
(store_parm_decls_oldstyle): Convert to calls.promote_prototypes
hook.
(finish_function): Handle calls.promote_prototypes hook here too.
* c-typeck.c (convert_arguments): Convert to
calls.promote_prototypes hook.
(c_convert_parm_for_inlining): Likewise.
* calls.c (initialize_argument_information): Convert to
calls.promote_function_args hook.
(expand_call): Convert to calls.struct_value_rtx,
calls.strict_argument_naming,
calls.pretend_outgoing_varargs_named, and
calls.promote_function_return hooks. Pass fndecl to
aggregate_value_p. Initialize CUMULATIVE_ARGS before calling
hooks, so they can use that.
(emit_library_call_value_1): Likewise.
* combine.c (setup_incoming_promotions): Convert to
calls.promote_function_args hook.
* emit-rtl.c: Convert to calls.struct_value_rtx hook.
* expr.c (expand_assignment): Pass call to aggregate_value_p.
(expand_expr): Likewise.
* expr.h: Remove support for SETUP_INCOMING_VARARGS,
STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED,
RETURN_IN_MEMORY macro defaults.
* final.c (profile_function): Convert to calls.struct_value_rtx
hook.
* function.c (aggregate_value_p): Accept function type tree as
second parameter; try to deduce fntype from it. Convert to
calls.return_in_memory hook.
(assign_parms): Convert to calls.setup_incoming_varargs,
calls.strict_argument_naming, calls.promote_function_args,
calls.pretend_outgoing_varargs_named hooks. Pass fndecl to
aggregate_value_p.
(expand_function_start): Likewise. Convert to
calls.struct_value_rtx hook.
(expand_function_end): Convert to calls.promote_function_return hook.
(allocate_struct_function): Pass fndecl to aggregate_value_p.
* hard-reg-set.h: Update comments to new hook names.
* integrate.c (expand_inline_function): Pass fndecl to aggregate_value_p.
* reg-stack.c (stack_result): Likewise.
* rtl.h (struct_value_rtx, struct_value_incoming_rtx): Delete.
* stmt.c (expand_value_return): Convert to
calls.promote_function_return hook.
* target-def.h: Add TARGET_PROMOTE_FUNCTION_ARGS,
TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES,
TARGET_STRUCT_VALUE_RTX, TARGET_RETURN_IN_MEMORY,
TARGET_EXPAND_BUILTIN_SAVEREGS, TARGET_SETUP_INCOMING_VARARGS,
TARGET_STRICT_ARGUMENT_NAMING,
TARGET_PRETEND_OUTGOING_VARARGS_NAMED, and TARGET_CALLS.
* target.h: Likewise.
* tree.h (aggregate_value_p): Also takes a tree to deduce function
attributes from (for target hooks).
* doc/tm.texi (PROMOTE_FUNCTION_ARGS, PROMOTE_FUNCTION_RETURN,
PROMOTE_PROTOTYPES, RETURN_IN_MEMORY, STRUCT_VALUE_REGNUM,
STRUCT_VALUE, STRUCT_VALUE_INCOMING_REGNUM, STRUCT_VALUE_INCOMING,
EXPAND_BUILTIN_SAVEREGS, SETUP_INCOMING_VARARGS,
STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED): Convert
to hooks.
* config/alpha/alpha.c (alpha_output_mi_thunk_osf): Pass function
to aggregate_value_p.
* config/arm/arm.c (arm_init_cumulative_args,
arm_output_mi_thunk): Likewise.
* config/i386/i386.c (ix86_return_pops_args, x86_this_parameter):
Likewise.
* config/mips/mips.c (mips_save_reg_p, mips_expand_prologue,
mips_can_use_return_insn): Likewise.
* config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise.
* config/s390/s390.c (s390_output_mi_thunk): Likewise.
* config/sparc/sparc.c (sparc_output_mi_thunk): Pass function to
aggregate_value_p.
* config/story16/stormy16.c (xstormy16_asm_output_mi_thunk): Pass
function to aggregate_value_p.
* objc/objc-act.c (generate_struct_by_value_array): Pass NULL to
aggregate_value_p.
* config/sh/sh-protos.h (sh_builtin_saveregs): Remove.
(sh_attr_renesas_p, sh_cfun_attr_renesas_p, sh_function_arg,
sh_function_arg_advance, sh_pass_in_reg_p): New. * config/sh/sh.c
(sh_handle_renesas_attribute, sh_promote_prototypes,
sh_struct_value_rtx, sh_return_in_memory, sh_builtin_saveregs,
sh_setup_incoming_varargs, sh_strict_argument_naming,
sh_pretend_outgoing_varargs_named): New decls.
(targetm): Add new hooks.
(calc_live_regs): Save MACL and MACH if the function has the
renesas attribute.
(sh_expand_prologue): Support renesas attribute.
(sh_builtin_saveregs): Make static.
(sh_build_va_list): Support renesas attribute.
(sh_va_start): Likewise.
(sh_va_arg): Likewise.
(sh_promote_prototypes): New.
(sh_function_arg): New, moved from sh.h. Support renesas
attribute.
(sh_function_arg_advance): Likewise.
(sh_return_in_memory): Likewise.
(sh_strict_argument_naming): Likewise.
(sh_pretend_outgoing_varargs_named): Likewise.
(sh_struct_value_rtx): New.
(sh_attribute): Add renesas attribute.
(sh_handle_renesas_attribute): New.
(sh_attr_renesas_p, sh_cfun_attr_renesas_p): New.
(sh_ms_bitfield_layout_p): Support renesas attribute also.
(sh_output_mi_thunk): Pass function to aggregate_value_p. *
config/sh/sh.h (TARGET_SWITCHES): Add -mrenesas as an alias for
-mhitachi.
(STRUCT_VALUE_REGNUM, STRUCT_VALUE, RETURN_IN_MEMORY): Moved to
target hooks.
(sh_args): Add renesas_abi flag.
(INIT_CUMULATIVE_ARGS): Set it. Pass fndecl to aggregate_value_p.
(FUNCTION_ARG_ADVANCE, FUNCTION_ARG): Move to sh.c.
(PASS_IN_REG_P): Support renesas attribute. Pass DF and TF on the
stack for the renesas abi.
(STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED,
SETUP_INCOMING_VARARGS, EXPAND_BUILTIN_SAVEREGS,
PROMOTE_PROTOTYPES): Moved to sh.c. * config/sh/sh.md (call): Set
call cookie to indicate renesas calls.
* decl.c (finish_function): Pass fndecl to aggregate_value_p.
* misc.c (default_pass_by_ref): Convert to calls.return_in_memory
hook.
From-SVN: r71048
2003-09-04 05:18:05 +02:00
|
|
|
@deftypefn {Target Hook} rtx TARGET_STRUCT_VALUE_RTX (tree @var{fndecl}, int @var{incoming})
|
|
|
|
This target hook should return the location of the structure value
|
|
|
|
address (normally a @code{mem} or @code{reg}), or 0 if the address is
|
|
|
|
passed as an ``invisible'' first argument. Note that @var{fndecl} may
|
target-def.h (TARGET_STRUCT_VALUE_RTX): Define as hook_rtx_tree_int_null.
* target-def.h (TARGET_STRUCT_VALUE_RTX): Define as
hook_rtx_tree_int_null.
* targhooks.c (default_struct_value_rtx): Remove.
* targhooks.h: Remove the prototype for
default_struct_value_rtx.
* config/alpha/alpha.c, config/arc/arc.c, config/avr/avr.c,
config/fr30/fr30.c, config/h8300/h8300.c, config/i386/i386.c,
config/ip2k/ip2k.c, config/iq2000/iq2000.c,
config/m32r/m32r.c, config/mcore/mcore.c, config/mips/mips.c,
config/mn10300/mn10300.c, config/pdp11/pdp11.c,
config/rs6000/rs6000.c, config/s390/s390.c,
config/stormy16/stormy16.c, config/v850/v850.c,
config/xtensa/xtensa.c (TARGET_STRUCT_VALUE_RTX): Remove.
* doc/tm.texi (TARGET_STRUCT_VALUE_RTX): Document the default.
From-SVN: r77505
2004-02-09 00:08:48 +01:00
|
|
|
be @code{NULL}, for libcalls. You do not need to define this target
|
|
|
|
hook if the address is always passed as an ``invisible'' first
|
|
|
|
argument.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
On some architectures the place where the structure value address
|
|
|
|
is found by the called function is not the same place that the
|
|
|
|
caller put it. This can be due to register windows, or it could
|
|
|
|
be because the function prologue moves it to a different place.
|
targhooks.c: New file.
* targhooks.c: New file.
* targhooks.h: New file.
* Makefile.in: Add targhooks.o support.
(function.o): Depend on$(TARGET_H).
(stmt.o): Likewise.
(combine.o): Depend on $(TREE_H) and $(TARGET_H).
* builtins.c (apply_args_size, expand_builtin_apply_args_1,
expand_builtin_apply): Convert to calls.struct_value_rtx hook.
(expand_builtin_saveregs): Convert to
calls.expand_builtin_saveregs hook.
* c-decl.c (start_decl): Handle new calls.promote_prototypes hook
here, instead of ...
(get_parm_info) ... here.
(store_parm_decls_oldstyle): Convert to calls.promote_prototypes
hook.
(finish_function): Handle calls.promote_prototypes hook here too.
* c-typeck.c (convert_arguments): Convert to
calls.promote_prototypes hook.
(c_convert_parm_for_inlining): Likewise.
* calls.c (initialize_argument_information): Convert to
calls.promote_function_args hook.
(expand_call): Convert to calls.struct_value_rtx,
calls.strict_argument_naming,
calls.pretend_outgoing_varargs_named, and
calls.promote_function_return hooks. Pass fndecl to
aggregate_value_p. Initialize CUMULATIVE_ARGS before calling
hooks, so they can use that.
(emit_library_call_value_1): Likewise.
* combine.c (setup_incoming_promotions): Convert to
calls.promote_function_args hook.
* emit-rtl.c: Convert to calls.struct_value_rtx hook.
* expr.c (expand_assignment): Pass call to aggregate_value_p.
(expand_expr): Likewise.
* expr.h: Remove support for SETUP_INCOMING_VARARGS,
STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED,
RETURN_IN_MEMORY macro defaults.
* final.c (profile_function): Convert to calls.struct_value_rtx
hook.
* function.c (aggregate_value_p): Accept function type tree as
second parameter; try to deduce fntype from it. Convert to
calls.return_in_memory hook.
(assign_parms): Convert to calls.setup_incoming_varargs,
calls.strict_argument_naming, calls.promote_function_args,
calls.pretend_outgoing_varargs_named hooks. Pass fndecl to
aggregate_value_p.
(expand_function_start): Likewise. Convert to
calls.struct_value_rtx hook.
(expand_function_end): Convert to calls.promote_function_return hook.
(allocate_struct_function): Pass fndecl to aggregate_value_p.
* hard-reg-set.h: Update comments to new hook names.
* integrate.c (expand_inline_function): Pass fndecl to aggregate_value_p.
* reg-stack.c (stack_result): Likewise.
* rtl.h (struct_value_rtx, struct_value_incoming_rtx): Delete.
* stmt.c (expand_value_return): Convert to
calls.promote_function_return hook.
* target-def.h: Add TARGET_PROMOTE_FUNCTION_ARGS,
TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES,
TARGET_STRUCT_VALUE_RTX, TARGET_RETURN_IN_MEMORY,
TARGET_EXPAND_BUILTIN_SAVEREGS, TARGET_SETUP_INCOMING_VARARGS,
TARGET_STRICT_ARGUMENT_NAMING,
TARGET_PRETEND_OUTGOING_VARARGS_NAMED, and TARGET_CALLS.
* target.h: Likewise.
* tree.h (aggregate_value_p): Also takes a tree to deduce function
attributes from (for target hooks).
* doc/tm.texi (PROMOTE_FUNCTION_ARGS, PROMOTE_FUNCTION_RETURN,
PROMOTE_PROTOTYPES, RETURN_IN_MEMORY, STRUCT_VALUE_REGNUM,
STRUCT_VALUE, STRUCT_VALUE_INCOMING_REGNUM, STRUCT_VALUE_INCOMING,
EXPAND_BUILTIN_SAVEREGS, SETUP_INCOMING_VARARGS,
STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED): Convert
to hooks.
* config/alpha/alpha.c (alpha_output_mi_thunk_osf): Pass function
to aggregate_value_p.
* config/arm/arm.c (arm_init_cumulative_args,
arm_output_mi_thunk): Likewise.
* config/i386/i386.c (ix86_return_pops_args, x86_this_parameter):
Likewise.
* config/mips/mips.c (mips_save_reg_p, mips_expand_prologue,
mips_can_use_return_insn): Likewise.
* config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise.
* config/s390/s390.c (s390_output_mi_thunk): Likewise.
* config/sparc/sparc.c (sparc_output_mi_thunk): Pass function to
aggregate_value_p.
* config/story16/stormy16.c (xstormy16_asm_output_mi_thunk): Pass
function to aggregate_value_p.
* objc/objc-act.c (generate_struct_by_value_array): Pass NULL to
aggregate_value_p.
* config/sh/sh-protos.h (sh_builtin_saveregs): Remove.
(sh_attr_renesas_p, sh_cfun_attr_renesas_p, sh_function_arg,
sh_function_arg_advance, sh_pass_in_reg_p): New. * config/sh/sh.c
(sh_handle_renesas_attribute, sh_promote_prototypes,
sh_struct_value_rtx, sh_return_in_memory, sh_builtin_saveregs,
sh_setup_incoming_varargs, sh_strict_argument_naming,
sh_pretend_outgoing_varargs_named): New decls.
(targetm): Add new hooks.
(calc_live_regs): Save MACL and MACH if the function has the
renesas attribute.
(sh_expand_prologue): Support renesas attribute.
(sh_builtin_saveregs): Make static.
(sh_build_va_list): Support renesas attribute.
(sh_va_start): Likewise.
(sh_va_arg): Likewise.
(sh_promote_prototypes): New.
(sh_function_arg): New, moved from sh.h. Support renesas
attribute.
(sh_function_arg_advance): Likewise.
(sh_return_in_memory): Likewise.
(sh_strict_argument_naming): Likewise.
(sh_pretend_outgoing_varargs_named): Likewise.
(sh_struct_value_rtx): New.
(sh_attribute): Add renesas attribute.
(sh_handle_renesas_attribute): New.
(sh_attr_renesas_p, sh_cfun_attr_renesas_p): New.
(sh_ms_bitfield_layout_p): Support renesas attribute also.
(sh_output_mi_thunk): Pass function to aggregate_value_p. *
config/sh/sh.h (TARGET_SWITCHES): Add -mrenesas as an alias for
-mhitachi.
(STRUCT_VALUE_REGNUM, STRUCT_VALUE, RETURN_IN_MEMORY): Moved to
target hooks.
(sh_args): Add renesas_abi flag.
(INIT_CUMULATIVE_ARGS): Set it. Pass fndecl to aggregate_value_p.
(FUNCTION_ARG_ADVANCE, FUNCTION_ARG): Move to sh.c.
(PASS_IN_REG_P): Support renesas attribute. Pass DF and TF on the
stack for the renesas abi.
(STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED,
SETUP_INCOMING_VARARGS, EXPAND_BUILTIN_SAVEREGS,
PROMOTE_PROTOTYPES): Moved to sh.c. * config/sh/sh.md (call): Set
call cookie to indicate renesas calls.
* decl.c (finish_function): Pass fndecl to aggregate_value_p.
* misc.c (default_pass_by_ref): Convert to calls.return_in_memory
hook.
From-SVN: r71048
2003-09-04 05:18:05 +02:00
|
|
|
@var{incoming} is @code{true} when the location is needed in
|
|
|
|
the context of the called function, and @code{false} in the context of
|
|
|
|
the caller.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
targhooks.c: New file.
* targhooks.c: New file.
* targhooks.h: New file.
* Makefile.in: Add targhooks.o support.
(function.o): Depend on$(TARGET_H).
(stmt.o): Likewise.
(combine.o): Depend on $(TREE_H) and $(TARGET_H).
* builtins.c (apply_args_size, expand_builtin_apply_args_1,
expand_builtin_apply): Convert to calls.struct_value_rtx hook.
(expand_builtin_saveregs): Convert to
calls.expand_builtin_saveregs hook.
* c-decl.c (start_decl): Handle new calls.promote_prototypes hook
here, instead of ...
(get_parm_info) ... here.
(store_parm_decls_oldstyle): Convert to calls.promote_prototypes
hook.
(finish_function): Handle calls.promote_prototypes hook here too.
* c-typeck.c (convert_arguments): Convert to
calls.promote_prototypes hook.
(c_convert_parm_for_inlining): Likewise.
* calls.c (initialize_argument_information): Convert to
calls.promote_function_args hook.
(expand_call): Convert to calls.struct_value_rtx,
calls.strict_argument_naming,
calls.pretend_outgoing_varargs_named, and
calls.promote_function_return hooks. Pass fndecl to
aggregate_value_p. Initialize CUMULATIVE_ARGS before calling
hooks, so they can use that.
(emit_library_call_value_1): Likewise.
* combine.c (setup_incoming_promotions): Convert to
calls.promote_function_args hook.
* emit-rtl.c: Convert to calls.struct_value_rtx hook.
* expr.c (expand_assignment): Pass call to aggregate_value_p.
(expand_expr): Likewise.
* expr.h: Remove support for SETUP_INCOMING_VARARGS,
STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED,
RETURN_IN_MEMORY macro defaults.
* final.c (profile_function): Convert to calls.struct_value_rtx
hook.
* function.c (aggregate_value_p): Accept function type tree as
second parameter; try to deduce fntype from it. Convert to
calls.return_in_memory hook.
(assign_parms): Convert to calls.setup_incoming_varargs,
calls.strict_argument_naming, calls.promote_function_args,
calls.pretend_outgoing_varargs_named hooks. Pass fndecl to
aggregate_value_p.
(expand_function_start): Likewise. Convert to
calls.struct_value_rtx hook.
(expand_function_end): Convert to calls.promote_function_return hook.
(allocate_struct_function): Pass fndecl to aggregate_value_p.
* hard-reg-set.h: Update comments to new hook names.
* integrate.c (expand_inline_function): Pass fndecl to aggregate_value_p.
* reg-stack.c (stack_result): Likewise.
* rtl.h (struct_value_rtx, struct_value_incoming_rtx): Delete.
* stmt.c (expand_value_return): Convert to
calls.promote_function_return hook.
* target-def.h: Add TARGET_PROMOTE_FUNCTION_ARGS,
TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES,
TARGET_STRUCT_VALUE_RTX, TARGET_RETURN_IN_MEMORY,
TARGET_EXPAND_BUILTIN_SAVEREGS, TARGET_SETUP_INCOMING_VARARGS,
TARGET_STRICT_ARGUMENT_NAMING,
TARGET_PRETEND_OUTGOING_VARARGS_NAMED, and TARGET_CALLS.
* target.h: Likewise.
* tree.h (aggregate_value_p): Also takes a tree to deduce function
attributes from (for target hooks).
* doc/tm.texi (PROMOTE_FUNCTION_ARGS, PROMOTE_FUNCTION_RETURN,
PROMOTE_PROTOTYPES, RETURN_IN_MEMORY, STRUCT_VALUE_REGNUM,
STRUCT_VALUE, STRUCT_VALUE_INCOMING_REGNUM, STRUCT_VALUE_INCOMING,
EXPAND_BUILTIN_SAVEREGS, SETUP_INCOMING_VARARGS,
STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED): Convert
to hooks.
* config/alpha/alpha.c (alpha_output_mi_thunk_osf): Pass function
to aggregate_value_p.
* config/arm/arm.c (arm_init_cumulative_args,
arm_output_mi_thunk): Likewise.
* config/i386/i386.c (ix86_return_pops_args, x86_this_parameter):
Likewise.
* config/mips/mips.c (mips_save_reg_p, mips_expand_prologue,
mips_can_use_return_insn): Likewise.
* config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise.
* config/s390/s390.c (s390_output_mi_thunk): Likewise.
* config/sparc/sparc.c (sparc_output_mi_thunk): Pass function to
aggregate_value_p.
* config/story16/stormy16.c (xstormy16_asm_output_mi_thunk): Pass
function to aggregate_value_p.
* objc/objc-act.c (generate_struct_by_value_array): Pass NULL to
aggregate_value_p.
* config/sh/sh-protos.h (sh_builtin_saveregs): Remove.
(sh_attr_renesas_p, sh_cfun_attr_renesas_p, sh_function_arg,
sh_function_arg_advance, sh_pass_in_reg_p): New. * config/sh/sh.c
(sh_handle_renesas_attribute, sh_promote_prototypes,
sh_struct_value_rtx, sh_return_in_memory, sh_builtin_saveregs,
sh_setup_incoming_varargs, sh_strict_argument_naming,
sh_pretend_outgoing_varargs_named): New decls.
(targetm): Add new hooks.
(calc_live_regs): Save MACL and MACH if the function has the
renesas attribute.
(sh_expand_prologue): Support renesas attribute.
(sh_builtin_saveregs): Make static.
(sh_build_va_list): Support renesas attribute.
(sh_va_start): Likewise.
(sh_va_arg): Likewise.
(sh_promote_prototypes): New.
(sh_function_arg): New, moved from sh.h. Support renesas
attribute.
(sh_function_arg_advance): Likewise.
(sh_return_in_memory): Likewise.
(sh_strict_argument_naming): Likewise.
(sh_pretend_outgoing_varargs_named): Likewise.
(sh_struct_value_rtx): New.
(sh_attribute): Add renesas attribute.
(sh_handle_renesas_attribute): New.
(sh_attr_renesas_p, sh_cfun_attr_renesas_p): New.
(sh_ms_bitfield_layout_p): Support renesas attribute also.
(sh_output_mi_thunk): Pass function to aggregate_value_p. *
config/sh/sh.h (TARGET_SWITCHES): Add -mrenesas as an alias for
-mhitachi.
(STRUCT_VALUE_REGNUM, STRUCT_VALUE, RETURN_IN_MEMORY): Moved to
target hooks.
(sh_args): Add renesas_abi flag.
(INIT_CUMULATIVE_ARGS): Set it. Pass fndecl to aggregate_value_p.
(FUNCTION_ARG_ADVANCE, FUNCTION_ARG): Move to sh.c.
(PASS_IN_REG_P): Support renesas attribute. Pass DF and TF on the
stack for the renesas abi.
(STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED,
SETUP_INCOMING_VARARGS, EXPAND_BUILTIN_SAVEREGS,
PROMOTE_PROTOTYPES): Moved to sh.c. * config/sh/sh.md (call): Set
call cookie to indicate renesas calls.
* decl.c (finish_function): Pass fndecl to aggregate_value_p.
* misc.c (default_pass_by_ref): Convert to calls.return_in_memory
hook.
From-SVN: r71048
2003-09-04 05:18:05 +02:00
|
|
|
If @var{incoming} is @code{true} and the address is to be found on the
|
|
|
|
stack, return a @code{mem} which refers to the frame pointer.
|
|
|
|
@end deftypefn
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac PCC_STATIC_STRUCT_RETURN
|
1996-09-25 01:21:45 +02:00
|
|
|
Define this macro if the usual system convention on the target machine
|
|
|
|
for returning structures and unions is for the called function to return
|
|
|
|
the address of a static variable containing the value.
|
|
|
|
|
|
|
|
Do not define this if the usual system convention is for the caller to
|
|
|
|
pass an address to the subroutine.
|
|
|
|
|
c-tree.texi, [...]: Use more logical markup.
* doc/c-tree.texi, doc/contrib.texi, doc/extend.texi,
doc/gcc.texi, doc/gcov.texi, doc/install-old.texi,
doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: Use more
logical markup. Use TeX quotes and dashes. Use @dots{} and
@minus{}. Avoid spaces inside @var. Update last modification
date in gcc.texi.
* doc/gcc.1, doc/gcov.1: Regenerate.
From-SVN: r43369
2001-06-14 13:08:04 +02:00
|
|
|
This macro has effect in @option{-fpcc-struct-return} mode, but it does
|
|
|
|
nothing when you use @option{-freg-struct-return} mode.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
@node Caller Saves
|
|
|
|
@subsection Caller-Saves Register Allocation
|
|
|
|
|
1999-08-25 09:27:13 +02:00
|
|
|
If you enable it, GCC can save registers around function calls. This
|
1996-09-25 01:21:45 +02:00
|
|
|
makes it possible to use call-clobbered registers to hold variables that
|
|
|
|
must live across calls.
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac CALLER_SAVE_PROFITABLE (@var{refs}, @var{calls})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C expression to determine whether it is worthwhile to consider placing
|
|
|
|
a pseudo-register in a call-clobbered hard register and saving and
|
|
|
|
restoring it around each function call. The expression should be 1 when
|
|
|
|
this is worth doing, and 0 otherwise.
|
|
|
|
|
|
|
|
If you don't define this macro, a default is used which is good on most
|
|
|
|
machines: @code{4 * @var{calls} < @var{refs}}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1998-09-30 19:21:12 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac HARD_REGNO_CALLER_SAVE_MODE (@var{regno}, @var{nregs})
|
1998-09-30 19:21:12 +02:00
|
|
|
A C expression specifying which mode is required for saving @var{nregs}
|
|
|
|
of a pseudo-register in call-clobbered hard register @var{regno}. If
|
|
|
|
@var{regno} is unsuitable for caller save, @code{VOIDmode} should be
|
|
|
|
returned. For most machines this macro need not be defined since GCC
|
|
|
|
will select the smallest suitable mode.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
@node Function Entry
|
|
|
|
@subsection Function Entry and Exit
|
|
|
|
@cindex function entry and exit
|
|
|
|
@cindex prologue
|
|
|
|
@cindex epilogue
|
|
|
|
|
|
|
|
This section describes the macros that output function entry
|
|
|
|
(@dfn{prologue}) and exit (@dfn{epilogue}) code.
|
|
|
|
|
2001-07-06 20:40:17 +02:00
|
|
|
@deftypefn {Target Hook} void TARGET_ASM_FUNCTION_PROLOGUE (FILE *@var{file}, HOST_WIDE_INT @var{size})
|
|
|
|
If defined, a function that outputs the assembler code for entry to a
|
1996-09-25 01:21:45 +02:00
|
|
|
function. The prologue is responsible for setting up the stack frame,
|
|
|
|
initializing the frame pointer register, saving registers that must be
|
|
|
|
saved, and allocating @var{size} additional bytes of storage for the
|
|
|
|
local variables. @var{size} is an integer. @var{file} is a stdio
|
|
|
|
stream to which the assembler code should be output.
|
|
|
|
|
|
|
|
The label for the beginning of the function need not be output by this
|
|
|
|
macro. That has already been done when the macro is run.
|
|
|
|
|
|
|
|
@findex regs_ever_live
|
|
|
|
To determine which registers to save, the macro can refer to the array
|
|
|
|
@code{regs_ever_live}: element @var{r} is nonzero if hard register
|
|
|
|
@var{r} is used anywhere within the function. This implies the function
|
|
|
|
prologue should save register @var{r}, provided it is not one of the
|
2001-07-06 20:40:17 +02:00
|
|
|
call-used registers. (@code{TARGET_ASM_FUNCTION_EPILOGUE} must likewise use
|
1996-09-25 01:21:45 +02:00
|
|
|
@code{regs_ever_live}.)
|
|
|
|
|
|
|
|
On machines that have ``register windows'', the function entry code does
|
|
|
|
not save on the stack the registers that are in the windows, even if
|
|
|
|
they are supposed to be preserved by function calls; instead it takes
|
|
|
|
appropriate steps to ``push'' the register stack, if any non-call-used
|
|
|
|
registers are used in the function.
|
|
|
|
|
|
|
|
@findex frame_pointer_needed
|
|
|
|
On machines where functions may or may not have frame-pointers, the
|
|
|
|
function entry code must vary accordingly; it must set up the frame
|
|
|
|
pointer if one is wanted, and not otherwise. To determine whether a
|
|
|
|
frame pointer is in wanted, the macro can refer to the variable
|
|
|
|
@code{frame_pointer_needed}. The variable's value will be 1 at run
|
|
|
|
time in a function that needs a frame pointer. @xref{Elimination}.
|
|
|
|
|
|
|
|
The function entry code is responsible for allocating any stack space
|
|
|
|
required for the function. This stack space consists of the regions
|
|
|
|
listed below. In most cases, these regions are allocated in the
|
|
|
|
order listed, with the last listed region closest to the top of the
|
|
|
|
stack (the lowest address if @code{STACK_GROWS_DOWNWARD} is defined, and
|
|
|
|
the highest address if it is not defined). You can use a different order
|
|
|
|
for a machine if doing so is more convenient or required for
|
|
|
|
compatibility reasons. Except in cases where required by standard
|
|
|
|
or by a debugger, there is no reason why the stack layout used by GCC
|
|
|
|
need agree with that used by other compilers for a machine.
|
2001-07-06 20:40:17 +02:00
|
|
|
@end deftypefn
|
|
|
|
|
2001-07-09 08:10:09 +02:00
|
|
|
@deftypefn {Target Hook} void TARGET_ASM_FUNCTION_END_PROLOGUE (FILE *@var{file})
|
|
|
|
If defined, a function that outputs assembler code at the end of a
|
|
|
|
prologue. This should be used when the function prologue is being
|
|
|
|
emitted as RTL, and you have some extra assembler that needs to be
|
|
|
|
emitted. @xref{prologue instruction pattern}.
|
|
|
|
@end deftypefn
|
|
|
|
|
|
|
|
@deftypefn {Target Hook} void TARGET_ASM_FUNCTION_BEGIN_EPILOGUE (FILE *@var{file})
|
|
|
|
If defined, a function that outputs assembler code at the start of an
|
|
|
|
epilogue. This should be used when the function epilogue is being
|
|
|
|
emitted as RTL, and you have some extra assembler that needs to be
|
|
|
|
emitted. @xref{epilogue instruction pattern}.
|
|
|
|
@end deftypefn
|
|
|
|
|
2001-07-06 20:40:17 +02:00
|
|
|
@deftypefn {Target Hook} void TARGET_ASM_FUNCTION_EPILOGUE (FILE *@var{file}, HOST_WIDE_INT @var{size})
|
|
|
|
If defined, a function that outputs the assembler code for exit from a
|
|
|
|
function. The epilogue is responsible for restoring the saved
|
|
|
|
registers and stack pointer to their values when the function was
|
|
|
|
called, and returning control to the caller. This macro takes the
|
|
|
|
same arguments as the macro @code{TARGET_ASM_FUNCTION_PROLOGUE}, and the
|
|
|
|
registers to restore are determined from @code{regs_ever_live} and
|
|
|
|
@code{CALL_USED_REGISTERS} in the same way.
|
|
|
|
|
|
|
|
On some machines, there is a single instruction that does all the work
|
|
|
|
of returning from the function. On these machines, give that
|
|
|
|
instruction the name @samp{return} and do not define the macro
|
|
|
|
@code{TARGET_ASM_FUNCTION_EPILOGUE} at all.
|
|
|
|
|
|
|
|
Do not define a pattern named @samp{return} if you want the
|
|
|
|
@code{TARGET_ASM_FUNCTION_EPILOGUE} to be used. If you want the target
|
|
|
|
switches to control whether return instructions or epilogues are used,
|
|
|
|
define a @samp{return} pattern with a validity condition that tests the
|
|
|
|
target switches appropriately. If the @samp{return} pattern's validity
|
|
|
|
condition is false, epilogues will be used.
|
|
|
|
|
|
|
|
On machines where functions may or may not have frame-pointers, the
|
|
|
|
function exit code must vary accordingly. Sometimes the code for these
|
|
|
|
two cases is completely different. To determine whether a frame pointer
|
|
|
|
is wanted, the macro can refer to the variable
|
|
|
|
@code{frame_pointer_needed}. The variable's value will be 1 when compiling
|
|
|
|
a function that needs a frame pointer.
|
|
|
|
|
|
|
|
Normally, @code{TARGET_ASM_FUNCTION_PROLOGUE} and
|
|
|
|
@code{TARGET_ASM_FUNCTION_EPILOGUE} must treat leaf functions specially.
|
|
|
|
The C variable @code{current_function_is_leaf} is nonzero for such a
|
|
|
|
function. @xref{Leaf Functions}.
|
|
|
|
|
|
|
|
On some machines, some functions pop their arguments on exit while
|
|
|
|
others leave that for the caller to do. For example, the 68020 when
|
|
|
|
given @option{-mrtd} pops arguments in functions that take a fixed
|
|
|
|
number of arguments.
|
|
|
|
|
|
|
|
@findex current_function_pops_args
|
|
|
|
Your definition of the macro @code{RETURN_POPS_ARGS} decides which
|
|
|
|
functions pop their own arguments. @code{TARGET_ASM_FUNCTION_EPILOGUE}
|
|
|
|
needs to know what was decided. The variable that is called
|
|
|
|
@code{current_function_pops_args} is the number of bytes of its
|
|
|
|
arguments that a function should pop. @xref{Scalar Return}.
|
|
|
|
@c what is the "its arguments" in the above sentence referring to, pray
|
|
|
|
@c tell? --mew 5feb93
|
|
|
|
@end deftypefn
|
|
|
|
|
1996-09-25 01:21:45 +02:00
|
|
|
@itemize @bullet
|
|
|
|
@item
|
|
|
|
@findex current_function_pretend_args_size
|
|
|
|
A region of @code{current_function_pretend_args_size} bytes of
|
|
|
|
uninitialized space just underneath the first argument arriving on the
|
|
|
|
stack. (This may not be at the very start of the allocated stack region
|
|
|
|
if the calling sequence has pushed anything else since pushing the stack
|
|
|
|
arguments. But usually, on such machines, nothing else has been pushed
|
|
|
|
yet, because the function prologue itself does all the pushing.) This
|
|
|
|
region is used on machines where an argument may be passed partly in
|
|
|
|
registers and partly in memory, and, in some cases to support the
|
varargs.h: Replace with stub which issues #error.
* ginclude/varargs.h: Replace with stub which issues #error.
* ginclude/stdarg.h: __builtin_stdarg_start is renamed
__builtin_va_start.
* builtins.def (BUILT_IN_VARARGS_START): Delete.
(BUILT_IN_VA_START): New.
* builtins.c (expand_builtin_va_start): Eliminate first
argument and code to implement pre-ISO varargs.
(std_expand_builtin_va_start): Ignore first argument; it is
always 1.
(expand_builtin): Handle BUILT_IN_VA_START and
BUILT_IN_STDARG_START identically. Delete
BUILT_IN_VARARGS_START case.
* function.c (assign_parms): Delete hide_last_arg and all
its uses.
(mark_varargs): Delete function.
* function.h (struct function): Delete 'varargs' bit.
(current_function_varargs): Delete macro.
* tree.h: Don't declare mark_varargs.
* c-decl.c (c_function_varargs, c_mark_varargs): Delete.
(c_expand_body): Don't call mark_varargs.
* c-objc-common.c: Handle BUILT_IN_VA_START and
BUILT_IN_STDARG_START identically. Delete
BUILT_IN_VARARGS_START case.
* c-tree.h: Don't declare c_mark_varargs.
* c-parse.in: Remove grammar rules for '&...' (which has been
commented out since before 2.7.2) and for '...' in K+R
argument declarations.
* builtins.c, function.c, integrate.c, sibcall.c,
config/alpha/unicosmk.h, config/arc/arc.c, config/arc/arc.h,
config/avr/avr.c, config/cris/cris.c, config/fr30/fr30.c,
config/i960/i960.c, config/i960/i960.md, config/m32r/m32r.c,
config/m32r/m32r.h, config/m88k/m88k.c, config/m88k/m88k.h,
config/mips/mips.c, config/mmix/mmix.c, config/mmix/mmix.h,
config/mn10300/mn10300.c, config/pa/som.h, config/s390/s390.c,
config/sh/sh.c, config/sh/sh.h, config/sparc/sparc.h,
config/stormy16/stormy16.c: Delete all references to
current_function_varargs, and code predicated on that flag.
* config/alpha/alpha.c (alpha_va_start),
config/arc/arc.c (arc_va_start),
config/i386/i386.c (ix86_va_start),
config/mips/mips.c (mips_va_start),
config/mn10300/mn10300.c (mn10300_va_start),
config/rs6000/rs6000.c (rs6000_va_start),
config/s390/s390.c (s390_va_start),
config/sh/sh.c (sh_va_start),
Ignore first argument; it is always 1.
* config/c4x/c4x-protos.h, config/c4x/c4x.c: Delete c4x_va_start.
* config/ia64/ia64-protos.h, config/ia64/ia64.c: Delete ia64_va_start.
* config/m68hc11/m68hc11-protos.h, config/m68hc11/m68hc11.c:
Delete m68hc11_va_start.
* config/c4x/c4x.h, config/ia64/ia64.h, config/m68hc11/m68hc11.h:
No need to define EXPAND_BUILTIN_VA_START.
* doc/invoke.texi, doc/sourcebuild.texi, doc/tm.texi,
doc/trouble.texi: Remove references to GCC-provided <varargs.h>.
testsuite:
* c-torture/execute/991216-3.c, c-torture/execute/strct-varg-1.c,
c-torture/execute/va-arg-7.c, c-torture/execute/va-arg-8.c,
c-torture/execute/va-arg-15.c, c-torture/execute/va-arg-16.c,
c-torture/execute/va-arg-17.c, c-torture/execute/va-arg-19.c:
Convert to use <stdarg.h>.
* c-torture/execute/va-arg-3.c, c-torture/execute/va-arg-3.x:
Delete.
* gcc.dg/va-arg-2.c: New.
* lib/gcc.exp, lib/objc.exp: Remove code to set -DNO_VARARGS.
From-SVN: r55472
2002-07-16 04:16:47 +02:00
|
|
|
features in @code{<stdarg.h>}.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
@item
|
|
|
|
An area of memory used to save certain registers used by the function.
|
|
|
|
The size of this area, which may also include space for such things as
|
|
|
|
the return address and pointers to previous stack frames, is
|
|
|
|
machine-specific and usually depends on which registers have been used
|
|
|
|
in the function. Machines with register windows often do not require
|
|
|
|
a save area.
|
|
|
|
|
|
|
|
@item
|
|
|
|
A region of at least @var{size} bytes, possibly rounded up to an allocation
|
|
|
|
boundary, to contain the local variables of the function. On some machines,
|
|
|
|
this region and the save area may occur in the opposite order, with the
|
|
|
|
save area closer to the top of the stack.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@cindex @code{ACCUMULATE_OUTGOING_ARGS} and stack frames
|
|
|
|
Optionally, when @code{ACCUMULATE_OUTGOING_ARGS} is defined, a region of
|
|
|
|
@code{current_function_outgoing_args_size} bytes to be used for outgoing
|
|
|
|
argument lists of the function. @xref{Stack Arguments}.
|
|
|
|
@end itemize
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac EXIT_IGNORE_STACK
|
1996-09-25 01:21:45 +02:00
|
|
|
Define this macro as a C expression that is nonzero if the return
|
|
|
|
instruction or the function epilogue ignores the value of the stack
|
|
|
|
pointer; in other words, if it is safe to delete an instruction to
|
2003-12-16 01:06:36 +01:00
|
|
|
adjust the stack pointer before a return from the function. The
|
|
|
|
default is 0.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
Note that this macro's value is relevant only for functions for which
|
|
|
|
frame pointers are maintained. It is never safe to delete a final
|
|
|
|
stack adjustment in a function that has no frame pointer, and the
|
|
|
|
compiler knows this regardless of @code{EXIT_IGNORE_STACK}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac EPILOGUE_USES (@var{regno})
|
2000-02-04 11:30:26 +01:00
|
|
|
Define this macro as a C expression that is nonzero for registers that are
|
1996-09-25 01:21:45 +02:00
|
|
|
used by the epilogue or the @samp{return} pattern. The stack and frame
|
|
|
|
pointer registers are already be assumed to be used as needed.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac EH_USES (@var{regno})
|
2002-03-20 03:13:39 +01:00
|
|
|
Define this macro as a C expression that is nonzero for registers that are
|
|
|
|
used by the exception handling mechanism, and so should be considered live
|
|
|
|
on entry to an exception edge.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2002-03-20 03:13:39 +01:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac DELAY_SLOTS_FOR_EPILOGUE
|
1996-09-25 01:21:45 +02:00
|
|
|
Define this macro if the function epilogue contains delay slots to which
|
|
|
|
instructions from the rest of the function can be ``moved''. The
|
|
|
|
definition should be a C expression whose value is an integer
|
|
|
|
representing the number of delay slots there.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ELIGIBLE_FOR_EPILOGUE_DELAY (@var{insn}, @var{n})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C expression that returns 1 if @var{insn} can be placed in delay
|
|
|
|
slot number @var{n} of the epilogue.
|
|
|
|
|
|
|
|
The argument @var{n} is an integer which identifies the delay slot now
|
|
|
|
being considered (since different slots may have different rules of
|
|
|
|
eligibility). It is never negative and is always less than the number
|
|
|
|
of epilogue delay slots (what @code{DELAY_SLOTS_FOR_EPILOGUE} returns).
|
|
|
|
If you reject a particular insn for a given delay slot, in principle, it
|
|
|
|
may be reconsidered for a subsequent delay slot. Also, other insns may
|
|
|
|
(at least in principle) be considered for the so far unfilled delay
|
|
|
|
slot.
|
|
|
|
|
|
|
|
@findex current_function_epilogue_delay_list
|
|
|
|
@findex final_scan_insn
|
|
|
|
The insns accepted to fill the epilogue delay slots are put in an RTL
|
|
|
|
list made with @code{insn_list} objects, stored in the variable
|
|
|
|
@code{current_function_epilogue_delay_list}. The insn for the first
|
|
|
|
delay slot comes first in the list. Your definition of the macro
|
2001-07-06 20:40:17 +02:00
|
|
|
@code{TARGET_ASM_FUNCTION_EPILOGUE} should fill the delay slots by
|
|
|
|
outputting the insns in this list, usually by calling
|
|
|
|
@code{final_scan_insn}.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
You need not define this macro if you did not define
|
|
|
|
@code{DELAY_SLOTS_FOR_EPILOGUE}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2004-10-13 16:09:05 +02:00
|
|
|
@deftypefn {Target Hook} void TARGET_ASM_OUTPUT_MI_THUNK (FILE *@var{file}, tree @var{thunk_fndecl}, HOST_WIDE_INT @var{delta}, HOST_WIDE_INT @var{vcall_offset}, tree @var{function})
|
2002-10-19 01:35:40 +02:00
|
|
|
A function that outputs the assembler code for a thunk
|
1996-09-25 01:21:45 +02:00
|
|
|
function, used to implement C++ virtual function calls with multiple
|
|
|
|
inheritance. The thunk acts as a wrapper around a virtual function,
|
|
|
|
adjusting the implicit object parameter before handing control off to
|
|
|
|
the real function.
|
|
|
|
|
|
|
|
First, emit code to add the integer @var{delta} to the location that
|
|
|
|
contains the incoming first argument. Assume that this argument
|
|
|
|
contains a pointer, and is the one used to pass the @code{this} pointer
|
|
|
|
in C++. This is the incoming argument @emph{before} the function prologue,
|
2001-06-27 02:04:39 +02:00
|
|
|
e.g.@: @samp{%o0} on a sparc. The addition must preserve the values of
|
1996-09-25 01:21:45 +02:00
|
|
|
all other incoming arguments.
|
|
|
|
|
2004-10-13 16:09:05 +02:00
|
|
|
Then, if @var{vcall_offset} is nonzero, an additional adjustment should be
|
|
|
|
made after adding @code{delta}. In particular, if @var{p} is the
|
|
|
|
adjusted pointer, the following adjustment should be made:
|
|
|
|
|
|
|
|
@smallexample
|
|
|
|
p += (*((ptrdiff_t **)p))[vcall_offset/sizeof(ptrdiff_t)]
|
|
|
|
@end smallexample
|
|
|
|
|
|
|
|
After the additions, emit code to jump to @var{function}, which is a
|
1996-09-25 01:21:45 +02:00
|
|
|
@code{FUNCTION_DECL}. This is a direct pure jump, not a call, and does
|
|
|
|
not touch the return address. Hence returning from @var{FUNCTION} will
|
|
|
|
return to whoever called the current @samp{thunk}.
|
|
|
|
|
|
|
|
The effect must be as if @var{function} had been called directly with
|
|
|
|
the adjusted first argument. This macro is responsible for emitting all
|
2001-07-06 20:40:17 +02:00
|
|
|
of the code for a thunk function; @code{TARGET_ASM_FUNCTION_PROLOGUE}
|
|
|
|
and @code{TARGET_ASM_FUNCTION_EPILOGUE} are not invoked.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
The @var{thunk_fndecl} is redundant. (@var{delta} and @var{function}
|
|
|
|
have already been extracted from it.) It might possibly be useful on
|
|
|
|
some targets, but probably not.
|
|
|
|
|
1997-08-11 17:56:58 +02:00
|
|
|
If you do not define this macro, the target-independent code in the C++
|
c-tree.texi, [...]: Fix spelling and typos.
* doc/c-tree.texi, doc/contrib.texi, doc/extend.texi,
doc/gcc.texi, doc/install.texi, doc/invoke.texi, doc/md.texi,
doc/objc.texi, doc/rtl.texi, doc/tm.texi: Fix spelling and typos.
Consistently use "built-in" and "bit-field". Minor logical markup
improvements.
* doc/gcc.1: Regenerate.
From-SVN: r43383
2001-06-15 00:51:18 +02:00
|
|
|
front end will generate a less efficient heavyweight thunk that calls
|
1997-08-11 17:56:58 +02:00
|
|
|
@var{function} instead of jumping to it. The generic approach does
|
|
|
|
not support varargs.
|
2002-10-19 01:35:40 +02:00
|
|
|
@end deftypefn
|
|
|
|
|
2004-10-13 16:09:05 +02:00
|
|
|
@deftypefn {Target Hook} bool TARGET_ASM_CAN_OUTPUT_MI_THUNK (tree @var{thunk_fndecl}, HOST_WIDE_INT @var{delta}, HOST_WIDE_INT @var{vcall_offset}, tree @var{function})
|
|
|
|
A function that returns true if TARGET_ASM_OUTPUT_MI_THUNK would be able
|
|
|
|
to output the assembler code for the thunk function specified by the
|
|
|
|
arguments it is passed, and false otherwise. In the latter case, the
|
|
|
|
generic approach will be used by the C++ front end, with the limitations
|
|
|
|
previously exposed.
|
2002-10-19 01:35:40 +02:00
|
|
|
@end deftypefn
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
@node Profiling
|
|
|
|
@subsection Generating Code for Profiling
|
|
|
|
@cindex profiling, code generation
|
|
|
|
|
|
|
|
These macros will help you generate code for profiling.
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac FUNCTION_PROFILER (@var{file}, @var{labelno})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C statement or compound statement to output to @var{file} some
|
|
|
|
assembler code to call the profiling subroutine @code{mcount}.
|
|
|
|
|
|
|
|
@findex mcount
|
2000-08-15 17:25:50 +02:00
|
|
|
The details of how @code{mcount} expects to be called are determined by
|
c-tree.texi, [...]: Replace . at end of sentences preceded by a capital letter with @..
* doc/c-tree.texi, doc/contrib.texi, doc/cpp.texi,
doc/cppinternals.texi, doc/extend.texi, doc/gcc.texi,
doc/gcov.texi, doc/install-old.texi, doc/install.texi,
doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: Replace
. at end of sentences preceded by a capital letter with @..
From-SVN: r43611
2001-06-27 17:04:16 +02:00
|
|
|
your operating system environment, not by GCC@. To figure them out,
|
2000-08-15 17:25:50 +02:00
|
|
|
compile a small program for profiling using the system's installed C
|
|
|
|
compiler and look at the assembler code that results.
|
|
|
|
|
|
|
|
Older implementations of @code{mcount} expect the address of a counter
|
|
|
|
variable to be loaded into some register. The name of this variable is
|
|
|
|
@samp{LP} followed by the number @var{labelno}, so you would generate
|
|
|
|
the name using @samp{LP%d} in a @code{fprintf}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2000-08-15 17:25:50 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac PROFILE_HOOK
|
2001-02-06 02:23:13 +01:00
|
|
|
A C statement or compound statement to output to @var{file} some assembly
|
|
|
|
code to call the profiling subroutine @code{mcount} even the target does
|
|
|
|
not support profiling.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2001-02-06 02:23:13 +01:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac NO_PROFILE_COUNTERS
|
2000-08-15 17:25:50 +02:00
|
|
|
Define this macro if the @code{mcount} subroutine on your system does
|
|
|
|
not need a counter variable allocated for each function. This is true
|
|
|
|
for almost all modern implementations. If you define this macro, you
|
|
|
|
must not use the @var{labelno} argument to @code{FUNCTION_PROFILER}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac PROFILE_BEFORE_PROLOGUE
|
1996-09-25 01:21:45 +02:00
|
|
|
Define this macro if the code for function profiling should come before
|
|
|
|
the function prologue. Normally, the profiling code comes after.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
Table-driven attributes.
* c-decl.c, config/alpha/alpha.c, config/arc/arc.c,
config/arm/arm.c, config/arm/pe.c, config/avr/avr.c,
config/avr/avr.h, config/d30v/d30v.h, config/fr30/fr30.h,
config/h8300/h8300.c, config/i386/cygwin.h, config/i386/winnt.c,
config/m32r/m32r.c, config/mcore/mcore.c, config/sh/sh.c,
config/stormy16/stormy16.h, config/v850/v850.c, doc/c-tree.texi,
doc/tm.texi, ggc-common.c, integrate.c, print-tree.c, tree.c,
tree.h: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
* tree.h (struct tree_decl): Change machine_attributes to
attributes.
* doc/c-tree.texi: Document that all attributes are now attached
to decls and types.
* c-common.c (add_attribute, attrtab, attrtab_idx,
default_valid_lang_attribute, valid_lang_attribute): Remove.
(attribute_tables, attributes_initialized,
c_common_attribute_table, default_lang_attribute_table): New
variables.
(handle_packed_attribute, handle_nocommon_attribute,
handle_common_attribute, handle_noreturn_attribute,
handle_unused_attribute, handle_const_attribute,
handle_transparent_union_attribute, handle_constructor_attribute,
handle_destructor_attribute, handle_mode_attribute,
handle_section_attribute, handle_aligned_attribute,
handle_weak_attribute, handle_alias_attribute,
handle_no_instrument_function_attribute,
handle_no_check_memory_usage_attribute, handle_malloc_attribute,
handle_no_limit_stack_attribute, handle_pure_attribute): New
functions.
(init_attributes, decl_attributes): Rewrite to implement
table-driven attributes.
* c-common.h (enum attribute_flags): Move to tree.h.
* c-format.c (decl_handle_format_attribute,
decl_handle_format_arg_attribute): Rename to
handle_format_attribute and handle_format_arg_attribute. Update
for table-driven attributes.
* c-common.h (decl_handle_format_attribute,
decl_handle_format_arg_attribute): Remove prototypes.
(handle_format_attribute, handle_format_arg_attribute): Add
prototypes.
* c-decl.c (grokdeclarator): Handle attributes nested inside
declarators.
* c-parse.in (setattrs, maybe_setattrs): Remove.
(maybe_type_quals_setattrs): Rename to maybe_type_quals_attrs.
Update to handle nested attributes properly.
(maybe_resetattrs, after_type_declarator,
parm_declarator_nostarttypename, notype_declarator, absdcl1_noea,
absdcl1_ea, direct_absdcl1): Update to handle nested attributes
properly.
(make_pointer_declarator): Update to handle nested attributes
properly.
* doc/extend.texi: Update documentation of limits of attributes
syntax. Warn about problems with attribute semantics in C++.
* target.h (struct target): Remove valid_decl_attribute and
valid_type_attribute. Add attribute_table and
function_attribute_inlinable_p.
* target-def.h (TARGET_VALID_DECL_ATTRIBUTE,
TARGET_VALID_TYPE_ATTRIBUTE): Remove.
(TARGET_ATTRIBUTE_TABLE, TARGET_FUNCTION_ATTRIBUTE_INLINABLE_P):
Add.
(TARGET_INITIALIZER): Update.
* integrate.c (FUNCTION_ATTRIBUTE_INLINABLE_P): Remove default
definition.
(function_attribute_inlinable_p): New function. Check for the
presence of any machine attributes before using
targetm.function_attribute_inlinable_p.
(function_cannot_inline_p): Update.
* Makefile.in (integrate.o): Update dependencies.
* doc/tm.texi: Update documentation of target attributes and
example definition of TARGET_VALID_TYPE_ATTRIBUTE.
* tree.c (default_valid_attribute_p, valid_machine_attribute):
Remove.
(default_target_attribute_table,
default_function_attribute_inlinable_p): New.
(lookup_attribute): Update comment to clarify handling of multiple
attributes with the same name.
(merge_attributes, attribute_list_contained): Allow multiple
attributes with the same name but different arguments to appear in
the same attribute list.
* tree.h (default_valid_attribute_p): Remove prototype.
(struct attribute_spec): New.
(default_target_attribute_table): Declare.
(enum attribute_flags): Move from c-common.h. Add
ATTR_FLAG_TYPE_IN_PLACE.
(default_function_attribute_inlinable_p): Declare.
* config/alpha/alpha.c (vms_valid_decl_attribute_p): Remove.
(TARGET_VALID_DECL_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(vms_attribute_table): New.
* config/arc/arc.c (arc_valid_decl_attribute): Remove.
(TARGET_VALID_DECL_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(arc_attribute_table, arc_handle_interrupt_attribute): New.
* config/arm/arm.c (arm_valid_type_attribute_p,
arm_valid_decl_attribute_p, arm_pe_valid_decl_attribute_p):
Remove.
(TARGET_VALID_TYPE_ATTRIBUTE, TARGET_VALID_DECL_ATTRIBUTE): Don't
define.
(TARGET_ATTRIBUTE_TABLE): Define.
(arm_attribute_table, arm_handle_fndecl_attribute,
arm_handle_isr_attribute): New.
* config/avr/avr.c (avr_valid_type_attribute,
avr_valid_decl_attribute): Remove.
(TARGET_VALID_DECL_ATTRIBUTE, TARGET_VALID_TYPE_ATTRIBUTE): Don't
define.
(TARGET_ATTRIBUTE_TABLE): Define.
(avr_attribute_table, avr_handle_progmem_attribute,
avr_handle_fndecl_attribute): New.
* config/c4x/c4x.c (c4x_valid_type_attribute_p): Remove.
(TARGET_VALID_TYPE_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(c4x_attribute_table, c4x_handle_fntype_attribute): New.
* config/h8300/h8300.c (h8300_valid_decl_attribute): Remove.
(TARGET_VALID_DECL_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(h8300_attribute_table, h8300_handle_fndecl_attribute,
h8300_handle_eightbit_data_attribute,
h8300_handle_tiny_data_attribute): New.
* config/i386/i386-protos.h (ix86_valid_type_attribute_p,
i386_pe_valid_decl_attribute_p, i386_pe_valid_type_attribute_p):
Remove prototypes.
(ix86_handle_dll_attribute, ix86_handle_shared_attribute): New
declarations.
* config/i386/i386.c (ix86_valid_type_attribute_p: Remove.
(TARGET_VALID_TYPE_ATTRIBUTE, TARGET_VALID_DECL_ATTRIBUTE): Don't
define.
(TARGET_ATTRIBUTE_TABLE): Define.
(ix86_attribute_table, ix86_handle_cdecl_attribute,
ix86_handle_regparm_attribute): New.
* config/i386/winnt.c (i386_pe_valid_decl_attribute_p,
i386_pe_valid_type_attribute_p): Remove.
(ix86_handle_dll_attribute, ix86_handle_shared_attribute): New.
* config/ia64/ia64.c (ia64_valid_type_attribute): Remove.
(TARGET_VALID_TYPE_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(ia64_attribute_table): New.
* config/m32r/m32r.c (m32r_valid_decl_attribute, interrupt_ident1,
interrupt_ident2, model_ident1, model_ident2): Remove.
(TARGET_VALID_DECL_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(init_idents): Update.
(m32r_attribute_table, m32r_handle_model_attribute): New.
* config/m68hc11/m68hc11.c (m68hc11_valid_type_attribute_p):
Remove.
(TARGET_VALID_TYPE_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(m68hc11_attribute_table, m68hc11_handle_fntype_attribute): New.
* config/mcore/mcore.c (mcore_valid_decl_attribute): Remove.
(TARGET_VALID_DECL_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(mcore_attribute_table, mcore_handle_naked_attribute): New.
* config/ns32k/ns32k.c (ns32k_valid_type_attribute_p): Remove.
(TARGET_VALID_TYPE_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(ns32k_attribute_table, ns32k_handle_fntype_attribute): New.
* config/rs6000/rs6000.c (rs6000_valid_type_attribute_p): Remove.
(TARGET_VALID_TYPE_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(rs6000_attribute_table, rs6000_handle_longcall_attribute): New.
* config/sh/sh.c (sh_valid_decl_attribute): Remove.
(TARGET_VALID_DECL_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(sh_attribute_table, sh_handle_interrupt_handler_attribute,
sh_handle_sp_switch_attribute, sh_handle_trap_exit_attribute):
New.
* config/stormy16/stormy16.c (stormy16_valid_type_attribute):
Remove.
(TARGET_VALID_TYPE_ATTRIBUTE): Don't define
(TARGET_ATTRIBUTE_TABLE): Define.
(stormy16_attribute_table, stormy16_handle_interrupt_attribute):
New.
* config/v850/v850.c (v850_valid_decl_attribute): Remove.
(TARGET_VALID_DECL_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(v850_attribute_table, v850_handle_interrupt_attribute,
v850_handle_data_area_attribute): New.
* config/v850/v850-c.c (mark_current_function_as_interrupt):
Return void. Call decl_attributes instead of
valid_machine_attribute.
cp:
Table-driven attributes.
* decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
* decl2.c (cplus_decl_attributes): Only take one attributes
parameter.
* cp-tree.c (cplus_decl_attributes): Update prototype.
* class.c (finish_struct), decl.c (start_decl, start_function),
decl2.c (grokfield), friend.c (do_friend), parse.y
(parse_bitfield): Update calls to cplus_decl_attributes.
* decl.c (grokdeclarator): Take a pointer to a single ordinary
attribute list.
* decl.h (grokdeclarator): Update prototype.
* decl2.c (grokfield): Take a single ordinary attribute list.
* friend.c (do_friend): Likewise.
* decl.c (shadow_tag, groktypename, start_decl,
start_handler_parms, grokdeclarator, grokparms, start_function,
start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
(process_template_parm, do_decl_instantiation): Pass single
ordinary attribute lists around.
* decl.c (grokdeclarator): Correct handling of nested attributes.
Revert the patch
1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
* decl.c (grokdeclarator): Embedded attrs bind to the right,
not the left.
.
* cp-tree.h (cp_valid_lang_attribute): Remove declaration
(cp_attribute_table): Declare.
* decl.c (valid_lang_attribute): Don't define.
(lang_attribute_table): Define.
(init_decl_processing): Initialize lang_attribute_table instead of
valid_lang_attribute.
* tree.c (cp_valid_lang_attribute): Remove.
(handle_java_interface_attribute, handle_com_interface_attribute,
handle_init_priority_attribute): New functions.
(cp_attribute_table): New array.
* decl2.c (import_export_class): Don't use
targetm.valid_type_attribute.
testsuite:
Table-driven attributes.
* g++.dg/ext/attrib1.C: New test.
From-SVN: r45718
2001-09-21 03:27:06 +02:00
|
|
|
@node Tail Calls
|
|
|
|
@subsection Permitting tail calls
|
|
|
|
@cindex tail calls
|
2000-04-25 23:10:26 +02:00
|
|
|
|
2002-12-16 19:23:00 +01:00
|
|
|
@deftypefn {Target Hook} bool TARGET_FUNCTION_OK_FOR_SIBCALL (tree @var{decl}, tree @var{exp})
|
|
|
|
True if it is ok to do sibling call optimization for the specified
|
|
|
|
call expression @var{exp}. @var{decl} will be the called function,
|
|
|
|
or @code{NULL} if this is an indirect call.
|
2000-05-30 08:12:37 +02:00
|
|
|
|
|
|
|
It is not uncommon for limitations of calling conventions to prevent
|
|
|
|
tail calls to functions outside the current unit of translation, or
|
2002-12-16 19:23:00 +01:00
|
|
|
during PIC compilation. The hook is used to enforce these restrictions,
|
2001-04-28 13:35:04 +02:00
|
|
|
as the @code{sibcall} md pattern can not fail, or fall over to a
|
2002-12-16 19:23:00 +01:00
|
|
|
``normal'' call. The criteria for successful sibling call optimization
|
|
|
|
may vary greatly between different architectures.
|
|
|
|
@end deftypefn
|
2000-05-30 08:12:37 +02:00
|
|
|
|
1996-09-25 01:21:45 +02:00
|
|
|
@node Varargs
|
|
|
|
@section Implementing the Varargs Macros
|
|
|
|
@cindex varargs implementation
|
|
|
|
|
2001-07-03 02:46:05 +02:00
|
|
|
GCC comes with an implementation of @code{<varargs.h>} and
|
|
|
|
@code{<stdarg.h>} that work without change on machines that pass arguments
|
1996-09-25 01:21:45 +02:00
|
|
|
on the stack. Other machines require their own implementations of
|
|
|
|
varargs, and the two machine independent header files must have
|
|
|
|
conditionals to include it.
|
|
|
|
|
2001-07-03 02:46:05 +02:00
|
|
|
ISO @code{<stdarg.h>} differs from traditional @code{<varargs.h>} mainly in
|
1996-09-25 01:21:45 +02:00
|
|
|
the calling convention for @code{va_start}. The traditional
|
|
|
|
implementation takes just one argument, which is the variable in which
|
2001-01-12 19:51:27 +01:00
|
|
|
to store the argument pointer. The ISO implementation of
|
1996-09-25 01:21:45 +02:00
|
|
|
@code{va_start} takes an additional second argument. The user is
|
|
|
|
supposed to write the last named argument of the function here.
|
|
|
|
|
|
|
|
However, @code{va_start} should not use this argument. The way to find
|
|
|
|
the end of the named arguments is with the built-in functions described
|
|
|
|
below.
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac __builtin_saveregs ()
|
1996-09-25 01:21:45 +02:00
|
|
|
Use this built-in function to save the argument registers in memory so
|
2001-01-12 19:51:27 +01:00
|
|
|
that the varargs mechanism can access them. Both ISO and traditional
|
1996-09-25 01:21:45 +02:00
|
|
|
versions of @code{va_start} must use @code{__builtin_saveregs}, unless
|
2004-02-04 07:32:51 +01:00
|
|
|
you use @code{TARGET_SETUP_INCOMING_VARARGS} (see below) instead.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
On some machines, @code{__builtin_saveregs} is open-coded under the
|
2004-02-04 07:07:39 +01:00
|
|
|
control of the target hook @code{TARGET_EXPAND_BUILTIN_SAVEREGS}. On
|
|
|
|
other machines, it calls a routine written in assembler language,
|
|
|
|
found in @file{libgcc2.c}.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
Code generated for the call to @code{__builtin_saveregs} appears at the
|
|
|
|
beginning of the function, as opposed to where the call to
|
|
|
|
@code{__builtin_saveregs} is written, regardless of what the code is.
|
|
|
|
This is because the registers must be saved before the function starts
|
|
|
|
to use them for its own purposes.
|
|
|
|
@c i rewrote the first sentence above to fix an overfull hbox. --mew
|
|
|
|
@c 10feb93
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac __builtin_args_info (@var{category})
|
1996-09-25 01:21:45 +02:00
|
|
|
Use this built-in function to find the first anonymous arguments in
|
|
|
|
registers.
|
|
|
|
|
|
|
|
In general, a machine may have several categories of registers used for
|
|
|
|
arguments, each for a particular category of data types. (For example,
|
|
|
|
on some machines, floating-point registers are used for floating-point
|
|
|
|
arguments while other arguments are passed in the general registers.)
|
|
|
|
To make non-varargs functions use the proper calling convention, you
|
|
|
|
have defined the @code{CUMULATIVE_ARGS} data type to record how many
|
|
|
|
registers in each category have been used so far
|
|
|
|
|
|
|
|
@code{__builtin_args_info} accesses the same data structure of type
|
|
|
|
@code{CUMULATIVE_ARGS} after the ordinary argument layout is finished
|
|
|
|
with it, with @var{category} specifying which word to access. Thus, the
|
|
|
|
value indicates the first unused register in a given category.
|
|
|
|
|
|
|
|
Normally, you would use @code{__builtin_args_info} in the implementation
|
|
|
|
of @code{va_start}, accessing each category just once and storing the
|
|
|
|
value in the @code{va_list} object. This is because @code{va_list} will
|
|
|
|
have to update the values, and there is no way to alter the
|
|
|
|
values accessed by @code{__builtin_args_info}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac __builtin_next_arg (@var{lastarg})
|
1996-09-25 01:21:45 +02:00
|
|
|
This is the equivalent of @code{__builtin_args_info}, for stack
|
|
|
|
arguments. It returns the address of the first anonymous stack
|
2001-06-27 00:47:11 +02:00
|
|
|
argument, as type @code{void *}. If @code{ARGS_GROW_DOWNWARD}, it
|
1996-09-25 01:21:45 +02:00
|
|
|
returns the address of the location above the first anonymous stack
|
|
|
|
argument. Use it in @code{va_start} to initialize the pointer for
|
|
|
|
fetching arguments from the stack. Also use it in @code{va_start} to
|
|
|
|
verify that the second parameter @var{lastarg} is the last named argument
|
|
|
|
of the current function.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac __builtin_classify_type (@var{object})
|
1996-09-25 01:21:45 +02:00
|
|
|
Since each machine has its own conventions for which data types are
|
|
|
|
passed in which kind of register, your implementation of @code{va_arg}
|
|
|
|
has to embody these conventions. The easiest way to categorize the
|
|
|
|
specified data type is to use @code{__builtin_classify_type} together
|
|
|
|
with @code{sizeof} and @code{__alignof__}.
|
|
|
|
|
|
|
|
@code{__builtin_classify_type} ignores the value of @var{object},
|
|
|
|
considering only its data type. It returns an integer describing what
|
|
|
|
kind of type that is---integer, floating, pointer, structure, and so on.
|
|
|
|
|
|
|
|
The file @file{typeclass.h} defines an enumeration that you can use to
|
|
|
|
interpret the values of @code{__builtin_classify_type}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
These machine description macros help implement varargs:
|
|
|
|
|
targhooks.c: New file.
* targhooks.c: New file.
* targhooks.h: New file.
* Makefile.in: Add targhooks.o support.
(function.o): Depend on$(TARGET_H).
(stmt.o): Likewise.
(combine.o): Depend on $(TREE_H) and $(TARGET_H).
* builtins.c (apply_args_size, expand_builtin_apply_args_1,
expand_builtin_apply): Convert to calls.struct_value_rtx hook.
(expand_builtin_saveregs): Convert to
calls.expand_builtin_saveregs hook.
* c-decl.c (start_decl): Handle new calls.promote_prototypes hook
here, instead of ...
(get_parm_info) ... here.
(store_parm_decls_oldstyle): Convert to calls.promote_prototypes
hook.
(finish_function): Handle calls.promote_prototypes hook here too.
* c-typeck.c (convert_arguments): Convert to
calls.promote_prototypes hook.
(c_convert_parm_for_inlining): Likewise.
* calls.c (initialize_argument_information): Convert to
calls.promote_function_args hook.
(expand_call): Convert to calls.struct_value_rtx,
calls.strict_argument_naming,
calls.pretend_outgoing_varargs_named, and
calls.promote_function_return hooks. Pass fndecl to
aggregate_value_p. Initialize CUMULATIVE_ARGS before calling
hooks, so they can use that.
(emit_library_call_value_1): Likewise.
* combine.c (setup_incoming_promotions): Convert to
calls.promote_function_args hook.
* emit-rtl.c: Convert to calls.struct_value_rtx hook.
* expr.c (expand_assignment): Pass call to aggregate_value_p.
(expand_expr): Likewise.
* expr.h: Remove support for SETUP_INCOMING_VARARGS,
STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED,
RETURN_IN_MEMORY macro defaults.
* final.c (profile_function): Convert to calls.struct_value_rtx
hook.
* function.c (aggregate_value_p): Accept function type tree as
second parameter; try to deduce fntype from it. Convert to
calls.return_in_memory hook.
(assign_parms): Convert to calls.setup_incoming_varargs,
calls.strict_argument_naming, calls.promote_function_args,
calls.pretend_outgoing_varargs_named hooks. Pass fndecl to
aggregate_value_p.
(expand_function_start): Likewise. Convert to
calls.struct_value_rtx hook.
(expand_function_end): Convert to calls.promote_function_return hook.
(allocate_struct_function): Pass fndecl to aggregate_value_p.
* hard-reg-set.h: Update comments to new hook names.
* integrate.c (expand_inline_function): Pass fndecl to aggregate_value_p.
* reg-stack.c (stack_result): Likewise.
* rtl.h (struct_value_rtx, struct_value_incoming_rtx): Delete.
* stmt.c (expand_value_return): Convert to
calls.promote_function_return hook.
* target-def.h: Add TARGET_PROMOTE_FUNCTION_ARGS,
TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES,
TARGET_STRUCT_VALUE_RTX, TARGET_RETURN_IN_MEMORY,
TARGET_EXPAND_BUILTIN_SAVEREGS, TARGET_SETUP_INCOMING_VARARGS,
TARGET_STRICT_ARGUMENT_NAMING,
TARGET_PRETEND_OUTGOING_VARARGS_NAMED, and TARGET_CALLS.
* target.h: Likewise.
* tree.h (aggregate_value_p): Also takes a tree to deduce function
attributes from (for target hooks).
* doc/tm.texi (PROMOTE_FUNCTION_ARGS, PROMOTE_FUNCTION_RETURN,
PROMOTE_PROTOTYPES, RETURN_IN_MEMORY, STRUCT_VALUE_REGNUM,
STRUCT_VALUE, STRUCT_VALUE_INCOMING_REGNUM, STRUCT_VALUE_INCOMING,
EXPAND_BUILTIN_SAVEREGS, SETUP_INCOMING_VARARGS,
STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED): Convert
to hooks.
* config/alpha/alpha.c (alpha_output_mi_thunk_osf): Pass function
to aggregate_value_p.
* config/arm/arm.c (arm_init_cumulative_args,
arm_output_mi_thunk): Likewise.
* config/i386/i386.c (ix86_return_pops_args, x86_this_parameter):
Likewise.
* config/mips/mips.c (mips_save_reg_p, mips_expand_prologue,
mips_can_use_return_insn): Likewise.
* config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise.
* config/s390/s390.c (s390_output_mi_thunk): Likewise.
* config/sparc/sparc.c (sparc_output_mi_thunk): Pass function to
aggregate_value_p.
* config/story16/stormy16.c (xstormy16_asm_output_mi_thunk): Pass
function to aggregate_value_p.
* objc/objc-act.c (generate_struct_by_value_array): Pass NULL to
aggregate_value_p.
* config/sh/sh-protos.h (sh_builtin_saveregs): Remove.
(sh_attr_renesas_p, sh_cfun_attr_renesas_p, sh_function_arg,
sh_function_arg_advance, sh_pass_in_reg_p): New. * config/sh/sh.c
(sh_handle_renesas_attribute, sh_promote_prototypes,
sh_struct_value_rtx, sh_return_in_memory, sh_builtin_saveregs,
sh_setup_incoming_varargs, sh_strict_argument_naming,
sh_pretend_outgoing_varargs_named): New decls.
(targetm): Add new hooks.
(calc_live_regs): Save MACL and MACH if the function has the
renesas attribute.
(sh_expand_prologue): Support renesas attribute.
(sh_builtin_saveregs): Make static.
(sh_build_va_list): Support renesas attribute.
(sh_va_start): Likewise.
(sh_va_arg): Likewise.
(sh_promote_prototypes): New.
(sh_function_arg): New, moved from sh.h. Support renesas
attribute.
(sh_function_arg_advance): Likewise.
(sh_return_in_memory): Likewise.
(sh_strict_argument_naming): Likewise.
(sh_pretend_outgoing_varargs_named): Likewise.
(sh_struct_value_rtx): New.
(sh_attribute): Add renesas attribute.
(sh_handle_renesas_attribute): New.
(sh_attr_renesas_p, sh_cfun_attr_renesas_p): New.
(sh_ms_bitfield_layout_p): Support renesas attribute also.
(sh_output_mi_thunk): Pass function to aggregate_value_p. *
config/sh/sh.h (TARGET_SWITCHES): Add -mrenesas as an alias for
-mhitachi.
(STRUCT_VALUE_REGNUM, STRUCT_VALUE, RETURN_IN_MEMORY): Moved to
target hooks.
(sh_args): Add renesas_abi flag.
(INIT_CUMULATIVE_ARGS): Set it. Pass fndecl to aggregate_value_p.
(FUNCTION_ARG_ADVANCE, FUNCTION_ARG): Move to sh.c.
(PASS_IN_REG_P): Support renesas attribute. Pass DF and TF on the
stack for the renesas abi.
(STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED,
SETUP_INCOMING_VARARGS, EXPAND_BUILTIN_SAVEREGS,
PROMOTE_PROTOTYPES): Moved to sh.c. * config/sh/sh.md (call): Set
call cookie to indicate renesas calls.
* decl.c (finish_function): Pass fndecl to aggregate_value_p.
* misc.c (default_pass_by_ref): Convert to calls.return_in_memory
hook.
From-SVN: r71048
2003-09-04 05:18:05 +02:00
|
|
|
@deftypefn {Target Hook} rtx TARGET_EXPAND_BUILTIN_SAVEREGS (void)
|
|
|
|
If defined, this hook produces the machine-specific code for a call to
|
|
|
|
@code{__builtin_saveregs}. This code will be moved to the very
|
|
|
|
beginning of the function, before any parameter access are made. The
|
|
|
|
return value of this function should be an RTX that contains the value
|
|
|
|
to use as the return of @code{__builtin_saveregs}.
|
|
|
|
@end deftypefn
|
1996-09-25 01:21:45 +02:00
|
|
|
|
targhooks.c: New file.
* targhooks.c: New file.
* targhooks.h: New file.
* Makefile.in: Add targhooks.o support.
(function.o): Depend on$(TARGET_H).
(stmt.o): Likewise.
(combine.o): Depend on $(TREE_H) and $(TARGET_H).
* builtins.c (apply_args_size, expand_builtin_apply_args_1,
expand_builtin_apply): Convert to calls.struct_value_rtx hook.
(expand_builtin_saveregs): Convert to
calls.expand_builtin_saveregs hook.
* c-decl.c (start_decl): Handle new calls.promote_prototypes hook
here, instead of ...
(get_parm_info) ... here.
(store_parm_decls_oldstyle): Convert to calls.promote_prototypes
hook.
(finish_function): Handle calls.promote_prototypes hook here too.
* c-typeck.c (convert_arguments): Convert to
calls.promote_prototypes hook.
(c_convert_parm_for_inlining): Likewise.
* calls.c (initialize_argument_information): Convert to
calls.promote_function_args hook.
(expand_call): Convert to calls.struct_value_rtx,
calls.strict_argument_naming,
calls.pretend_outgoing_varargs_named, and
calls.promote_function_return hooks. Pass fndecl to
aggregate_value_p. Initialize CUMULATIVE_ARGS before calling
hooks, so they can use that.
(emit_library_call_value_1): Likewise.
* combine.c (setup_incoming_promotions): Convert to
calls.promote_function_args hook.
* emit-rtl.c: Convert to calls.struct_value_rtx hook.
* expr.c (expand_assignment): Pass call to aggregate_value_p.
(expand_expr): Likewise.
* expr.h: Remove support for SETUP_INCOMING_VARARGS,
STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED,
RETURN_IN_MEMORY macro defaults.
* final.c (profile_function): Convert to calls.struct_value_rtx
hook.
* function.c (aggregate_value_p): Accept function type tree as
second parameter; try to deduce fntype from it. Convert to
calls.return_in_memory hook.
(assign_parms): Convert to calls.setup_incoming_varargs,
calls.strict_argument_naming, calls.promote_function_args,
calls.pretend_outgoing_varargs_named hooks. Pass fndecl to
aggregate_value_p.
(expand_function_start): Likewise. Convert to
calls.struct_value_rtx hook.
(expand_function_end): Convert to calls.promote_function_return hook.
(allocate_struct_function): Pass fndecl to aggregate_value_p.
* hard-reg-set.h: Update comments to new hook names.
* integrate.c (expand_inline_function): Pass fndecl to aggregate_value_p.
* reg-stack.c (stack_result): Likewise.
* rtl.h (struct_value_rtx, struct_value_incoming_rtx): Delete.
* stmt.c (expand_value_return): Convert to
calls.promote_function_return hook.
* target-def.h: Add TARGET_PROMOTE_FUNCTION_ARGS,
TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES,
TARGET_STRUCT_VALUE_RTX, TARGET_RETURN_IN_MEMORY,
TARGET_EXPAND_BUILTIN_SAVEREGS, TARGET_SETUP_INCOMING_VARARGS,
TARGET_STRICT_ARGUMENT_NAMING,
TARGET_PRETEND_OUTGOING_VARARGS_NAMED, and TARGET_CALLS.
* target.h: Likewise.
* tree.h (aggregate_value_p): Also takes a tree to deduce function
attributes from (for target hooks).
* doc/tm.texi (PROMOTE_FUNCTION_ARGS, PROMOTE_FUNCTION_RETURN,
PROMOTE_PROTOTYPES, RETURN_IN_MEMORY, STRUCT_VALUE_REGNUM,
STRUCT_VALUE, STRUCT_VALUE_INCOMING_REGNUM, STRUCT_VALUE_INCOMING,
EXPAND_BUILTIN_SAVEREGS, SETUP_INCOMING_VARARGS,
STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED): Convert
to hooks.
* config/alpha/alpha.c (alpha_output_mi_thunk_osf): Pass function
to aggregate_value_p.
* config/arm/arm.c (arm_init_cumulative_args,
arm_output_mi_thunk): Likewise.
* config/i386/i386.c (ix86_return_pops_args, x86_this_parameter):
Likewise.
* config/mips/mips.c (mips_save_reg_p, mips_expand_prologue,
mips_can_use_return_insn): Likewise.
* config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise.
* config/s390/s390.c (s390_output_mi_thunk): Likewise.
* config/sparc/sparc.c (sparc_output_mi_thunk): Pass function to
aggregate_value_p.
* config/story16/stormy16.c (xstormy16_asm_output_mi_thunk): Pass
function to aggregate_value_p.
* objc/objc-act.c (generate_struct_by_value_array): Pass NULL to
aggregate_value_p.
* config/sh/sh-protos.h (sh_builtin_saveregs): Remove.
(sh_attr_renesas_p, sh_cfun_attr_renesas_p, sh_function_arg,
sh_function_arg_advance, sh_pass_in_reg_p): New. * config/sh/sh.c
(sh_handle_renesas_attribute, sh_promote_prototypes,
sh_struct_value_rtx, sh_return_in_memory, sh_builtin_saveregs,
sh_setup_incoming_varargs, sh_strict_argument_naming,
sh_pretend_outgoing_varargs_named): New decls.
(targetm): Add new hooks.
(calc_live_regs): Save MACL and MACH if the function has the
renesas attribute.
(sh_expand_prologue): Support renesas attribute.
(sh_builtin_saveregs): Make static.
(sh_build_va_list): Support renesas attribute.
(sh_va_start): Likewise.
(sh_va_arg): Likewise.
(sh_promote_prototypes): New.
(sh_function_arg): New, moved from sh.h. Support renesas
attribute.
(sh_function_arg_advance): Likewise.
(sh_return_in_memory): Likewise.
(sh_strict_argument_naming): Likewise.
(sh_pretend_outgoing_varargs_named): Likewise.
(sh_struct_value_rtx): New.
(sh_attribute): Add renesas attribute.
(sh_handle_renesas_attribute): New.
(sh_attr_renesas_p, sh_cfun_attr_renesas_p): New.
(sh_ms_bitfield_layout_p): Support renesas attribute also.
(sh_output_mi_thunk): Pass function to aggregate_value_p. *
config/sh/sh.h (TARGET_SWITCHES): Add -mrenesas as an alias for
-mhitachi.
(STRUCT_VALUE_REGNUM, STRUCT_VALUE, RETURN_IN_MEMORY): Moved to
target hooks.
(sh_args): Add renesas_abi flag.
(INIT_CUMULATIVE_ARGS): Set it. Pass fndecl to aggregate_value_p.
(FUNCTION_ARG_ADVANCE, FUNCTION_ARG): Move to sh.c.
(PASS_IN_REG_P): Support renesas attribute. Pass DF and TF on the
stack for the renesas abi.
(STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED,
SETUP_INCOMING_VARARGS, EXPAND_BUILTIN_SAVEREGS,
PROMOTE_PROTOTYPES): Moved to sh.c. * config/sh/sh.md (call): Set
call cookie to indicate renesas calls.
* decl.c (finish_function): Pass fndecl to aggregate_value_p.
* misc.c (default_pass_by_ref): Convert to calls.return_in_memory
hook.
From-SVN: r71048
2003-09-04 05:18:05 +02:00
|
|
|
@deftypefn {Target Hook} void TARGET_SETUP_INCOMING_VARARGS (CUMULATIVE_ARGS *@var{args_so_far}, enum machine_mode @var{mode}, tree @var{type}, int *@var{pretend_args_size}, int @var{second_time})
|
|
|
|
This target hook offers an alternative to using
|
|
|
|
@code{__builtin_saveregs} and defining the hook
|
|
|
|
@code{TARGET_EXPAND_BUILTIN_SAVEREGS}. Use it to store the anonymous
|
|
|
|
register arguments into the stack so that all the arguments appear to
|
|
|
|
have been passed consecutively on the stack. Once this is done, you can
|
|
|
|
use the standard implementation of varargs that works for machines that
|
|
|
|
pass all their arguments on the stack.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
targhooks.c: New file.
* targhooks.c: New file.
* targhooks.h: New file.
* Makefile.in: Add targhooks.o support.
(function.o): Depend on$(TARGET_H).
(stmt.o): Likewise.
(combine.o): Depend on $(TREE_H) and $(TARGET_H).
* builtins.c (apply_args_size, expand_builtin_apply_args_1,
expand_builtin_apply): Convert to calls.struct_value_rtx hook.
(expand_builtin_saveregs): Convert to
calls.expand_builtin_saveregs hook.
* c-decl.c (start_decl): Handle new calls.promote_prototypes hook
here, instead of ...
(get_parm_info) ... here.
(store_parm_decls_oldstyle): Convert to calls.promote_prototypes
hook.
(finish_function): Handle calls.promote_prototypes hook here too.
* c-typeck.c (convert_arguments): Convert to
calls.promote_prototypes hook.
(c_convert_parm_for_inlining): Likewise.
* calls.c (initialize_argument_information): Convert to
calls.promote_function_args hook.
(expand_call): Convert to calls.struct_value_rtx,
calls.strict_argument_naming,
calls.pretend_outgoing_varargs_named, and
calls.promote_function_return hooks. Pass fndecl to
aggregate_value_p. Initialize CUMULATIVE_ARGS before calling
hooks, so they can use that.
(emit_library_call_value_1): Likewise.
* combine.c (setup_incoming_promotions): Convert to
calls.promote_function_args hook.
* emit-rtl.c: Convert to calls.struct_value_rtx hook.
* expr.c (expand_assignment): Pass call to aggregate_value_p.
(expand_expr): Likewise.
* expr.h: Remove support for SETUP_INCOMING_VARARGS,
STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED,
RETURN_IN_MEMORY macro defaults.
* final.c (profile_function): Convert to calls.struct_value_rtx
hook.
* function.c (aggregate_value_p): Accept function type tree as
second parameter; try to deduce fntype from it. Convert to
calls.return_in_memory hook.
(assign_parms): Convert to calls.setup_incoming_varargs,
calls.strict_argument_naming, calls.promote_function_args,
calls.pretend_outgoing_varargs_named hooks. Pass fndecl to
aggregate_value_p.
(expand_function_start): Likewise. Convert to
calls.struct_value_rtx hook.
(expand_function_end): Convert to calls.promote_function_return hook.
(allocate_struct_function): Pass fndecl to aggregate_value_p.
* hard-reg-set.h: Update comments to new hook names.
* integrate.c (expand_inline_function): Pass fndecl to aggregate_value_p.
* reg-stack.c (stack_result): Likewise.
* rtl.h (struct_value_rtx, struct_value_incoming_rtx): Delete.
* stmt.c (expand_value_return): Convert to
calls.promote_function_return hook.
* target-def.h: Add TARGET_PROMOTE_FUNCTION_ARGS,
TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES,
TARGET_STRUCT_VALUE_RTX, TARGET_RETURN_IN_MEMORY,
TARGET_EXPAND_BUILTIN_SAVEREGS, TARGET_SETUP_INCOMING_VARARGS,
TARGET_STRICT_ARGUMENT_NAMING,
TARGET_PRETEND_OUTGOING_VARARGS_NAMED, and TARGET_CALLS.
* target.h: Likewise.
* tree.h (aggregate_value_p): Also takes a tree to deduce function
attributes from (for target hooks).
* doc/tm.texi (PROMOTE_FUNCTION_ARGS, PROMOTE_FUNCTION_RETURN,
PROMOTE_PROTOTYPES, RETURN_IN_MEMORY, STRUCT_VALUE_REGNUM,
STRUCT_VALUE, STRUCT_VALUE_INCOMING_REGNUM, STRUCT_VALUE_INCOMING,
EXPAND_BUILTIN_SAVEREGS, SETUP_INCOMING_VARARGS,
STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED): Convert
to hooks.
* config/alpha/alpha.c (alpha_output_mi_thunk_osf): Pass function
to aggregate_value_p.
* config/arm/arm.c (arm_init_cumulative_args,
arm_output_mi_thunk): Likewise.
* config/i386/i386.c (ix86_return_pops_args, x86_this_parameter):
Likewise.
* config/mips/mips.c (mips_save_reg_p, mips_expand_prologue,
mips_can_use_return_insn): Likewise.
* config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise.
* config/s390/s390.c (s390_output_mi_thunk): Likewise.
* config/sparc/sparc.c (sparc_output_mi_thunk): Pass function to
aggregate_value_p.
* config/story16/stormy16.c (xstormy16_asm_output_mi_thunk): Pass
function to aggregate_value_p.
* objc/objc-act.c (generate_struct_by_value_array): Pass NULL to
aggregate_value_p.
* config/sh/sh-protos.h (sh_builtin_saveregs): Remove.
(sh_attr_renesas_p, sh_cfun_attr_renesas_p, sh_function_arg,
sh_function_arg_advance, sh_pass_in_reg_p): New. * config/sh/sh.c
(sh_handle_renesas_attribute, sh_promote_prototypes,
sh_struct_value_rtx, sh_return_in_memory, sh_builtin_saveregs,
sh_setup_incoming_varargs, sh_strict_argument_naming,
sh_pretend_outgoing_varargs_named): New decls.
(targetm): Add new hooks.
(calc_live_regs): Save MACL and MACH if the function has the
renesas attribute.
(sh_expand_prologue): Support renesas attribute.
(sh_builtin_saveregs): Make static.
(sh_build_va_list): Support renesas attribute.
(sh_va_start): Likewise.
(sh_va_arg): Likewise.
(sh_promote_prototypes): New.
(sh_function_arg): New, moved from sh.h. Support renesas
attribute.
(sh_function_arg_advance): Likewise.
(sh_return_in_memory): Likewise.
(sh_strict_argument_naming): Likewise.
(sh_pretend_outgoing_varargs_named): Likewise.
(sh_struct_value_rtx): New.
(sh_attribute): Add renesas attribute.
(sh_handle_renesas_attribute): New.
(sh_attr_renesas_p, sh_cfun_attr_renesas_p): New.
(sh_ms_bitfield_layout_p): Support renesas attribute also.
(sh_output_mi_thunk): Pass function to aggregate_value_p. *
config/sh/sh.h (TARGET_SWITCHES): Add -mrenesas as an alias for
-mhitachi.
(STRUCT_VALUE_REGNUM, STRUCT_VALUE, RETURN_IN_MEMORY): Moved to
target hooks.
(sh_args): Add renesas_abi flag.
(INIT_CUMULATIVE_ARGS): Set it. Pass fndecl to aggregate_value_p.
(FUNCTION_ARG_ADVANCE, FUNCTION_ARG): Move to sh.c.
(PASS_IN_REG_P): Support renesas attribute. Pass DF and TF on the
stack for the renesas abi.
(STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED,
SETUP_INCOMING_VARARGS, EXPAND_BUILTIN_SAVEREGS,
PROMOTE_PROTOTYPES): Moved to sh.c. * config/sh/sh.md (call): Set
call cookie to indicate renesas calls.
* decl.c (finish_function): Pass fndecl to aggregate_value_p.
* misc.c (default_pass_by_ref): Convert to calls.return_in_memory
hook.
From-SVN: r71048
2003-09-04 05:18:05 +02:00
|
|
|
The argument @var{args_so_far} points to the @code{CUMULATIVE_ARGS} data
|
2000-02-04 11:30:26 +01:00
|
|
|
structure, containing the values that are obtained after processing the
|
1996-09-25 01:21:45 +02:00
|
|
|
named arguments. The arguments @var{mode} and @var{type} describe the
|
|
|
|
last named argument---its machine mode and its data type as a tree node.
|
|
|
|
|
targhooks.c: New file.
* targhooks.c: New file.
* targhooks.h: New file.
* Makefile.in: Add targhooks.o support.
(function.o): Depend on$(TARGET_H).
(stmt.o): Likewise.
(combine.o): Depend on $(TREE_H) and $(TARGET_H).
* builtins.c (apply_args_size, expand_builtin_apply_args_1,
expand_builtin_apply): Convert to calls.struct_value_rtx hook.
(expand_builtin_saveregs): Convert to
calls.expand_builtin_saveregs hook.
* c-decl.c (start_decl): Handle new calls.promote_prototypes hook
here, instead of ...
(get_parm_info) ... here.
(store_parm_decls_oldstyle): Convert to calls.promote_prototypes
hook.
(finish_function): Handle calls.promote_prototypes hook here too.
* c-typeck.c (convert_arguments): Convert to
calls.promote_prototypes hook.
(c_convert_parm_for_inlining): Likewise.
* calls.c (initialize_argument_information): Convert to
calls.promote_function_args hook.
(expand_call): Convert to calls.struct_value_rtx,
calls.strict_argument_naming,
calls.pretend_outgoing_varargs_named, and
calls.promote_function_return hooks. Pass fndecl to
aggregate_value_p. Initialize CUMULATIVE_ARGS before calling
hooks, so they can use that.
(emit_library_call_value_1): Likewise.
* combine.c (setup_incoming_promotions): Convert to
calls.promote_function_args hook.
* emit-rtl.c: Convert to calls.struct_value_rtx hook.
* expr.c (expand_assignment): Pass call to aggregate_value_p.
(expand_expr): Likewise.
* expr.h: Remove support for SETUP_INCOMING_VARARGS,
STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED,
RETURN_IN_MEMORY macro defaults.
* final.c (profile_function): Convert to calls.struct_value_rtx
hook.
* function.c (aggregate_value_p): Accept function type tree as
second parameter; try to deduce fntype from it. Convert to
calls.return_in_memory hook.
(assign_parms): Convert to calls.setup_incoming_varargs,
calls.strict_argument_naming, calls.promote_function_args,
calls.pretend_outgoing_varargs_named hooks. Pass fndecl to
aggregate_value_p.
(expand_function_start): Likewise. Convert to
calls.struct_value_rtx hook.
(expand_function_end): Convert to calls.promote_function_return hook.
(allocate_struct_function): Pass fndecl to aggregate_value_p.
* hard-reg-set.h: Update comments to new hook names.
* integrate.c (expand_inline_function): Pass fndecl to aggregate_value_p.
* reg-stack.c (stack_result): Likewise.
* rtl.h (struct_value_rtx, struct_value_incoming_rtx): Delete.
* stmt.c (expand_value_return): Convert to
calls.promote_function_return hook.
* target-def.h: Add TARGET_PROMOTE_FUNCTION_ARGS,
TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES,
TARGET_STRUCT_VALUE_RTX, TARGET_RETURN_IN_MEMORY,
TARGET_EXPAND_BUILTIN_SAVEREGS, TARGET_SETUP_INCOMING_VARARGS,
TARGET_STRICT_ARGUMENT_NAMING,
TARGET_PRETEND_OUTGOING_VARARGS_NAMED, and TARGET_CALLS.
* target.h: Likewise.
* tree.h (aggregate_value_p): Also takes a tree to deduce function
attributes from (for target hooks).
* doc/tm.texi (PROMOTE_FUNCTION_ARGS, PROMOTE_FUNCTION_RETURN,
PROMOTE_PROTOTYPES, RETURN_IN_MEMORY, STRUCT_VALUE_REGNUM,
STRUCT_VALUE, STRUCT_VALUE_INCOMING_REGNUM, STRUCT_VALUE_INCOMING,
EXPAND_BUILTIN_SAVEREGS, SETUP_INCOMING_VARARGS,
STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED): Convert
to hooks.
* config/alpha/alpha.c (alpha_output_mi_thunk_osf): Pass function
to aggregate_value_p.
* config/arm/arm.c (arm_init_cumulative_args,
arm_output_mi_thunk): Likewise.
* config/i386/i386.c (ix86_return_pops_args, x86_this_parameter):
Likewise.
* config/mips/mips.c (mips_save_reg_p, mips_expand_prologue,
mips_can_use_return_insn): Likewise.
* config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise.
* config/s390/s390.c (s390_output_mi_thunk): Likewise.
* config/sparc/sparc.c (sparc_output_mi_thunk): Pass function to
aggregate_value_p.
* config/story16/stormy16.c (xstormy16_asm_output_mi_thunk): Pass
function to aggregate_value_p.
* objc/objc-act.c (generate_struct_by_value_array): Pass NULL to
aggregate_value_p.
* config/sh/sh-protos.h (sh_builtin_saveregs): Remove.
(sh_attr_renesas_p, sh_cfun_attr_renesas_p, sh_function_arg,
sh_function_arg_advance, sh_pass_in_reg_p): New. * config/sh/sh.c
(sh_handle_renesas_attribute, sh_promote_prototypes,
sh_struct_value_rtx, sh_return_in_memory, sh_builtin_saveregs,
sh_setup_incoming_varargs, sh_strict_argument_naming,
sh_pretend_outgoing_varargs_named): New decls.
(targetm): Add new hooks.
(calc_live_regs): Save MACL and MACH if the function has the
renesas attribute.
(sh_expand_prologue): Support renesas attribute.
(sh_builtin_saveregs): Make static.
(sh_build_va_list): Support renesas attribute.
(sh_va_start): Likewise.
(sh_va_arg): Likewise.
(sh_promote_prototypes): New.
(sh_function_arg): New, moved from sh.h. Support renesas
attribute.
(sh_function_arg_advance): Likewise.
(sh_return_in_memory): Likewise.
(sh_strict_argument_naming): Likewise.
(sh_pretend_outgoing_varargs_named): Likewise.
(sh_struct_value_rtx): New.
(sh_attribute): Add renesas attribute.
(sh_handle_renesas_attribute): New.
(sh_attr_renesas_p, sh_cfun_attr_renesas_p): New.
(sh_ms_bitfield_layout_p): Support renesas attribute also.
(sh_output_mi_thunk): Pass function to aggregate_value_p. *
config/sh/sh.h (TARGET_SWITCHES): Add -mrenesas as an alias for
-mhitachi.
(STRUCT_VALUE_REGNUM, STRUCT_VALUE, RETURN_IN_MEMORY): Moved to
target hooks.
(sh_args): Add renesas_abi flag.
(INIT_CUMULATIVE_ARGS): Set it. Pass fndecl to aggregate_value_p.
(FUNCTION_ARG_ADVANCE, FUNCTION_ARG): Move to sh.c.
(PASS_IN_REG_P): Support renesas attribute. Pass DF and TF on the
stack for the renesas abi.
(STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED,
SETUP_INCOMING_VARARGS, EXPAND_BUILTIN_SAVEREGS,
PROMOTE_PROTOTYPES): Moved to sh.c. * config/sh/sh.md (call): Set
call cookie to indicate renesas calls.
* decl.c (finish_function): Pass fndecl to aggregate_value_p.
* misc.c (default_pass_by_ref): Convert to calls.return_in_memory
hook.
From-SVN: r71048
2003-09-04 05:18:05 +02:00
|
|
|
The target hook should do two things: first, push onto the stack all the
|
|
|
|
argument registers @emph{not} used for the named arguments, and second,
|
|
|
|
store the size of the data thus pushed into the @code{int}-valued
|
|
|
|
variable pointed to by @var{pretend_args_size}. The value that you
|
|
|
|
store here will serve as additional offset for setting up the stack
|
|
|
|
frame.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
Because you must generate code to push the anonymous arguments at
|
|
|
|
compile time without knowing their data types,
|
targhooks.c: New file.
* targhooks.c: New file.
* targhooks.h: New file.
* Makefile.in: Add targhooks.o support.
(function.o): Depend on$(TARGET_H).
(stmt.o): Likewise.
(combine.o): Depend on $(TREE_H) and $(TARGET_H).
* builtins.c (apply_args_size, expand_builtin_apply_args_1,
expand_builtin_apply): Convert to calls.struct_value_rtx hook.
(expand_builtin_saveregs): Convert to
calls.expand_builtin_saveregs hook.
* c-decl.c (start_decl): Handle new calls.promote_prototypes hook
here, instead of ...
(get_parm_info) ... here.
(store_parm_decls_oldstyle): Convert to calls.promote_prototypes
hook.
(finish_function): Handle calls.promote_prototypes hook here too.
* c-typeck.c (convert_arguments): Convert to
calls.promote_prototypes hook.
(c_convert_parm_for_inlining): Likewise.
* calls.c (initialize_argument_information): Convert to
calls.promote_function_args hook.
(expand_call): Convert to calls.struct_value_rtx,
calls.strict_argument_naming,
calls.pretend_outgoing_varargs_named, and
calls.promote_function_return hooks. Pass fndecl to
aggregate_value_p. Initialize CUMULATIVE_ARGS before calling
hooks, so they can use that.
(emit_library_call_value_1): Likewise.
* combine.c (setup_incoming_promotions): Convert to
calls.promote_function_args hook.
* emit-rtl.c: Convert to calls.struct_value_rtx hook.
* expr.c (expand_assignment): Pass call to aggregate_value_p.
(expand_expr): Likewise.
* expr.h: Remove support for SETUP_INCOMING_VARARGS,
STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED,
RETURN_IN_MEMORY macro defaults.
* final.c (profile_function): Convert to calls.struct_value_rtx
hook.
* function.c (aggregate_value_p): Accept function type tree as
second parameter; try to deduce fntype from it. Convert to
calls.return_in_memory hook.
(assign_parms): Convert to calls.setup_incoming_varargs,
calls.strict_argument_naming, calls.promote_function_args,
calls.pretend_outgoing_varargs_named hooks. Pass fndecl to
aggregate_value_p.
(expand_function_start): Likewise. Convert to
calls.struct_value_rtx hook.
(expand_function_end): Convert to calls.promote_function_return hook.
(allocate_struct_function): Pass fndecl to aggregate_value_p.
* hard-reg-set.h: Update comments to new hook names.
* integrate.c (expand_inline_function): Pass fndecl to aggregate_value_p.
* reg-stack.c (stack_result): Likewise.
* rtl.h (struct_value_rtx, struct_value_incoming_rtx): Delete.
* stmt.c (expand_value_return): Convert to
calls.promote_function_return hook.
* target-def.h: Add TARGET_PROMOTE_FUNCTION_ARGS,
TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES,
TARGET_STRUCT_VALUE_RTX, TARGET_RETURN_IN_MEMORY,
TARGET_EXPAND_BUILTIN_SAVEREGS, TARGET_SETUP_INCOMING_VARARGS,
TARGET_STRICT_ARGUMENT_NAMING,
TARGET_PRETEND_OUTGOING_VARARGS_NAMED, and TARGET_CALLS.
* target.h: Likewise.
* tree.h (aggregate_value_p): Also takes a tree to deduce function
attributes from (for target hooks).
* doc/tm.texi (PROMOTE_FUNCTION_ARGS, PROMOTE_FUNCTION_RETURN,
PROMOTE_PROTOTYPES, RETURN_IN_MEMORY, STRUCT_VALUE_REGNUM,
STRUCT_VALUE, STRUCT_VALUE_INCOMING_REGNUM, STRUCT_VALUE_INCOMING,
EXPAND_BUILTIN_SAVEREGS, SETUP_INCOMING_VARARGS,
STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED): Convert
to hooks.
* config/alpha/alpha.c (alpha_output_mi_thunk_osf): Pass function
to aggregate_value_p.
* config/arm/arm.c (arm_init_cumulative_args,
arm_output_mi_thunk): Likewise.
* config/i386/i386.c (ix86_return_pops_args, x86_this_parameter):
Likewise.
* config/mips/mips.c (mips_save_reg_p, mips_expand_prologue,
mips_can_use_return_insn): Likewise.
* config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise.
* config/s390/s390.c (s390_output_mi_thunk): Likewise.
* config/sparc/sparc.c (sparc_output_mi_thunk): Pass function to
aggregate_value_p.
* config/story16/stormy16.c (xstormy16_asm_output_mi_thunk): Pass
function to aggregate_value_p.
* objc/objc-act.c (generate_struct_by_value_array): Pass NULL to
aggregate_value_p.
* config/sh/sh-protos.h (sh_builtin_saveregs): Remove.
(sh_attr_renesas_p, sh_cfun_attr_renesas_p, sh_function_arg,
sh_function_arg_advance, sh_pass_in_reg_p): New. * config/sh/sh.c
(sh_handle_renesas_attribute, sh_promote_prototypes,
sh_struct_value_rtx, sh_return_in_memory, sh_builtin_saveregs,
sh_setup_incoming_varargs, sh_strict_argument_naming,
sh_pretend_outgoing_varargs_named): New decls.
(targetm): Add new hooks.
(calc_live_regs): Save MACL and MACH if the function has the
renesas attribute.
(sh_expand_prologue): Support renesas attribute.
(sh_builtin_saveregs): Make static.
(sh_build_va_list): Support renesas attribute.
(sh_va_start): Likewise.
(sh_va_arg): Likewise.
(sh_promote_prototypes): New.
(sh_function_arg): New, moved from sh.h. Support renesas
attribute.
(sh_function_arg_advance): Likewise.
(sh_return_in_memory): Likewise.
(sh_strict_argument_naming): Likewise.
(sh_pretend_outgoing_varargs_named): Likewise.
(sh_struct_value_rtx): New.
(sh_attribute): Add renesas attribute.
(sh_handle_renesas_attribute): New.
(sh_attr_renesas_p, sh_cfun_attr_renesas_p): New.
(sh_ms_bitfield_layout_p): Support renesas attribute also.
(sh_output_mi_thunk): Pass function to aggregate_value_p. *
config/sh/sh.h (TARGET_SWITCHES): Add -mrenesas as an alias for
-mhitachi.
(STRUCT_VALUE_REGNUM, STRUCT_VALUE, RETURN_IN_MEMORY): Moved to
target hooks.
(sh_args): Add renesas_abi flag.
(INIT_CUMULATIVE_ARGS): Set it. Pass fndecl to aggregate_value_p.
(FUNCTION_ARG_ADVANCE, FUNCTION_ARG): Move to sh.c.
(PASS_IN_REG_P): Support renesas attribute. Pass DF and TF on the
stack for the renesas abi.
(STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED,
SETUP_INCOMING_VARARGS, EXPAND_BUILTIN_SAVEREGS,
PROMOTE_PROTOTYPES): Moved to sh.c. * config/sh/sh.md (call): Set
call cookie to indicate renesas calls.
* decl.c (finish_function): Pass fndecl to aggregate_value_p.
* misc.c (default_pass_by_ref): Convert to calls.return_in_memory
hook.
From-SVN: r71048
2003-09-04 05:18:05 +02:00
|
|
|
@code{TARGET_SETUP_INCOMING_VARARGS} is only useful on machines that
|
|
|
|
have just a single category of argument register and use it uniformly
|
|
|
|
for all data types.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
If the argument @var{second_time} is nonzero, it means that the
|
|
|
|
arguments of the function are being analyzed for the second time. This
|
|
|
|
happens for an inline function, which is not actually compiled until the
|
targhooks.c: New file.
* targhooks.c: New file.
* targhooks.h: New file.
* Makefile.in: Add targhooks.o support.
(function.o): Depend on$(TARGET_H).
(stmt.o): Likewise.
(combine.o): Depend on $(TREE_H) and $(TARGET_H).
* builtins.c (apply_args_size, expand_builtin_apply_args_1,
expand_builtin_apply): Convert to calls.struct_value_rtx hook.
(expand_builtin_saveregs): Convert to
calls.expand_builtin_saveregs hook.
* c-decl.c (start_decl): Handle new calls.promote_prototypes hook
here, instead of ...
(get_parm_info) ... here.
(store_parm_decls_oldstyle): Convert to calls.promote_prototypes
hook.
(finish_function): Handle calls.promote_prototypes hook here too.
* c-typeck.c (convert_arguments): Convert to
calls.promote_prototypes hook.
(c_convert_parm_for_inlining): Likewise.
* calls.c (initialize_argument_information): Convert to
calls.promote_function_args hook.
(expand_call): Convert to calls.struct_value_rtx,
calls.strict_argument_naming,
calls.pretend_outgoing_varargs_named, and
calls.promote_function_return hooks. Pass fndecl to
aggregate_value_p. Initialize CUMULATIVE_ARGS before calling
hooks, so they can use that.
(emit_library_call_value_1): Likewise.
* combine.c (setup_incoming_promotions): Convert to
calls.promote_function_args hook.
* emit-rtl.c: Convert to calls.struct_value_rtx hook.
* expr.c (expand_assignment): Pass call to aggregate_value_p.
(expand_expr): Likewise.
* expr.h: Remove support for SETUP_INCOMING_VARARGS,
STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED,
RETURN_IN_MEMORY macro defaults.
* final.c (profile_function): Convert to calls.struct_value_rtx
hook.
* function.c (aggregate_value_p): Accept function type tree as
second parameter; try to deduce fntype from it. Convert to
calls.return_in_memory hook.
(assign_parms): Convert to calls.setup_incoming_varargs,
calls.strict_argument_naming, calls.promote_function_args,
calls.pretend_outgoing_varargs_named hooks. Pass fndecl to
aggregate_value_p.
(expand_function_start): Likewise. Convert to
calls.struct_value_rtx hook.
(expand_function_end): Convert to calls.promote_function_return hook.
(allocate_struct_function): Pass fndecl to aggregate_value_p.
* hard-reg-set.h: Update comments to new hook names.
* integrate.c (expand_inline_function): Pass fndecl to aggregate_value_p.
* reg-stack.c (stack_result): Likewise.
* rtl.h (struct_value_rtx, struct_value_incoming_rtx): Delete.
* stmt.c (expand_value_return): Convert to
calls.promote_function_return hook.
* target-def.h: Add TARGET_PROMOTE_FUNCTION_ARGS,
TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES,
TARGET_STRUCT_VALUE_RTX, TARGET_RETURN_IN_MEMORY,
TARGET_EXPAND_BUILTIN_SAVEREGS, TARGET_SETUP_INCOMING_VARARGS,
TARGET_STRICT_ARGUMENT_NAMING,
TARGET_PRETEND_OUTGOING_VARARGS_NAMED, and TARGET_CALLS.
* target.h: Likewise.
* tree.h (aggregate_value_p): Also takes a tree to deduce function
attributes from (for target hooks).
* doc/tm.texi (PROMOTE_FUNCTION_ARGS, PROMOTE_FUNCTION_RETURN,
PROMOTE_PROTOTYPES, RETURN_IN_MEMORY, STRUCT_VALUE_REGNUM,
STRUCT_VALUE, STRUCT_VALUE_INCOMING_REGNUM, STRUCT_VALUE_INCOMING,
EXPAND_BUILTIN_SAVEREGS, SETUP_INCOMING_VARARGS,
STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED): Convert
to hooks.
* config/alpha/alpha.c (alpha_output_mi_thunk_osf): Pass function
to aggregate_value_p.
* config/arm/arm.c (arm_init_cumulative_args,
arm_output_mi_thunk): Likewise.
* config/i386/i386.c (ix86_return_pops_args, x86_this_parameter):
Likewise.
* config/mips/mips.c (mips_save_reg_p, mips_expand_prologue,
mips_can_use_return_insn): Likewise.
* config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise.
* config/s390/s390.c (s390_output_mi_thunk): Likewise.
* config/sparc/sparc.c (sparc_output_mi_thunk): Pass function to
aggregate_value_p.
* config/story16/stormy16.c (xstormy16_asm_output_mi_thunk): Pass
function to aggregate_value_p.
* objc/objc-act.c (generate_struct_by_value_array): Pass NULL to
aggregate_value_p.
* config/sh/sh-protos.h (sh_builtin_saveregs): Remove.
(sh_attr_renesas_p, sh_cfun_attr_renesas_p, sh_function_arg,
sh_function_arg_advance, sh_pass_in_reg_p): New. * config/sh/sh.c
(sh_handle_renesas_attribute, sh_promote_prototypes,
sh_struct_value_rtx, sh_return_in_memory, sh_builtin_saveregs,
sh_setup_incoming_varargs, sh_strict_argument_naming,
sh_pretend_outgoing_varargs_named): New decls.
(targetm): Add new hooks.
(calc_live_regs): Save MACL and MACH if the function has the
renesas attribute.
(sh_expand_prologue): Support renesas attribute.
(sh_builtin_saveregs): Make static.
(sh_build_va_list): Support renesas attribute.
(sh_va_start): Likewise.
(sh_va_arg): Likewise.
(sh_promote_prototypes): New.
(sh_function_arg): New, moved from sh.h. Support renesas
attribute.
(sh_function_arg_advance): Likewise.
(sh_return_in_memory): Likewise.
(sh_strict_argument_naming): Likewise.
(sh_pretend_outgoing_varargs_named): Likewise.
(sh_struct_value_rtx): New.
(sh_attribute): Add renesas attribute.
(sh_handle_renesas_attribute): New.
(sh_attr_renesas_p, sh_cfun_attr_renesas_p): New.
(sh_ms_bitfield_layout_p): Support renesas attribute also.
(sh_output_mi_thunk): Pass function to aggregate_value_p. *
config/sh/sh.h (TARGET_SWITCHES): Add -mrenesas as an alias for
-mhitachi.
(STRUCT_VALUE_REGNUM, STRUCT_VALUE, RETURN_IN_MEMORY): Moved to
target hooks.
(sh_args): Add renesas_abi flag.
(INIT_CUMULATIVE_ARGS): Set it. Pass fndecl to aggregate_value_p.
(FUNCTION_ARG_ADVANCE, FUNCTION_ARG): Move to sh.c.
(PASS_IN_REG_P): Support renesas attribute. Pass DF and TF on the
stack for the renesas abi.
(STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED,
SETUP_INCOMING_VARARGS, EXPAND_BUILTIN_SAVEREGS,
PROMOTE_PROTOTYPES): Moved to sh.c. * config/sh/sh.md (call): Set
call cookie to indicate renesas calls.
* decl.c (finish_function): Pass fndecl to aggregate_value_p.
* misc.c (default_pass_by_ref): Convert to calls.return_in_memory
hook.
From-SVN: r71048
2003-09-04 05:18:05 +02:00
|
|
|
end of the source file. The hook @code{TARGET_SETUP_INCOMING_VARARGS} should
|
1996-09-25 01:21:45 +02:00
|
|
|
not generate any instructions in this case.
|
targhooks.c: New file.
* targhooks.c: New file.
* targhooks.h: New file.
* Makefile.in: Add targhooks.o support.
(function.o): Depend on$(TARGET_H).
(stmt.o): Likewise.
(combine.o): Depend on $(TREE_H) and $(TARGET_H).
* builtins.c (apply_args_size, expand_builtin_apply_args_1,
expand_builtin_apply): Convert to calls.struct_value_rtx hook.
(expand_builtin_saveregs): Convert to
calls.expand_builtin_saveregs hook.
* c-decl.c (start_decl): Handle new calls.promote_prototypes hook
here, instead of ...
(get_parm_info) ... here.
(store_parm_decls_oldstyle): Convert to calls.promote_prototypes
hook.
(finish_function): Handle calls.promote_prototypes hook here too.
* c-typeck.c (convert_arguments): Convert to
calls.promote_prototypes hook.
(c_convert_parm_for_inlining): Likewise.
* calls.c (initialize_argument_information): Convert to
calls.promote_function_args hook.
(expand_call): Convert to calls.struct_value_rtx,
calls.strict_argument_naming,
calls.pretend_outgoing_varargs_named, and
calls.promote_function_return hooks. Pass fndecl to
aggregate_value_p. Initialize CUMULATIVE_ARGS before calling
hooks, so they can use that.
(emit_library_call_value_1): Likewise.
* combine.c (setup_incoming_promotions): Convert to
calls.promote_function_args hook.
* emit-rtl.c: Convert to calls.struct_value_rtx hook.
* expr.c (expand_assignment): Pass call to aggregate_value_p.
(expand_expr): Likewise.
* expr.h: Remove support for SETUP_INCOMING_VARARGS,
STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED,
RETURN_IN_MEMORY macro defaults.
* final.c (profile_function): Convert to calls.struct_value_rtx
hook.
* function.c (aggregate_value_p): Accept function type tree as
second parameter; try to deduce fntype from it. Convert to
calls.return_in_memory hook.
(assign_parms): Convert to calls.setup_incoming_varargs,
calls.strict_argument_naming, calls.promote_function_args,
calls.pretend_outgoing_varargs_named hooks. Pass fndecl to
aggregate_value_p.
(expand_function_start): Likewise. Convert to
calls.struct_value_rtx hook.
(expand_function_end): Convert to calls.promote_function_return hook.
(allocate_struct_function): Pass fndecl to aggregate_value_p.
* hard-reg-set.h: Update comments to new hook names.
* integrate.c (expand_inline_function): Pass fndecl to aggregate_value_p.
* reg-stack.c (stack_result): Likewise.
* rtl.h (struct_value_rtx, struct_value_incoming_rtx): Delete.
* stmt.c (expand_value_return): Convert to
calls.promote_function_return hook.
* target-def.h: Add TARGET_PROMOTE_FUNCTION_ARGS,
TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES,
TARGET_STRUCT_VALUE_RTX, TARGET_RETURN_IN_MEMORY,
TARGET_EXPAND_BUILTIN_SAVEREGS, TARGET_SETUP_INCOMING_VARARGS,
TARGET_STRICT_ARGUMENT_NAMING,
TARGET_PRETEND_OUTGOING_VARARGS_NAMED, and TARGET_CALLS.
* target.h: Likewise.
* tree.h (aggregate_value_p): Also takes a tree to deduce function
attributes from (for target hooks).
* doc/tm.texi (PROMOTE_FUNCTION_ARGS, PROMOTE_FUNCTION_RETURN,
PROMOTE_PROTOTYPES, RETURN_IN_MEMORY, STRUCT_VALUE_REGNUM,
STRUCT_VALUE, STRUCT_VALUE_INCOMING_REGNUM, STRUCT_VALUE_INCOMING,
EXPAND_BUILTIN_SAVEREGS, SETUP_INCOMING_VARARGS,
STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED): Convert
to hooks.
* config/alpha/alpha.c (alpha_output_mi_thunk_osf): Pass function
to aggregate_value_p.
* config/arm/arm.c (arm_init_cumulative_args,
arm_output_mi_thunk): Likewise.
* config/i386/i386.c (ix86_return_pops_args, x86_this_parameter):
Likewise.
* config/mips/mips.c (mips_save_reg_p, mips_expand_prologue,
mips_can_use_return_insn): Likewise.
* config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise.
* config/s390/s390.c (s390_output_mi_thunk): Likewise.
* config/sparc/sparc.c (sparc_output_mi_thunk): Pass function to
aggregate_value_p.
* config/story16/stormy16.c (xstormy16_asm_output_mi_thunk): Pass
function to aggregate_value_p.
* objc/objc-act.c (generate_struct_by_value_array): Pass NULL to
aggregate_value_p.
* config/sh/sh-protos.h (sh_builtin_saveregs): Remove.
(sh_attr_renesas_p, sh_cfun_attr_renesas_p, sh_function_arg,
sh_function_arg_advance, sh_pass_in_reg_p): New. * config/sh/sh.c
(sh_handle_renesas_attribute, sh_promote_prototypes,
sh_struct_value_rtx, sh_return_in_memory, sh_builtin_saveregs,
sh_setup_incoming_varargs, sh_strict_argument_naming,
sh_pretend_outgoing_varargs_named): New decls.
(targetm): Add new hooks.
(calc_live_regs): Save MACL and MACH if the function has the
renesas attribute.
(sh_expand_prologue): Support renesas attribute.
(sh_builtin_saveregs): Make static.
(sh_build_va_list): Support renesas attribute.
(sh_va_start): Likewise.
(sh_va_arg): Likewise.
(sh_promote_prototypes): New.
(sh_function_arg): New, moved from sh.h. Support renesas
attribute.
(sh_function_arg_advance): Likewise.
(sh_return_in_memory): Likewise.
(sh_strict_argument_naming): Likewise.
(sh_pretend_outgoing_varargs_named): Likewise.
(sh_struct_value_rtx): New.
(sh_attribute): Add renesas attribute.
(sh_handle_renesas_attribute): New.
(sh_attr_renesas_p, sh_cfun_attr_renesas_p): New.
(sh_ms_bitfield_layout_p): Support renesas attribute also.
(sh_output_mi_thunk): Pass function to aggregate_value_p. *
config/sh/sh.h (TARGET_SWITCHES): Add -mrenesas as an alias for
-mhitachi.
(STRUCT_VALUE_REGNUM, STRUCT_VALUE, RETURN_IN_MEMORY): Moved to
target hooks.
(sh_args): Add renesas_abi flag.
(INIT_CUMULATIVE_ARGS): Set it. Pass fndecl to aggregate_value_p.
(FUNCTION_ARG_ADVANCE, FUNCTION_ARG): Move to sh.c.
(PASS_IN_REG_P): Support renesas attribute. Pass DF and TF on the
stack for the renesas abi.
(STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED,
SETUP_INCOMING_VARARGS, EXPAND_BUILTIN_SAVEREGS,
PROMOTE_PROTOTYPES): Moved to sh.c. * config/sh/sh.md (call): Set
call cookie to indicate renesas calls.
* decl.c (finish_function): Pass fndecl to aggregate_value_p.
* misc.c (default_pass_by_ref): Convert to calls.return_in_memory
hook.
From-SVN: r71048
2003-09-04 05:18:05 +02:00
|
|
|
@end deftypefn
|
1996-09-25 01:21:45 +02:00
|
|
|
|
targhooks.c: New file.
* targhooks.c: New file.
* targhooks.h: New file.
* Makefile.in: Add targhooks.o support.
(function.o): Depend on$(TARGET_H).
(stmt.o): Likewise.
(combine.o): Depend on $(TREE_H) and $(TARGET_H).
* builtins.c (apply_args_size, expand_builtin_apply_args_1,
expand_builtin_apply): Convert to calls.struct_value_rtx hook.
(expand_builtin_saveregs): Convert to
calls.expand_builtin_saveregs hook.
* c-decl.c (start_decl): Handle new calls.promote_prototypes hook
here, instead of ...
(get_parm_info) ... here.
(store_parm_decls_oldstyle): Convert to calls.promote_prototypes
hook.
(finish_function): Handle calls.promote_prototypes hook here too.
* c-typeck.c (convert_arguments): Convert to
calls.promote_prototypes hook.
(c_convert_parm_for_inlining): Likewise.
* calls.c (initialize_argument_information): Convert to
calls.promote_function_args hook.
(expand_call): Convert to calls.struct_value_rtx,
calls.strict_argument_naming,
calls.pretend_outgoing_varargs_named, and
calls.promote_function_return hooks. Pass fndecl to
aggregate_value_p. Initialize CUMULATIVE_ARGS before calling
hooks, so they can use that.
(emit_library_call_value_1): Likewise.
* combine.c (setup_incoming_promotions): Convert to
calls.promote_function_args hook.
* emit-rtl.c: Convert to calls.struct_value_rtx hook.
* expr.c (expand_assignment): Pass call to aggregate_value_p.
(expand_expr): Likewise.
* expr.h: Remove support for SETUP_INCOMING_VARARGS,
STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED,
RETURN_IN_MEMORY macro defaults.
* final.c (profile_function): Convert to calls.struct_value_rtx
hook.
* function.c (aggregate_value_p): Accept function type tree as
second parameter; try to deduce fntype from it. Convert to
calls.return_in_memory hook.
(assign_parms): Convert to calls.setup_incoming_varargs,
calls.strict_argument_naming, calls.promote_function_args,
calls.pretend_outgoing_varargs_named hooks. Pass fndecl to
aggregate_value_p.
(expand_function_start): Likewise. Convert to
calls.struct_value_rtx hook.
(expand_function_end): Convert to calls.promote_function_return hook.
(allocate_struct_function): Pass fndecl to aggregate_value_p.
* hard-reg-set.h: Update comments to new hook names.
* integrate.c (expand_inline_function): Pass fndecl to aggregate_value_p.
* reg-stack.c (stack_result): Likewise.
* rtl.h (struct_value_rtx, struct_value_incoming_rtx): Delete.
* stmt.c (expand_value_return): Convert to
calls.promote_function_return hook.
* target-def.h: Add TARGET_PROMOTE_FUNCTION_ARGS,
TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES,
TARGET_STRUCT_VALUE_RTX, TARGET_RETURN_IN_MEMORY,
TARGET_EXPAND_BUILTIN_SAVEREGS, TARGET_SETUP_INCOMING_VARARGS,
TARGET_STRICT_ARGUMENT_NAMING,
TARGET_PRETEND_OUTGOING_VARARGS_NAMED, and TARGET_CALLS.
* target.h: Likewise.
* tree.h (aggregate_value_p): Also takes a tree to deduce function
attributes from (for target hooks).
* doc/tm.texi (PROMOTE_FUNCTION_ARGS, PROMOTE_FUNCTION_RETURN,
PROMOTE_PROTOTYPES, RETURN_IN_MEMORY, STRUCT_VALUE_REGNUM,
STRUCT_VALUE, STRUCT_VALUE_INCOMING_REGNUM, STRUCT_VALUE_INCOMING,
EXPAND_BUILTIN_SAVEREGS, SETUP_INCOMING_VARARGS,
STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED): Convert
to hooks.
* config/alpha/alpha.c (alpha_output_mi_thunk_osf): Pass function
to aggregate_value_p.
* config/arm/arm.c (arm_init_cumulative_args,
arm_output_mi_thunk): Likewise.
* config/i386/i386.c (ix86_return_pops_args, x86_this_parameter):
Likewise.
* config/mips/mips.c (mips_save_reg_p, mips_expand_prologue,
mips_can_use_return_insn): Likewise.
* config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise.
* config/s390/s390.c (s390_output_mi_thunk): Likewise.
* config/sparc/sparc.c (sparc_output_mi_thunk): Pass function to
aggregate_value_p.
* config/story16/stormy16.c (xstormy16_asm_output_mi_thunk): Pass
function to aggregate_value_p.
* objc/objc-act.c (generate_struct_by_value_array): Pass NULL to
aggregate_value_p.
* config/sh/sh-protos.h (sh_builtin_saveregs): Remove.
(sh_attr_renesas_p, sh_cfun_attr_renesas_p, sh_function_arg,
sh_function_arg_advance, sh_pass_in_reg_p): New. * config/sh/sh.c
(sh_handle_renesas_attribute, sh_promote_prototypes,
sh_struct_value_rtx, sh_return_in_memory, sh_builtin_saveregs,
sh_setup_incoming_varargs, sh_strict_argument_naming,
sh_pretend_outgoing_varargs_named): New decls.
(targetm): Add new hooks.
(calc_live_regs): Save MACL and MACH if the function has the
renesas attribute.
(sh_expand_prologue): Support renesas attribute.
(sh_builtin_saveregs): Make static.
(sh_build_va_list): Support renesas attribute.
(sh_va_start): Likewise.
(sh_va_arg): Likewise.
(sh_promote_prototypes): New.
(sh_function_arg): New, moved from sh.h. Support renesas
attribute.
(sh_function_arg_advance): Likewise.
(sh_return_in_memory): Likewise.
(sh_strict_argument_naming): Likewise.
(sh_pretend_outgoing_varargs_named): Likewise.
(sh_struct_value_rtx): New.
(sh_attribute): Add renesas attribute.
(sh_handle_renesas_attribute): New.
(sh_attr_renesas_p, sh_cfun_attr_renesas_p): New.
(sh_ms_bitfield_layout_p): Support renesas attribute also.
(sh_output_mi_thunk): Pass function to aggregate_value_p. *
config/sh/sh.h (TARGET_SWITCHES): Add -mrenesas as an alias for
-mhitachi.
(STRUCT_VALUE_REGNUM, STRUCT_VALUE, RETURN_IN_MEMORY): Moved to
target hooks.
(sh_args): Add renesas_abi flag.
(INIT_CUMULATIVE_ARGS): Set it. Pass fndecl to aggregate_value_p.
(FUNCTION_ARG_ADVANCE, FUNCTION_ARG): Move to sh.c.
(PASS_IN_REG_P): Support renesas attribute. Pass DF and TF on the
stack for the renesas abi.
(STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED,
SETUP_INCOMING_VARARGS, EXPAND_BUILTIN_SAVEREGS,
PROMOTE_PROTOTYPES): Moved to sh.c. * config/sh/sh.md (call): Set
call cookie to indicate renesas calls.
* decl.c (finish_function): Pass fndecl to aggregate_value_p.
* misc.c (default_pass_by_ref): Convert to calls.return_in_memory
hook.
From-SVN: r71048
2003-09-04 05:18:05 +02:00
|
|
|
@deftypefn {Target Hook} bool TARGET_STRICT_ARGUMENT_NAMING (CUMULATIVE_ARGS *@var{ca})
|
|
|
|
Define this hook to return @code{true} if the location where a function
|
1998-04-04 15:32:39 +02:00
|
|
|
argument is passed depends on whether or not it is a named argument.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
targhooks.c: New file.
* targhooks.c: New file.
* targhooks.h: New file.
* Makefile.in: Add targhooks.o support.
(function.o): Depend on$(TARGET_H).
(stmt.o): Likewise.
(combine.o): Depend on $(TREE_H) and $(TARGET_H).
* builtins.c (apply_args_size, expand_builtin_apply_args_1,
expand_builtin_apply): Convert to calls.struct_value_rtx hook.
(expand_builtin_saveregs): Convert to
calls.expand_builtin_saveregs hook.
* c-decl.c (start_decl): Handle new calls.promote_prototypes hook
here, instead of ...
(get_parm_info) ... here.
(store_parm_decls_oldstyle): Convert to calls.promote_prototypes
hook.
(finish_function): Handle calls.promote_prototypes hook here too.
* c-typeck.c (convert_arguments): Convert to
calls.promote_prototypes hook.
(c_convert_parm_for_inlining): Likewise.
* calls.c (initialize_argument_information): Convert to
calls.promote_function_args hook.
(expand_call): Convert to calls.struct_value_rtx,
calls.strict_argument_naming,
calls.pretend_outgoing_varargs_named, and
calls.promote_function_return hooks. Pass fndecl to
aggregate_value_p. Initialize CUMULATIVE_ARGS before calling
hooks, so they can use that.
(emit_library_call_value_1): Likewise.
* combine.c (setup_incoming_promotions): Convert to
calls.promote_function_args hook.
* emit-rtl.c: Convert to calls.struct_value_rtx hook.
* expr.c (expand_assignment): Pass call to aggregate_value_p.
(expand_expr): Likewise.
* expr.h: Remove support for SETUP_INCOMING_VARARGS,
STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED,
RETURN_IN_MEMORY macro defaults.
* final.c (profile_function): Convert to calls.struct_value_rtx
hook.
* function.c (aggregate_value_p): Accept function type tree as
second parameter; try to deduce fntype from it. Convert to
calls.return_in_memory hook.
(assign_parms): Convert to calls.setup_incoming_varargs,
calls.strict_argument_naming, calls.promote_function_args,
calls.pretend_outgoing_varargs_named hooks. Pass fndecl to
aggregate_value_p.
(expand_function_start): Likewise. Convert to
calls.struct_value_rtx hook.
(expand_function_end): Convert to calls.promote_function_return hook.
(allocate_struct_function): Pass fndecl to aggregate_value_p.
* hard-reg-set.h: Update comments to new hook names.
* integrate.c (expand_inline_function): Pass fndecl to aggregate_value_p.
* reg-stack.c (stack_result): Likewise.
* rtl.h (struct_value_rtx, struct_value_incoming_rtx): Delete.
* stmt.c (expand_value_return): Convert to
calls.promote_function_return hook.
* target-def.h: Add TARGET_PROMOTE_FUNCTION_ARGS,
TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES,
TARGET_STRUCT_VALUE_RTX, TARGET_RETURN_IN_MEMORY,
TARGET_EXPAND_BUILTIN_SAVEREGS, TARGET_SETUP_INCOMING_VARARGS,
TARGET_STRICT_ARGUMENT_NAMING,
TARGET_PRETEND_OUTGOING_VARARGS_NAMED, and TARGET_CALLS.
* target.h: Likewise.
* tree.h (aggregate_value_p): Also takes a tree to deduce function
attributes from (for target hooks).
* doc/tm.texi (PROMOTE_FUNCTION_ARGS, PROMOTE_FUNCTION_RETURN,
PROMOTE_PROTOTYPES, RETURN_IN_MEMORY, STRUCT_VALUE_REGNUM,
STRUCT_VALUE, STRUCT_VALUE_INCOMING_REGNUM, STRUCT_VALUE_INCOMING,
EXPAND_BUILTIN_SAVEREGS, SETUP_INCOMING_VARARGS,
STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED): Convert
to hooks.
* config/alpha/alpha.c (alpha_output_mi_thunk_osf): Pass function
to aggregate_value_p.
* config/arm/arm.c (arm_init_cumulative_args,
arm_output_mi_thunk): Likewise.
* config/i386/i386.c (ix86_return_pops_args, x86_this_parameter):
Likewise.
* config/mips/mips.c (mips_save_reg_p, mips_expand_prologue,
mips_can_use_return_insn): Likewise.
* config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise.
* config/s390/s390.c (s390_output_mi_thunk): Likewise.
* config/sparc/sparc.c (sparc_output_mi_thunk): Pass function to
aggregate_value_p.
* config/story16/stormy16.c (xstormy16_asm_output_mi_thunk): Pass
function to aggregate_value_p.
* objc/objc-act.c (generate_struct_by_value_array): Pass NULL to
aggregate_value_p.
* config/sh/sh-protos.h (sh_builtin_saveregs): Remove.
(sh_attr_renesas_p, sh_cfun_attr_renesas_p, sh_function_arg,
sh_function_arg_advance, sh_pass_in_reg_p): New. * config/sh/sh.c
(sh_handle_renesas_attribute, sh_promote_prototypes,
sh_struct_value_rtx, sh_return_in_memory, sh_builtin_saveregs,
sh_setup_incoming_varargs, sh_strict_argument_naming,
sh_pretend_outgoing_varargs_named): New decls.
(targetm): Add new hooks.
(calc_live_regs): Save MACL and MACH if the function has the
renesas attribute.
(sh_expand_prologue): Support renesas attribute.
(sh_builtin_saveregs): Make static.
(sh_build_va_list): Support renesas attribute.
(sh_va_start): Likewise.
(sh_va_arg): Likewise.
(sh_promote_prototypes): New.
(sh_function_arg): New, moved from sh.h. Support renesas
attribute.
(sh_function_arg_advance): Likewise.
(sh_return_in_memory): Likewise.
(sh_strict_argument_naming): Likewise.
(sh_pretend_outgoing_varargs_named): Likewise.
(sh_struct_value_rtx): New.
(sh_attribute): Add renesas attribute.
(sh_handle_renesas_attribute): New.
(sh_attr_renesas_p, sh_cfun_attr_renesas_p): New.
(sh_ms_bitfield_layout_p): Support renesas attribute also.
(sh_output_mi_thunk): Pass function to aggregate_value_p. *
config/sh/sh.h (TARGET_SWITCHES): Add -mrenesas as an alias for
-mhitachi.
(STRUCT_VALUE_REGNUM, STRUCT_VALUE, RETURN_IN_MEMORY): Moved to
target hooks.
(sh_args): Add renesas_abi flag.
(INIT_CUMULATIVE_ARGS): Set it. Pass fndecl to aggregate_value_p.
(FUNCTION_ARG_ADVANCE, FUNCTION_ARG): Move to sh.c.
(PASS_IN_REG_P): Support renesas attribute. Pass DF and TF on the
stack for the renesas abi.
(STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED,
SETUP_INCOMING_VARARGS, EXPAND_BUILTIN_SAVEREGS,
PROMOTE_PROTOTYPES): Moved to sh.c. * config/sh/sh.md (call): Set
call cookie to indicate renesas calls.
* decl.c (finish_function): Pass fndecl to aggregate_value_p.
* misc.c (default_pass_by_ref): Convert to calls.return_in_memory
hook.
From-SVN: r71048
2003-09-04 05:18:05 +02:00
|
|
|
This hook controls how the @var{named} argument to @code{FUNCTION_ARG}
|
|
|
|
is set for varargs and stdarg functions. If this hook returns
|
|
|
|
@code{true}, the @var{named} argument is always true for named
|
|
|
|
arguments, and false for unnamed arguments. If it returns @code{false},
|
2004-11-17 00:33:58 +01:00
|
|
|
but @code{TARGET_PRETEND_OUTGOING_VARARGS_NAMED} returns @code{true},
|
targhooks.c: New file.
* targhooks.c: New file.
* targhooks.h: New file.
* Makefile.in: Add targhooks.o support.
(function.o): Depend on$(TARGET_H).
(stmt.o): Likewise.
(combine.o): Depend on $(TREE_H) and $(TARGET_H).
* builtins.c (apply_args_size, expand_builtin_apply_args_1,
expand_builtin_apply): Convert to calls.struct_value_rtx hook.
(expand_builtin_saveregs): Convert to
calls.expand_builtin_saveregs hook.
* c-decl.c (start_decl): Handle new calls.promote_prototypes hook
here, instead of ...
(get_parm_info) ... here.
(store_parm_decls_oldstyle): Convert to calls.promote_prototypes
hook.
(finish_function): Handle calls.promote_prototypes hook here too.
* c-typeck.c (convert_arguments): Convert to
calls.promote_prototypes hook.
(c_convert_parm_for_inlining): Likewise.
* calls.c (initialize_argument_information): Convert to
calls.promote_function_args hook.
(expand_call): Convert to calls.struct_value_rtx,
calls.strict_argument_naming,
calls.pretend_outgoing_varargs_named, and
calls.promote_function_return hooks. Pass fndecl to
aggregate_value_p. Initialize CUMULATIVE_ARGS before calling
hooks, so they can use that.
(emit_library_call_value_1): Likewise.
* combine.c (setup_incoming_promotions): Convert to
calls.promote_function_args hook.
* emit-rtl.c: Convert to calls.struct_value_rtx hook.
* expr.c (expand_assignment): Pass call to aggregate_value_p.
(expand_expr): Likewise.
* expr.h: Remove support for SETUP_INCOMING_VARARGS,
STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED,
RETURN_IN_MEMORY macro defaults.
* final.c (profile_function): Convert to calls.struct_value_rtx
hook.
* function.c (aggregate_value_p): Accept function type tree as
second parameter; try to deduce fntype from it. Convert to
calls.return_in_memory hook.
(assign_parms): Convert to calls.setup_incoming_varargs,
calls.strict_argument_naming, calls.promote_function_args,
calls.pretend_outgoing_varargs_named hooks. Pass fndecl to
aggregate_value_p.
(expand_function_start): Likewise. Convert to
calls.struct_value_rtx hook.
(expand_function_end): Convert to calls.promote_function_return hook.
(allocate_struct_function): Pass fndecl to aggregate_value_p.
* hard-reg-set.h: Update comments to new hook names.
* integrate.c (expand_inline_function): Pass fndecl to aggregate_value_p.
* reg-stack.c (stack_result): Likewise.
* rtl.h (struct_value_rtx, struct_value_incoming_rtx): Delete.
* stmt.c (expand_value_return): Convert to
calls.promote_function_return hook.
* target-def.h: Add TARGET_PROMOTE_FUNCTION_ARGS,
TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES,
TARGET_STRUCT_VALUE_RTX, TARGET_RETURN_IN_MEMORY,
TARGET_EXPAND_BUILTIN_SAVEREGS, TARGET_SETUP_INCOMING_VARARGS,
TARGET_STRICT_ARGUMENT_NAMING,
TARGET_PRETEND_OUTGOING_VARARGS_NAMED, and TARGET_CALLS.
* target.h: Likewise.
* tree.h (aggregate_value_p): Also takes a tree to deduce function
attributes from (for target hooks).
* doc/tm.texi (PROMOTE_FUNCTION_ARGS, PROMOTE_FUNCTION_RETURN,
PROMOTE_PROTOTYPES, RETURN_IN_MEMORY, STRUCT_VALUE_REGNUM,
STRUCT_VALUE, STRUCT_VALUE_INCOMING_REGNUM, STRUCT_VALUE_INCOMING,
EXPAND_BUILTIN_SAVEREGS, SETUP_INCOMING_VARARGS,
STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED): Convert
to hooks.
* config/alpha/alpha.c (alpha_output_mi_thunk_osf): Pass function
to aggregate_value_p.
* config/arm/arm.c (arm_init_cumulative_args,
arm_output_mi_thunk): Likewise.
* config/i386/i386.c (ix86_return_pops_args, x86_this_parameter):
Likewise.
* config/mips/mips.c (mips_save_reg_p, mips_expand_prologue,
mips_can_use_return_insn): Likewise.
* config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise.
* config/s390/s390.c (s390_output_mi_thunk): Likewise.
* config/sparc/sparc.c (sparc_output_mi_thunk): Pass function to
aggregate_value_p.
* config/story16/stormy16.c (xstormy16_asm_output_mi_thunk): Pass
function to aggregate_value_p.
* objc/objc-act.c (generate_struct_by_value_array): Pass NULL to
aggregate_value_p.
* config/sh/sh-protos.h (sh_builtin_saveregs): Remove.
(sh_attr_renesas_p, sh_cfun_attr_renesas_p, sh_function_arg,
sh_function_arg_advance, sh_pass_in_reg_p): New. * config/sh/sh.c
(sh_handle_renesas_attribute, sh_promote_prototypes,
sh_struct_value_rtx, sh_return_in_memory, sh_builtin_saveregs,
sh_setup_incoming_varargs, sh_strict_argument_naming,
sh_pretend_outgoing_varargs_named): New decls.
(targetm): Add new hooks.
(calc_live_regs): Save MACL and MACH if the function has the
renesas attribute.
(sh_expand_prologue): Support renesas attribute.
(sh_builtin_saveregs): Make static.
(sh_build_va_list): Support renesas attribute.
(sh_va_start): Likewise.
(sh_va_arg): Likewise.
(sh_promote_prototypes): New.
(sh_function_arg): New, moved from sh.h. Support renesas
attribute.
(sh_function_arg_advance): Likewise.
(sh_return_in_memory): Likewise.
(sh_strict_argument_naming): Likewise.
(sh_pretend_outgoing_varargs_named): Likewise.
(sh_struct_value_rtx): New.
(sh_attribute): Add renesas attribute.
(sh_handle_renesas_attribute): New.
(sh_attr_renesas_p, sh_cfun_attr_renesas_p): New.
(sh_ms_bitfield_layout_p): Support renesas attribute also.
(sh_output_mi_thunk): Pass function to aggregate_value_p. *
config/sh/sh.h (TARGET_SWITCHES): Add -mrenesas as an alias for
-mhitachi.
(STRUCT_VALUE_REGNUM, STRUCT_VALUE, RETURN_IN_MEMORY): Moved to
target hooks.
(sh_args): Add renesas_abi flag.
(INIT_CUMULATIVE_ARGS): Set it. Pass fndecl to aggregate_value_p.
(FUNCTION_ARG_ADVANCE, FUNCTION_ARG): Move to sh.c.
(PASS_IN_REG_P): Support renesas attribute. Pass DF and TF on the
stack for the renesas abi.
(STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED,
SETUP_INCOMING_VARARGS, EXPAND_BUILTIN_SAVEREGS,
PROMOTE_PROTOTYPES): Moved to sh.c. * config/sh/sh.md (call): Set
call cookie to indicate renesas calls.
* decl.c (finish_function): Pass fndecl to aggregate_value_p.
* misc.c (default_pass_by_ref): Convert to calls.return_in_memory
hook.
From-SVN: r71048
2003-09-04 05:18:05 +02:00
|
|
|
then all arguments are treated as named. Otherwise, all named arguments
|
|
|
|
except the last are treated as named.
|
1998-04-04 15:32:39 +02:00
|
|
|
|
targhooks.c: New file.
* targhooks.c: New file.
* targhooks.h: New file.
* Makefile.in: Add targhooks.o support.
(function.o): Depend on$(TARGET_H).
(stmt.o): Likewise.
(combine.o): Depend on $(TREE_H) and $(TARGET_H).
* builtins.c (apply_args_size, expand_builtin_apply_args_1,
expand_builtin_apply): Convert to calls.struct_value_rtx hook.
(expand_builtin_saveregs): Convert to
calls.expand_builtin_saveregs hook.
* c-decl.c (start_decl): Handle new calls.promote_prototypes hook
here, instead of ...
(get_parm_info) ... here.
(store_parm_decls_oldstyle): Convert to calls.promote_prototypes
hook.
(finish_function): Handle calls.promote_prototypes hook here too.
* c-typeck.c (convert_arguments): Convert to
calls.promote_prototypes hook.
(c_convert_parm_for_inlining): Likewise.
* calls.c (initialize_argument_information): Convert to
calls.promote_function_args hook.
(expand_call): Convert to calls.struct_value_rtx,
calls.strict_argument_naming,
calls.pretend_outgoing_varargs_named, and
calls.promote_function_return hooks. Pass fndecl to
aggregate_value_p. Initialize CUMULATIVE_ARGS before calling
hooks, so they can use that.
(emit_library_call_value_1): Likewise.
* combine.c (setup_incoming_promotions): Convert to
calls.promote_function_args hook.
* emit-rtl.c: Convert to calls.struct_value_rtx hook.
* expr.c (expand_assignment): Pass call to aggregate_value_p.
(expand_expr): Likewise.
* expr.h: Remove support for SETUP_INCOMING_VARARGS,
STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED,
RETURN_IN_MEMORY macro defaults.
* final.c (profile_function): Convert to calls.struct_value_rtx
hook.
* function.c (aggregate_value_p): Accept function type tree as
second parameter; try to deduce fntype from it. Convert to
calls.return_in_memory hook.
(assign_parms): Convert to calls.setup_incoming_varargs,
calls.strict_argument_naming, calls.promote_function_args,
calls.pretend_outgoing_varargs_named hooks. Pass fndecl to
aggregate_value_p.
(expand_function_start): Likewise. Convert to
calls.struct_value_rtx hook.
(expand_function_end): Convert to calls.promote_function_return hook.
(allocate_struct_function): Pass fndecl to aggregate_value_p.
* hard-reg-set.h: Update comments to new hook names.
* integrate.c (expand_inline_function): Pass fndecl to aggregate_value_p.
* reg-stack.c (stack_result): Likewise.
* rtl.h (struct_value_rtx, struct_value_incoming_rtx): Delete.
* stmt.c (expand_value_return): Convert to
calls.promote_function_return hook.
* target-def.h: Add TARGET_PROMOTE_FUNCTION_ARGS,
TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES,
TARGET_STRUCT_VALUE_RTX, TARGET_RETURN_IN_MEMORY,
TARGET_EXPAND_BUILTIN_SAVEREGS, TARGET_SETUP_INCOMING_VARARGS,
TARGET_STRICT_ARGUMENT_NAMING,
TARGET_PRETEND_OUTGOING_VARARGS_NAMED, and TARGET_CALLS.
* target.h: Likewise.
* tree.h (aggregate_value_p): Also takes a tree to deduce function
attributes from (for target hooks).
* doc/tm.texi (PROMOTE_FUNCTION_ARGS, PROMOTE_FUNCTION_RETURN,
PROMOTE_PROTOTYPES, RETURN_IN_MEMORY, STRUCT_VALUE_REGNUM,
STRUCT_VALUE, STRUCT_VALUE_INCOMING_REGNUM, STRUCT_VALUE_INCOMING,
EXPAND_BUILTIN_SAVEREGS, SETUP_INCOMING_VARARGS,
STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED): Convert
to hooks.
* config/alpha/alpha.c (alpha_output_mi_thunk_osf): Pass function
to aggregate_value_p.
* config/arm/arm.c (arm_init_cumulative_args,
arm_output_mi_thunk): Likewise.
* config/i386/i386.c (ix86_return_pops_args, x86_this_parameter):
Likewise.
* config/mips/mips.c (mips_save_reg_p, mips_expand_prologue,
mips_can_use_return_insn): Likewise.
* config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise.
* config/s390/s390.c (s390_output_mi_thunk): Likewise.
* config/sparc/sparc.c (sparc_output_mi_thunk): Pass function to
aggregate_value_p.
* config/story16/stormy16.c (xstormy16_asm_output_mi_thunk): Pass
function to aggregate_value_p.
* objc/objc-act.c (generate_struct_by_value_array): Pass NULL to
aggregate_value_p.
* config/sh/sh-protos.h (sh_builtin_saveregs): Remove.
(sh_attr_renesas_p, sh_cfun_attr_renesas_p, sh_function_arg,
sh_function_arg_advance, sh_pass_in_reg_p): New. * config/sh/sh.c
(sh_handle_renesas_attribute, sh_promote_prototypes,
sh_struct_value_rtx, sh_return_in_memory, sh_builtin_saveregs,
sh_setup_incoming_varargs, sh_strict_argument_naming,
sh_pretend_outgoing_varargs_named): New decls.
(targetm): Add new hooks.
(calc_live_regs): Save MACL and MACH if the function has the
renesas attribute.
(sh_expand_prologue): Support renesas attribute.
(sh_builtin_saveregs): Make static.
(sh_build_va_list): Support renesas attribute.
(sh_va_start): Likewise.
(sh_va_arg): Likewise.
(sh_promote_prototypes): New.
(sh_function_arg): New, moved from sh.h. Support renesas
attribute.
(sh_function_arg_advance): Likewise.
(sh_return_in_memory): Likewise.
(sh_strict_argument_naming): Likewise.
(sh_pretend_outgoing_varargs_named): Likewise.
(sh_struct_value_rtx): New.
(sh_attribute): Add renesas attribute.
(sh_handle_renesas_attribute): New.
(sh_attr_renesas_p, sh_cfun_attr_renesas_p): New.
(sh_ms_bitfield_layout_p): Support renesas attribute also.
(sh_output_mi_thunk): Pass function to aggregate_value_p. *
config/sh/sh.h (TARGET_SWITCHES): Add -mrenesas as an alias for
-mhitachi.
(STRUCT_VALUE_REGNUM, STRUCT_VALUE, RETURN_IN_MEMORY): Moved to
target hooks.
(sh_args): Add renesas_abi flag.
(INIT_CUMULATIVE_ARGS): Set it. Pass fndecl to aggregate_value_p.
(FUNCTION_ARG_ADVANCE, FUNCTION_ARG): Move to sh.c.
(PASS_IN_REG_P): Support renesas attribute. Pass DF and TF on the
stack for the renesas abi.
(STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED,
SETUP_INCOMING_VARARGS, EXPAND_BUILTIN_SAVEREGS,
PROMOTE_PROTOTYPES): Moved to sh.c. * config/sh/sh.md (call): Set
call cookie to indicate renesas calls.
* decl.c (finish_function): Pass fndecl to aggregate_value_p.
* misc.c (default_pass_by_ref): Convert to calls.return_in_memory
hook.
From-SVN: r71048
2003-09-04 05:18:05 +02:00
|
|
|
You need not define this hook if it always returns zero.
|
|
|
|
@end deftypefn
|
1999-02-25 15:02:32 +01:00
|
|
|
|
targhooks.c: New file.
* targhooks.c: New file.
* targhooks.h: New file.
* Makefile.in: Add targhooks.o support.
(function.o): Depend on$(TARGET_H).
(stmt.o): Likewise.
(combine.o): Depend on $(TREE_H) and $(TARGET_H).
* builtins.c (apply_args_size, expand_builtin_apply_args_1,
expand_builtin_apply): Convert to calls.struct_value_rtx hook.
(expand_builtin_saveregs): Convert to
calls.expand_builtin_saveregs hook.
* c-decl.c (start_decl): Handle new calls.promote_prototypes hook
here, instead of ...
(get_parm_info) ... here.
(store_parm_decls_oldstyle): Convert to calls.promote_prototypes
hook.
(finish_function): Handle calls.promote_prototypes hook here too.
* c-typeck.c (convert_arguments): Convert to
calls.promote_prototypes hook.
(c_convert_parm_for_inlining): Likewise.
* calls.c (initialize_argument_information): Convert to
calls.promote_function_args hook.
(expand_call): Convert to calls.struct_value_rtx,
calls.strict_argument_naming,
calls.pretend_outgoing_varargs_named, and
calls.promote_function_return hooks. Pass fndecl to
aggregate_value_p. Initialize CUMULATIVE_ARGS before calling
hooks, so they can use that.
(emit_library_call_value_1): Likewise.
* combine.c (setup_incoming_promotions): Convert to
calls.promote_function_args hook.
* emit-rtl.c: Convert to calls.struct_value_rtx hook.
* expr.c (expand_assignment): Pass call to aggregate_value_p.
(expand_expr): Likewise.
* expr.h: Remove support for SETUP_INCOMING_VARARGS,
STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED,
RETURN_IN_MEMORY macro defaults.
* final.c (profile_function): Convert to calls.struct_value_rtx
hook.
* function.c (aggregate_value_p): Accept function type tree as
second parameter; try to deduce fntype from it. Convert to
calls.return_in_memory hook.
(assign_parms): Convert to calls.setup_incoming_varargs,
calls.strict_argument_naming, calls.promote_function_args,
calls.pretend_outgoing_varargs_named hooks. Pass fndecl to
aggregate_value_p.
(expand_function_start): Likewise. Convert to
calls.struct_value_rtx hook.
(expand_function_end): Convert to calls.promote_function_return hook.
(allocate_struct_function): Pass fndecl to aggregate_value_p.
* hard-reg-set.h: Update comments to new hook names.
* integrate.c (expand_inline_function): Pass fndecl to aggregate_value_p.
* reg-stack.c (stack_result): Likewise.
* rtl.h (struct_value_rtx, struct_value_incoming_rtx): Delete.
* stmt.c (expand_value_return): Convert to
calls.promote_function_return hook.
* target-def.h: Add TARGET_PROMOTE_FUNCTION_ARGS,
TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES,
TARGET_STRUCT_VALUE_RTX, TARGET_RETURN_IN_MEMORY,
TARGET_EXPAND_BUILTIN_SAVEREGS, TARGET_SETUP_INCOMING_VARARGS,
TARGET_STRICT_ARGUMENT_NAMING,
TARGET_PRETEND_OUTGOING_VARARGS_NAMED, and TARGET_CALLS.
* target.h: Likewise.
* tree.h (aggregate_value_p): Also takes a tree to deduce function
attributes from (for target hooks).
* doc/tm.texi (PROMOTE_FUNCTION_ARGS, PROMOTE_FUNCTION_RETURN,
PROMOTE_PROTOTYPES, RETURN_IN_MEMORY, STRUCT_VALUE_REGNUM,
STRUCT_VALUE, STRUCT_VALUE_INCOMING_REGNUM, STRUCT_VALUE_INCOMING,
EXPAND_BUILTIN_SAVEREGS, SETUP_INCOMING_VARARGS,
STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED): Convert
to hooks.
* config/alpha/alpha.c (alpha_output_mi_thunk_osf): Pass function
to aggregate_value_p.
* config/arm/arm.c (arm_init_cumulative_args,
arm_output_mi_thunk): Likewise.
* config/i386/i386.c (ix86_return_pops_args, x86_this_parameter):
Likewise.
* config/mips/mips.c (mips_save_reg_p, mips_expand_prologue,
mips_can_use_return_insn): Likewise.
* config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise.
* config/s390/s390.c (s390_output_mi_thunk): Likewise.
* config/sparc/sparc.c (sparc_output_mi_thunk): Pass function to
aggregate_value_p.
* config/story16/stormy16.c (xstormy16_asm_output_mi_thunk): Pass
function to aggregate_value_p.
* objc/objc-act.c (generate_struct_by_value_array): Pass NULL to
aggregate_value_p.
* config/sh/sh-protos.h (sh_builtin_saveregs): Remove.
(sh_attr_renesas_p, sh_cfun_attr_renesas_p, sh_function_arg,
sh_function_arg_advance, sh_pass_in_reg_p): New. * config/sh/sh.c
(sh_handle_renesas_attribute, sh_promote_prototypes,
sh_struct_value_rtx, sh_return_in_memory, sh_builtin_saveregs,
sh_setup_incoming_varargs, sh_strict_argument_naming,
sh_pretend_outgoing_varargs_named): New decls.
(targetm): Add new hooks.
(calc_live_regs): Save MACL and MACH if the function has the
renesas attribute.
(sh_expand_prologue): Support renesas attribute.
(sh_builtin_saveregs): Make static.
(sh_build_va_list): Support renesas attribute.
(sh_va_start): Likewise.
(sh_va_arg): Likewise.
(sh_promote_prototypes): New.
(sh_function_arg): New, moved from sh.h. Support renesas
attribute.
(sh_function_arg_advance): Likewise.
(sh_return_in_memory): Likewise.
(sh_strict_argument_naming): Likewise.
(sh_pretend_outgoing_varargs_named): Likewise.
(sh_struct_value_rtx): New.
(sh_attribute): Add renesas attribute.
(sh_handle_renesas_attribute): New.
(sh_attr_renesas_p, sh_cfun_attr_renesas_p): New.
(sh_ms_bitfield_layout_p): Support renesas attribute also.
(sh_output_mi_thunk): Pass function to aggregate_value_p. *
config/sh/sh.h (TARGET_SWITCHES): Add -mrenesas as an alias for
-mhitachi.
(STRUCT_VALUE_REGNUM, STRUCT_VALUE, RETURN_IN_MEMORY): Moved to
target hooks.
(sh_args): Add renesas_abi flag.
(INIT_CUMULATIVE_ARGS): Set it. Pass fndecl to aggregate_value_p.
(FUNCTION_ARG_ADVANCE, FUNCTION_ARG): Move to sh.c.
(PASS_IN_REG_P): Support renesas attribute. Pass DF and TF on the
stack for the renesas abi.
(STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED,
SETUP_INCOMING_VARARGS, EXPAND_BUILTIN_SAVEREGS,
PROMOTE_PROTOTYPES): Moved to sh.c. * config/sh/sh.md (call): Set
call cookie to indicate renesas calls.
* decl.c (finish_function): Pass fndecl to aggregate_value_p.
* misc.c (default_pass_by_ref): Convert to calls.return_in_memory
hook.
From-SVN: r71048
2003-09-04 05:18:05 +02:00
|
|
|
@deftypefn {Target Hook} bool TARGET_PRETEND_OUTGOING_VARARGS_NAMED
|
1999-02-25 15:02:32 +01:00
|
|
|
If you need to conditionally change ABIs so that one works with
|
targhooks.c: New file.
* targhooks.c: New file.
* targhooks.h: New file.
* Makefile.in: Add targhooks.o support.
(function.o): Depend on$(TARGET_H).
(stmt.o): Likewise.
(combine.o): Depend on $(TREE_H) and $(TARGET_H).
* builtins.c (apply_args_size, expand_builtin_apply_args_1,
expand_builtin_apply): Convert to calls.struct_value_rtx hook.
(expand_builtin_saveregs): Convert to
calls.expand_builtin_saveregs hook.
* c-decl.c (start_decl): Handle new calls.promote_prototypes hook
here, instead of ...
(get_parm_info) ... here.
(store_parm_decls_oldstyle): Convert to calls.promote_prototypes
hook.
(finish_function): Handle calls.promote_prototypes hook here too.
* c-typeck.c (convert_arguments): Convert to
calls.promote_prototypes hook.
(c_convert_parm_for_inlining): Likewise.
* calls.c (initialize_argument_information): Convert to
calls.promote_function_args hook.
(expand_call): Convert to calls.struct_value_rtx,
calls.strict_argument_naming,
calls.pretend_outgoing_varargs_named, and
calls.promote_function_return hooks. Pass fndecl to
aggregate_value_p. Initialize CUMULATIVE_ARGS before calling
hooks, so they can use that.
(emit_library_call_value_1): Likewise.
* combine.c (setup_incoming_promotions): Convert to
calls.promote_function_args hook.
* emit-rtl.c: Convert to calls.struct_value_rtx hook.
* expr.c (expand_assignment): Pass call to aggregate_value_p.
(expand_expr): Likewise.
* expr.h: Remove support for SETUP_INCOMING_VARARGS,
STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED,
RETURN_IN_MEMORY macro defaults.
* final.c (profile_function): Convert to calls.struct_value_rtx
hook.
* function.c (aggregate_value_p): Accept function type tree as
second parameter; try to deduce fntype from it. Convert to
calls.return_in_memory hook.
(assign_parms): Convert to calls.setup_incoming_varargs,
calls.strict_argument_naming, calls.promote_function_args,
calls.pretend_outgoing_varargs_named hooks. Pass fndecl to
aggregate_value_p.
(expand_function_start): Likewise. Convert to
calls.struct_value_rtx hook.
(expand_function_end): Convert to calls.promote_function_return hook.
(allocate_struct_function): Pass fndecl to aggregate_value_p.
* hard-reg-set.h: Update comments to new hook names.
* integrate.c (expand_inline_function): Pass fndecl to aggregate_value_p.
* reg-stack.c (stack_result): Likewise.
* rtl.h (struct_value_rtx, struct_value_incoming_rtx): Delete.
* stmt.c (expand_value_return): Convert to
calls.promote_function_return hook.
* target-def.h: Add TARGET_PROMOTE_FUNCTION_ARGS,
TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES,
TARGET_STRUCT_VALUE_RTX, TARGET_RETURN_IN_MEMORY,
TARGET_EXPAND_BUILTIN_SAVEREGS, TARGET_SETUP_INCOMING_VARARGS,
TARGET_STRICT_ARGUMENT_NAMING,
TARGET_PRETEND_OUTGOING_VARARGS_NAMED, and TARGET_CALLS.
* target.h: Likewise.
* tree.h (aggregate_value_p): Also takes a tree to deduce function
attributes from (for target hooks).
* doc/tm.texi (PROMOTE_FUNCTION_ARGS, PROMOTE_FUNCTION_RETURN,
PROMOTE_PROTOTYPES, RETURN_IN_MEMORY, STRUCT_VALUE_REGNUM,
STRUCT_VALUE, STRUCT_VALUE_INCOMING_REGNUM, STRUCT_VALUE_INCOMING,
EXPAND_BUILTIN_SAVEREGS, SETUP_INCOMING_VARARGS,
STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED): Convert
to hooks.
* config/alpha/alpha.c (alpha_output_mi_thunk_osf): Pass function
to aggregate_value_p.
* config/arm/arm.c (arm_init_cumulative_args,
arm_output_mi_thunk): Likewise.
* config/i386/i386.c (ix86_return_pops_args, x86_this_parameter):
Likewise.
* config/mips/mips.c (mips_save_reg_p, mips_expand_prologue,
mips_can_use_return_insn): Likewise.
* config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise.
* config/s390/s390.c (s390_output_mi_thunk): Likewise.
* config/sparc/sparc.c (sparc_output_mi_thunk): Pass function to
aggregate_value_p.
* config/story16/stormy16.c (xstormy16_asm_output_mi_thunk): Pass
function to aggregate_value_p.
* objc/objc-act.c (generate_struct_by_value_array): Pass NULL to
aggregate_value_p.
* config/sh/sh-protos.h (sh_builtin_saveregs): Remove.
(sh_attr_renesas_p, sh_cfun_attr_renesas_p, sh_function_arg,
sh_function_arg_advance, sh_pass_in_reg_p): New. * config/sh/sh.c
(sh_handle_renesas_attribute, sh_promote_prototypes,
sh_struct_value_rtx, sh_return_in_memory, sh_builtin_saveregs,
sh_setup_incoming_varargs, sh_strict_argument_naming,
sh_pretend_outgoing_varargs_named): New decls.
(targetm): Add new hooks.
(calc_live_regs): Save MACL and MACH if the function has the
renesas attribute.
(sh_expand_prologue): Support renesas attribute.
(sh_builtin_saveregs): Make static.
(sh_build_va_list): Support renesas attribute.
(sh_va_start): Likewise.
(sh_va_arg): Likewise.
(sh_promote_prototypes): New.
(sh_function_arg): New, moved from sh.h. Support renesas
attribute.
(sh_function_arg_advance): Likewise.
(sh_return_in_memory): Likewise.
(sh_strict_argument_naming): Likewise.
(sh_pretend_outgoing_varargs_named): Likewise.
(sh_struct_value_rtx): New.
(sh_attribute): Add renesas attribute.
(sh_handle_renesas_attribute): New.
(sh_attr_renesas_p, sh_cfun_attr_renesas_p): New.
(sh_ms_bitfield_layout_p): Support renesas attribute also.
(sh_output_mi_thunk): Pass function to aggregate_value_p. *
config/sh/sh.h (TARGET_SWITCHES): Add -mrenesas as an alias for
-mhitachi.
(STRUCT_VALUE_REGNUM, STRUCT_VALUE, RETURN_IN_MEMORY): Moved to
target hooks.
(sh_args): Add renesas_abi flag.
(INIT_CUMULATIVE_ARGS): Set it. Pass fndecl to aggregate_value_p.
(FUNCTION_ARG_ADVANCE, FUNCTION_ARG): Move to sh.c.
(PASS_IN_REG_P): Support renesas attribute. Pass DF and TF on the
stack for the renesas abi.
(STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED,
SETUP_INCOMING_VARARGS, EXPAND_BUILTIN_SAVEREGS,
PROMOTE_PROTOTYPES): Moved to sh.c. * config/sh/sh.md (call): Set
call cookie to indicate renesas calls.
* decl.c (finish_function): Pass fndecl to aggregate_value_p.
* misc.c (default_pass_by_ref): Convert to calls.return_in_memory
hook.
From-SVN: r71048
2003-09-04 05:18:05 +02:00
|
|
|
@code{TARGET_SETUP_INCOMING_VARARGS}, but the other works like neither
|
|
|
|
@code{TARGET_SETUP_INCOMING_VARARGS} nor @code{TARGET_STRICT_ARGUMENT_NAMING} was
|
|
|
|
defined, then define this hook to return @code{true} if
|
2004-02-04 07:32:51 +01:00
|
|
|
@code{TARGET_SETUP_INCOMING_VARARGS} is used, @code{false} otherwise.
|
targhooks.c: New file.
* targhooks.c: New file.
* targhooks.h: New file.
* Makefile.in: Add targhooks.o support.
(function.o): Depend on$(TARGET_H).
(stmt.o): Likewise.
(combine.o): Depend on $(TREE_H) and $(TARGET_H).
* builtins.c (apply_args_size, expand_builtin_apply_args_1,
expand_builtin_apply): Convert to calls.struct_value_rtx hook.
(expand_builtin_saveregs): Convert to
calls.expand_builtin_saveregs hook.
* c-decl.c (start_decl): Handle new calls.promote_prototypes hook
here, instead of ...
(get_parm_info) ... here.
(store_parm_decls_oldstyle): Convert to calls.promote_prototypes
hook.
(finish_function): Handle calls.promote_prototypes hook here too.
* c-typeck.c (convert_arguments): Convert to
calls.promote_prototypes hook.
(c_convert_parm_for_inlining): Likewise.
* calls.c (initialize_argument_information): Convert to
calls.promote_function_args hook.
(expand_call): Convert to calls.struct_value_rtx,
calls.strict_argument_naming,
calls.pretend_outgoing_varargs_named, and
calls.promote_function_return hooks. Pass fndecl to
aggregate_value_p. Initialize CUMULATIVE_ARGS before calling
hooks, so they can use that.
(emit_library_call_value_1): Likewise.
* combine.c (setup_incoming_promotions): Convert to
calls.promote_function_args hook.
* emit-rtl.c: Convert to calls.struct_value_rtx hook.
* expr.c (expand_assignment): Pass call to aggregate_value_p.
(expand_expr): Likewise.
* expr.h: Remove support for SETUP_INCOMING_VARARGS,
STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED,
RETURN_IN_MEMORY macro defaults.
* final.c (profile_function): Convert to calls.struct_value_rtx
hook.
* function.c (aggregate_value_p): Accept function type tree as
second parameter; try to deduce fntype from it. Convert to
calls.return_in_memory hook.
(assign_parms): Convert to calls.setup_incoming_varargs,
calls.strict_argument_naming, calls.promote_function_args,
calls.pretend_outgoing_varargs_named hooks. Pass fndecl to
aggregate_value_p.
(expand_function_start): Likewise. Convert to
calls.struct_value_rtx hook.
(expand_function_end): Convert to calls.promote_function_return hook.
(allocate_struct_function): Pass fndecl to aggregate_value_p.
* hard-reg-set.h: Update comments to new hook names.
* integrate.c (expand_inline_function): Pass fndecl to aggregate_value_p.
* reg-stack.c (stack_result): Likewise.
* rtl.h (struct_value_rtx, struct_value_incoming_rtx): Delete.
* stmt.c (expand_value_return): Convert to
calls.promote_function_return hook.
* target-def.h: Add TARGET_PROMOTE_FUNCTION_ARGS,
TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES,
TARGET_STRUCT_VALUE_RTX, TARGET_RETURN_IN_MEMORY,
TARGET_EXPAND_BUILTIN_SAVEREGS, TARGET_SETUP_INCOMING_VARARGS,
TARGET_STRICT_ARGUMENT_NAMING,
TARGET_PRETEND_OUTGOING_VARARGS_NAMED, and TARGET_CALLS.
* target.h: Likewise.
* tree.h (aggregate_value_p): Also takes a tree to deduce function
attributes from (for target hooks).
* doc/tm.texi (PROMOTE_FUNCTION_ARGS, PROMOTE_FUNCTION_RETURN,
PROMOTE_PROTOTYPES, RETURN_IN_MEMORY, STRUCT_VALUE_REGNUM,
STRUCT_VALUE, STRUCT_VALUE_INCOMING_REGNUM, STRUCT_VALUE_INCOMING,
EXPAND_BUILTIN_SAVEREGS, SETUP_INCOMING_VARARGS,
STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED): Convert
to hooks.
* config/alpha/alpha.c (alpha_output_mi_thunk_osf): Pass function
to aggregate_value_p.
* config/arm/arm.c (arm_init_cumulative_args,
arm_output_mi_thunk): Likewise.
* config/i386/i386.c (ix86_return_pops_args, x86_this_parameter):
Likewise.
* config/mips/mips.c (mips_save_reg_p, mips_expand_prologue,
mips_can_use_return_insn): Likewise.
* config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise.
* config/s390/s390.c (s390_output_mi_thunk): Likewise.
* config/sparc/sparc.c (sparc_output_mi_thunk): Pass function to
aggregate_value_p.
* config/story16/stormy16.c (xstormy16_asm_output_mi_thunk): Pass
function to aggregate_value_p.
* objc/objc-act.c (generate_struct_by_value_array): Pass NULL to
aggregate_value_p.
* config/sh/sh-protos.h (sh_builtin_saveregs): Remove.
(sh_attr_renesas_p, sh_cfun_attr_renesas_p, sh_function_arg,
sh_function_arg_advance, sh_pass_in_reg_p): New. * config/sh/sh.c
(sh_handle_renesas_attribute, sh_promote_prototypes,
sh_struct_value_rtx, sh_return_in_memory, sh_builtin_saveregs,
sh_setup_incoming_varargs, sh_strict_argument_naming,
sh_pretend_outgoing_varargs_named): New decls.
(targetm): Add new hooks.
(calc_live_regs): Save MACL and MACH if the function has the
renesas attribute.
(sh_expand_prologue): Support renesas attribute.
(sh_builtin_saveregs): Make static.
(sh_build_va_list): Support renesas attribute.
(sh_va_start): Likewise.
(sh_va_arg): Likewise.
(sh_promote_prototypes): New.
(sh_function_arg): New, moved from sh.h. Support renesas
attribute.
(sh_function_arg_advance): Likewise.
(sh_return_in_memory): Likewise.
(sh_strict_argument_naming): Likewise.
(sh_pretend_outgoing_varargs_named): Likewise.
(sh_struct_value_rtx): New.
(sh_attribute): Add renesas attribute.
(sh_handle_renesas_attribute): New.
(sh_attr_renesas_p, sh_cfun_attr_renesas_p): New.
(sh_ms_bitfield_layout_p): Support renesas attribute also.
(sh_output_mi_thunk): Pass function to aggregate_value_p. *
config/sh/sh.h (TARGET_SWITCHES): Add -mrenesas as an alias for
-mhitachi.
(STRUCT_VALUE_REGNUM, STRUCT_VALUE, RETURN_IN_MEMORY): Moved to
target hooks.
(sh_args): Add renesas_abi flag.
(INIT_CUMULATIVE_ARGS): Set it. Pass fndecl to aggregate_value_p.
(FUNCTION_ARG_ADVANCE, FUNCTION_ARG): Move to sh.c.
(PASS_IN_REG_P): Support renesas attribute. Pass DF and TF on the
stack for the renesas abi.
(STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED,
SETUP_INCOMING_VARARGS, EXPAND_BUILTIN_SAVEREGS,
PROMOTE_PROTOTYPES): Moved to sh.c. * config/sh/sh.md (call): Set
call cookie to indicate renesas calls.
* decl.c (finish_function): Pass fndecl to aggregate_value_p.
* misc.c (default_pass_by_ref): Convert to calls.return_in_memory
hook.
From-SVN: r71048
2003-09-04 05:18:05 +02:00
|
|
|
Otherwise, you should not define this hook.
|
|
|
|
@end deftypefn
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
@node Trampolines
|
|
|
|
@section Trampolines for Nested Functions
|
|
|
|
@cindex trampolines for nested functions
|
|
|
|
@cindex nested functions, trampolines for
|
|
|
|
|
|
|
|
A @dfn{trampoline} is a small piece of code that is created at run time
|
|
|
|
when the address of a nested function is taken. It normally resides on
|
|
|
|
the stack, in the stack frame of the containing function. These macros
|
1999-08-25 09:27:13 +02:00
|
|
|
tell GCC how to generate code to allocate and initialize a
|
1996-09-25 01:21:45 +02:00
|
|
|
trampoline.
|
|
|
|
|
|
|
|
The instructions in the trampoline must do two things: load a constant
|
|
|
|
address into the static chain register, and jump to the real address of
|
|
|
|
the nested function. On CISC machines such as the m68k, this requires
|
|
|
|
two instructions, a move immediate and a jump. Then the two addresses
|
|
|
|
exist in the trampoline as word-long immediate operands. On RISC
|
|
|
|
machines, it is often necessary to load each address into a register in
|
|
|
|
two parts. Then pieces of each address form separate immediate
|
|
|
|
operands.
|
|
|
|
|
|
|
|
The code generated to initialize the trampoline must store the variable
|
|
|
|
parts---the static chain value and the function address---into the
|
|
|
|
immediate operands of the instructions. On a CISC machine, this is
|
|
|
|
simply a matter of copying each address to a memory reference at the
|
|
|
|
proper offset from the start of the trampoline. On a RISC machine, it
|
|
|
|
may be necessary to take out pieces of the address and store them
|
|
|
|
separately.
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac TRAMPOLINE_TEMPLATE (@var{file})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C statement to output, on the stream @var{file}, assembler code for a
|
|
|
|
block of data that contains the constant parts of a trampoline. This
|
|
|
|
code should not include a label---the label is taken care of
|
|
|
|
automatically.
|
|
|
|
|
|
|
|
If you do not define this macro, it means no template is needed
|
|
|
|
for the target. Do not define this macro on systems where the block move
|
|
|
|
code to copy the trampoline into place would be larger than the code
|
|
|
|
to generate it on the spot.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac TRAMPOLINE_SECTION
|
1996-09-25 01:21:45 +02:00
|
|
|
The name of a subroutine to switch to the section in which the
|
|
|
|
trampoline template is to be placed (@pxref{Sections}). The default is
|
|
|
|
a value of @samp{readonly_data_section}, which places the trampoline in
|
|
|
|
the section containing read-only data.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac TRAMPOLINE_SIZE
|
1996-09-25 01:21:45 +02:00
|
|
|
A C expression for the size in bytes of the trampoline, as an integer.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac TRAMPOLINE_ALIGNMENT
|
1996-09-25 01:21:45 +02:00
|
|
|
Alignment required for trampolines, in bits.
|
|
|
|
|
|
|
|
If you don't define this macro, the value of @code{BIGGEST_ALIGNMENT}
|
|
|
|
is used for aligning trampolines.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac INITIALIZE_TRAMPOLINE (@var{addr}, @var{fnaddr}, @var{static_chain})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C statement to initialize the variable parts of a trampoline.
|
|
|
|
@var{addr} is an RTX for the address of the trampoline; @var{fnaddr} is
|
|
|
|
an RTX for the address of the nested function; @var{static_chain} is an
|
|
|
|
RTX for the static chain value that should be passed to the function
|
|
|
|
when it is called.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac TRAMPOLINE_ADJUST_ADDRESS (@var{addr})
|
2000-12-15 10:09:41 +01:00
|
|
|
A C statement that should perform any machine-specific adjustment in
|
|
|
|
the address of the trampoline. Its argument contains the address that
|
|
|
|
was passed to @code{INITIALIZE_TRAMPOLINE}. In case the address to be
|
|
|
|
used for a function call should be different from the address in which
|
|
|
|
the template was stored, the different address should be assigned to
|
|
|
|
@var{addr}. If this macro is not defined, @var{addr} will be used for
|
|
|
|
function calls.
|
|
|
|
|
2001-07-06 20:40:17 +02:00
|
|
|
@cindex @code{TARGET_ASM_FUNCTION_EPILOGUE} and trampolines
|
|
|
|
@cindex @code{TARGET_ASM_FUNCTION_PROLOGUE} and trampolines
|
1996-09-25 01:21:45 +02:00
|
|
|
If this macro is not defined, by default the trampoline is allocated as
|
|
|
|
a stack slot. This default is right for most machines. The exceptions
|
|
|
|
are machines where it is impossible to execute instructions in the stack
|
|
|
|
area. On such machines, you may have to implement a separate stack,
|
2001-07-06 20:40:17 +02:00
|
|
|
using this macro in conjunction with @code{TARGET_ASM_FUNCTION_PROLOGUE}
|
|
|
|
and @code{TARGET_ASM_FUNCTION_EPILOGUE}.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
@var{fp} points to a data structure, a @code{struct function}, which
|
|
|
|
describes the compilation status of the immediate containing function of
|
2003-05-31 20:45:31 +02:00
|
|
|
the function which the trampoline is for. The stack slot for the
|
1996-09-25 01:21:45 +02:00
|
|
|
trampoline is in the stack frame of this containing function. Other
|
|
|
|
allocation strategies probably must do something analogous with this
|
|
|
|
information.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
Implementing trampolines is difficult on many machines because they have
|
|
|
|
separate instruction and data caches. Writing into a stack location
|
|
|
|
fails to clear the memory in the instruction cache, so when the program
|
|
|
|
jumps to that location, it executes the old contents.
|
|
|
|
|
|
|
|
Here are two possible solutions. One is to clear the relevant parts of
|
|
|
|
the instruction cache whenever a trampoline is set up. The other is to
|
|
|
|
make all trampolines identical, by having them jump to a standard
|
|
|
|
subroutine. The former technique makes trampoline execution faster; the
|
|
|
|
latter makes initialization faster.
|
|
|
|
|
|
|
|
To clear the instruction cache when a trampoline is initialized, define
|
2003-06-04 07:21:41 +02:00
|
|
|
the following macro.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac CLEAR_INSN_CACHE (@var{beg}, @var{end})
|
1996-09-25 01:21:45 +02:00
|
|
|
If defined, expands to a C expression clearing the @emph{instruction
|
2003-06-04 07:21:41 +02:00
|
|
|
cache} in the specified interval. The definition of this macro would
|
|
|
|
typically be a series of @code{asm} statements. Both @var{beg} and
|
|
|
|
@var{end} are both pointer expressions.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2004-07-17 23:09:14 +02:00
|
|
|
The operating system may also require the stack to be made executable
|
|
|
|
before calling the trampoline. To implement this requirement, define
|
|
|
|
the following macro.
|
|
|
|
|
|
|
|
@defmac ENABLE_EXECUTE_STACK
|
|
|
|
Define this macro if certain operations must be performed before executing
|
|
|
|
code located on the stack. The macro should expand to a series of C
|
2004-09-11 10:34:26 +02:00
|
|
|
file-scope constructs (e.g.@: functions) and provide a unique entry point
|
2004-07-17 23:09:14 +02:00
|
|
|
named @code{__enable_execute_stack}. The target is responsible for
|
|
|
|
emitting calls to the entry point in the code, for example from the
|
|
|
|
@code{INITIALIZE_TRAMPOLINE} macro.
|
|
|
|
@end defmac
|
|
|
|
|
1996-09-25 01:21:45 +02:00
|
|
|
To use a standard subroutine, define the following macro. In addition,
|
|
|
|
you must make sure that the instructions in a trampoline fill an entire
|
|
|
|
cache line with identical instructions, or else ensure that the
|
|
|
|
beginning of the trampoline code is always aligned at the same point in
|
|
|
|
its cache line. Look in @file{m68k.h} as a guide.
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac TRANSFER_FROM_TRAMPOLINE
|
1996-09-25 01:21:45 +02:00
|
|
|
Define this macro if trampolines need a special subroutine to do their
|
|
|
|
work. The macro should expand to a series of @code{asm} statements
|
c-tree.texi, [...]: Replace . at end of sentences preceded by a capital letter with @..
* doc/c-tree.texi, doc/contrib.texi, doc/cpp.texi,
doc/cppinternals.texi, doc/extend.texi, doc/gcc.texi,
doc/gcov.texi, doc/install-old.texi, doc/install.texi,
doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: Replace
. at end of sentences preceded by a capital letter with @..
From-SVN: r43611
2001-06-27 17:04:16 +02:00
|
|
|
which will be compiled with GCC@. They go in a library function named
|
1996-09-25 01:21:45 +02:00
|
|
|
@code{__transfer_from_trampoline}.
|
|
|
|
|
|
|
|
If you need to avoid executing the ordinary prologue code of a compiled
|
|
|
|
C function when you jump to the subroutine, you can do so by placing a
|
|
|
|
special label of your own in the assembler code. Use one @code{asm}
|
|
|
|
statement to generate an assembler label, and another to make the label
|
|
|
|
global. Then trampolines can use that label to jump directly to your
|
|
|
|
special assembler code.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
@node Library Calls
|
|
|
|
@section Implicit Calls to Library Routines
|
|
|
|
@cindex library subroutine names
|
|
|
|
@cindex @file{libgcc.a}
|
|
|
|
|
|
|
|
@c prevent bad page break with this line
|
|
|
|
Here is an explanation of implicit calls to library routines.
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac DECLARE_LIBRARY_RENAMES
|
2002-07-31 01:55:09 +02:00
|
|
|
This macro, if defined, should expand to a piece of C code that will get
|
|
|
|
expanded when compiling functions for libgcc.a. It can be used to
|
contrib.texi, [...]: Capitalize "gcc", "g++" and "g77" or mark up with appropriate markup.
* doc/contrib.texi, doc/extend.texi, doc/gcov.texi,
doc/install.texi, doc/invoke.texi, doc/makefile.texi,
doc/sourcebuild.texi, doc/tm.texi, doc/trouble.texi: Capitalize
"gcc", "g++" and "g77" or mark up with appropriate markup. Adjust
wording and grammar.
From-SVN: r79482
2004-03-14 23:29:38 +01:00
|
|
|
provide alternate names for GCC's internal library functions if there
|
2002-07-31 01:55:09 +02:00
|
|
|
are ABI-mandated names that the compiler should provide.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2002-07-31 01:55:09 +02:00
|
|
|
|
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
|
|
|
@findex init_one_libfunc
|
|
|
|
@findex set_optab_libfunc
|
|
|
|
@deftypefn {Target Hook} void TARGET_INIT_LIBFUNCS (void)
|
|
|
|
This hook should declare additional library routines or rename
|
|
|
|
existing ones, using the functions @code{set_optab_libfunc} and
|
|
|
|
@code{init_one_libfunc} defined in @file{optabs.c}.
|
|
|
|
@code{init_optabs} calls this macro after initializing all the normal
|
|
|
|
library routines.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
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
|
|
|
The default is to do nothing. Most ports don't need to define this hook.
|
|
|
|
@end deftypefn
|
1999-08-23 18:09:52 +02:00
|
|
|
|
2004-02-07 04:53:42 +01:00
|
|
|
@defmac FLOAT_LIB_COMPARE_RETURNS_BOOL (@var{mode}, @var{comparison})
|
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
|
|
|
This macro should return @code{true} if the library routine that
|
|
|
|
implements the floating point comparison operator @var{comparison} in
|
|
|
|
mode @var{mode} will return a boolean, and @var{false} if it will
|
|
|
|
return a tristate.
|
|
|
|
|
|
|
|
GCC's own floating point libraries return tristates from the
|
|
|
|
comparison operators, so the default returns false always. Most ports
|
|
|
|
don't need to define this macro.
|
|
|
|
@end defmac
|
|
|
|
|
2004-08-11 04:50:14 +02:00
|
|
|
@defmac TARGET_LIB_INT_CMP_BIASED
|
|
|
|
This macro should evaluate to @code{true} if the integer comparison
|
|
|
|
functions (like @code{__cmpdi2}) return 0 to indicate that the first
|
|
|
|
operand is smaller than the second, 1 to indicate that they are equal,
|
|
|
|
and 2 to indicate that the first operand is greater than the second.
|
|
|
|
If this macro evalutes to @code{false} the comparison functions return
|
contrib.texi, [...]: Improve Texinfo formatting.
* doc/contrib.texi, doc/cpp.texi, doc/cppopts.texi,
doc/extend.texi, doc/gcov.texi, doc/install.texi, doc/invoke.texi,
doc/libgcc.texi, doc/md.texi, doc/passes.texi,
doc/sourcebuild.texi, doc/tm.texi: Improve Texinfo formatting.
From-SVN: r89725
2004-10-28 03:00:31 +02:00
|
|
|
@minus{}1, 0, and 1 instead of 0, 1, and 2. If the target uses the routines
|
2004-08-11 04:50:14 +02:00
|
|
|
in @file{libgcc.a}, you do not need to define this macro.
|
|
|
|
@end defmac
|
|
|
|
|
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
|
|
|
@cindex US Software GOFAST, floating point emulation library
|
|
|
|
@cindex floating point emulation library, US Software GOFAST
|
|
|
|
@cindex GOFAST, floating point emulation library
|
|
|
|
@findex gofast_maybe_init_libfuncs
|
|
|
|
@defmac US_SOFTWARE_GOFAST
|
|
|
|
Define this macro if your system C library uses the US Software GOFAST
|
2003-10-10 23:28:56 +02:00
|
|
|
library to provide floating point emulation.
|
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
|
|
|
|
|
|
|
In addition to defining this macro, your architecture must set
|
|
|
|
@code{TARGET_INIT_LIBFUNCS} to @code{gofast_maybe_init_libfuncs}, or
|
|
|
|
else call that function from its version of that hook. It is defined
|
|
|
|
in @file{config/gofast.h}, which must be included by your
|
|
|
|
architecture's @file{@var{cpu}.c} file. See @file{sparc/sparc.c} for
|
|
|
|
an example.
|
|
|
|
|
|
|
|
If this macro is defined, the
|
|
|
|
@code{TARGET_FLOAT_LIB_COMPARE_RETURNS_BOOL} target hook must return
|
|
|
|
false for @code{SFmode} and @code{DFmode} comparisons.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1999-08-23 18:09:52 +02:00
|
|
|
|
1996-09-25 01:21:45 +02:00
|
|
|
@cindex @code{EDOM}, implicit usage
|
2003-06-20 08:41:12 +02:00
|
|
|
@findex matherr
|
|
|
|
@defmac TARGET_EDOM
|
1996-09-25 01:21:45 +02:00
|
|
|
The value of @code{EDOM} on the target machine, as a C integer constant
|
1999-08-25 09:27:13 +02:00
|
|
|
expression. If you don't define this macro, GCC does not attempt to
|
1996-09-25 01:21:45 +02:00
|
|
|
deposit the value of @code{EDOM} into @code{errno} directly. Look in
|
|
|
|
@file{/usr/include/errno.h} to find the value of @code{EDOM} on your
|
|
|
|
system.
|
|
|
|
|
|
|
|
If you do not define @code{TARGET_EDOM}, then compiled code reports
|
|
|
|
domain errors by calling the library function and letting it report the
|
|
|
|
error. If mathematical functions on your system use @code{matherr} when
|
|
|
|
there is an error, then you should leave @code{TARGET_EDOM} undefined so
|
|
|
|
that @code{matherr} is used normally.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
@cindex @code{errno}, implicit usage
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac GEN_ERRNO_RTX
|
1996-09-25 01:21:45 +02:00
|
|
|
Define this macro as a C expression to create an rtl expression that
|
|
|
|
refers to the global ``variable'' @code{errno}. (On certain systems,
|
|
|
|
@code{errno} may not actually be a variable.) If you don't define this
|
|
|
|
macro, a reasonable default is used.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
builtins.c (DEF_BUILTIN): Accept 10 arguments.
* builtins.c (DEF_BUILTIN): Accept 10 arguments.
(implicit_built_in_decls): New global array.
(mathfn_built_in): New global function.
(fold_trunc_transparent_mathfn): New static function
(expand_builtin_strstr, expand_bultin_strchr,
expand_builtin_strpbrk, expand_builtin_strcpy,
expand_builtin_strncpy, expand_bultin_strcmp,
expand_bultin_strncat, expand_builtin_fputs): Use
implicint_built_in_decls.
(fold_builtin): Fold floor/trunc/round/ceil/nearbyint.
* builtins.def: Fix comments.
(DEF_GCC_BUILTIN, DEF_FALLBACK_BUILTIN, DEF_EXT_FALLBACK_BUILTIN,
DEF_LIB_BUILTIN, DEF_LIB_ALWAYS_BUILTIN, DEF_EXT_LIB_BUILTIN,
DEF_C99_BULTIN, DEF_FRONT_END_LIB_BUILTIN,
DEF_EXT_FRONT_END_LIB_BUILTIN): Pass implicit as needed.
(DEF_C99_C90RES_BULTIN): New.
(*f, *l builtins): Update.
* c-common.c (DEF_BUILTIN): Initialize implicit array.
(c_expand_builtin_printf, c_expand_builtin_fprintf): Update.
* convert.c (strip_float_extensions): New global function.
* tree.h (DEF_BUILTIN): Accept 10 arguments.
(implicit_built_in_decls, mathfn_built_in, strip_float_extension):
Declare.
* java/builtins.c (define_builtin): Handle implicit.
(DEF_BUILTIN): Update.
* tm.texi (TARGET_C99_FUNCTIONS): Document.
* defaults.h (TARGET_C99_FUNCTIONS): Default to 0.
* config/linux.h (TARGET_C99_FUNCTIONS): Default to 1
when using glibc2.
From-SVN: r61738
2003-01-24 23:07:01 +01:00
|
|
|
@cindex C99 math functions, implicit usage
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac TARGET_C99_FUNCTIONS
|
builtins.c (DEF_BUILTIN): Accept 10 arguments.
* builtins.c (DEF_BUILTIN): Accept 10 arguments.
(implicit_built_in_decls): New global array.
(mathfn_built_in): New global function.
(fold_trunc_transparent_mathfn): New static function
(expand_builtin_strstr, expand_bultin_strchr,
expand_builtin_strpbrk, expand_builtin_strcpy,
expand_builtin_strncpy, expand_bultin_strcmp,
expand_bultin_strncat, expand_builtin_fputs): Use
implicint_built_in_decls.
(fold_builtin): Fold floor/trunc/round/ceil/nearbyint.
* builtins.def: Fix comments.
(DEF_GCC_BUILTIN, DEF_FALLBACK_BUILTIN, DEF_EXT_FALLBACK_BUILTIN,
DEF_LIB_BUILTIN, DEF_LIB_ALWAYS_BUILTIN, DEF_EXT_LIB_BUILTIN,
DEF_C99_BULTIN, DEF_FRONT_END_LIB_BUILTIN,
DEF_EXT_FRONT_END_LIB_BUILTIN): Pass implicit as needed.
(DEF_C99_C90RES_BULTIN): New.
(*f, *l builtins): Update.
* c-common.c (DEF_BUILTIN): Initialize implicit array.
(c_expand_builtin_printf, c_expand_builtin_fprintf): Update.
* convert.c (strip_float_extensions): New global function.
* tree.h (DEF_BUILTIN): Accept 10 arguments.
(implicit_built_in_decls, mathfn_built_in, strip_float_extension):
Declare.
* java/builtins.c (define_builtin): Handle implicit.
(DEF_BUILTIN): Update.
* tm.texi (TARGET_C99_FUNCTIONS): Document.
* defaults.h (TARGET_C99_FUNCTIONS): Default to 0.
* config/linux.h (TARGET_C99_FUNCTIONS): Default to 1
when using glibc2.
From-SVN: r61738
2003-01-24 23:07:01 +01:00
|
|
|
When this macro is nonzero, GCC will implicitly optimize @code{sin} calls into
|
2003-01-26 21:56:09 +01:00
|
|
|
@code{sinf} and similarly for other functions defined by C99 standard. The
|
builtins.c (DEF_BUILTIN): Accept 10 arguments.
* builtins.c (DEF_BUILTIN): Accept 10 arguments.
(implicit_built_in_decls): New global array.
(mathfn_built_in): New global function.
(fold_trunc_transparent_mathfn): New static function
(expand_builtin_strstr, expand_bultin_strchr,
expand_builtin_strpbrk, expand_builtin_strcpy,
expand_builtin_strncpy, expand_bultin_strcmp,
expand_bultin_strncat, expand_builtin_fputs): Use
implicint_built_in_decls.
(fold_builtin): Fold floor/trunc/round/ceil/nearbyint.
* builtins.def: Fix comments.
(DEF_GCC_BUILTIN, DEF_FALLBACK_BUILTIN, DEF_EXT_FALLBACK_BUILTIN,
DEF_LIB_BUILTIN, DEF_LIB_ALWAYS_BUILTIN, DEF_EXT_LIB_BUILTIN,
DEF_C99_BULTIN, DEF_FRONT_END_LIB_BUILTIN,
DEF_EXT_FRONT_END_LIB_BUILTIN): Pass implicit as needed.
(DEF_C99_C90RES_BULTIN): New.
(*f, *l builtins): Update.
* c-common.c (DEF_BUILTIN): Initialize implicit array.
(c_expand_builtin_printf, c_expand_builtin_fprintf): Update.
* convert.c (strip_float_extensions): New global function.
* tree.h (DEF_BUILTIN): Accept 10 arguments.
(implicit_built_in_decls, mathfn_built_in, strip_float_extension):
Declare.
* java/builtins.c (define_builtin): Handle implicit.
(DEF_BUILTIN): Update.
* tm.texi (TARGET_C99_FUNCTIONS): Document.
* defaults.h (TARGET_C99_FUNCTIONS): Default to 0.
* config/linux.h (TARGET_C99_FUNCTIONS): Default to 1
when using glibc2.
From-SVN: r61738
2003-01-24 23:07:01 +01:00
|
|
|
default is nonzero that should be proper value for most modern systems, however
|
|
|
|
number of existing systems lacks support for these functions in the runtime so
|
|
|
|
they needs this macro to be redefined to 0.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
builtins.c (DEF_BUILTIN): Accept 10 arguments.
* builtins.c (DEF_BUILTIN): Accept 10 arguments.
(implicit_built_in_decls): New global array.
(mathfn_built_in): New global function.
(fold_trunc_transparent_mathfn): New static function
(expand_builtin_strstr, expand_bultin_strchr,
expand_builtin_strpbrk, expand_builtin_strcpy,
expand_builtin_strncpy, expand_bultin_strcmp,
expand_bultin_strncat, expand_builtin_fputs): Use
implicint_built_in_decls.
(fold_builtin): Fold floor/trunc/round/ceil/nearbyint.
* builtins.def: Fix comments.
(DEF_GCC_BUILTIN, DEF_FALLBACK_BUILTIN, DEF_EXT_FALLBACK_BUILTIN,
DEF_LIB_BUILTIN, DEF_LIB_ALWAYS_BUILTIN, DEF_EXT_LIB_BUILTIN,
DEF_C99_BULTIN, DEF_FRONT_END_LIB_BUILTIN,
DEF_EXT_FRONT_END_LIB_BUILTIN): Pass implicit as needed.
(DEF_C99_C90RES_BULTIN): New.
(*f, *l builtins): Update.
* c-common.c (DEF_BUILTIN): Initialize implicit array.
(c_expand_builtin_printf, c_expand_builtin_fprintf): Update.
* convert.c (strip_float_extensions): New global function.
* tree.h (DEF_BUILTIN): Accept 10 arguments.
(implicit_built_in_decls, mathfn_built_in, strip_float_extension):
Declare.
* java/builtins.c (define_builtin): Handle implicit.
(DEF_BUILTIN): Update.
* tm.texi (TARGET_C99_FUNCTIONS): Document.
* defaults.h (TARGET_C99_FUNCTIONS): Default to 0.
* config/linux.h (TARGET_C99_FUNCTIONS): Default to 1
when using glibc2.
From-SVN: r61738
2003-01-24 23:07:01 +01:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac NEXT_OBJC_RUNTIME
|
2001-06-21 17:25:56 +02:00
|
|
|
Define this macro to generate code for Objective-C message sending using
|
1996-09-25 01:21:45 +02:00
|
|
|
the calling convention of the NeXT system. This calling convention
|
|
|
|
involves passing the object, the selector and the method arguments all
|
|
|
|
at once to the method-lookup library function.
|
|
|
|
|
|
|
|
The default calling convention passes just the object and the selector
|
|
|
|
to the lookup function, which returns a pointer to the method.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
@node Addressing Modes
|
|
|
|
@section Addressing Modes
|
|
|
|
@cindex addressing modes
|
|
|
|
|
|
|
|
@c prevent bad page break with this line
|
|
|
|
This is about addressing modes.
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac HAVE_PRE_INCREMENT
|
|
|
|
@defmacx HAVE_PRE_DECREMENT
|
|
|
|
@defmacx HAVE_POST_INCREMENT
|
|
|
|
@defmacx HAVE_POST_DECREMENT
|
2001-10-10 01:11:55 +02:00
|
|
|
A C expression that is nonzero if the machine supports pre-increment,
|
2000-08-15 17:28:19 +02:00
|
|
|
pre-decrement, post-increment, or post-decrement addressing respectively.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac HAVE_PRE_MODIFY_DISP
|
|
|
|
@defmacx HAVE_POST_MODIFY_DISP
|
2001-10-10 01:11:55 +02:00
|
|
|
A C expression that is nonzero if the machine supports pre- or
|
2000-08-15 17:28:19 +02:00
|
|
|
post-address side-effect generation involving constants other than
|
|
|
|
the size of the memory operand.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2000-08-15 17:27:11 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac HAVE_PRE_MODIFY_REG
|
|
|
|
@defmacx HAVE_POST_MODIFY_REG
|
2001-10-10 01:11:55 +02:00
|
|
|
A C expression that is nonzero if the machine supports pre- or
|
2000-08-15 17:28:19 +02:00
|
|
|
post-address side-effect generation involving a register displacement.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2000-08-15 17:27:11 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac CONSTANT_ADDRESS_P (@var{x})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C expression that is 1 if the RTX @var{x} is a constant which
|
|
|
|
is a valid address. On most machines, this can be defined as
|
|
|
|
@code{CONSTANT_P (@var{x})}, but a few machines are more restrictive
|
|
|
|
in which constant addresses are supported.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac CONSTANT_P (@var{x})
|
|
|
|
@code{CONSTANT_P}, which is defined by target-independent code,
|
|
|
|
accepts integer-values expressions whose values are not explicitly
|
|
|
|
known, such as @code{symbol_ref}, @code{label_ref}, and @code{high}
|
|
|
|
expressions and @code{const} arithmetic expressions, in addition to
|
|
|
|
@code{const_int} and @code{const_double} expressions.
|
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac MAX_REGS_PER_ADDRESS
|
1996-09-25 01:21:45 +02:00
|
|
|
A number, the maximum number of registers that can appear in a valid
|
|
|
|
memory address. Note that it is up to you to specify a value equal to
|
|
|
|
the maximum number that @code{GO_IF_LEGITIMATE_ADDRESS} would ever
|
|
|
|
accept.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac GO_IF_LEGITIMATE_ADDRESS (@var{mode}, @var{x}, @var{label})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C compound statement with a conditional @code{goto @var{label};}
|
|
|
|
executed if @var{x} (an RTX) is a legitimate memory address on the
|
|
|
|
target machine for a memory operand of mode @var{mode}.
|
|
|
|
|
|
|
|
It usually pays to define several simpler macros to serve as
|
|
|
|
subroutines for this one. Otherwise it may be too complicated to
|
|
|
|
understand.
|
|
|
|
|
|
|
|
This macro must exist in two variants: a strict variant and a
|
|
|
|
non-strict one. The strict variant is used in the reload pass. It
|
|
|
|
must be defined so that any pseudo-register that has not been
|
|
|
|
allocated a hard register is considered a memory reference. In
|
|
|
|
contexts where some kind of register is required, a pseudo-register
|
|
|
|
with no hard register must be rejected.
|
|
|
|
|
|
|
|
The non-strict variant is used in other passes. It must be defined to
|
|
|
|
accept all pseudo-registers in every context where some kind of
|
|
|
|
register is required.
|
|
|
|
|
|
|
|
@findex REG_OK_STRICT
|
|
|
|
Compiler source files that want to use the strict variant of this
|
|
|
|
macro define the macro @code{REG_OK_STRICT}. You should use an
|
|
|
|
@code{#ifdef REG_OK_STRICT} conditional to define the strict variant
|
|
|
|
in that case and the non-strict variant otherwise.
|
|
|
|
|
|
|
|
Subroutines to check for acceptable registers for various purposes (one
|
|
|
|
for base registers, one for index registers, and so on) are typically
|
|
|
|
among the subroutines used to define @code{GO_IF_LEGITIMATE_ADDRESS}.
|
|
|
|
Then only these subroutine macros need have two variants; the higher
|
2001-06-25 01:04:49 +02:00
|
|
|
levels of macros may be the same whether strict or not.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
Normally, constant addresses which are the sum of a @code{symbol_ref}
|
|
|
|
and an integer are stored inside a @code{const} RTX to mark them as
|
|
|
|
constant. Therefore, there is no need to recognize such sums
|
|
|
|
specifically as legitimate addresses. Normally you would simply
|
|
|
|
recognize any @code{const} as legitimate.
|
|
|
|
|
|
|
|
Usually @code{PRINT_OPERAND_ADDRESS} is not prepared to handle constant
|
|
|
|
sums that are not marked with @code{const}. It assumes that a naked
|
|
|
|
@code{plus} indicates indexing. If so, then you @emph{must} reject such
|
|
|
|
naked constant sums as illegitimate addresses, so that none of them will
|
|
|
|
be given to @code{PRINT_OPERAND_ADDRESS}.
|
|
|
|
|
system.h (ENCODE_SECTION_INFO): Poison it.
* system.h (ENCODE_SECTION_INFO): Poison it.
* target-def.h (TARGET_ENCODE_SECTION_INFO): New.
* target.h (encode_section_info): New.
* varasm.c (make_decl_rtl, output_constant_def): Use it.
* hooks.c (hook_tree_int_void): New.
* hooks.h: Declare it.
* config/darwin.h, config/alpha/alpha-protos.h, config/alpha/alpha.c,
config/alpha/alpha.h, config/arm/pe.h, config/avr/avr-protos.h,
config/avr/avr.c, config/avr/avr.h, config/c4x/c4x-protos.h,
config/c4x/c4x.c, config/c4x/c4x.h, config/cris/cris-protos.h,
config/cris/cris.c, config/cris/cris.h, config/i386/cygwin.h,
config/i386/win32.h, config/ia64/ia64-protos.h, config/ia64/ia64.c,
config/ia64/ia64.h, config/m32r/m32r-protos.h, config/m32r/m32r.c,
config/m32r/m32r.h, config/m68hc11/m68hc11-protos.h,
config/m68hc11/m68hc11.c, config/m68hc11/m68hc11.h,
config/mcore/mcore-protos.h, config/mcore/mcore.c,
config/mcore/mcore.h, config/mmix/mmix-protos.h, config/mmix/mmix.c,
config/mmix/mmix.h, config/rs6000/rs6000-protos.h,
config/rs6000/sysv4.h, config/stormy16/stormy16-protos.h,
config/stormy16/stormy16.c, config/stormy16/stormy16.h:
Replace ENCODE_SECTION_INFO with TARGET_ENCODE_SECTION_INFO
referencing existing function. Make function static.
* config/a29k/a29k.c, config/a29k/a29k.h, config/arc/arc.c,
config/arc/arc.h, config/arm/arm.c, config/arm/arm.h,
config/h8300/h8300.c, config/h8300/h8300.h, config/i370/i370.c,
config/i370/i370.h, config/i386/i386-interix.h, config/i386/i386.c,
config/i386/i386.h, config/i386/interix.c, config/m88k/m88k.c,
config/m88k/m88k.h, config/mips/mips.c, config/mips/mips.h,
config/ns32k/ns32k.c, config/ns32k/ns32k.h, config/pa/pa.c,
config/pa/pa.h, config/romp/romp.c, config/romp/romp.h,
config/rs6000/linux64.h, config/rs6000/xcoff.h, config/s390/s390.c,
config/s390/s390.h, config/sh/sh.c, config/sh/sh.h,
config/sparc/sparc.c, config/sparc/sparc.h, config/v850/v850.c,
config/v850/v850.h, config/vax/vax.c, config/vax/vms.h,
config/xtensa/xtensa.c, config/xtensa/xtensa.h:
Move ENCODE_SECTION_INFO to out-of-line function and add
TARGET_ENCODE_SECTION_INFO.
* config/darwin.h (ASM_DECLARE_FUNCTION_NAME): Use hook, not macro.
(ASM_DECLARE_OBJECT_NAME, ASM_OUTPUT_ALIGNED_DECL_LOCAL): Likewise.
* config/arm/pe.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Rename
from SUBTARGET_*
(switch_to_section): Replace in_rdata case with in_readonly_data.
* config/h8300/h8300.c (h8300_encode_label): Make static.
* config/h8300/h8300-protos.h: Update.
* config/rs6000/rs6000.c (rs6000_elf_encode_section_info): Rename
from rs6000_encode_section_info; make static.
(rs6000_xcoff_encode_section_info): New.
* config/v850/v850.c (v850_encode_data_area): Make static.
* config/v850/v850-protos.h: Update.
* config/vax/vax.c: Include flags.h.
(vms_select_section): Fix typo.
* doc/tm.texi (TARGET_ENCODE_SECTION_INFO): Update from previous
ENCODE_SECTION_INFO docs.
From-SVN: r53606
2002-05-19 07:23:27 +02:00
|
|
|
@cindex @code{TARGET_ENCODE_SECTION_INFO} and address validation
|
1996-09-25 01:21:45 +02:00
|
|
|
On some machines, whether a symbolic address is legitimate depends on
|
|
|
|
the section that the address refers to. On these machines, define the
|
system.h (ENCODE_SECTION_INFO): Poison it.
* system.h (ENCODE_SECTION_INFO): Poison it.
* target-def.h (TARGET_ENCODE_SECTION_INFO): New.
* target.h (encode_section_info): New.
* varasm.c (make_decl_rtl, output_constant_def): Use it.
* hooks.c (hook_tree_int_void): New.
* hooks.h: Declare it.
* config/darwin.h, config/alpha/alpha-protos.h, config/alpha/alpha.c,
config/alpha/alpha.h, config/arm/pe.h, config/avr/avr-protos.h,
config/avr/avr.c, config/avr/avr.h, config/c4x/c4x-protos.h,
config/c4x/c4x.c, config/c4x/c4x.h, config/cris/cris-protos.h,
config/cris/cris.c, config/cris/cris.h, config/i386/cygwin.h,
config/i386/win32.h, config/ia64/ia64-protos.h, config/ia64/ia64.c,
config/ia64/ia64.h, config/m32r/m32r-protos.h, config/m32r/m32r.c,
config/m32r/m32r.h, config/m68hc11/m68hc11-protos.h,
config/m68hc11/m68hc11.c, config/m68hc11/m68hc11.h,
config/mcore/mcore-protos.h, config/mcore/mcore.c,
config/mcore/mcore.h, config/mmix/mmix-protos.h, config/mmix/mmix.c,
config/mmix/mmix.h, config/rs6000/rs6000-protos.h,
config/rs6000/sysv4.h, config/stormy16/stormy16-protos.h,
config/stormy16/stormy16.c, config/stormy16/stormy16.h:
Replace ENCODE_SECTION_INFO with TARGET_ENCODE_SECTION_INFO
referencing existing function. Make function static.
* config/a29k/a29k.c, config/a29k/a29k.h, config/arc/arc.c,
config/arc/arc.h, config/arm/arm.c, config/arm/arm.h,
config/h8300/h8300.c, config/h8300/h8300.h, config/i370/i370.c,
config/i370/i370.h, config/i386/i386-interix.h, config/i386/i386.c,
config/i386/i386.h, config/i386/interix.c, config/m88k/m88k.c,
config/m88k/m88k.h, config/mips/mips.c, config/mips/mips.h,
config/ns32k/ns32k.c, config/ns32k/ns32k.h, config/pa/pa.c,
config/pa/pa.h, config/romp/romp.c, config/romp/romp.h,
config/rs6000/linux64.h, config/rs6000/xcoff.h, config/s390/s390.c,
config/s390/s390.h, config/sh/sh.c, config/sh/sh.h,
config/sparc/sparc.c, config/sparc/sparc.h, config/v850/v850.c,
config/v850/v850.h, config/vax/vax.c, config/vax/vms.h,
config/xtensa/xtensa.c, config/xtensa/xtensa.h:
Move ENCODE_SECTION_INFO to out-of-line function and add
TARGET_ENCODE_SECTION_INFO.
* config/darwin.h (ASM_DECLARE_FUNCTION_NAME): Use hook, not macro.
(ASM_DECLARE_OBJECT_NAME, ASM_OUTPUT_ALIGNED_DECL_LOCAL): Likewise.
* config/arm/pe.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Rename
from SUBTARGET_*
(switch_to_section): Replace in_rdata case with in_readonly_data.
* config/h8300/h8300.c (h8300_encode_label): Make static.
* config/h8300/h8300-protos.h: Update.
* config/rs6000/rs6000.c (rs6000_elf_encode_section_info): Rename
from rs6000_encode_section_info; make static.
(rs6000_xcoff_encode_section_info): New.
* config/v850/v850.c (v850_encode_data_area): Make static.
* config/v850/v850-protos.h: Update.
* config/vax/vax.c: Include flags.h.
(vms_select_section): Fix typo.
* doc/tm.texi (TARGET_ENCODE_SECTION_INFO): Update from previous
ENCODE_SECTION_INFO docs.
From-SVN: r53606
2002-05-19 07:23:27 +02:00
|
|
|
target hook @code{TARGET_ENCODE_SECTION_INFO} to store the information
|
|
|
|
into the @code{symbol_ref}, and then check for it here. When you see a
|
1996-09-25 01:21:45 +02:00
|
|
|
@code{const}, you will have to look inside it to find the
|
|
|
|
@code{symbol_ref} in order to determine the section. @xref{Assembler
|
|
|
|
Format}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac REG_OK_FOR_BASE_P (@var{x})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C expression that is nonzero if @var{x} (assumed to be a @code{reg}
|
|
|
|
RTX) is valid for use as a base register. For hard registers, it
|
|
|
|
should always accept those which the hardware permits and reject the
|
|
|
|
others. Whether the macro accepts or rejects pseudo registers must be
|
|
|
|
controlled by @code{REG_OK_STRICT} as described above. This usually
|
|
|
|
requires two variant definitions, of which @code{REG_OK_STRICT}
|
|
|
|
controls the one actually used.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac REG_MODE_OK_FOR_BASE_P (@var{x}, @var{mode})
|
1997-08-11 17:56:58 +02:00
|
|
|
A C expression that is just like @code{REG_OK_FOR_BASE_P}, except that
|
|
|
|
that expression may examine the mode of the memory reference in
|
|
|
|
@var{mode}. You should define this macro if the mode of the memory
|
|
|
|
reference affects whether a register may be used as a base register. If
|
|
|
|
you define this macro, the compiler will use it instead of
|
|
|
|
@code{REG_OK_FOR_BASE_P}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1997-08-11 17:56:58 +02:00
|
|
|
|
2004-10-12 21:28:56 +02:00
|
|
|
@defmac REG_MODE_OK_FOR_REG_BASE_P (@var{x}, @var{mode})
|
|
|
|
A C expression which is nonzero if @var{x} (assumed to be a @code{reg} RTX)
|
|
|
|
is suitable for use as a base register in base plus index operand addresses,
|
|
|
|
accessing memory in mode @var{mode}. It may be either a suitable hard
|
c-tree.texi, [...]: Remove trailing whitespace.
* doc/c-tree.texi, doc/cfg.texi, doc/extend.texi, doc/gty.texi,
doc/install.texi, doc/invoke.texi, doc/md.texi, doc/passes.texi,
doc/rtl.texi, doc/tm.texi, doc/tree-ssa.texi: Remove trailing
whitespace.
From-SVN: r90100
2004-11-05 01:53:49 +01:00
|
|
|
register or a pseudo register that has been allocated such a hard register.
|
2004-10-12 21:28:56 +02:00
|
|
|
You should define this macro if base plus index addresses have different
|
|
|
|
requirements than other base register uses.
|
|
|
|
@end defmac
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac REG_OK_FOR_INDEX_P (@var{x})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C expression that is nonzero if @var{x} (assumed to be a @code{reg}
|
|
|
|
RTX) is valid for use as an index register.
|
|
|
|
|
|
|
|
The difference between an index register and a base register is that
|
|
|
|
the index register may be scaled. If an address involves the sum of
|
|
|
|
two registers, neither one of them scaled, then either one may be
|
|
|
|
labeled the ``base'' and the other the ``index''; but whichever
|
|
|
|
labeling is used must fit the machine's constraints of which registers
|
|
|
|
may serve in each capacity. The compiler will try both labelings,
|
|
|
|
looking for one that is valid, and will reload one or both registers
|
|
|
|
only if neither labeling works.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac FIND_BASE_TERM (@var{x})
|
2000-08-25 18:52:24 +02:00
|
|
|
A C expression to determine the base term of address @var{x}.
|
|
|
|
This macro is used in only one place: `find_base_term' in alias.c.
|
|
|
|
|
|
|
|
It is always safe for this macro to not be defined. It exists so
|
|
|
|
that alias analysis can understand machine-dependent addresses.
|
|
|
|
|
|
|
|
The typical use of this macro is to handle addresses containing
|
c-tree.texi, [...]: Replace . at end of sentences preceded by a capital letter with @..
* doc/c-tree.texi, doc/contrib.texi, doc/cpp.texi,
doc/cppinternals.texi, doc/extend.texi, doc/gcc.texi,
doc/gcov.texi, doc/install-old.texi, doc/install.texi,
doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: Replace
. at end of sentences preceded by a capital letter with @..
From-SVN: r43611
2001-06-27 17:04:16 +02:00
|
|
|
a label_ref or symbol_ref within an UNSPEC@.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2000-08-25 18:52:24 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac LEGITIMIZE_ADDRESS (@var{x}, @var{oldx}, @var{mode}, @var{win})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C compound statement that attempts to replace @var{x} with a valid
|
|
|
|
memory address for an operand of mode @var{mode}. @var{win} will be a
|
|
|
|
C statement label elsewhere in the code; the macro definition may use
|
|
|
|
|
c-tree.texi, [...]: Use @smallexample instead of @example.
* doc/c-tree.texi, doc/compat.texi, doc/cpp.texi,
doc/cppopts.texi, doc/extend.texi, doc/install.texi,
doc/interface.texi, doc/invoke.texi, doc/libgcc.texi, doc/md.texi,
doc/objc.texi, doc/rtl.texi, doc/tm.texi, doc/trouble.texi: Use
@smallexample instead of @example.
From-SVN: r76075
2004-01-18 02:20:48 +01:00
|
|
|
@smallexample
|
1996-09-25 01:21:45 +02:00
|
|
|
GO_IF_LEGITIMATE_ADDRESS (@var{mode}, @var{x}, @var{win});
|
c-tree.texi, [...]: Use @smallexample instead of @example.
* doc/c-tree.texi, doc/compat.texi, doc/cpp.texi,
doc/cppopts.texi, doc/extend.texi, doc/install.texi,
doc/interface.texi, doc/invoke.texi, doc/libgcc.texi, doc/md.texi,
doc/objc.texi, doc/rtl.texi, doc/tm.texi, doc/trouble.texi: Use
@smallexample instead of @example.
From-SVN: r76075
2004-01-18 02:20:48 +01:00
|
|
|
@end smallexample
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
@noindent
|
|
|
|
to avoid further processing if the address has become legitimate.
|
|
|
|
|
|
|
|
@findex break_out_memory_refs
|
|
|
|
@var{x} will always be the result of a call to @code{break_out_memory_refs},
|
|
|
|
and @var{oldx} will be the operand that was given to that function to produce
|
|
|
|
@var{x}.
|
|
|
|
|
|
|
|
The code generated by this macro should not alter the substructure of
|
|
|
|
@var{x}. If it transforms @var{x} into a more legitimate form, it
|
|
|
|
should assign @var{x} (which will always be a C variable) a new value.
|
|
|
|
|
|
|
|
It is not necessary for this macro to come up with a legitimate
|
|
|
|
address. The compiler has standard ways of doing so in all cases. In
|
defaults.h (LEGITIMIZE_ADDRESS): Provide a default definition.
* defaults.h (LEGITIMIZE_ADDRESS): Provide a default
definition.
* config/arc/arc.h, config/fr30/fr30.h, config/frv/frv.h,
config/h8300/h8300.h, config/ia64/ia64.h,
config/mcore/mcore.h, config/mmix/mmix.h,
config/ns32k/ns32k.h, config/pdp11/pdp11.h,
config/stormy16/stormy16.h, config/v850/v850.h,
config/vax/vax.h (LEGITIMIZE_ADDRESS): Remove.
* doc/tm.texi (LEGITIMIZE_ADDRESS): Mention the default
definition.
From-SVN: r79066
2004-03-07 21:23:32 +01:00
|
|
|
fact, it is safe to omit this macro. But often a
|
1996-09-25 01:21:45 +02:00
|
|
|
machine-dependent strategy can generate better code.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac LEGITIMIZE_RELOAD_ADDRESS (@var{x}, @var{mode}, @var{opnum}, @var{type}, @var{ind_levels}, @var{win})
|
1998-04-02 04:42:26 +02:00
|
|
|
A C compound statement that attempts to replace @var{x}, which is an address
|
|
|
|
that needs reloading, with a valid memory address for an operand of mode
|
|
|
|
@var{mode}. @var{win} will be a C statement label elsewhere in the code.
|
|
|
|
It is not necessary to define this macro, but it might be useful for
|
2001-04-28 13:35:04 +02:00
|
|
|
performance reasons.
|
1998-04-02 04:42:26 +02:00
|
|
|
|
|
|
|
For example, on the i386, it is sometimes possible to use a single
|
|
|
|
reload register instead of two by reloading a sum of two pseudo
|
|
|
|
registers into a register. On the other hand, for number of RISC
|
|
|
|
processors offsets are limited so that often an intermediate address
|
|
|
|
needs to be generated in order to address a stack slot. By defining
|
2001-07-03 02:46:05 +02:00
|
|
|
@code{LEGITIMIZE_RELOAD_ADDRESS} appropriately, the intermediate addresses
|
1998-04-02 04:42:26 +02:00
|
|
|
generated for adjacent some stack slots can be made identical, and thus
|
|
|
|
be shared.
|
|
|
|
|
1998-04-04 20:37:01 +02:00
|
|
|
@emph{Note}: This macro should be used with caution. It is necessary
|
|
|
|
to know something of how reload works in order to effectively use this,
|
|
|
|
and it is quite easy to produce macros that build in too much knowledge
|
|
|
|
of reload internals.
|
1998-04-02 04:42:26 +02:00
|
|
|
|
1998-07-09 00:05:40 +02:00
|
|
|
@emph{Note}: This macro must be able to reload an address created by a
|
|
|
|
previous invocation of this macro. If it fails to handle such addresses
|
|
|
|
then the compiler may generate incorrect code or abort.
|
|
|
|
|
1998-04-02 04:42:26 +02:00
|
|
|
@findex push_reload
|
1998-04-04 20:37:01 +02:00
|
|
|
The macro definition should use @code{push_reload} to indicate parts that
|
|
|
|
need reloading; @var{opnum}, @var{type} and @var{ind_levels} are usually
|
|
|
|
suitable to be passed unaltered to @code{push_reload}.
|
1998-04-02 04:42:26 +02:00
|
|
|
|
1998-04-04 20:37:01 +02:00
|
|
|
The code generated by this macro must not alter the substructure of
|
1998-04-02 04:42:26 +02:00
|
|
|
@var{x}. If it transforms @var{x} into a more legitimate form, it
|
|
|
|
should assign @var{x} (which will always be a C variable) a new value.
|
|
|
|
This also applies to parts that you change indirectly by calling
|
|
|
|
@code{push_reload}.
|
|
|
|
|
1998-04-04 20:37:01 +02:00
|
|
|
@findex strict_memory_address_p
|
|
|
|
The macro definition may use @code{strict_memory_address_p} to test if
|
|
|
|
the address has become legitimate.
|
|
|
|
|
1998-04-02 04:42:26 +02:00
|
|
|
@findex copy_rtx
|
|
|
|
If you want to change only a part of @var{x}, one standard way of doing
|
|
|
|
this is to use @code{copy_rtx}. Note, however, that is unshares only a
|
|
|
|
single level of rtl. Thus, if the part to be changed is not at the
|
c-tree.texi, [...]: Fix spelling and typos.
* doc/c-tree.texi, doc/contrib.texi, doc/extend.texi,
doc/gcc.texi, doc/install.texi, doc/invoke.texi, doc/md.texi,
doc/objc.texi, doc/rtl.texi, doc/tm.texi: Fix spelling and typos.
Consistently use "built-in" and "bit-field". Minor logical markup
improvements.
* doc/gcc.1: Regenerate.
From-SVN: r43383
2001-06-15 00:51:18 +02:00
|
|
|
top level, you'll need to replace first the top level.
|
1998-04-02 04:42:26 +02:00
|
|
|
It is not necessary for this macro to come up with a legitimate
|
|
|
|
address; but often a machine-dependent strategy can generate better code.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1998-04-02 04:42:26 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac GO_IF_MODE_DEPENDENT_ADDRESS (@var{addr}, @var{label})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C statement or compound statement with a conditional @code{goto
|
|
|
|
@var{label};} executed if memory address @var{x} (an RTX) can have
|
|
|
|
different meanings depending on the machine mode of the memory
|
|
|
|
reference it is used for or if the address is valid for some modes
|
|
|
|
but not others.
|
|
|
|
|
|
|
|
Autoincrement and autodecrement addresses typically have mode-dependent
|
|
|
|
effects because the amount of the increment or decrement is the size
|
|
|
|
of the operand being addressed. Some machines have other mode-dependent
|
|
|
|
addresses. Many RISC machines have no mode-dependent addresses.
|
|
|
|
|
|
|
|
You may assume that @var{addr} is a valid address for the machine.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac LEGITIMATE_CONSTANT_P (@var{x})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C expression that is nonzero if @var{x} is a legitimate constant for
|
|
|
|
an immediate operand on the target machine. You can assume that
|
|
|
|
@var{x} satisfies @code{CONSTANT_P}, so you need not check this. In fact,
|
|
|
|
@samp{1} is a suitable definition for this macro on machines where
|
2001-06-25 01:04:49 +02:00
|
|
|
anything @code{CONSTANT_P} is valid.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2004-12-04 01:34:43 +01:00
|
|
|
@deftypefn {Target Hook} rtx TARGET_DELEGITIMIZE_ADDRESS (rtx @var{x})
|
|
|
|
This hook is used to undo the possibly obfuscating effects of the
|
|
|
|
@code{LEGITIMIZE_ADDRESS} and @code{LEGITIMIZE_RELOAD_ADDRESS} target
|
|
|
|
macros. Some backend implementations of these macros wrap symbol
|
|
|
|
references inside an @code{UNSPEC} rtx to represent PIC or similar
|
|
|
|
addressing modes. This target hook allows GCC's optimizers to understand
|
|
|
|
the semantics of these opaque @code{UNSPEC}s by converting them back
|
|
|
|
into their original form.
|
|
|
|
@end deftypefn
|
|
|
|
|
2004-12-04 00:15:15 +01:00
|
|
|
@deftypefn {Target Hook} bool TARGET_CANNOT_FORCE_CONST_MEM (rtx @var{x})
|
|
|
|
This hook should return true if @var{x} is of a form that cannot (or
|
|
|
|
should not) be spilled to the constant pool. The default version of
|
|
|
|
this hook returns false.
|
|
|
|
|
|
|
|
The primary reason to define this hook is to prevent reload from
|
|
|
|
deciding that a non-legitimate constant would be better reloaded
|
|
|
|
from the constant pool instead of spilling and reloading a register
|
|
|
|
holding the constant. This restriction is often true of addresses
|
|
|
|
of TLS symbols for various targets.
|
|
|
|
@end deftypefn
|
|
|
|
|
2004-12-09 12:06:20 +01:00
|
|
|
@deftypefn {Target Hook} tree TARGET_VECTORIZE_BUILTIN_MASK_FOR_LOAD (void)
|
|
|
|
This hook should return the DECL of a function @var{f} that given an
|
|
|
|
address @var{addr} as an argument returns a mask @var{m} that can be
|
|
|
|
used to extract from two vectors the relevant data that resides in
|
|
|
|
@var{addr} in case @var{addr} is not properly aligned.
|
|
|
|
|
|
|
|
The autovectrizer, when vectorizing a load operation from an address
|
|
|
|
@var{addr} that may be unaligned, will generate two vector loads from
|
|
|
|
the two aligned addresses around @var{addr}. It then generates a
|
|
|
|
@code{REALIGN_LOAD} operation to extract the relevant data from the
|
|
|
|
two loaded vectors. The first two arguments to @code{REALIGN_LOAD},
|
|
|
|
@var{v1} and @var{v2}, are the two vectors, each of size @var{VS}, and
|
|
|
|
the third argument, @var{OFF}, defines how the data will be extracted
|
|
|
|
from these two vectors: if @var{OFF} is 0, then the returned vector is
|
|
|
|
@var{v2}; otherwise, the returned vector is composed from the last
|
|
|
|
@var{VS}-@var{OFF} elements of @var{v1} concatenated to the first
|
|
|
|
@var{OFF} elements of @var{v2}.
|
|
|
|
|
|
|
|
If this hook is defined, the autovectorizer will generate a call
|
|
|
|
to @var{f} (using the DECL tree that this hook returns) and will
|
|
|
|
use the return value of @var{f} as the argument @var{OFF} to
|
|
|
|
@code{REALIGN_LOAD}. Therefore, the mask @var{m} returned by @var{f}
|
|
|
|
should comply with the semantics expected by @code{REALIGN_LOAD}
|
|
|
|
described above.
|
|
|
|
If this hook is not defined, then @var{addr} will be used as
|
|
|
|
the argument @var{OFF} to @code{REALIGN_LOAD}, in which case the low
|
|
|
|
log2(@var{VS})-1 bits of @var{addr} will be considered.
|
|
|
|
@end deftypefn
|
|
|
|
|
1996-09-25 01:21:45 +02:00
|
|
|
@node Condition Code
|
|
|
|
@section Condition Code Status
|
|
|
|
@cindex condition code status
|
|
|
|
|
|
|
|
@c prevent bad page break with this line
|
|
|
|
This describes the condition code status.
|
|
|
|
|
|
|
|
@findex cc_status
|
|
|
|
The file @file{conditions.h} defines a variable @code{cc_status} to
|
|
|
|
describe how the condition code was computed (in case the interpretation of
|
|
|
|
the condition code depends on the instruction that it was set by). This
|
|
|
|
variable contains the RTL expressions on which the condition code is
|
|
|
|
currently based, and several standard flags.
|
|
|
|
|
|
|
|
Sometimes additional machine-specific flags must be defined in the machine
|
|
|
|
description header file. It can also add additional machine-specific
|
|
|
|
information by defining @code{CC_STATUS_MDEP}.
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac CC_STATUS_MDEP
|
1996-09-25 01:21:45 +02:00
|
|
|
C code for a data type which is used for declaring the @code{mdep}
|
|
|
|
component of @code{cc_status}. It defaults to @code{int}.
|
|
|
|
|
|
|
|
This macro is not used on machines that do not use @code{cc0}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac CC_STATUS_MDEP_INIT
|
1996-09-25 01:21:45 +02:00
|
|
|
A C expression to initialize the @code{mdep} field to ``empty''.
|
|
|
|
The default definition does nothing, since most machines don't use
|
|
|
|
the field anyway. If you want to use the field, you should probably
|
|
|
|
define this macro to initialize it.
|
|
|
|
|
|
|
|
This macro is not used on machines that do not use @code{cc0}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac NOTICE_UPDATE_CC (@var{exp}, @var{insn})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C compound statement to set the components of @code{cc_status}
|
|
|
|
appropriately for an insn @var{insn} whose body is @var{exp}. It is
|
|
|
|
this macro's responsibility to recognize insns that set the condition
|
|
|
|
code as a byproduct of other activity as well as those that explicitly
|
|
|
|
set @code{(cc0)}.
|
|
|
|
|
|
|
|
This macro is not used on machines that do not use @code{cc0}.
|
|
|
|
|
|
|
|
If there are insns that do not set the condition code but do alter
|
|
|
|
other machine registers, this macro must check to see whether they
|
|
|
|
invalidate the expressions that the condition code is recorded as
|
|
|
|
reflecting. For example, on the 68000, insns that store in address
|
|
|
|
registers do not set the condition code, which means that usually
|
|
|
|
@code{NOTICE_UPDATE_CC} can leave @code{cc_status} unaltered for such
|
|
|
|
insns. But suppose that the previous insn set the condition code
|
|
|
|
based on location @samp{a4@@(102)} and the current insn stores a new
|
|
|
|
value in @samp{a4}. Although the condition code is not changed by
|
|
|
|
this, it will no longer be true that it reflects the contents of
|
|
|
|
@samp{a4@@(102)}. Therefore, @code{NOTICE_UPDATE_CC} must alter
|
|
|
|
@code{cc_status} in this case to say that nothing is known about the
|
|
|
|
condition code value.
|
|
|
|
|
|
|
|
The definition of @code{NOTICE_UPDATE_CC} must be prepared to deal
|
|
|
|
with the results of peephole optimization: insns whose patterns are
|
|
|
|
@code{parallel} RTXs containing various @code{reg}, @code{mem} or
|
|
|
|
constants which are just the operands. The RTL structure of these
|
|
|
|
insns is not sufficient to indicate what the insns actually do. What
|
|
|
|
@code{NOTICE_UPDATE_CC} should do when it sees one is just to run
|
|
|
|
@code{CC_STATUS_INIT}.
|
|
|
|
|
|
|
|
A possible definition of @code{NOTICE_UPDATE_CC} is to call a function
|
|
|
|
that looks at an attribute (@pxref{Insn Attributes}) named, for example,
|
|
|
|
@samp{cc}. This avoids having detailed information about patterns in
|
|
|
|
two places, the @file{md} file and in @code{NOTICE_UPDATE_CC}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac SELECT_CC_MODE (@var{op}, @var{x}, @var{y})
|
1996-09-25 01:21:45 +02:00
|
|
|
Returns a mode from class @code{MODE_CC} to be used when comparison
|
|
|
|
operation code @var{op} is applied to rtx @var{x} and @var{y}. For
|
2002-09-16 00:48:06 +02:00
|
|
|
example, on the SPARC, @code{SELECT_CC_MODE} is defined as (see
|
1996-09-25 01:21:45 +02:00
|
|
|
@pxref{Jump Patterns} for a description of the reason for this
|
|
|
|
definition)
|
|
|
|
|
|
|
|
@smallexample
|
|
|
|
#define SELECT_CC_MODE(OP,X,Y) \
|
|
|
|
(GET_MODE_CLASS (GET_MODE (X)) == MODE_FLOAT \
|
|
|
|
? ((OP == EQ || OP == NE) ? CCFPmode : CCFPEmode) \
|
|
|
|
: ((GET_CODE (X) == PLUS || GET_CODE (X) == MINUS \
|
|
|
|
|| GET_CODE (X) == NEG) \
|
|
|
|
? CC_NOOVmode : CCmode))
|
|
|
|
@end smallexample
|
|
|
|
|
Makefile.in (BUILD_RTL): Replace $(BUILD_PREFIX)insn-modes.o with min-insn-modes.o.
* Makefile.in (BUILD_RTL): Replace $(BUILD_PREFIX)insn-modes.o
with min-insn-modes.o.
(STAGESTUFF): Add min-insn-modes.c.
(genobjs): Add genmodes.o.
(print-rtl.o, print-rtl1.o): Depend on $(TM_P_H).
(insn-modes.o): Depend on $(TM_H) not $(GTM_H); also real.h.
(min-insn-modes.c, min-insn-modes.o): New rules.
(s-modes): Also generate min-insn-modes.c.
($(BUILD_PREFIX_1)insn-modes.o): Kill.
* genmodes.c (struct mode_data): Add format field.
(blank_mode, validate_mode, complete_mode): Update to match.
(make_scalar_mode): Separate into make_int_mode and make_float_mode.
(_SCALAR_MODE): Kill.
(FLOAT_MODE, FRACTIONAL_FLOAT_MODE): Add format argument.
(emit_insn_modes_c_header): Adjust.
(emit_min_insn_modes_c_header, emit_real_format_for_mode)
(emit_min_insn_modes_c): New functions.
(emit_insn_modes_c): Call emit_real_format_for_mode.
(main): Add -m option to generate min-insn-modes.c.
* machmode.h: Update documentation. Add format argument to
all uses of FLOAT_MODE.
* real.c: Don't define real_format_for_mode here.
* dwarfout.c: Move default definition of PRINT_REG...
* defaults.h: ...here.
* print-rtl.c: Include tm_p.h.
(DEBUG_PRINT_REG, DEBUG_REGISTER_NAMES, debug_reg_names, reg_names):
Kill.
(print_rtx): Use PRINT_REG, not DEBUG_PRINT_REG. But surround
this entire block with #ifndef GENERATOR_FILE.
* regclass.c: Unconditionally define reg_names.
* config/mips/mips.h, config/rs6000/rs6000.h, config/sh/sh.h
Don't define DEBUG_REGISTER_NAMES.
* config/rs6000/darwin.h: Don't use DEBUG_REGISTER_NAMES in
redefinition of REGISTER_NAMES.
* config/i386/i386.h: Don't define DEBUG_PRINT_REG.
* combine.c: Change all preprocessor conditionals on
EXTRA_CC_MODES to use SELECT_CC_MODE instead; rearrange a bit
for clarity.
* genopinit.c: Remove mention of EXTRA_CC_MODES in comment.
* configure.in: Don't define EXTRA_CC_MODES.
* configure, config.in: Regenerate.
* doc/tm.texi: Remove documentation of EXTRA_CC_MODES.
* config/arc/arc.c, config/m32r/m32r.c, config/sparc/sparc.c:
May assume that GET_MODE_CLASS is accurate for extra CC modes
at all times.
* config/i860/i860.h (INIT_CUMULATIVE_ARGS): Pass correct
number of arguments to aggregate_value_p.
* genmodes.c (RESET_FLOAT_FORMAT, reset_float_format): New.
* machmode.def: Explain ARCH-modes.def. Document
RESET_FLOAT_FORMAT. Improve commentary on various mode
clusters. Do not define OI, PQI, PHI, PSI, PDI, QF, HF, TQF,
XF, or TF modes here. Remove backward-compatibility
definition of CC.
* config/alpha/alpha-modes.def: New file; define TF mode.
* config/arc/arm-modes.def: Define XF mode.
* config/c4x/c4x-modes.def: Define QF and HF modes. Unset
float format for SF and DF modes.
* config/dsp16xx/dsp16xx-modes.def: New file; define HF mode.
* config/i386/i386-modes.def: Define XF and TF modes.
* config/i960/i960-modes.def: Define TF mode.
* config/ia64/ia64-modes.def: Define TF and OI modes.
* config/m68k/m68k-modes.def: New file; define XF mode.
* config/mips/mips-modes.def: New file; define TF mode, reset
formats for SF and DF modes.
* config/pa/pa-modes.def: Define TF mode.
* config/rs6000/rs6000.c: Define TF and PSI modes.
* config/s390/s390-modes.def: Define OI mode.
* config/sh/sh-modes.def: New file; define PSI mode.
* config/sparc/sparc-modes.def: Define TF mode.
* config/vax/vax-modes.def: New file; reset formats for SF and
DF modes.
* config/c4x/c4x.c (c4x_override_options): No need to mess
with real_format_for_mode or set REAL_MODE_FORMATs.
(c4x_immed_int_constant): Don't apply GET_MODE_CLASS to rtx
variable.
* config/i386/i386.c (override_options): No need to set
REAL_MODE_FORMATs here.
* config/i960/i960.c (i960_initialize): Likewise.
* config/m68k/m68k.c (m68k_override_options): Likewise.
* config/ia64/ia64.c (ia64_override_options): Set REAL_MODE_FORMAT
for TFmode only if not the default.
* config/mips/mips.c (override_options): Likewise.
* config/vax/vax.c (override_optionms): Set REAL_MODE_FORMAT for
DFmode only if not the default.
* config/i370/i370.h (RET_REG): Don't consider TFmode.
* config/m68hc11/m68hc11.c (print_operand): Don't consider XFmode.
* config/dsp16xx/dsp16xx.c (hard_regno_mode_ok): #if 0 out use
of modes that don't appear anywhere in the machine description.
* config/arc/arc-modes.def, config/arm/arm-modes.def
* config/c4x/c4x-modes.def, config/frv/frv-modes.def
* config/i386/i386-modes.def, config/i960/i960-modes.def
* config/ia64/ia64-modes.def, config/mmix/mmix-modes.def
* config/pa/pa-modes.def, config/pdp11/pdp11-modes.def
* config/rs6000/rs6000-modes.def, config/s390/s390-modes.def
* config/sparc/sparc-modes.def: Convert to new style for
declaring extra CC modes.
From-SVN: r72440
2003-10-13 23:16:33 +02:00
|
|
|
You should define this macro if and only if you define extra CC modes
|
|
|
|
in @file{@var{machine}-modes.def}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac CANONICALIZE_COMPARISON (@var{code}, @var{op0}, @var{op1})
|
2000-02-04 11:30:26 +01:00
|
|
|
On some machines not all possible comparisons are defined, but you can
|
1996-09-25 01:21:45 +02:00
|
|
|
convert an invalid comparison into a valid one. For example, the Alpha
|
|
|
|
does not have a @code{GT} comparison, but you can use an @code{LT}
|
|
|
|
comparison instead and swap the order of the operands.
|
|
|
|
|
|
|
|
On such machines, define this macro to be a C statement to do any
|
|
|
|
required conversions. @var{code} is the initial comparison code
|
|
|
|
and @var{op0} and @var{op1} are the left and right operands of the
|
|
|
|
comparison, respectively. You should modify @var{code}, @var{op0}, and
|
|
|
|
@var{op1} as required.
|
|
|
|
|
1999-08-25 09:27:13 +02:00
|
|
|
GCC will not assume that the comparison resulting from this macro is
|
1996-09-25 01:21:45 +02:00
|
|
|
valid but will see if the resulting insn matches a pattern in the
|
|
|
|
@file{md} file.
|
|
|
|
|
|
|
|
You need not define this macro if it would never change the comparison
|
|
|
|
code or operands.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac REVERSIBLE_CC_MODE (@var{mode})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C expression whose value is one if it is always safe to reverse a
|
|
|
|
comparison whose mode is @var{mode}. If @code{SELECT_CC_MODE}
|
|
|
|
can ever return @var{mode} for a floating-point inequality comparison,
|
|
|
|
then @code{REVERSIBLE_CC_MODE (@var{mode})} must be zero.
|
|
|
|
|
|
|
|
You need not define this macro if it would always returns zero or if the
|
|
|
|
floating-point format is anything other than @code{IEEE_FLOAT_FORMAT}.
|
2002-09-16 00:48:06 +02:00
|
|
|
For example, here is the definition used on the SPARC, where floating-point
|
1996-09-25 01:21:45 +02:00
|
|
|
inequality comparisons are always given @code{CCFPEmode}:
|
|
|
|
|
|
|
|
@smallexample
|
|
|
|
#define REVERSIBLE_CC_MODE(MODE) ((MODE) != CCFPEmode)
|
|
|
|
@end smallexample
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac REVERSE_CONDITION (@var{code}, @var{mode})
|
2001-01-13 09:57:29 +01:00
|
|
|
A C expression whose value is reversed condition code of the @var{code} for
|
|
|
|
comparison done in CC_MODE @var{mode}. The macro is used only in case
|
|
|
|
@code{REVERSIBLE_CC_MODE (@var{mode})} is nonzero. Define this macro in case
|
|
|
|
machine has some non-standard way how to reverse certain conditionals. For
|
|
|
|
instance in case all floating point conditions are non-trapping, compiler may
|
|
|
|
freely convert unordered compares to ordered one. Then definition may look
|
|
|
|
like:
|
|
|
|
|
|
|
|
@smallexample
|
|
|
|
#define REVERSE_CONDITION(CODE, MODE) \
|
c-tree.texi, [...]: Fix spelling and typos.
* doc/c-tree.texi, doc/contrib.texi, doc/extend.texi,
doc/gcc.texi, doc/install.texi, doc/invoke.texi, doc/md.texi,
doc/objc.texi, doc/rtl.texi, doc/tm.texi: Fix spelling and typos.
Consistently use "built-in" and "bit-field". Minor logical markup
improvements.
* doc/gcc.1: Regenerate.
From-SVN: r43383
2001-06-15 00:51:18 +02:00
|
|
|
((MODE) != CCFPmode ? reverse_condition (CODE) \
|
2001-01-13 09:57:29 +01:00
|
|
|
: reverse_condition_maybe_unordered (CODE))
|
|
|
|
@end smallexample
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2001-01-13 09:57:29 +01:00
|
|
|
|
2004-08-30 00:10:44 +02:00
|
|
|
@defmac REVERSE_CONDEXEC_PREDICATES_P (@var{op1}, @var{op2})
|
2001-02-21 16:59:30 +01:00
|
|
|
A C expression that returns true if the conditional execution predicate
|
2004-08-30 00:10:44 +02:00
|
|
|
@var{op1}, a comparison operation, is the inverse of @var{op2} and vice
|
|
|
|
versa. Define this to return 0 if the target has conditional execution
|
|
|
|
predicates that cannot be reversed safely. There is no need to validate
|
|
|
|
that the arguments of op1 and op2 are the same, this is done separately.
|
|
|
|
If no expansion is specified, this macro is defined as follows:
|
2001-02-21 16:59:30 +01:00
|
|
|
|
|
|
|
@smallexample
|
2001-07-03 02:46:05 +02:00
|
|
|
#define REVERSE_CONDEXEC_PREDICATES_P (x, y) \
|
2004-08-30 00:10:44 +02:00
|
|
|
(GET_CODE ((x)) == reversed_comparison_code ((y), NULL))
|
2001-02-21 16:59:30 +01:00
|
|
|
@end smallexample
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2004-01-23 22:05:21 +01:00
|
|
|
@deftypefn {Target Hook} bool TARGET_FIXED_CONDITION_CODE_REGS (unsigned int *, unsigned int *)
|
|
|
|
On targets which do not use @code{(cc0)}, and which use a hard
|
|
|
|
register rather than a pseudo-register to hold condition codes, the
|
|
|
|
regular CSE passes are often not able to identify cases in which the
|
|
|
|
hard register is set to a common value. Use this hook to enable a
|
|
|
|
small pass which optimizes such cases. This hook should return true
|
|
|
|
to enable this pass, and it should set the integers to which its
|
|
|
|
arguments point to the hard register numbers used for condition codes.
|
|
|
|
When there is only one such register, as is true on most systems, the
|
|
|
|
integer pointed to by the second argument should be set to
|
|
|
|
@code{INVALID_REGNUM}.
|
|
|
|
|
|
|
|
The default version of this hook returns false.
|
|
|
|
@end deftypefn
|
|
|
|
|
|
|
|
@deftypefn {Target Hook} enum machine_mode TARGET_CC_MODES_COMPATIBLE (enum machine_mode, enum machine_mode)
|
|
|
|
On targets which use multiple condition code modes in class
|
|
|
|
@code{MODE_CC}, it is sometimes the case that a comparison can be
|
|
|
|
validly done in more than one mode. On such a system, define this
|
|
|
|
target hook to take two mode arguments and to return a mode in which
|
|
|
|
both comparisons may be validly done. If there is no such mode,
|
|
|
|
return @code{VOIDmode}.
|
|
|
|
|
|
|
|
The default version of this hook checks whether the modes are the
|
|
|
|
same. If they are, it returns that mode. If they are different, it
|
|
|
|
returns @code{VOIDmode}.
|
|
|
|
@end deftypefn
|
|
|
|
|
1996-09-25 01:21:45 +02:00
|
|
|
@node Costs
|
|
|
|
@section Describing Relative Costs of Operations
|
|
|
|
@cindex costs of instructions
|
|
|
|
@cindex relative costs
|
|
|
|
@cindex speed of instructions
|
|
|
|
|
|
|
|
These macros let you describe the relative speed of various operations
|
|
|
|
on the target machine.
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac REGISTER_MOVE_COST (@var{mode}, @var{from}, @var{to})
|
2001-01-02 01:59:52 +01:00
|
|
|
A C expression for the cost of moving data of mode @var{mode} from a
|
|
|
|
register in class @var{from} to one in class @var{to}. The classes are
|
|
|
|
expressed using the enumeration values such as @code{GENERAL_REGS}. A
|
|
|
|
value of 2 is the default; other values are interpreted relative to
|
|
|
|
that.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
It is not required that the cost always equal 2 when @var{from} is the
|
|
|
|
same as @var{to}; on some machines it is expensive to move between
|
|
|
|
registers if they are not general registers.
|
|
|
|
|
|
|
|
If reload sees an insn consisting of a single @code{set} between two
|
|
|
|
hard registers, and if @code{REGISTER_MOVE_COST} applied to their
|
|
|
|
classes returns a value of 2, reload does not check to ensure that the
|
|
|
|
constraints of the insn are met. Setting a cost of other than 2 will
|
|
|
|
allow reload to verify that the constraints are met. You should do this
|
|
|
|
if the @samp{mov@var{m}} pattern's constraints do not allow such copying.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac MEMORY_MOVE_COST (@var{mode}, @var{class}, @var{in})
|
1998-03-16 12:56:25 +01:00
|
|
|
A C expression for the cost of moving data of mode @var{mode} between a
|
|
|
|
register of class @var{class} and memory; @var{in} is zero if the value
|
2001-10-10 01:11:55 +02:00
|
|
|
is to be written to memory, nonzero if it is to be read in. This cost
|
1998-04-07 15:24:41 +02:00
|
|
|
is relative to those in @code{REGISTER_MOVE_COST}. If moving between
|
|
|
|
registers and memory is more expensive than between two registers, you
|
|
|
|
should define this macro to express the relative cost.
|
|
|
|
|
1999-08-25 09:27:13 +02:00
|
|
|
If you do not define this macro, GCC uses a default cost of 4 plus
|
1998-05-06 23:09:07 +02:00
|
|
|
the cost of copying via a secondary reload register, if one is
|
1998-04-07 15:24:41 +02:00
|
|
|
needed. If your machine requires a secondary reload register to copy
|
|
|
|
between memory and a register of @var{class} but the reload mechanism is
|
|
|
|
more complex than copying via an intermediate, define this macro to
|
|
|
|
reflect the actual cost of the move.
|
|
|
|
|
1999-08-25 09:27:13 +02:00
|
|
|
GCC defines the function @code{memory_move_secondary_cost} if
|
1998-04-07 15:24:41 +02:00
|
|
|
secondary reloads are needed. It computes the costs due to copying via
|
|
|
|
a secondary register. If your machine copies from memory using a
|
|
|
|
secondary register in the conventional way but the default base value of
|
|
|
|
4 is not correct for your machine, define this macro to add some other
|
|
|
|
value to the result of that function. The arguments to that function
|
|
|
|
are the same as to this macro.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1998-03-16 12:56:25 +01:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac BRANCH_COST
|
1996-09-25 01:21:45 +02:00
|
|
|
A C expression for the cost of a branch instruction. A value of 1 is
|
|
|
|
the default; other values are interpreted relative to that.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
Here are additional macros which do not specify precise relative costs,
|
1999-08-25 09:27:13 +02:00
|
|
|
but only that certain actions are more expensive than GCC would
|
1996-09-25 01:21:45 +02:00
|
|
|
ordinarily expect.
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac SLOW_BYTE_ACCESS
|
1996-09-25 01:21:45 +02:00
|
|
|
Define this macro as a C expression which is nonzero if accessing less
|
2001-06-27 02:04:39 +02:00
|
|
|
than a word of memory (i.e.@: a @code{char} or a @code{short}) is no
|
1996-09-25 01:21:45 +02:00
|
|
|
faster than accessing a word of memory, i.e., if such access
|
|
|
|
require more than one instruction or if there is no difference in cost
|
|
|
|
between byte and (aligned) word loads.
|
|
|
|
|
|
|
|
When this macro is not defined, the compiler will access a field by
|
|
|
|
finding the smallest containing object; when it is defined, a fullword
|
|
|
|
load will be used if alignment permits. Unless bytes accesses are
|
|
|
|
faster than word accesses, using word accesses is preferable since it
|
|
|
|
may eliminate subsequent memory access if subsequent accesses occur to
|
|
|
|
other fields in the same word of the structure, but to different bytes.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac SLOW_UNALIGNED_ACCESS (@var{mode}, @var{alignment})
|
2000-01-04 21:10:19 +01:00
|
|
|
Define this macro to be the value 1 if memory accesses described by the
|
|
|
|
@var{mode} and @var{alignment} parameters have a cost many times greater
|
|
|
|
than aligned accesses, for example if they are emulated in a trap
|
|
|
|
handler.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2001-10-10 01:11:55 +02:00
|
|
|
When this macro is nonzero, the compiler will act as if
|
|
|
|
@code{STRICT_ALIGNMENT} were nonzero when generating code for block
|
1996-09-25 01:21:45 +02:00
|
|
|
moves. This can cause significantly more instructions to be produced.
|
2001-10-10 01:11:55 +02:00
|
|
|
Therefore, do not set this macro nonzero if unaligned accesses only add a
|
1996-09-25 01:21:45 +02:00
|
|
|
cycle or two to the time for a memory access.
|
|
|
|
|
2000-01-04 21:29:31 +01:00
|
|
|
If the value of this macro is always zero, it need not be defined. If
|
2001-10-10 01:11:55 +02:00
|
|
|
this macro is defined, it should produce a nonzero value when
|
|
|
|
@code{STRICT_ALIGNMENT} is nonzero.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac MOVE_RATIO
|
1998-08-30 21:21:22 +02:00
|
|
|
The threshold of number of scalar memory-to-memory move insns, @emph{below}
|
1999-09-07 07:49:18 +02:00
|
|
|
which a sequence of insns should be generated instead of a
|
1996-09-25 01:21:45 +02:00
|
|
|
string move insn or a library call. Increasing the value will always
|
|
|
|
make code faster, but eventually incurs high cost in increased code size.
|
|
|
|
|
1999-09-07 07:49:18 +02:00
|
|
|
Note that on machines where the corresponding move insn is a
|
|
|
|
@code{define_expand} that emits a sequence of insns, this macro counts
|
|
|
|
the number of such sequences.
|
1998-08-30 21:21:22 +02:00
|
|
|
|
1996-09-25 01:21:45 +02:00
|
|
|
If you don't define this, a reasonable default is used.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac MOVE_BY_PIECES_P (@var{size}, @var{alignment})
|
1999-01-21 12:33:44 +01:00
|
|
|
A C expression used to determine whether @code{move_by_pieces} will be used to
|
|
|
|
copy a chunk of memory, or whether some other block move mechanism
|
tm.texi (USE_LOAD_POST_DECREMENT, [...]): Document.
* tm.texi (USE_LOAD_POST_DECREMENT, USE_LOAD_PRE_DECREMENT,
USE_STORE_POST_DECREMENT, USE_STORE_PRE_DECREMENT): Document.
(USE_LOAD_POST_INCREMENT, USE_LOAD_PRE_INCREMENT,
USE_STORE_POST_INCREMENT, USE_STORE_PRE_INCREMENT): Fix documentation.
* rtl.h (USE_LOAD_POST_DECREMENT, USE_LOAD_PRE_DECREMENT,
USE_STORE_POST_DECREMENT, USE_STORE_PRE_DECREMENT,
USE_LOAD_POST_INCREMENT, USE_LOAD_PRE_INCREMENT,
USE_STORE_POST_INCREMENT, USE_STORE_PRE_INCREMENT): Provide default
definition.
* expr.c: (USE_LOAD_POST_INCREMENT, USE_LOAD_PRE_INCREMENT,
USE_STORE_POST_INCREMENT, USE_STORE_PRE_INCREMENT): Delete default
definition.
From-SVN: r26134
1999-04-02 17:39:55 +02:00
|
|
|
will be used. Defaults to 1 if @code{move_by_pieces_ninsns} returns less
|
1999-01-21 12:33:44 +01:00
|
|
|
than @code{MOVE_RATIO}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1999-01-21 12:33:44 +01:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac MOVE_MAX_PIECES
|
1999-01-21 12:33:44 +01:00
|
|
|
A C expression used by @code{move_by_pieces} to determine the largest unit
|
tm.texi (USE_LOAD_POST_DECREMENT, [...]): Document.
* tm.texi (USE_LOAD_POST_DECREMENT, USE_LOAD_PRE_DECREMENT,
USE_STORE_POST_DECREMENT, USE_STORE_PRE_DECREMENT): Document.
(USE_LOAD_POST_INCREMENT, USE_LOAD_PRE_INCREMENT,
USE_STORE_POST_INCREMENT, USE_STORE_PRE_INCREMENT): Fix documentation.
* rtl.h (USE_LOAD_POST_DECREMENT, USE_LOAD_PRE_DECREMENT,
USE_STORE_POST_DECREMENT, USE_STORE_PRE_DECREMENT,
USE_LOAD_POST_INCREMENT, USE_LOAD_PRE_INCREMENT,
USE_STORE_POST_INCREMENT, USE_STORE_PRE_INCREMENT): Provide default
definition.
* expr.c: (USE_LOAD_POST_INCREMENT, USE_LOAD_PRE_INCREMENT,
USE_STORE_POST_INCREMENT, USE_STORE_PRE_INCREMENT): Delete default
definition.
From-SVN: r26134
1999-04-02 17:39:55 +02:00
|
|
|
a load or store used to copy memory is. Defaults to @code{MOVE_MAX}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1999-01-21 12:33:44 +01:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac CLEAR_RATIO
|
2002-07-13 02:13:15 +02:00
|
|
|
The threshold of number of scalar move insns, @emph{below} which a sequence
|
|
|
|
of insns should be generated to clear memory instead of a string clear insn
|
|
|
|
or a library call. Increasing the value will always make code faster, but
|
|
|
|
eventually incurs high cost in increased code size.
|
|
|
|
|
|
|
|
If you don't define this, a reasonable default is used.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2002-07-13 02:13:15 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac CLEAR_BY_PIECES_P (@var{size}, @var{alignment})
|
2002-07-13 02:13:15 +02:00
|
|
|
A C expression used to determine whether @code{clear_by_pieces} will be used
|
|
|
|
to clear a chunk of memory, or whether some other block clear mechanism
|
|
|
|
will be used. Defaults to 1 if @code{move_by_pieces_ninsns} returns less
|
|
|
|
than @code{CLEAR_RATIO}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2002-07-13 02:13:15 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac STORE_BY_PIECES_P (@var{size}, @var{alignment})
|
2002-12-16 19:23:00 +01:00
|
|
|
A C expression used to determine whether @code{store_by_pieces} will be
|
|
|
|
used to set a chunk of memory to a constant value, or whether some other
|
|
|
|
mechanism will be used. Used by @code{__builtin_memset} when storing
|
|
|
|
values other than constant zero and by @code{__builtin_strcpy} when
|
|
|
|
when called with a constant source string.
|
2004-08-10 15:28:26 +02:00
|
|
|
Defaults to to 1 if @code{move_by_pieces_ninsns} returns less
|
|
|
|
than @code{MOVE_RATIO}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2002-12-16 19:23:00 +01:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac USE_LOAD_POST_INCREMENT (@var{mode})
|
tm.texi (USE_LOAD_POST_DECREMENT, [...]): Document.
* tm.texi (USE_LOAD_POST_DECREMENT, USE_LOAD_PRE_DECREMENT,
USE_STORE_POST_DECREMENT, USE_STORE_PRE_DECREMENT): Document.
(USE_LOAD_POST_INCREMENT, USE_LOAD_PRE_INCREMENT,
USE_STORE_POST_INCREMENT, USE_STORE_PRE_INCREMENT): Fix documentation.
* rtl.h (USE_LOAD_POST_DECREMENT, USE_LOAD_PRE_DECREMENT,
USE_STORE_POST_DECREMENT, USE_STORE_PRE_DECREMENT,
USE_LOAD_POST_INCREMENT, USE_LOAD_PRE_INCREMENT,
USE_STORE_POST_INCREMENT, USE_STORE_PRE_INCREMENT): Provide default
definition.
* expr.c: (USE_LOAD_POST_INCREMENT, USE_LOAD_PRE_INCREMENT,
USE_STORE_POST_INCREMENT, USE_STORE_PRE_INCREMENT): Delete default
definition.
From-SVN: r26134
1999-04-02 17:39:55 +02:00
|
|
|
A C expression used to determine whether a load postincrement is a good
|
|
|
|
thing to use for a given mode. Defaults to the value of
|
|
|
|
@code{HAVE_POST_INCREMENT}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
tm.texi (USE_LOAD_POST_DECREMENT, [...]): Document.
* tm.texi (USE_LOAD_POST_DECREMENT, USE_LOAD_PRE_DECREMENT,
USE_STORE_POST_DECREMENT, USE_STORE_PRE_DECREMENT): Document.
(USE_LOAD_POST_INCREMENT, USE_LOAD_PRE_INCREMENT,
USE_STORE_POST_INCREMENT, USE_STORE_PRE_INCREMENT): Fix documentation.
* rtl.h (USE_LOAD_POST_DECREMENT, USE_LOAD_PRE_DECREMENT,
USE_STORE_POST_DECREMENT, USE_STORE_PRE_DECREMENT,
USE_LOAD_POST_INCREMENT, USE_LOAD_PRE_INCREMENT,
USE_STORE_POST_INCREMENT, USE_STORE_PRE_INCREMENT): Provide default
definition.
* expr.c: (USE_LOAD_POST_INCREMENT, USE_LOAD_PRE_INCREMENT,
USE_STORE_POST_INCREMENT, USE_STORE_PRE_INCREMENT): Delete default
definition.
From-SVN: r26134
1999-04-02 17:39:55 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac USE_LOAD_POST_DECREMENT (@var{mode})
|
tm.texi (USE_LOAD_POST_DECREMENT, [...]): Document.
* tm.texi (USE_LOAD_POST_DECREMENT, USE_LOAD_PRE_DECREMENT,
USE_STORE_POST_DECREMENT, USE_STORE_PRE_DECREMENT): Document.
(USE_LOAD_POST_INCREMENT, USE_LOAD_PRE_INCREMENT,
USE_STORE_POST_INCREMENT, USE_STORE_PRE_INCREMENT): Fix documentation.
* rtl.h (USE_LOAD_POST_DECREMENT, USE_LOAD_PRE_DECREMENT,
USE_STORE_POST_DECREMENT, USE_STORE_PRE_DECREMENT,
USE_LOAD_POST_INCREMENT, USE_LOAD_PRE_INCREMENT,
USE_STORE_POST_INCREMENT, USE_STORE_PRE_INCREMENT): Provide default
definition.
* expr.c: (USE_LOAD_POST_INCREMENT, USE_LOAD_PRE_INCREMENT,
USE_STORE_POST_INCREMENT, USE_STORE_PRE_INCREMENT): Delete default
definition.
From-SVN: r26134
1999-04-02 17:39:55 +02:00
|
|
|
A C expression used to determine whether a load postdecrement is a good
|
|
|
|
thing to use for a given mode. Defaults to the value of
|
|
|
|
@code{HAVE_POST_DECREMENT}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1999-01-21 12:33:44 +01:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac USE_LOAD_PRE_INCREMENT (@var{mode})
|
tm.texi (USE_LOAD_POST_DECREMENT, [...]): Document.
* tm.texi (USE_LOAD_POST_DECREMENT, USE_LOAD_PRE_DECREMENT,
USE_STORE_POST_DECREMENT, USE_STORE_PRE_DECREMENT): Document.
(USE_LOAD_POST_INCREMENT, USE_LOAD_PRE_INCREMENT,
USE_STORE_POST_INCREMENT, USE_STORE_PRE_INCREMENT): Fix documentation.
* rtl.h (USE_LOAD_POST_DECREMENT, USE_LOAD_PRE_DECREMENT,
USE_STORE_POST_DECREMENT, USE_STORE_PRE_DECREMENT,
USE_LOAD_POST_INCREMENT, USE_LOAD_PRE_INCREMENT,
USE_STORE_POST_INCREMENT, USE_STORE_PRE_INCREMENT): Provide default
definition.
* expr.c: (USE_LOAD_POST_INCREMENT, USE_LOAD_PRE_INCREMENT,
USE_STORE_POST_INCREMENT, USE_STORE_PRE_INCREMENT): Delete default
definition.
From-SVN: r26134
1999-04-02 17:39:55 +02:00
|
|
|
A C expression used to determine whether a load preincrement is a good
|
|
|
|
thing to use for a given mode. Defaults to the value of
|
|
|
|
@code{HAVE_PRE_INCREMENT}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
tm.texi (USE_LOAD_POST_DECREMENT, [...]): Document.
* tm.texi (USE_LOAD_POST_DECREMENT, USE_LOAD_PRE_DECREMENT,
USE_STORE_POST_DECREMENT, USE_STORE_PRE_DECREMENT): Document.
(USE_LOAD_POST_INCREMENT, USE_LOAD_PRE_INCREMENT,
USE_STORE_POST_INCREMENT, USE_STORE_PRE_INCREMENT): Fix documentation.
* rtl.h (USE_LOAD_POST_DECREMENT, USE_LOAD_PRE_DECREMENT,
USE_STORE_POST_DECREMENT, USE_STORE_PRE_DECREMENT,
USE_LOAD_POST_INCREMENT, USE_LOAD_PRE_INCREMENT,
USE_STORE_POST_INCREMENT, USE_STORE_PRE_INCREMENT): Provide default
definition.
* expr.c: (USE_LOAD_POST_INCREMENT, USE_LOAD_PRE_INCREMENT,
USE_STORE_POST_INCREMENT, USE_STORE_PRE_INCREMENT): Delete default
definition.
From-SVN: r26134
1999-04-02 17:39:55 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac USE_LOAD_PRE_DECREMENT (@var{mode})
|
tm.texi (USE_LOAD_POST_DECREMENT, [...]): Document.
* tm.texi (USE_LOAD_POST_DECREMENT, USE_LOAD_PRE_DECREMENT,
USE_STORE_POST_DECREMENT, USE_STORE_PRE_DECREMENT): Document.
(USE_LOAD_POST_INCREMENT, USE_LOAD_PRE_INCREMENT,
USE_STORE_POST_INCREMENT, USE_STORE_PRE_INCREMENT): Fix documentation.
* rtl.h (USE_LOAD_POST_DECREMENT, USE_LOAD_PRE_DECREMENT,
USE_STORE_POST_DECREMENT, USE_STORE_PRE_DECREMENT,
USE_LOAD_POST_INCREMENT, USE_LOAD_PRE_INCREMENT,
USE_STORE_POST_INCREMENT, USE_STORE_PRE_INCREMENT): Provide default
definition.
* expr.c: (USE_LOAD_POST_INCREMENT, USE_LOAD_PRE_INCREMENT,
USE_STORE_POST_INCREMENT, USE_STORE_PRE_INCREMENT): Delete default
definition.
From-SVN: r26134
1999-04-02 17:39:55 +02:00
|
|
|
A C expression used to determine whether a load predecrement is a good
|
|
|
|
thing to use for a given mode. Defaults to the value of
|
|
|
|
@code{HAVE_PRE_DECREMENT}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1999-01-21 12:33:44 +01:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac USE_STORE_POST_INCREMENT (@var{mode})
|
tm.texi (USE_LOAD_POST_DECREMENT, [...]): Document.
* tm.texi (USE_LOAD_POST_DECREMENT, USE_LOAD_PRE_DECREMENT,
USE_STORE_POST_DECREMENT, USE_STORE_PRE_DECREMENT): Document.
(USE_LOAD_POST_INCREMENT, USE_LOAD_PRE_INCREMENT,
USE_STORE_POST_INCREMENT, USE_STORE_PRE_INCREMENT): Fix documentation.
* rtl.h (USE_LOAD_POST_DECREMENT, USE_LOAD_PRE_DECREMENT,
USE_STORE_POST_DECREMENT, USE_STORE_PRE_DECREMENT,
USE_LOAD_POST_INCREMENT, USE_LOAD_PRE_INCREMENT,
USE_STORE_POST_INCREMENT, USE_STORE_PRE_INCREMENT): Provide default
definition.
* expr.c: (USE_LOAD_POST_INCREMENT, USE_LOAD_PRE_INCREMENT,
USE_STORE_POST_INCREMENT, USE_STORE_PRE_INCREMENT): Delete default
definition.
From-SVN: r26134
1999-04-02 17:39:55 +02:00
|
|
|
A C expression used to determine whether a store postincrement is a good
|
|
|
|
thing to use for a given mode. Defaults to the value of
|
|
|
|
@code{HAVE_POST_INCREMENT}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
tm.texi (USE_LOAD_POST_DECREMENT, [...]): Document.
* tm.texi (USE_LOAD_POST_DECREMENT, USE_LOAD_PRE_DECREMENT,
USE_STORE_POST_DECREMENT, USE_STORE_PRE_DECREMENT): Document.
(USE_LOAD_POST_INCREMENT, USE_LOAD_PRE_INCREMENT,
USE_STORE_POST_INCREMENT, USE_STORE_PRE_INCREMENT): Fix documentation.
* rtl.h (USE_LOAD_POST_DECREMENT, USE_LOAD_PRE_DECREMENT,
USE_STORE_POST_DECREMENT, USE_STORE_PRE_DECREMENT,
USE_LOAD_POST_INCREMENT, USE_LOAD_PRE_INCREMENT,
USE_STORE_POST_INCREMENT, USE_STORE_PRE_INCREMENT): Provide default
definition.
* expr.c: (USE_LOAD_POST_INCREMENT, USE_LOAD_PRE_INCREMENT,
USE_STORE_POST_INCREMENT, USE_STORE_PRE_INCREMENT): Delete default
definition.
From-SVN: r26134
1999-04-02 17:39:55 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac USE_STORE_POST_DECREMENT (@var{mode})
|
c-tree.texi, [...]: Fix spelling and typos.
* doc/c-tree.texi, doc/contrib.texi, doc/extend.texi,
doc/gcc.texi, doc/install.texi, doc/invoke.texi, doc/md.texi,
doc/objc.texi, doc/rtl.texi, doc/tm.texi: Fix spelling and typos.
Consistently use "built-in" and "bit-field". Minor logical markup
improvements.
* doc/gcc.1: Regenerate.
From-SVN: r43383
2001-06-15 00:51:18 +02:00
|
|
|
A C expression used to determine whether a store postdecrement is a good
|
tm.texi (USE_LOAD_POST_DECREMENT, [...]): Document.
* tm.texi (USE_LOAD_POST_DECREMENT, USE_LOAD_PRE_DECREMENT,
USE_STORE_POST_DECREMENT, USE_STORE_PRE_DECREMENT): Document.
(USE_LOAD_POST_INCREMENT, USE_LOAD_PRE_INCREMENT,
USE_STORE_POST_INCREMENT, USE_STORE_PRE_INCREMENT): Fix documentation.
* rtl.h (USE_LOAD_POST_DECREMENT, USE_LOAD_PRE_DECREMENT,
USE_STORE_POST_DECREMENT, USE_STORE_PRE_DECREMENT,
USE_LOAD_POST_INCREMENT, USE_LOAD_PRE_INCREMENT,
USE_STORE_POST_INCREMENT, USE_STORE_PRE_INCREMENT): Provide default
definition.
* expr.c: (USE_LOAD_POST_INCREMENT, USE_LOAD_PRE_INCREMENT,
USE_STORE_POST_INCREMENT, USE_STORE_PRE_INCREMENT): Delete default
definition.
From-SVN: r26134
1999-04-02 17:39:55 +02:00
|
|
|
thing to use for a given mode. Defaults to the value of
|
|
|
|
@code{HAVE_POST_DECREMENT}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1999-01-21 12:33:44 +01:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac USE_STORE_PRE_INCREMENT (@var{mode})
|
tm.texi (USE_LOAD_POST_DECREMENT, [...]): Document.
* tm.texi (USE_LOAD_POST_DECREMENT, USE_LOAD_PRE_DECREMENT,
USE_STORE_POST_DECREMENT, USE_STORE_PRE_DECREMENT): Document.
(USE_LOAD_POST_INCREMENT, USE_LOAD_PRE_INCREMENT,
USE_STORE_POST_INCREMENT, USE_STORE_PRE_INCREMENT): Fix documentation.
* rtl.h (USE_LOAD_POST_DECREMENT, USE_LOAD_PRE_DECREMENT,
USE_STORE_POST_DECREMENT, USE_STORE_PRE_DECREMENT,
USE_LOAD_POST_INCREMENT, USE_LOAD_PRE_INCREMENT,
USE_STORE_POST_INCREMENT, USE_STORE_PRE_INCREMENT): Provide default
definition.
* expr.c: (USE_LOAD_POST_INCREMENT, USE_LOAD_PRE_INCREMENT,
USE_STORE_POST_INCREMENT, USE_STORE_PRE_INCREMENT): Delete default
definition.
From-SVN: r26134
1999-04-02 17:39:55 +02:00
|
|
|
This macro is used to determine whether a store preincrement is a good
|
|
|
|
thing to use for a given mode. Defaults to the value of
|
|
|
|
@code{HAVE_PRE_INCREMENT}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
tm.texi (USE_LOAD_POST_DECREMENT, [...]): Document.
* tm.texi (USE_LOAD_POST_DECREMENT, USE_LOAD_PRE_DECREMENT,
USE_STORE_POST_DECREMENT, USE_STORE_PRE_DECREMENT): Document.
(USE_LOAD_POST_INCREMENT, USE_LOAD_PRE_INCREMENT,
USE_STORE_POST_INCREMENT, USE_STORE_PRE_INCREMENT): Fix documentation.
* rtl.h (USE_LOAD_POST_DECREMENT, USE_LOAD_PRE_DECREMENT,
USE_STORE_POST_DECREMENT, USE_STORE_PRE_DECREMENT,
USE_LOAD_POST_INCREMENT, USE_LOAD_PRE_INCREMENT,
USE_STORE_POST_INCREMENT, USE_STORE_PRE_INCREMENT): Provide default
definition.
* expr.c: (USE_LOAD_POST_INCREMENT, USE_LOAD_PRE_INCREMENT,
USE_STORE_POST_INCREMENT, USE_STORE_PRE_INCREMENT): Delete default
definition.
From-SVN: r26134
1999-04-02 17:39:55 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac USE_STORE_PRE_DECREMENT (@var{mode})
|
tm.texi (USE_LOAD_POST_DECREMENT, [...]): Document.
* tm.texi (USE_LOAD_POST_DECREMENT, USE_LOAD_PRE_DECREMENT,
USE_STORE_POST_DECREMENT, USE_STORE_PRE_DECREMENT): Document.
(USE_LOAD_POST_INCREMENT, USE_LOAD_PRE_INCREMENT,
USE_STORE_POST_INCREMENT, USE_STORE_PRE_INCREMENT): Fix documentation.
* rtl.h (USE_LOAD_POST_DECREMENT, USE_LOAD_PRE_DECREMENT,
USE_STORE_POST_DECREMENT, USE_STORE_PRE_DECREMENT,
USE_LOAD_POST_INCREMENT, USE_LOAD_PRE_INCREMENT,
USE_STORE_POST_INCREMENT, USE_STORE_PRE_INCREMENT): Provide default
definition.
* expr.c: (USE_LOAD_POST_INCREMENT, USE_LOAD_PRE_INCREMENT,
USE_STORE_POST_INCREMENT, USE_STORE_PRE_INCREMENT): Delete default
definition.
From-SVN: r26134
1999-04-02 17:39:55 +02:00
|
|
|
This macro is used to determine whether a store predecrement is a good
|
|
|
|
thing to use for a given mode. Defaults to the value of
|
|
|
|
@code{HAVE_PRE_DECREMENT}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1999-01-21 12:33:44 +01:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac NO_FUNCTION_CSE
|
1996-09-25 01:21:45 +02:00
|
|
|
Define this macro if it is as good or better to call a constant
|
|
|
|
function address than to call an address kept in a register.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac RANGE_TEST_NON_SHORT_CIRCUIT
|
2003-04-22 17:01:18 +02:00
|
|
|
Define this macro if a non-short-circuit operation produced by
|
|
|
|
@samp{fold_range_test ()} is optimal. This macro defaults to true if
|
|
|
|
@code{BRANCH_COST} is greater than or equal to the value 2.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
Makefile.in (cse.o): Depend on TARGET_H.
* Makefile.in (cse.o): Depend on TARGET_H.
* cse.c (rtx_cost): Use targetm.rtx_costs.
* system.h (CONST_COSTS RTX_COSTS DEFAULT_RTX_COSTS): Poison.
* doc/tm.texi: Update.
* target.h (targetm.rtx_costs): New.
* target-def.h (TARGET_RTX_COSTS): New.
* hooks.c (hook_bool_rtx_int_int_intp_false): New.
* hooks.h: Update.
* config/alpha/alpha.c (alpha_rtx_cost_data): New.
(alpha_rtx_costs, TARGET_RTX_COSTS): New.
* config/alpha/alpha.h (PROCESSOR_MAX): New.
(CONST_COSTS, RTX_COSTS): Remove.
* config/arc/arc.c, config/arc/arc.h, config/c4x/c4x.c,
config/c4x/c4x.h, config/cris/cris.c, config/cris/cris.h,
config/d30v/d30v.c, config/d30v/d30v.h, config/dsp16xx/dsp16xx.c,
config/dsp16xx/dsp16xx.h, config/frv/frv.c, config/frv/frv.h,
config/h8300/h8300.c, config/h8300/h8300.h, config/i370/i370.c,
config/i370/i370.h, config/i386/i386.c, config/i386/i386.h,
config/i960/i960.c, config/i960/i960.h, config/ia64/ia64.c,
config/ia64/ia64.h, config/m32r/m32r.c, config/m32r/m32r.h,
config/m68k/m68k.c, config/m68k/m68k.h, config/m88k/m88k.c,
config/m88k/m88k.h, config/mcore/mcore.c, config/mcore/mcore.h,
config/mips/mips.c, config/mips/mips.h, config/mn10200/mn10200.c,
config/mn10200/mn10200.h, config/mn10300/mn10300.c,
config/mn10300/mn10300.h, config/ns32k/ns32k.c, config/ns32k/ns32k.h,
config/pa/pa.c, config/pa/pa.h, config/pdp11/pdp11.c,
config/pdp11/pdp11.h, config/romp/romp.c, config/romp/romp.h,
config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/s390/s390.c,
config/s390/s390.h, config/sh/sh.c, config/sh/sh.h,
config/stormy16/stormy16.c, config/stormy16/stormy16.h,
config/v850/v850.c, config/v850/v850.h,
config/xtensa/xtensa.c, config/xtensa/xtensa.h
(CONST_COSTS, RTX_COSTS): Move code ...
(foo_rtx_costs, TARGET_RTX_COSTS): ... here.
* config/arm/arm.c (arm_rtx_costs_1): Rename from arm_rtx_costs.
(arm_rtx_costs, TARGET_RTX_COSTS): New.
* config/arm/arm-protos.h: Update.
* config/arm/arm.h (DEFAULT_RTX_COSTS): Remove.
* config/avr/avr.h (CONST_COSTS): Move code ...
* config/avr/avr.c (avr_rtx_costs): ... here.
(default_rtx_costs): Make static.
* config/avr/avr-protos.h: Update.
* config/h8300/h8300.c (const_costs): Make static.
(h8300_and_costs, h8300_shift_costs): Likewise.
* config/h8300/h8300-protos.h: Update.
* config/ip2k/ip2k.h (DEFAULT_RTX_COSTS): Remove.
(CONST_COSTS): Move code ...
* config/ip2k/ip2k.c (ip2k_rtx_costs): ... here. Rename from
default_rtx_costs; update for signature change.
* config/ip2k/ip2k-protos.h: Update.
* config/m68hc11/m68hc11.h (RTX_COSTS): Remove.
(CONST_COSTS): Move code ...
* config/m68hc11/m68hc11.c (m68hc11_rtx_costs): ... here.
(TARGET_RTX_COSTS): New.
(m68hc11_rtx_costs_1): Rename from m68hc11_rtx_costs; make static.
* config/m68hc11/m68hc11-protos.h: Update.
* config/m68k/m68k.c (const_int_cost): Make static.
* config/m68k/m68k-protos.h: Update.
* config/mcore/mcore.c (mcore_const_costs): Make static.
(mcore_and_cost, mcore_ior_cost): Likewise.
* config/mcore/mcore-protos.h: Update.
* config/mmix/mmix.c (mmix_rtx_costs, TARGET_RTX_COSTS): New.
(mmix_rtx_cost_recalculated): Remove.
* config/mmix/mmix.h (DEFAULT_RTX_COSTS): Remove.
* config/mmix/mmix-protos.h: Update.
* config/sh/sh.c (shiftcosts): Make static.
(addsubcosts, andcosts, multcosts): Likewise.
* config/sh/sh-protos.h: Update.
* config/sparc/sparc.c (TARGET_RTX_COSTS): New.
(sparc_rtx_costs): Make static; update for change in signature.
* config/sparc/sparc.h (RTX_COSTS_CASES, RTX_COSTS): Remove.
* config/sparc/sparc-protos.h: Update.
* config/v850/v850.c (const_costs): Make static.
* config/v850/v850-protos.h: Update.
* config/vax/vax.h (RTX_COSTS): Remove.
(CONST_COSTS): Move code ...
* config/vax/vax.c (vax_rtx_costs_1): ... here; rename
from vax_rtx_cost.
(vax_rtx_costs, TARGET_RTX_COSTS): New.
From-SVN: r61954
2003-01-28 05:46:33 +01:00
|
|
|
@deftypefn {Target Hook} bool TARGET_RTX_COSTS (rtx @var{x}, int @var{code}, int @var{outer_code}, int *@var{total})
|
|
|
|
This target hook describes the relative costs of RTL expressions.
|
|
|
|
|
|
|
|
The cost may depend on the precise form of the expression, which is
|
|
|
|
available for examination in @var{x}, and the rtx code of the expression
|
|
|
|
in which it is contained, found in @var{outer_code}. @var{code} is the
|
|
|
|
expression code---redundant, since it can be obtained with
|
|
|
|
@code{GET_CODE (@var{x})}.
|
|
|
|
|
|
|
|
In implementing this hook, you can use the construct
|
|
|
|
@code{COSTS_N_INSNS (@var{n})} to specify a cost equal to @var{n} fast
|
|
|
|
instructions.
|
|
|
|
|
|
|
|
On entry to the hook, @code{*@var{total}} contains a default estimate
|
|
|
|
for the cost of the expression. The hook should modify this value as
|
2004-05-19 15:54:15 +02:00
|
|
|
necessary. Traditionally, the default costs are @code{COSTS_N_INSNS (5)}
|
|
|
|
for multiplications, @code{COSTS_N_INSNS (7)} for division and modulus
|
|
|
|
operations, and @code{COSTS_N_INSNS (1)} for all other operations.
|
|
|
|
|
c-tree.texi, [...]: Correct end-of-sentence markup and markup of "etc.", "e.g." and "i.e.".
* doc/c-tree.texi, doc/cfg.texi, doc/contrib.texi, doc/cpp.texi,
doc/cppopts.texi, doc/extend.texi, doc/fragments.texi,
doc/frontends.texi, doc/gcov.texi, doc/hostconfig.texi,
doc/implement-c.texi, doc/install.texi, doc/invoke.texi,
doc/libgcc.texi, doc/md.texi, doc/passes.texi,
doc/portability.texi, doc/rtl.texi, doc/sourcebuild.texi,
doc/standards.texi, doc/tm.texi, doc/tree-ssa.texi,
doc/trouble.texi: Correct end-of-sentence markup and markup of
"etc.", "e.g." and "i.e.". Use @code in various places where
appropriate.
From-SVN: r90101
2004-11-05 02:36:57 +01:00
|
|
|
When optimizing for code size, i.e.@: when @code{optimize_size} is
|
2004-09-15 15:12:33 +02:00
|
|
|
nonzero, this target hook should be used to estimate the relative
|
2004-05-19 15:54:15 +02:00
|
|
|
size cost of an expression, again relative to @code{COSTS_N_INSNS}.
|
Makefile.in (cse.o): Depend on TARGET_H.
* Makefile.in (cse.o): Depend on TARGET_H.
* cse.c (rtx_cost): Use targetm.rtx_costs.
* system.h (CONST_COSTS RTX_COSTS DEFAULT_RTX_COSTS): Poison.
* doc/tm.texi: Update.
* target.h (targetm.rtx_costs): New.
* target-def.h (TARGET_RTX_COSTS): New.
* hooks.c (hook_bool_rtx_int_int_intp_false): New.
* hooks.h: Update.
* config/alpha/alpha.c (alpha_rtx_cost_data): New.
(alpha_rtx_costs, TARGET_RTX_COSTS): New.
* config/alpha/alpha.h (PROCESSOR_MAX): New.
(CONST_COSTS, RTX_COSTS): Remove.
* config/arc/arc.c, config/arc/arc.h, config/c4x/c4x.c,
config/c4x/c4x.h, config/cris/cris.c, config/cris/cris.h,
config/d30v/d30v.c, config/d30v/d30v.h, config/dsp16xx/dsp16xx.c,
config/dsp16xx/dsp16xx.h, config/frv/frv.c, config/frv/frv.h,
config/h8300/h8300.c, config/h8300/h8300.h, config/i370/i370.c,
config/i370/i370.h, config/i386/i386.c, config/i386/i386.h,
config/i960/i960.c, config/i960/i960.h, config/ia64/ia64.c,
config/ia64/ia64.h, config/m32r/m32r.c, config/m32r/m32r.h,
config/m68k/m68k.c, config/m68k/m68k.h, config/m88k/m88k.c,
config/m88k/m88k.h, config/mcore/mcore.c, config/mcore/mcore.h,
config/mips/mips.c, config/mips/mips.h, config/mn10200/mn10200.c,
config/mn10200/mn10200.h, config/mn10300/mn10300.c,
config/mn10300/mn10300.h, config/ns32k/ns32k.c, config/ns32k/ns32k.h,
config/pa/pa.c, config/pa/pa.h, config/pdp11/pdp11.c,
config/pdp11/pdp11.h, config/romp/romp.c, config/romp/romp.h,
config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/s390/s390.c,
config/s390/s390.h, config/sh/sh.c, config/sh/sh.h,
config/stormy16/stormy16.c, config/stormy16/stormy16.h,
config/v850/v850.c, config/v850/v850.h,
config/xtensa/xtensa.c, config/xtensa/xtensa.h
(CONST_COSTS, RTX_COSTS): Move code ...
(foo_rtx_costs, TARGET_RTX_COSTS): ... here.
* config/arm/arm.c (arm_rtx_costs_1): Rename from arm_rtx_costs.
(arm_rtx_costs, TARGET_RTX_COSTS): New.
* config/arm/arm-protos.h: Update.
* config/arm/arm.h (DEFAULT_RTX_COSTS): Remove.
* config/avr/avr.h (CONST_COSTS): Move code ...
* config/avr/avr.c (avr_rtx_costs): ... here.
(default_rtx_costs): Make static.
* config/avr/avr-protos.h: Update.
* config/h8300/h8300.c (const_costs): Make static.
(h8300_and_costs, h8300_shift_costs): Likewise.
* config/h8300/h8300-protos.h: Update.
* config/ip2k/ip2k.h (DEFAULT_RTX_COSTS): Remove.
(CONST_COSTS): Move code ...
* config/ip2k/ip2k.c (ip2k_rtx_costs): ... here. Rename from
default_rtx_costs; update for signature change.
* config/ip2k/ip2k-protos.h: Update.
* config/m68hc11/m68hc11.h (RTX_COSTS): Remove.
(CONST_COSTS): Move code ...
* config/m68hc11/m68hc11.c (m68hc11_rtx_costs): ... here.
(TARGET_RTX_COSTS): New.
(m68hc11_rtx_costs_1): Rename from m68hc11_rtx_costs; make static.
* config/m68hc11/m68hc11-protos.h: Update.
* config/m68k/m68k.c (const_int_cost): Make static.
* config/m68k/m68k-protos.h: Update.
* config/mcore/mcore.c (mcore_const_costs): Make static.
(mcore_and_cost, mcore_ior_cost): Likewise.
* config/mcore/mcore-protos.h: Update.
* config/mmix/mmix.c (mmix_rtx_costs, TARGET_RTX_COSTS): New.
(mmix_rtx_cost_recalculated): Remove.
* config/mmix/mmix.h (DEFAULT_RTX_COSTS): Remove.
* config/mmix/mmix-protos.h: Update.
* config/sh/sh.c (shiftcosts): Make static.
(addsubcosts, andcosts, multcosts): Likewise.
* config/sh/sh-protos.h: Update.
* config/sparc/sparc.c (TARGET_RTX_COSTS): New.
(sparc_rtx_costs): Make static; update for change in signature.
* config/sparc/sparc.h (RTX_COSTS_CASES, RTX_COSTS): Remove.
* config/sparc/sparc-protos.h: Update.
* config/v850/v850.c (const_costs): Make static.
* config/v850/v850-protos.h: Update.
* config/vax/vax.h (RTX_COSTS): Remove.
(CONST_COSTS): Move code ...
* config/vax/vax.c (vax_rtx_costs_1): ... here; rename
from vax_rtx_cost.
(vax_rtx_costs, TARGET_RTX_COSTS): New.
From-SVN: r61954
2003-01-28 05:46:33 +01:00
|
|
|
|
|
|
|
The hook returns true when all subexpressions of @var{x} have been
|
|
|
|
processed, and false when @code{rtx_cost} should recurse.
|
|
|
|
@end deftypefn
|
|
|
|
|
target.h (targetm.address_cost): New.
* target.h (targetm.address_cost): New.
* target-def.h (TARGET_ADDRESS_COST): New.
(TARGET_RTX_COSTS): Uncomment. Oops.
* cse.c (address_cost): Use new target hook.
(default_address_cost): New.
* output.h (default_address_cost): Declare.
* hooks.c (hook_int_rtx_0): New.
* hooks.h (hook_int_rtx_0): Declare.
* loop.c (combine_givs_p): Remove if 0 code.
* system.h (ADDRESS_COST): Poison.
* config/alpha/alpha.c, config/alpha/alpha.h, config/d30v/d30v.c,
config/d30v/d30v.h, config/ia64/ia64.c, config/ia64/ia64.h,
config/m32r/m32r.c, config/m32r/m32r.h, config/mcore/mcore.c,
config/mcore/mcore.h, config/mmix/mmix.c, config/mmix/mmix.h,
config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/sparc/sparc.c,
config/sparc/sparc.h, config/v850/v850.c, config/v850/v850.h,
config/xtensa/xtensa.c, config/xtensa/xtensa.h
(TARGET_ADDRESS_COST): Define as hook_int_rtx_0.
(ADDRESS_COST): Remove.
* config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h,
config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.h,
config/c4x/c4x-protos.h, config/c4x/c4x.c, config/c4x/c4x.h,
config/dsp16xx/dsp16xx-protos.h, config/dsp16xx/dsp16xx.c,
config/dsp16xx/dsp16xx.h, config/i386/i386-protos.h,
config/i386/i386.c, config/i386/i386.h, config/i960/i960-protos.h,
config/i960/i960.c, config/i960/i960.h, config/ip2k/ip2k-protos.h,
config/ip2k/ip2k.c, config/ip2k/ip2k.h, config/mips/mips-protos.h,
config/mips/mips.c, config/mips/mips.h,
config/m68hc11/m68hc11-protos.h, config/m68hc11/m68hc11.c,
config/m68hc11/m68hc11.h, config/ns32k/ns32k-protos.h,
config/ns32k/ns32k.c, config/ns32k/ns32k.h, config/pa/pa-protos.h,
config/pa/pa.c, config/pa/pa.h, config/s390/s390-protos.h,
config/s390/s390.c, config/s390/s390.h, config/vax/vax-protos.h,
config/vax/vax.c, config/vax/vax.h
(foo_address_cost): Make static.
(TARGET_ADDRESS_COST): New.
(ADDRESS_COST): Remove.
* config/arm/arm.h, config/arm/arm.c, config/m88k/m88k.h,
config/m88k/m88k.c, config/romp/romp.h, config/romp/romp.c,
config/sh/sh.c, config/sh/sh.h, config/stormy16/stormy16.c,
config/stormy16/stormy16.h
(ADDRESS_COST): Move code ...
(foo_address_cost): ... here.
(TARGET_ADDRESS_COST): New.
* config/m32r/m32r.c (m32r_address_cost): Remove.
* config/m32r/m32r-protos.h: Update.
* config/mmix/mmix.c (mmix_address_cost): Remove.
* config/mmix/mmix-protos.h: Update.
* config/mn10300/mn10300.c (mn10300_address_cost_1): Rename from
mn10300_address_cost; move unsig allocation ...
(mn10300_address_cost): ... here.
(TARGET_ADDRESS_COST): New.
* config/mn10300/mn10300-protos.h: Update.
* config/mn10300/mn10300.h (ADDRESS_COST): Remove.
From-SVN: r61989
2003-01-28 19:14:42 +01:00
|
|
|
@deftypefn {Target Hook} int TARGET_ADDRESS_COST (rtx @var{address})
|
|
|
|
This hook computes the cost of an addressing mode that contains
|
|
|
|
@var{address}. If not defined, the cost is computed from
|
|
|
|
the @var{address} expression and the @code{TARGET_RTX_COST} hook.
|
|
|
|
|
|
|
|
For most CISC machines, the default cost is a good approximation of the
|
|
|
|
true cost of the addressing mode. However, on RISC machines, all
|
|
|
|
instructions normally have the same length and execution time. Hence
|
|
|
|
all addresses will have equal costs.
|
|
|
|
|
|
|
|
In cases where more than one form of an address is known, the form with
|
|
|
|
the lowest cost will be used. If multiple forms have the same, lowest,
|
|
|
|
cost, the one that is the most complex will be used.
|
|
|
|
|
|
|
|
For example, suppose an address that is equal to the sum of a register
|
|
|
|
and a constant is used twice in the same basic block. When this macro
|
|
|
|
is not defined, the address will be computed in a register and memory
|
|
|
|
references will be indirect through that register. On machines where
|
|
|
|
the cost of the addressing mode containing the sum is no higher than
|
|
|
|
that of a simple indirect reference, this will produce an additional
|
|
|
|
instruction and possibly require an additional register. Proper
|
|
|
|
specification of this macro eliminates this overhead for such machines.
|
|
|
|
|
|
|
|
This hook is never called with an invalid address.
|
|
|
|
|
|
|
|
On machines where an address involving more than one register is as
|
|
|
|
cheap as an address computation involving only one register, defining
|
|
|
|
@code{TARGET_ADDRESS_COST} to reflect this can cause two registers to
|
|
|
|
be live over a region of code where only one would have been if
|
|
|
|
@code{TARGET_ADDRESS_COST} were not defined in that manner. This effect
|
|
|
|
should be considered in the definition of this macro. Equivalent costs
|
|
|
|
should probably only be given to addresses with different numbers of
|
|
|
|
registers on machines with lots of registers.
|
|
|
|
@end deftypefn
|
|
|
|
|
haifa-sched.c: Convert to target hooks.
* haifa-sched.c: Convert to target hooks. Macros replaced
are ISSUE_RATE, ADJUST_COST, ADJUST_PRIORITY, MD_SCHED_INIT,
MD_SCHED_REORDER, MD_SCHED_REORDER2, MD_SCHED_VARIABLE_ISSUE,
MD_SCHED_FINISH, and HAVE_cycle_display.
* target-def.h (TARGET_SCHED_ADJUST_COST,
TARGET_SCHED_ADJUST_PRIORITY, TARGET_SCHED_ISSUE_RATE,
TARGET_SCHED_VARIABLE_ISSUE, TARGET_SCHED_INIT,
TARGET_SCHED_FINISH, TARGET_SCHED_REORDER,
TARGET_SCHED_REORDER2, TARGET_SCHED_CYCLE_DISPLAY):
New hook #defines to be overridden.
(TARGET_SCHED): Bring them all together.
(TARGET_INITIALIZER): Update.
* target.h: Don't forward declare struct rtx_def. Use 'rtx'
instead of 'struct rtx_def *' throughout.
(struct sched): New set of hooks for the scheduler.
* Makefile.in (haifa-sched.o): Depend on target.h.
* doc/tm.texi: Document the new scheduler hooks, together in
their own section, instead of scattered around.
Fix a bunch of underfull/overfull hboxes.
* a29k.h, alpha.h, arm.h, c4x.h, convex.h, d30v.h, i386.h,
ia64.h, m32r.h, m88k.h, mips.h, pa.h, rs6000.h, s390.h, sh.h,
sparc.h: Don't define any of the old scheduler macros.
* a29k.c, alpha.c, arm.c, c4x.c, convex.c, d30v.c, i386.c,
ia64.c, m32r.c, m88k.c, mips.c, pa.c, rs6000.c, s390.c, sh.c,
sparc.c: Create hook functions from code extracted from
corresponding target header, or make existing hooks static, as
appropriate. Set the appropriate entries in targetm.
* alpha-protos.h, arm-protos.h, c4x-protos.h, d30v-protos.h,
i386-protos.h, ia64-protos.h, m32r-protos.h, pa-protos.h,
rs6000-protos.h, s390-protos.h, sparc-protos.h:
Remove prototypes for functions which are now static.
* d30v.h, d30v.c, m32r.h, m32r.c: Remove #ifdef HAIFA and
related gunk; the Haifa scheduler is now the only choice.
From-SVN: r45009
2001-08-18 22:25:54 +02:00
|
|
|
@node Scheduling
|
|
|
|
@section Adjusting the Instruction Scheduler
|
|
|
|
|
|
|
|
The instruction scheduler may need a fair amount of machine-specific
|
|
|
|
adjustment in order to produce good code. GCC provides several target
|
|
|
|
hooks for this purpose. It is usually enough to define just a few of
|
|
|
|
them: try the first ones in this list first.
|
|
|
|
|
|
|
|
@deftypefn {Target Hook} int TARGET_SCHED_ISSUE_RATE (void)
|
2002-04-30 00:34:36 +02:00
|
|
|
This hook returns the maximum number of instructions that can ever
|
|
|
|
issue at the same time on the target machine. The default is one.
|
|
|
|
Although the insn scheduler can define itself the possibility of issue
|
|
|
|
an insn on the same cycle, the value can serve as an additional
|
|
|
|
constraint to issue insns on the same simulated processor cycle (see
|
|
|
|
hooks @samp{TARGET_SCHED_REORDER} and @samp{TARGET_SCHED_REORDER2}).
|
|
|
|
This value must be constant over the entire compilation. If you need
|
|
|
|
it to vary depending on what the instructions are, you must use
|
haifa-sched.c: Convert to target hooks.
* haifa-sched.c: Convert to target hooks. Macros replaced
are ISSUE_RATE, ADJUST_COST, ADJUST_PRIORITY, MD_SCHED_INIT,
MD_SCHED_REORDER, MD_SCHED_REORDER2, MD_SCHED_VARIABLE_ISSUE,
MD_SCHED_FINISH, and HAVE_cycle_display.
* target-def.h (TARGET_SCHED_ADJUST_COST,
TARGET_SCHED_ADJUST_PRIORITY, TARGET_SCHED_ISSUE_RATE,
TARGET_SCHED_VARIABLE_ISSUE, TARGET_SCHED_INIT,
TARGET_SCHED_FINISH, TARGET_SCHED_REORDER,
TARGET_SCHED_REORDER2, TARGET_SCHED_CYCLE_DISPLAY):
New hook #defines to be overridden.
(TARGET_SCHED): Bring them all together.
(TARGET_INITIALIZER): Update.
* target.h: Don't forward declare struct rtx_def. Use 'rtx'
instead of 'struct rtx_def *' throughout.
(struct sched): New set of hooks for the scheduler.
* Makefile.in (haifa-sched.o): Depend on target.h.
* doc/tm.texi: Document the new scheduler hooks, together in
their own section, instead of scattered around.
Fix a bunch of underfull/overfull hboxes.
* a29k.h, alpha.h, arm.h, c4x.h, convex.h, d30v.h, i386.h,
ia64.h, m32r.h, m88k.h, mips.h, pa.h, rs6000.h, s390.h, sh.h,
sparc.h: Don't define any of the old scheduler macros.
* a29k.c, alpha.c, arm.c, c4x.c, convex.c, d30v.c, i386.c,
ia64.c, m32r.c, m88k.c, mips.c, pa.c, rs6000.c, s390.c, sh.c,
sparc.c: Create hook functions from code extracted from
corresponding target header, or make existing hooks static, as
appropriate. Set the appropriate entries in targetm.
* alpha-protos.h, arm-protos.h, c4x-protos.h, d30v-protos.h,
i386-protos.h, ia64-protos.h, m32r-protos.h, pa-protos.h,
rs6000-protos.h, s390-protos.h, sparc-protos.h:
Remove prototypes for functions which are now static.
* d30v.h, d30v.c, m32r.h, m32r.c: Remove #ifdef HAIFA and
related gunk; the Haifa scheduler is now the only choice.
From-SVN: r45009
2001-08-18 22:25:54 +02:00
|
|
|
@samp{TARGET_SCHED_VARIABLE_ISSUE}.
|
2002-04-30 00:34:36 +02:00
|
|
|
|
genattr.c (struct range, [...]): Remove them.
2004-07-19 Paolo Bonzini <bonzini@gnu.org>
* genattr.c (struct range, struct function_unit,
write_units, extend_range, init_range): Remove them.
(main): Remove code dealing with DEFINE_FUNCTION_UNIT.
Output "#define INSN_SCHEDULING" here.
* genattrtab.c (struct range, struct function_unit_op,
struct function_unit, struct dimension, enum operator,
operate_exp, expand_units, simplify_knowing,
encode_units_mask, simplify_by_exploding,
find_and_mark_used_attributes, unmark_used_attributes,
add_values_to_cover, increment_current_value,
test_for_current_value, simplify_with_current_value,
simplify_with_current_value_aux, gen_unit,
write_unit_name, write_function_unit_info,
write_complex_function, write_toplevel_expr,
find_single_value, extend_range): Remove.
(write_attr_get): Do not handle common_av->value
being an FFS.
(struct attr_desc): Remove func_units_p and blockage_p.
(write_attr_valueq): Do not handle them.
(find_attr): Do not clear them.
(make_internal_attr): Do not initialize them.
(main): Remove code dealing with DEFINE_FUNCTION_UNIT.
* sched-vis.c (init_target_units, insn_print_units,
init_block_visualization, print_block_visualization,
visualize_scheduled_insns, visualize_no_unit,
visualize_stall_cycles, visualize_alloc,
visualize_free, target_units, get_visual_tbl_length,
MAX_VISUAL_LINES, INSN_LEN, n_visual_lines,
visual_tbl_line_length, visual_tbl, n_vis_no_unit,
MAX_VISUAL_NO_UNIT, vis_no_unit): Remove.
* haifa-sched.c (blockage_range, clear_units,
schedule_unit, actual_hazard, potential_hazard,
insn_unit, unit_last_insn, unit_tick,
actual_hazard_this_instance, potential_hazard,
schedule_unit, max_insn_queue_index_value): Remove.
(MAX_INSN_QUEUE_INDEX): Removed, renamed throughout to
max_insn_queue_index.
* rtl.def (DEFINE_FUNCTION_UNIT): Remove.
* doc/md.texi (Processor pipeline description): Remove
references to old pipeline descriptions.
(Automaton pipeline description): Merge with the above.
(Old pipeline description, Comparison of the two descriptions):
Remove.
* bt-load.c (migrate_btr_def): Remove references to
use_pipeline_interface.
* haifa-sched.c (insn_cost, schedule_insn,
schedule_block, advance_one_cycle, sched_init,
queue_to_ready, sched_finish): Likewise.
* modulo-sched.c (sms_schedule, advance_one_cycle,
ps_has_conflicts): Likewise.
* sched-rgn.c (init_ready): Likewise.
(debug_dependencies): Likewise, and remove an "if (1)".
* target.h (use_dfa_pipeline_interface): Remove.
* config/alpha/alpha.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove.
* config/arc/arc.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove.
* config/arm/arm.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove.
* config/c4x/c4x.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove.
* config/frv/frv.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove.
* config/i386/i386.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove.
* config/ia64/ia64.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove.
* config/iq2000/iq2000.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove.
* config/m32r/m32r.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove.
* config/mcore/mcore.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove.
* config/mips/mips.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove.
* config/pa/pa.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove.
* config/rs6000/rs6000.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove.
* config/s390/s390.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove.
* config/sh/sh.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove.
* config/sparc/sparc.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove.
* config/v850/v850.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove.
* config/xtensa/xtensa.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove.
* doc/tm.texi (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove.
From-SVN: r84944
2004-07-20 09:27:18 +02:00
|
|
|
You could define this hook to return the value of the macro
|
|
|
|
@code{MAX_DFA_ISSUE_RATE}.
|
haifa-sched.c: Convert to target hooks.
* haifa-sched.c: Convert to target hooks. Macros replaced
are ISSUE_RATE, ADJUST_COST, ADJUST_PRIORITY, MD_SCHED_INIT,
MD_SCHED_REORDER, MD_SCHED_REORDER2, MD_SCHED_VARIABLE_ISSUE,
MD_SCHED_FINISH, and HAVE_cycle_display.
* target-def.h (TARGET_SCHED_ADJUST_COST,
TARGET_SCHED_ADJUST_PRIORITY, TARGET_SCHED_ISSUE_RATE,
TARGET_SCHED_VARIABLE_ISSUE, TARGET_SCHED_INIT,
TARGET_SCHED_FINISH, TARGET_SCHED_REORDER,
TARGET_SCHED_REORDER2, TARGET_SCHED_CYCLE_DISPLAY):
New hook #defines to be overridden.
(TARGET_SCHED): Bring them all together.
(TARGET_INITIALIZER): Update.
* target.h: Don't forward declare struct rtx_def. Use 'rtx'
instead of 'struct rtx_def *' throughout.
(struct sched): New set of hooks for the scheduler.
* Makefile.in (haifa-sched.o): Depend on target.h.
* doc/tm.texi: Document the new scheduler hooks, together in
their own section, instead of scattered around.
Fix a bunch of underfull/overfull hboxes.
* a29k.h, alpha.h, arm.h, c4x.h, convex.h, d30v.h, i386.h,
ia64.h, m32r.h, m88k.h, mips.h, pa.h, rs6000.h, s390.h, sh.h,
sparc.h: Don't define any of the old scheduler macros.
* a29k.c, alpha.c, arm.c, c4x.c, convex.c, d30v.c, i386.c,
ia64.c, m32r.c, m88k.c, mips.c, pa.c, rs6000.c, s390.c, sh.c,
sparc.c: Create hook functions from code extracted from
corresponding target header, or make existing hooks static, as
appropriate. Set the appropriate entries in targetm.
* alpha-protos.h, arm-protos.h, c4x-protos.h, d30v-protos.h,
i386-protos.h, ia64-protos.h, m32r-protos.h, pa-protos.h,
rs6000-protos.h, s390-protos.h, sparc-protos.h:
Remove prototypes for functions which are now static.
* d30v.h, d30v.c, m32r.h, m32r.c: Remove #ifdef HAIFA and
related gunk; the Haifa scheduler is now the only choice.
From-SVN: r45009
2001-08-18 22:25:54 +02:00
|
|
|
@end deftypefn
|
|
|
|
|
|
|
|
@deftypefn {Target Hook} int TARGET_SCHED_VARIABLE_ISSUE (FILE *@var{file}, int @var{verbose}, rtx @var{insn}, int @var{more})
|
|
|
|
This hook is executed by the scheduler after it has scheduled an insn
|
|
|
|
from the ready list. It should return the number of insns which can
|
2003-01-07 22:22:18 +01:00
|
|
|
still be issued in the current cycle. The default is
|
|
|
|
@samp{@w{@var{more} - 1}} for insns other than @code{CLOBBER} and
|
|
|
|
@code{USE}, which normally are not counted against the issue rate.
|
|
|
|
You should define this hook if some insns take more machine resources
|
|
|
|
than others, so that fewer insns can follow them in the same cycle.
|
|
|
|
@var{file} is either a null pointer, or a stdio stream to write any
|
|
|
|
debug output to. @var{verbose} is the verbose level provided by
|
|
|
|
@option{-fsched-verbose-@var{n}}. @var{insn} is the instruction that
|
|
|
|
was scheduled.
|
haifa-sched.c: Convert to target hooks.
* haifa-sched.c: Convert to target hooks. Macros replaced
are ISSUE_RATE, ADJUST_COST, ADJUST_PRIORITY, MD_SCHED_INIT,
MD_SCHED_REORDER, MD_SCHED_REORDER2, MD_SCHED_VARIABLE_ISSUE,
MD_SCHED_FINISH, and HAVE_cycle_display.
* target-def.h (TARGET_SCHED_ADJUST_COST,
TARGET_SCHED_ADJUST_PRIORITY, TARGET_SCHED_ISSUE_RATE,
TARGET_SCHED_VARIABLE_ISSUE, TARGET_SCHED_INIT,
TARGET_SCHED_FINISH, TARGET_SCHED_REORDER,
TARGET_SCHED_REORDER2, TARGET_SCHED_CYCLE_DISPLAY):
New hook #defines to be overridden.
(TARGET_SCHED): Bring them all together.
(TARGET_INITIALIZER): Update.
* target.h: Don't forward declare struct rtx_def. Use 'rtx'
instead of 'struct rtx_def *' throughout.
(struct sched): New set of hooks for the scheduler.
* Makefile.in (haifa-sched.o): Depend on target.h.
* doc/tm.texi: Document the new scheduler hooks, together in
their own section, instead of scattered around.
Fix a bunch of underfull/overfull hboxes.
* a29k.h, alpha.h, arm.h, c4x.h, convex.h, d30v.h, i386.h,
ia64.h, m32r.h, m88k.h, mips.h, pa.h, rs6000.h, s390.h, sh.h,
sparc.h: Don't define any of the old scheduler macros.
* a29k.c, alpha.c, arm.c, c4x.c, convex.c, d30v.c, i386.c,
ia64.c, m32r.c, m88k.c, mips.c, pa.c, rs6000.c, s390.c, sh.c,
sparc.c: Create hook functions from code extracted from
corresponding target header, or make existing hooks static, as
appropriate. Set the appropriate entries in targetm.
* alpha-protos.h, arm-protos.h, c4x-protos.h, d30v-protos.h,
i386-protos.h, ia64-protos.h, m32r-protos.h, pa-protos.h,
rs6000-protos.h, s390-protos.h, sparc-protos.h:
Remove prototypes for functions which are now static.
* d30v.h, d30v.c, m32r.h, m32r.c: Remove #ifdef HAIFA and
related gunk; the Haifa scheduler is now the only choice.
From-SVN: r45009
2001-08-18 22:25:54 +02:00
|
|
|
@end deftypefn
|
|
|
|
|
|
|
|
@deftypefn {Target Hook} int TARGET_SCHED_ADJUST_COST (rtx @var{insn}, rtx @var{link}, rtx @var{dep_insn}, int @var{cost})
|
2002-04-30 00:34:36 +02:00
|
|
|
This function corrects the value of @var{cost} based on the
|
|
|
|
relationship between @var{insn} and @var{dep_insn} through the
|
|
|
|
dependence @var{link}. It should return the new value. The default
|
|
|
|
is to make no adjustment to @var{cost}. This can be used for example
|
|
|
|
to specify to the scheduler using the traditional pipeline description
|
haifa-sched.c: Convert to target hooks.
* haifa-sched.c: Convert to target hooks. Macros replaced
are ISSUE_RATE, ADJUST_COST, ADJUST_PRIORITY, MD_SCHED_INIT,
MD_SCHED_REORDER, MD_SCHED_REORDER2, MD_SCHED_VARIABLE_ISSUE,
MD_SCHED_FINISH, and HAVE_cycle_display.
* target-def.h (TARGET_SCHED_ADJUST_COST,
TARGET_SCHED_ADJUST_PRIORITY, TARGET_SCHED_ISSUE_RATE,
TARGET_SCHED_VARIABLE_ISSUE, TARGET_SCHED_INIT,
TARGET_SCHED_FINISH, TARGET_SCHED_REORDER,
TARGET_SCHED_REORDER2, TARGET_SCHED_CYCLE_DISPLAY):
New hook #defines to be overridden.
(TARGET_SCHED): Bring them all together.
(TARGET_INITIALIZER): Update.
* target.h: Don't forward declare struct rtx_def. Use 'rtx'
instead of 'struct rtx_def *' throughout.
(struct sched): New set of hooks for the scheduler.
* Makefile.in (haifa-sched.o): Depend on target.h.
* doc/tm.texi: Document the new scheduler hooks, together in
their own section, instead of scattered around.
Fix a bunch of underfull/overfull hboxes.
* a29k.h, alpha.h, arm.h, c4x.h, convex.h, d30v.h, i386.h,
ia64.h, m32r.h, m88k.h, mips.h, pa.h, rs6000.h, s390.h, sh.h,
sparc.h: Don't define any of the old scheduler macros.
* a29k.c, alpha.c, arm.c, c4x.c, convex.c, d30v.c, i386.c,
ia64.c, m32r.c, m88k.c, mips.c, pa.c, rs6000.c, s390.c, sh.c,
sparc.c: Create hook functions from code extracted from
corresponding target header, or make existing hooks static, as
appropriate. Set the appropriate entries in targetm.
* alpha-protos.h, arm-protos.h, c4x-protos.h, d30v-protos.h,
i386-protos.h, ia64-protos.h, m32r-protos.h, pa-protos.h,
rs6000-protos.h, s390-protos.h, sparc-protos.h:
Remove prototypes for functions which are now static.
* d30v.h, d30v.c, m32r.h, m32r.c: Remove #ifdef HAIFA and
related gunk; the Haifa scheduler is now the only choice.
From-SVN: r45009
2001-08-18 22:25:54 +02:00
|
|
|
that an output- or anti-dependence does not incur the same cost as a
|
2002-04-30 00:34:36 +02:00
|
|
|
data-dependence. If the scheduler using the automaton based pipeline
|
|
|
|
description, the cost of anti-dependence is zero and the cost of
|
|
|
|
output-dependence is maximum of one and the difference of latency
|
|
|
|
times of the first and the second insns. If these values are not
|
|
|
|
acceptable, you could use the hook to modify them too. See also
|
genattr.c (struct range, [...]): Remove them.
2004-07-19 Paolo Bonzini <bonzini@gnu.org>
* genattr.c (struct range, struct function_unit,
write_units, extend_range, init_range): Remove them.
(main): Remove code dealing with DEFINE_FUNCTION_UNIT.
Output "#define INSN_SCHEDULING" here.
* genattrtab.c (struct range, struct function_unit_op,
struct function_unit, struct dimension, enum operator,
operate_exp, expand_units, simplify_knowing,
encode_units_mask, simplify_by_exploding,
find_and_mark_used_attributes, unmark_used_attributes,
add_values_to_cover, increment_current_value,
test_for_current_value, simplify_with_current_value,
simplify_with_current_value_aux, gen_unit,
write_unit_name, write_function_unit_info,
write_complex_function, write_toplevel_expr,
find_single_value, extend_range): Remove.
(write_attr_get): Do not handle common_av->value
being an FFS.
(struct attr_desc): Remove func_units_p and blockage_p.
(write_attr_valueq): Do not handle them.
(find_attr): Do not clear them.
(make_internal_attr): Do not initialize them.
(main): Remove code dealing with DEFINE_FUNCTION_UNIT.
* sched-vis.c (init_target_units, insn_print_units,
init_block_visualization, print_block_visualization,
visualize_scheduled_insns, visualize_no_unit,
visualize_stall_cycles, visualize_alloc,
visualize_free, target_units, get_visual_tbl_length,
MAX_VISUAL_LINES, INSN_LEN, n_visual_lines,
visual_tbl_line_length, visual_tbl, n_vis_no_unit,
MAX_VISUAL_NO_UNIT, vis_no_unit): Remove.
* haifa-sched.c (blockage_range, clear_units,
schedule_unit, actual_hazard, potential_hazard,
insn_unit, unit_last_insn, unit_tick,
actual_hazard_this_instance, potential_hazard,
schedule_unit, max_insn_queue_index_value): Remove.
(MAX_INSN_QUEUE_INDEX): Removed, renamed throughout to
max_insn_queue_index.
* rtl.def (DEFINE_FUNCTION_UNIT): Remove.
* doc/md.texi (Processor pipeline description): Remove
references to old pipeline descriptions.
(Automaton pipeline description): Merge with the above.
(Old pipeline description, Comparison of the two descriptions):
Remove.
* bt-load.c (migrate_btr_def): Remove references to
use_pipeline_interface.
* haifa-sched.c (insn_cost, schedule_insn,
schedule_block, advance_one_cycle, sched_init,
queue_to_ready, sched_finish): Likewise.
* modulo-sched.c (sms_schedule, advance_one_cycle,
ps_has_conflicts): Likewise.
* sched-rgn.c (init_ready): Likewise.
(debug_dependencies): Likewise, and remove an "if (1)".
* target.h (use_dfa_pipeline_interface): Remove.
* config/alpha/alpha.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove.
* config/arc/arc.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove.
* config/arm/arm.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove.
* config/c4x/c4x.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove.
* config/frv/frv.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove.
* config/i386/i386.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove.
* config/ia64/ia64.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove.
* config/iq2000/iq2000.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove.
* config/m32r/m32r.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove.
* config/mcore/mcore.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove.
* config/mips/mips.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove.
* config/pa/pa.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove.
* config/rs6000/rs6000.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove.
* config/s390/s390.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove.
* config/sh/sh.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove.
* config/sparc/sparc.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove.
* config/v850/v850.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove.
* config/xtensa/xtensa.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove.
* doc/tm.texi (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove.
From-SVN: r84944
2004-07-20 09:27:18 +02:00
|
|
|
@pxref{Processor pipeline description}.
|
haifa-sched.c: Convert to target hooks.
* haifa-sched.c: Convert to target hooks. Macros replaced
are ISSUE_RATE, ADJUST_COST, ADJUST_PRIORITY, MD_SCHED_INIT,
MD_SCHED_REORDER, MD_SCHED_REORDER2, MD_SCHED_VARIABLE_ISSUE,
MD_SCHED_FINISH, and HAVE_cycle_display.
* target-def.h (TARGET_SCHED_ADJUST_COST,
TARGET_SCHED_ADJUST_PRIORITY, TARGET_SCHED_ISSUE_RATE,
TARGET_SCHED_VARIABLE_ISSUE, TARGET_SCHED_INIT,
TARGET_SCHED_FINISH, TARGET_SCHED_REORDER,
TARGET_SCHED_REORDER2, TARGET_SCHED_CYCLE_DISPLAY):
New hook #defines to be overridden.
(TARGET_SCHED): Bring them all together.
(TARGET_INITIALIZER): Update.
* target.h: Don't forward declare struct rtx_def. Use 'rtx'
instead of 'struct rtx_def *' throughout.
(struct sched): New set of hooks for the scheduler.
* Makefile.in (haifa-sched.o): Depend on target.h.
* doc/tm.texi: Document the new scheduler hooks, together in
their own section, instead of scattered around.
Fix a bunch of underfull/overfull hboxes.
* a29k.h, alpha.h, arm.h, c4x.h, convex.h, d30v.h, i386.h,
ia64.h, m32r.h, m88k.h, mips.h, pa.h, rs6000.h, s390.h, sh.h,
sparc.h: Don't define any of the old scheduler macros.
* a29k.c, alpha.c, arm.c, c4x.c, convex.c, d30v.c, i386.c,
ia64.c, m32r.c, m88k.c, mips.c, pa.c, rs6000.c, s390.c, sh.c,
sparc.c: Create hook functions from code extracted from
corresponding target header, or make existing hooks static, as
appropriate. Set the appropriate entries in targetm.
* alpha-protos.h, arm-protos.h, c4x-protos.h, d30v-protos.h,
i386-protos.h, ia64-protos.h, m32r-protos.h, pa-protos.h,
rs6000-protos.h, s390-protos.h, sparc-protos.h:
Remove prototypes for functions which are now static.
* d30v.h, d30v.c, m32r.h, m32r.c: Remove #ifdef HAIFA and
related gunk; the Haifa scheduler is now the only choice.
From-SVN: r45009
2001-08-18 22:25:54 +02:00
|
|
|
@end deftypefn
|
|
|
|
|
|
|
|
@deftypefn {Target Hook} int TARGET_SCHED_ADJUST_PRIORITY (rtx @var{insn}, int @var{priority})
|
|
|
|
This hook adjusts the integer scheduling priority @var{priority} of
|
|
|
|
@var{insn}. It should return the new priority. Reduce the priority to
|
|
|
|
execute @var{insn} earlier, increase the priority to execute @var{insn}
|
|
|
|
later. Do not define this hook if you do not need to adjust the
|
|
|
|
scheduling priorities of insns.
|
|
|
|
@end deftypefn
|
|
|
|
|
|
|
|
@deftypefn {Target Hook} int TARGET_SCHED_REORDER (FILE *@var{file}, int @var{verbose}, rtx *@var{ready}, int *@var{n_readyp}, int @var{clock})
|
|
|
|
This hook is executed by the scheduler after it has scheduled the ready
|
|
|
|
list, to allow the machine description to reorder it (for example to
|
|
|
|
combine two small instructions together on @samp{VLIW} machines).
|
|
|
|
@var{file} is either a null pointer, or a stdio stream to write any
|
|
|
|
debug output to. @var{verbose} is the verbose level provided by
|
|
|
|
@option{-fsched-verbose-@var{n}}. @var{ready} is a pointer to the ready
|
|
|
|
list of instructions that are ready to be scheduled. @var{n_readyp} is
|
|
|
|
a pointer to the number of elements in the ready list. The scheduler
|
|
|
|
reads the ready list in reverse order, starting with
|
|
|
|
@var{ready}[@var{*n_readyp}-1] and going to @var{ready}[0]. @var{clock}
|
|
|
|
is the timer tick of the scheduler. You may modify the ready list and
|
|
|
|
the number of ready insns. The return value is the number of insns that
|
|
|
|
can issue this cycle; normally this is just @code{issue_rate}. See also
|
|
|
|
@samp{TARGET_SCHED_REORDER2}.
|
|
|
|
@end deftypefn
|
|
|
|
|
|
|
|
@deftypefn {Target Hook} int TARGET_SCHED_REORDER2 (FILE *@var{file}, int @var{verbose}, rtx *@var{ready}, int *@var{n_ready}, @var{clock})
|
|
|
|
Like @samp{TARGET_SCHED_REORDER}, but called at a different time. That
|
|
|
|
function is called whenever the scheduler starts a new cycle. This one
|
|
|
|
is called once per iteration over a cycle, immediately after
|
|
|
|
@samp{TARGET_SCHED_VARIABLE_ISSUE}; it can reorder the ready list and
|
|
|
|
return the number of insns to be scheduled in the same cycle. Defining
|
|
|
|
this hook can be useful if there are frequent situations where
|
|
|
|
scheduling one insn causes other insns to become ready in the same
|
|
|
|
cycle. These other insns can then be taken into account properly.
|
|
|
|
@end deftypefn
|
|
|
|
|
2003-01-10 00:15:34 +01:00
|
|
|
@deftypefn {Target Hook} void TARGET_SCHED_DEPENDENCIES_EVALUATION_HOOK (rtx @var{head}, rtx @var{tail})
|
|
|
|
This hook is called after evaluation forward dependencies of insns in
|
|
|
|
chain given by two parameter values (@var{head} and @var{tail}
|
|
|
|
correspondingly) but before insns scheduling of the insn chain. For
|
|
|
|
example, it can be used for better insn classification if it requires
|
|
|
|
analysis of dependencies. This hook can use backward and forward
|
|
|
|
dependencies of the insn scheduler because they are already
|
|
|
|
calculated.
|
|
|
|
@end deftypefn
|
|
|
|
|
haifa-sched.c: Convert to target hooks.
* haifa-sched.c: Convert to target hooks. Macros replaced
are ISSUE_RATE, ADJUST_COST, ADJUST_PRIORITY, MD_SCHED_INIT,
MD_SCHED_REORDER, MD_SCHED_REORDER2, MD_SCHED_VARIABLE_ISSUE,
MD_SCHED_FINISH, and HAVE_cycle_display.
* target-def.h (TARGET_SCHED_ADJUST_COST,
TARGET_SCHED_ADJUST_PRIORITY, TARGET_SCHED_ISSUE_RATE,
TARGET_SCHED_VARIABLE_ISSUE, TARGET_SCHED_INIT,
TARGET_SCHED_FINISH, TARGET_SCHED_REORDER,
TARGET_SCHED_REORDER2, TARGET_SCHED_CYCLE_DISPLAY):
New hook #defines to be overridden.
(TARGET_SCHED): Bring them all together.
(TARGET_INITIALIZER): Update.
* target.h: Don't forward declare struct rtx_def. Use 'rtx'
instead of 'struct rtx_def *' throughout.
(struct sched): New set of hooks for the scheduler.
* Makefile.in (haifa-sched.o): Depend on target.h.
* doc/tm.texi: Document the new scheduler hooks, together in
their own section, instead of scattered around.
Fix a bunch of underfull/overfull hboxes.
* a29k.h, alpha.h, arm.h, c4x.h, convex.h, d30v.h, i386.h,
ia64.h, m32r.h, m88k.h, mips.h, pa.h, rs6000.h, s390.h, sh.h,
sparc.h: Don't define any of the old scheduler macros.
* a29k.c, alpha.c, arm.c, c4x.c, convex.c, d30v.c, i386.c,
ia64.c, m32r.c, m88k.c, mips.c, pa.c, rs6000.c, s390.c, sh.c,
sparc.c: Create hook functions from code extracted from
corresponding target header, or make existing hooks static, as
appropriate. Set the appropriate entries in targetm.
* alpha-protos.h, arm-protos.h, c4x-protos.h, d30v-protos.h,
i386-protos.h, ia64-protos.h, m32r-protos.h, pa-protos.h,
rs6000-protos.h, s390-protos.h, sparc-protos.h:
Remove prototypes for functions which are now static.
* d30v.h, d30v.c, m32r.h, m32r.c: Remove #ifdef HAIFA and
related gunk; the Haifa scheduler is now the only choice.
From-SVN: r45009
2001-08-18 22:25:54 +02:00
|
|
|
@deftypefn {Target Hook} void TARGET_SCHED_INIT (FILE *@var{file}, int @var{verbose}, int @var{max_ready})
|
|
|
|
This hook is executed by the scheduler at the beginning of each block of
|
|
|
|
instructions that are to be scheduled. @var{file} is either a null
|
|
|
|
pointer, or a stdio stream to write any debug output to. @var{verbose}
|
|
|
|
is the verbose level provided by @option{-fsched-verbose-@var{n}}.
|
|
|
|
@var{max_ready} is the maximum number of insns in the current scheduling
|
|
|
|
region that can be live at the same time. This can be used to allocate
|
2004-09-11 10:34:26 +02:00
|
|
|
scratch space if it is needed, e.g.@: by @samp{TARGET_SCHED_REORDER}.
|
haifa-sched.c: Convert to target hooks.
* haifa-sched.c: Convert to target hooks. Macros replaced
are ISSUE_RATE, ADJUST_COST, ADJUST_PRIORITY, MD_SCHED_INIT,
MD_SCHED_REORDER, MD_SCHED_REORDER2, MD_SCHED_VARIABLE_ISSUE,
MD_SCHED_FINISH, and HAVE_cycle_display.
* target-def.h (TARGET_SCHED_ADJUST_COST,
TARGET_SCHED_ADJUST_PRIORITY, TARGET_SCHED_ISSUE_RATE,
TARGET_SCHED_VARIABLE_ISSUE, TARGET_SCHED_INIT,
TARGET_SCHED_FINISH, TARGET_SCHED_REORDER,
TARGET_SCHED_REORDER2, TARGET_SCHED_CYCLE_DISPLAY):
New hook #defines to be overridden.
(TARGET_SCHED): Bring them all together.
(TARGET_INITIALIZER): Update.
* target.h: Don't forward declare struct rtx_def. Use 'rtx'
instead of 'struct rtx_def *' throughout.
(struct sched): New set of hooks for the scheduler.
* Makefile.in (haifa-sched.o): Depend on target.h.
* doc/tm.texi: Document the new scheduler hooks, together in
their own section, instead of scattered around.
Fix a bunch of underfull/overfull hboxes.
* a29k.h, alpha.h, arm.h, c4x.h, convex.h, d30v.h, i386.h,
ia64.h, m32r.h, m88k.h, mips.h, pa.h, rs6000.h, s390.h, sh.h,
sparc.h: Don't define any of the old scheduler macros.
* a29k.c, alpha.c, arm.c, c4x.c, convex.c, d30v.c, i386.c,
ia64.c, m32r.c, m88k.c, mips.c, pa.c, rs6000.c, s390.c, sh.c,
sparc.c: Create hook functions from code extracted from
corresponding target header, or make existing hooks static, as
appropriate. Set the appropriate entries in targetm.
* alpha-protos.h, arm-protos.h, c4x-protos.h, d30v-protos.h,
i386-protos.h, ia64-protos.h, m32r-protos.h, pa-protos.h,
rs6000-protos.h, s390-protos.h, sparc-protos.h:
Remove prototypes for functions which are now static.
* d30v.h, d30v.c, m32r.h, m32r.c: Remove #ifdef HAIFA and
related gunk; the Haifa scheduler is now the only choice.
From-SVN: r45009
2001-08-18 22:25:54 +02:00
|
|
|
@end deftypefn
|
|
|
|
|
|
|
|
@deftypefn {Target Hook} void TARGET_SCHED_FINISH (FILE *@var{file}, int @var{verbose})
|
|
|
|
This hook is executed by the scheduler at the end of each block of
|
|
|
|
instructions that are to be scheduled. It can be used to perform
|
|
|
|
cleanup of any actions done by the other scheduling hooks. @var{file}
|
|
|
|
is either a null pointer, or a stdio stream to write any debug output
|
|
|
|
to. @var{verbose} is the verbose level provided by
|
|
|
|
@option{-fsched-verbose-@var{n}}.
|
|
|
|
@end deftypefn
|
|
|
|
|
target-def.h (TARGET_SCHED_INIT_GLOBAL, [...]): New macros.
2003-02-24 Sanjiv Kumar Gupta <sanjivg@noida.hcltech.com>
* target-def.h (TARGET_SCHED_INIT_GLOBAL,
TARGET_SCHED_FINISH_GLOBAL): New macros.
* target.h (md_init_global, md_finish_global): Function
declarations corresponding to new target macros.
* haifa-sched.c (sched_init, sched_finish): Allow target to
call the new schedular hooks.
* flow.c (recompute_reg_usage): Add PROP_DEATH_NOTES flag in
call to update_life_info.
* config/sh/sh.h (OVERRIDE_OPTIONS): Re-enable
flag_schedule_insns for SH4.
* config/sh/sh.c (sh_md_init_global, sh_md_finish_global,
find_set_regmode_weight, find_insn_regmode_weight,
find_regmode_weight), sh_md_init, sh_dfa_new_cycle,
sh_variable_issue, high_pressure, ready_reorder,
rank_for_reorder, swap_reorder, sh_reorder, sh_reorder2): New
functions used to throttle the insn movement in first
scheduling pass for SH.
* gcc/doc/tm.texi: Document TARGET_SCHED_INIT_GLOBAL and
TARGET_SCHED_FINISH_GLOBAL.
From-SVN: r78374
2004-02-24 18:28:33 +01:00
|
|
|
@deftypefn {Target Hook} void TARGET_SCHED_INIT_GLOBAL (FILE *@var{file}, int @var{verbose}, int @var{old_max_uid})
|
|
|
|
This hook is executed by the scheduler after function level initializations.
|
|
|
|
@var{file} is either a null pointer, or a stdio stream to write any debug output to.
|
|
|
|
@var{verbose} is the verbose level provided by @option{-fsched-verbose-@var{n}}.
|
|
|
|
@var{old_max_uid} is the maximum insn uid when scheduling begins.
|
|
|
|
@end deftypefn
|
|
|
|
|
|
|
|
@deftypefn {Target Hook} void TARGET_SCHED_FINISH_GLOBAL (FILE *@var{file}, int @var{verbose})
|
c-tree.texi, [...]: Correct end-of-sentence markup and markup of "etc.", "e.g." and "i.e.".
* doc/c-tree.texi, doc/cfg.texi, doc/contrib.texi, doc/cpp.texi,
doc/cppopts.texi, doc/extend.texi, doc/fragments.texi,
doc/frontends.texi, doc/gcov.texi, doc/hostconfig.texi,
doc/implement-c.texi, doc/install.texi, doc/invoke.texi,
doc/libgcc.texi, doc/md.texi, doc/passes.texi,
doc/portability.texi, doc/rtl.texi, doc/sourcebuild.texi,
doc/standards.texi, doc/tm.texi, doc/tree-ssa.texi,
doc/trouble.texi: Correct end-of-sentence markup and markup of
"etc.", "e.g." and "i.e.". Use @code in various places where
appropriate.
From-SVN: r90101
2004-11-05 02:36:57 +01:00
|
|
|
This is the cleanup hook corresponding to @code{TARGET_SCHED_INIT_GLOBAL}.
|
target-def.h (TARGET_SCHED_INIT_GLOBAL, [...]): New macros.
2003-02-24 Sanjiv Kumar Gupta <sanjivg@noida.hcltech.com>
* target-def.h (TARGET_SCHED_INIT_GLOBAL,
TARGET_SCHED_FINISH_GLOBAL): New macros.
* target.h (md_init_global, md_finish_global): Function
declarations corresponding to new target macros.
* haifa-sched.c (sched_init, sched_finish): Allow target to
call the new schedular hooks.
* flow.c (recompute_reg_usage): Add PROP_DEATH_NOTES flag in
call to update_life_info.
* config/sh/sh.h (OVERRIDE_OPTIONS): Re-enable
flag_schedule_insns for SH4.
* config/sh/sh.c (sh_md_init_global, sh_md_finish_global,
find_set_regmode_weight, find_insn_regmode_weight,
find_regmode_weight), sh_md_init, sh_dfa_new_cycle,
sh_variable_issue, high_pressure, ready_reorder,
rank_for_reorder, swap_reorder, sh_reorder, sh_reorder2): New
functions used to throttle the insn movement in first
scheduling pass for SH.
* gcc/doc/tm.texi: Document TARGET_SCHED_INIT_GLOBAL and
TARGET_SCHED_FINISH_GLOBAL.
From-SVN: r78374
2004-02-24 18:28:33 +01:00
|
|
|
@var{file} is either a null pointer, or a stdio stream to write any debug output to.
|
|
|
|
@var{verbose} is the verbose level provided by @option{-fsched-verbose-@var{n}}.
|
|
|
|
@end deftypefn
|
|
|
|
|
2002-04-30 00:34:36 +02:00
|
|
|
@deftypefn {Target Hook} int TARGET_SCHED_DFA_PRE_CYCLE_INSN (void)
|
|
|
|
The hook returns an RTL insn. The automaton state used in the
|
|
|
|
pipeline hazard recognizer is changed as if the insn were scheduled
|
|
|
|
when the new simulated processor cycle starts. Usage of the hook may
|
|
|
|
simplify the automaton pipeline description for some @acronym{VLIW}
|
|
|
|
processors. If the hook is defined, it is used only for the automaton
|
|
|
|
based pipeline description. The default is not to change the state
|
|
|
|
when the new simulated processor cycle starts.
|
|
|
|
@end deftypefn
|
|
|
|
|
|
|
|
@deftypefn {Target Hook} void TARGET_SCHED_INIT_DFA_PRE_CYCLE_INSN (void)
|
|
|
|
The hook can be used to initialize data used by the previous hook.
|
|
|
|
@end deftypefn
|
|
|
|
|
|
|
|
@deftypefn {Target Hook} int TARGET_SCHED_DFA_POST_CYCLE_INSN (void)
|
|
|
|
The hook is analogous to @samp{TARGET_SCHED_DFA_PRE_CYCLE_INSN} but used
|
|
|
|
to changed the state as if the insn were scheduled when the new
|
|
|
|
simulated processor cycle finishes.
|
|
|
|
@end deftypefn
|
|
|
|
|
|
|
|
@deftypefn {Target Hook} void TARGET_SCHED_INIT_DFA_POST_CYCLE_INSN (void)
|
|
|
|
The hook is analogous to @samp{TARGET_SCHED_INIT_DFA_PRE_CYCLE_INSN} but
|
|
|
|
used to initialize data used by the previous hook.
|
|
|
|
@end deftypefn
|
|
|
|
|
|
|
|
@deftypefn {Target Hook} int TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD (void)
|
|
|
|
This hook controls better choosing an insn from the ready insn queue
|
|
|
|
for the @acronym{DFA}-based insn scheduler. Usually the scheduler
|
|
|
|
chooses the first insn from the queue. If the hook returns a positive
|
|
|
|
value, an additional scheduler code tries all permutations of
|
|
|
|
@samp{TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD ()}
|
|
|
|
subsequent ready insns to choose an insn whose issue will result in
|
|
|
|
maximal number of issued insns on the same cycle. For the
|
|
|
|
@acronym{VLIW} processor, the code could actually solve the problem of
|
|
|
|
packing simple insns into the @acronym{VLIW} insn. Of course, if the
|
|
|
|
rules of @acronym{VLIW} packing are described in the automaton.
|
|
|
|
|
|
|
|
This code also could be used for superscalar @acronym{RISC}
|
|
|
|
processors. Let us consider a superscalar @acronym{RISC} processor
|
|
|
|
with 3 pipelines. Some insns can be executed in pipelines @var{A} or
|
|
|
|
@var{B}, some insns can be executed only in pipelines @var{B} or
|
|
|
|
@var{C}, and one insn can be executed in pipeline @var{B}. The
|
|
|
|
processor may issue the 1st insn into @var{A} and the 2nd one into
|
|
|
|
@var{B}. In this case, the 3rd insn will wait for freeing @var{B}
|
|
|
|
until the next cycle. If the scheduler issues the 3rd insn the first,
|
|
|
|
the processor could issue all 3 insns per cycle.
|
|
|
|
|
|
|
|
Actually this code demonstrates advantages of the automaton based
|
|
|
|
pipeline hazard recognizer. We try quickly and easy many insn
|
|
|
|
schedules to choose the best one.
|
|
|
|
|
|
|
|
The default is no multipass scheduling.
|
|
|
|
@end deftypefn
|
|
|
|
|
2003-01-10 00:15:34 +01:00
|
|
|
@deftypefn {Target Hook} int TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD_GUARD (rtx)
|
|
|
|
|
|
|
|
This hook controls what insns from the ready insn queue will be
|
|
|
|
considered for the multipass insn scheduling. If the hook returns
|
|
|
|
zero for insn passed as the parameter, the insn will be not chosen to
|
|
|
|
be issued.
|
|
|
|
|
2003-04-13 13:18:36 +02:00
|
|
|
The default is that any ready insns can be chosen to be issued.
|
2003-01-10 00:15:34 +01:00
|
|
|
@end deftypefn
|
|
|
|
|
|
|
|
@deftypefn {Target Hook} int TARGET_SCHED_DFA_NEW_CYCLE (FILE *, int, rtx, int, int, int *)
|
|
|
|
|
|
|
|
This hook is called by the insn scheduler before issuing insn passed
|
|
|
|
as the third parameter on given cycle. If the hook returns nonzero,
|
|
|
|
the insn is not issued on given processors cycle. Instead of that,
|
|
|
|
the processor cycle is advanced. If the value passed through the last
|
|
|
|
parameter is zero, the insn ready queue is not sorted on the new cycle
|
|
|
|
start as usually. The first parameter passes file for debugging
|
|
|
|
output. The second one passes the scheduler verbose level of the
|
|
|
|
debugging output. The forth and the fifth parameter values are
|
|
|
|
correspondingly processor cycle on which the previous insn has been
|
|
|
|
issued and the current processor cycle.
|
|
|
|
@end deftypefn
|
|
|
|
|
2004-02-28 20:23:37 +01:00
|
|
|
@deftypefn {Target Hook} bool TARGET_SCHED_IS_COSTLY_DEPENDENCE (rtx @var{insn1}, rtx @var{insn2}, rtx @var{dep_link}, int @var{dep_cost}, int @var{distance})
|
2003-10-09 11:08:37 +02:00
|
|
|
This hook is used to define which dependences are considered costly by
|
c-tree.texi, [...]: Remove trailing whitespace.
* doc/c-tree.texi, doc/cpp.texi, doc/extend.texi,
doc/frontends.texi, doc/gcov.texi, doc/gty.texi, doc/install.texi,
doc/invoke.texi, doc/libgcc.texi, doc/md.texi, doc/rtl.texi,
doc/sourcebuild.texi, doc/standards.texi, doc/tm.texi,
doc/trouble.texi: Remove trailing whitespace.
From-SVN: r76098
2004-01-18 12:57:17 +01:00
|
|
|
the target, so costly that it is not advisable to schedule the insns that
|
2003-10-09 11:08:37 +02:00
|
|
|
are involved in the dependence too close to one another. The parameters
|
c-tree.texi, [...]: Remove trailing whitespace.
* doc/c-tree.texi, doc/cpp.texi, doc/extend.texi,
doc/frontends.texi, doc/gcov.texi, doc/gty.texi, doc/install.texi,
doc/invoke.texi, doc/libgcc.texi, doc/md.texi, doc/rtl.texi,
doc/sourcebuild.texi, doc/standards.texi, doc/tm.texi,
doc/trouble.texi: Remove trailing whitespace.
From-SVN: r76098
2004-01-18 12:57:17 +01:00
|
|
|
to this hook are as follows: The second parameter @var{insn2} is dependent
|
|
|
|
upon the first parameter @var{insn1}. The dependence between @var{insn1}
|
|
|
|
and @var{insn2} is represented by the third parameter @var{dep_link}. The
|
|
|
|
fourth parameter @var{cost} is the cost of the dependence, and the fifth
|
|
|
|
parameter @var{distance} is the distance in cycles between the two insns.
|
2003-10-09 11:08:37 +02:00
|
|
|
The hook returns @code{true} if considering the distance between the two
|
|
|
|
insns the dependence between them is considered costly by the target,
|
|
|
|
and @code{false} otherwise.
|
|
|
|
|
|
|
|
Defining this hook can be useful in multiple-issue out-of-order machines,
|
c-tree.texi, [...]: Remove trailing whitespace.
* doc/c-tree.texi, doc/cpp.texi, doc/extend.texi,
doc/frontends.texi, doc/gcov.texi, doc/gty.texi, doc/install.texi,
doc/invoke.texi, doc/libgcc.texi, doc/md.texi, doc/rtl.texi,
doc/sourcebuild.texi, doc/standards.texi, doc/tm.texi,
doc/trouble.texi: Remove trailing whitespace.
From-SVN: r76098
2004-01-18 12:57:17 +01:00
|
|
|
where (a) it's practically hopeless to predict the actual data/resource
|
2003-10-09 11:08:37 +02:00
|
|
|
delays, however: (b) there's a better chance to predict the actual grouping
|
c-tree.texi, [...]: Remove trailing whitespace.
* doc/c-tree.texi, doc/cpp.texi, doc/extend.texi,
doc/frontends.texi, doc/gcov.texi, doc/gty.texi, doc/install.texi,
doc/invoke.texi, doc/libgcc.texi, doc/md.texi, doc/rtl.texi,
doc/sourcebuild.texi, doc/standards.texi, doc/tm.texi,
doc/trouble.texi: Remove trailing whitespace.
From-SVN: r76098
2004-01-18 12:57:17 +01:00
|
|
|
that will be formed, and (c) correctly emulating the grouping can be very
|
2003-10-09 11:08:37 +02:00
|
|
|
important. In such targets one may want to allow issuing dependent insns
|
contrib.texi, [...]: Improve Texinfo formatting.
* doc/contrib.texi, doc/cpp.texi, doc/cppopts.texi,
doc/extend.texi, doc/gcov.texi, doc/install.texi, doc/invoke.texi,
doc/libgcc.texi, doc/md.texi, doc/passes.texi,
doc/sourcebuild.texi, doc/tm.texi: Improve Texinfo formatting.
From-SVN: r89725
2004-10-28 03:00:31 +02:00
|
|
|
closer to one another---i.e., closer than the dependence distance; however,
|
2003-10-09 11:08:37 +02:00
|
|
|
not in cases of "costly dependences", which this hooks allows to define.
|
|
|
|
@end deftypefn
|
|
|
|
|
2002-04-30 00:34:36 +02:00
|
|
|
Macros in the following table are generated by the program
|
|
|
|
@file{genattr} and can be useful for writing the hooks.
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac MAX_DFA_ISSUE_RATE
|
2002-04-30 00:34:36 +02:00
|
|
|
The macro definition is generated in the automaton based pipeline
|
|
|
|
description interface. Its value is calculated from the automaton
|
|
|
|
based pipeline description and is equal to maximal number of all insns
|
|
|
|
described in constructions @samp{define_insn_reservation} which can be
|
|
|
|
issued on the same processor cycle.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2002-04-30 00:34:36 +02:00
|
|
|
|
1996-09-25 01:21:45 +02:00
|
|
|
@node Sections
|
|
|
|
@section Dividing the Output into Sections (Texts, Data, @dots{})
|
|
|
|
@c the above section title is WAY too long. maybe cut the part between
|
|
|
|
@c the (...)? --mew 10feb93
|
|
|
|
|
|
|
|
An object file is divided into sections containing different types of
|
|
|
|
data. In the most common case, there are three sections: the @dfn{text
|
|
|
|
section}, which holds instructions and read-only data; the @dfn{data
|
|
|
|
section}, which holds initialized writable data; and the @dfn{bss
|
|
|
|
section}, which holds uninitialized data. Some systems have other kinds
|
|
|
|
of sections.
|
|
|
|
|
|
|
|
The compiler must tell the assembler when to switch sections. These
|
|
|
|
macros control what commands to output to tell the assembler this. You
|
|
|
|
can also define additional sections.
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac TEXT_SECTION_ASM_OP
|
2000-09-25 15:50:51 +02:00
|
|
|
A C expression whose value is a string, including spacing, containing the
|
|
|
|
assembler operation that should precede instructions and read-only data.
|
|
|
|
Normally @code{"\t.text"} is right.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2001-08-17 21:07:46 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac HOT_TEXT_SECTION_NAME
|
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
|
|
|
If defined, a C string constant for the name of the section containing most
|
|
|
|
frequently executed functions of the program. If not defined, GCC will provide
|
|
|
|
a default definition if the target supports named sections.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
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
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac UNLIKELY_EXECUTED_TEXT_SECTION_NAME
|
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
|
|
|
If defined, a C string constant for the name of the section containing unlikely
|
|
|
|
executed functions in the program.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
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
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac DATA_SECTION_ASM_OP
|
2000-09-25 15:50:51 +02:00
|
|
|
A C expression whose value is a string, including spacing, containing the
|
|
|
|
assembler operation to identify the following data as writable initialized
|
|
|
|
data. Normally @code{"\t.data"} is right.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac READONLY_DATA_SECTION_ASM_OP
|
final.c (HAVE_READONLY_DATA_SECTION): New.
* final.c (HAVE_READONLY_DATA_SECTION): New.
(shorten_branches): Use it instead of ifdefs.
* varasm.c (enum in_section): Add in_readonly_data.
(text_section, data_section): Tidy.
(readonly_data_section): Use READONLY_DATA_SECTION_ASM_OP if present.
* config/darwin.h, config/nextstep.h, config/h8300/elf.h,
config/i860/paragon.h, config/m68k/dpx2.h, config/m68k/hp320.h
(READONLY_DATA_SECTION): Don't undef.
* config/alpha/unicosmk.h, config/h8300/elf.h, config/i386/aix386ng.h,
config/i860/paragon.h, config/m68k/dpx2.h, config/m68k/hp320.h,
config/rs6000/lynx.h (READONLY_DATA_SECTION_ASM_OP): Undef.
* config/elfos.h, config/svr3.h, config/alpha/alpha-interix.h,
config/alpha/elf.h, config/c4x/c4x.h, config/i386/i386-interix.h,
config/i386/sco5.h, config/i386/svr3gas.h, config/i860/sysv3.h,
config/m88k/m88k.h, config/pa/pa64-hpux.h (USE_CONST_SECTION): Remove.
* config/elfos.h, config/netware.h, config/alpha/alpha-interix.h,
config/alpha/elf.h, config/alpha/vms.h, config/arc/arc.h,
config/arm/coff.h, config/c4x/c4x.h, config/dsp16xx/dsp16xx.h,
config/i386/dgux.h, config/i386/i386-interix.h, config/i386/sco5.h,
config/ia64/hpux.h, config/m32r/m32r.h, config/m68k/tower-as.h,
config/m88k/m88k.h, config/mcore/mcore-pe.h, config/mips/iris6.h,
config/mips/mips.h, config/mmix/mmix.h, config/pa/pa64-hpux.h,
config/sparc/sysv4.h (READONLY_DATA_SECTION_ASM_OP): Rename from
CONST_SECTION_ASM_OP/READONLY_SECTION_ASM_OP/RDATA_SECTION_ASM_OP.
* config/elfos.h, config/netware.h, config/1750a/1750a.h,
config/a29k/a29k.h, config/alpha/alpha-interix.h, config/alpha/alpha.h,
config/arm/coff.h, config/h8300/h8300.h, config/i386/aix386ng.h,
config/i386/i386-interix.h, config/i386/osfrose.h, config/mmix/mmix.h,
config/pa/pa64-hpux.h, config/sparc/litecoff.h
(EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Remove.
* config/elfos.h, config/netware.h, config/svr3.h,
config/alpha/alpha-interix.h, config/alpha/alpha.h, config/alpha/elf.h,
config/arm/coff.h, config/c4x/c4x.h, config/dsp16xx/dsp16xx.h,
config/h8300/h8300.h, config/i386/i386-interix.h,
config/i386/osfrose.h, config/i386/svr3gas.h, config/mmix/mmix.h,
config/pa/pa64-hpux.h (READONLY_DATA_SECTION): Remove.
* config/elfos.h, config/netware.h, config/svr3.h,
config/alpha/alpha-interix.h, config/alpha/alpha.h, config/alpha/elf.h,
config/c4x/c4x.h, config/i386/aix386ng.h, config/i386/i386-interix.h,
config/i386/sco5.h, config/i386/svr3gas.h, config/mmix/mmix.h,
config/pa/pa64-hpux.h (CONST_SECTION_FUNCTION): Remove.
* config/lynx.h, config/svr3.h, config/alpha/elf.h, config/alpha/vms.h,
config/c4x/c4x.h, config/dsp16xx/dsp16xx.h, config/i386/sco5.h,
config/i386/svr3gas.h, config/i860/sysv3.h, config/i860/sysv4.h,
config/ia64/sysv4.h, config/m32r/m32r.h, config/m88k/m88k.h,
config/mcore/mcore-elf.h, config/mcore/mcore-pe.h, config/mips/elf.h,
config/mips/elf64.h, config/mips/iris6.h, config/mips/linux.h,
config/mips/mips.h, config/mips/rtems64.h, config/mips/vxworks.h,
config/rs6000/sysv4.h, config/v850/v850.h
(EXTRA_SECTIONS): Remove in_const/in_rdata.
(EXTRA_SECTION_FUNCTIONS): Remove accompanying function.
* config/svr3.h, config/c4x/c4x.h, config/i386/dgux.h,
config/i386/sco5.h, config/i386/svr3gas.h, config/ia64/aix.h,
config/m88k/dgux.h, config/mcore/mcore-pe.h, config/mmix/mmix.h,
config/sparc/sysv4.h (SELECT_RTX_SECTION): Use readonly_data_section.
* config/alpha/alpha.c (alpha_start_function): Likewise.
(alpha_write_linkage): Likewise.
* config/m32r/m32r.c (m32r_select_section): Likewise.
* config/m88k/m88k.c (m88k_select_section): Likewise.
* config/mips/mips.c (mips_select_rtx_section): Likewise.
* config/rs6000/rs6000.c (rs6000_select_rtx_section): Likewise.
(rs6000_elf_select_section): Likewise.
* config/v850/v850.c (v850_select_section): Likewise.
* config/1750a/1750a.h, config/i860/sysv3.h
(READONLY_DATA_SECTION_ASM_OP): New.
READONLY_DATA_SECTION_ASM_OP.
* config/i386/interix.c, config/i386/winnt.c
(i386_pe_unique_section): Always use .rdata prefix.
* config/pa/som.h (readonly_data): Always switch to read-only section.
(READONLY_DATA_SECTION): Predicate on flag_pic.
* config/we32k/we32k.h (READONLY_DATA_SECTION): Remove parenthesis.
* doc/tm.texi (READONLY_DATA_SECTION_ASM_OP): New.
(READONLY_DATA_SECTION): Update.
From-SVN: r53593
2002-05-18 21:27:52 +02:00
|
|
|
A C expression whose value is a string, including spacing, containing the
|
|
|
|
assembler operation to identify the following data as read-only initialized
|
|
|
|
data.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
final.c (HAVE_READONLY_DATA_SECTION): New.
* final.c (HAVE_READONLY_DATA_SECTION): New.
(shorten_branches): Use it instead of ifdefs.
* varasm.c (enum in_section): Add in_readonly_data.
(text_section, data_section): Tidy.
(readonly_data_section): Use READONLY_DATA_SECTION_ASM_OP if present.
* config/darwin.h, config/nextstep.h, config/h8300/elf.h,
config/i860/paragon.h, config/m68k/dpx2.h, config/m68k/hp320.h
(READONLY_DATA_SECTION): Don't undef.
* config/alpha/unicosmk.h, config/h8300/elf.h, config/i386/aix386ng.h,
config/i860/paragon.h, config/m68k/dpx2.h, config/m68k/hp320.h,
config/rs6000/lynx.h (READONLY_DATA_SECTION_ASM_OP): Undef.
* config/elfos.h, config/svr3.h, config/alpha/alpha-interix.h,
config/alpha/elf.h, config/c4x/c4x.h, config/i386/i386-interix.h,
config/i386/sco5.h, config/i386/svr3gas.h, config/i860/sysv3.h,
config/m88k/m88k.h, config/pa/pa64-hpux.h (USE_CONST_SECTION): Remove.
* config/elfos.h, config/netware.h, config/alpha/alpha-interix.h,
config/alpha/elf.h, config/alpha/vms.h, config/arc/arc.h,
config/arm/coff.h, config/c4x/c4x.h, config/dsp16xx/dsp16xx.h,
config/i386/dgux.h, config/i386/i386-interix.h, config/i386/sco5.h,
config/ia64/hpux.h, config/m32r/m32r.h, config/m68k/tower-as.h,
config/m88k/m88k.h, config/mcore/mcore-pe.h, config/mips/iris6.h,
config/mips/mips.h, config/mmix/mmix.h, config/pa/pa64-hpux.h,
config/sparc/sysv4.h (READONLY_DATA_SECTION_ASM_OP): Rename from
CONST_SECTION_ASM_OP/READONLY_SECTION_ASM_OP/RDATA_SECTION_ASM_OP.
* config/elfos.h, config/netware.h, config/1750a/1750a.h,
config/a29k/a29k.h, config/alpha/alpha-interix.h, config/alpha/alpha.h,
config/arm/coff.h, config/h8300/h8300.h, config/i386/aix386ng.h,
config/i386/i386-interix.h, config/i386/osfrose.h, config/mmix/mmix.h,
config/pa/pa64-hpux.h, config/sparc/litecoff.h
(EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Remove.
* config/elfos.h, config/netware.h, config/svr3.h,
config/alpha/alpha-interix.h, config/alpha/alpha.h, config/alpha/elf.h,
config/arm/coff.h, config/c4x/c4x.h, config/dsp16xx/dsp16xx.h,
config/h8300/h8300.h, config/i386/i386-interix.h,
config/i386/osfrose.h, config/i386/svr3gas.h, config/mmix/mmix.h,
config/pa/pa64-hpux.h (READONLY_DATA_SECTION): Remove.
* config/elfos.h, config/netware.h, config/svr3.h,
config/alpha/alpha-interix.h, config/alpha/alpha.h, config/alpha/elf.h,
config/c4x/c4x.h, config/i386/aix386ng.h, config/i386/i386-interix.h,
config/i386/sco5.h, config/i386/svr3gas.h, config/mmix/mmix.h,
config/pa/pa64-hpux.h (CONST_SECTION_FUNCTION): Remove.
* config/lynx.h, config/svr3.h, config/alpha/elf.h, config/alpha/vms.h,
config/c4x/c4x.h, config/dsp16xx/dsp16xx.h, config/i386/sco5.h,
config/i386/svr3gas.h, config/i860/sysv3.h, config/i860/sysv4.h,
config/ia64/sysv4.h, config/m32r/m32r.h, config/m88k/m88k.h,
config/mcore/mcore-elf.h, config/mcore/mcore-pe.h, config/mips/elf.h,
config/mips/elf64.h, config/mips/iris6.h, config/mips/linux.h,
config/mips/mips.h, config/mips/rtems64.h, config/mips/vxworks.h,
config/rs6000/sysv4.h, config/v850/v850.h
(EXTRA_SECTIONS): Remove in_const/in_rdata.
(EXTRA_SECTION_FUNCTIONS): Remove accompanying function.
* config/svr3.h, config/c4x/c4x.h, config/i386/dgux.h,
config/i386/sco5.h, config/i386/svr3gas.h, config/ia64/aix.h,
config/m88k/dgux.h, config/mcore/mcore-pe.h, config/mmix/mmix.h,
config/sparc/sysv4.h (SELECT_RTX_SECTION): Use readonly_data_section.
* config/alpha/alpha.c (alpha_start_function): Likewise.
(alpha_write_linkage): Likewise.
* config/m32r/m32r.c (m32r_select_section): Likewise.
* config/m88k/m88k.c (m88k_select_section): Likewise.
* config/mips/mips.c (mips_select_rtx_section): Likewise.
* config/rs6000/rs6000.c (rs6000_select_rtx_section): Likewise.
(rs6000_elf_select_section): Likewise.
* config/v850/v850.c (v850_select_section): Likewise.
* config/1750a/1750a.h, config/i860/sysv3.h
(READONLY_DATA_SECTION_ASM_OP): New.
READONLY_DATA_SECTION_ASM_OP.
* config/i386/interix.c, config/i386/winnt.c
(i386_pe_unique_section): Always use .rdata prefix.
* config/pa/som.h (readonly_data): Always switch to read-only section.
(READONLY_DATA_SECTION): Predicate on flag_pic.
* config/we32k/we32k.h (READONLY_DATA_SECTION): Remove parenthesis.
* doc/tm.texi (READONLY_DATA_SECTION_ASM_OP): New.
(READONLY_DATA_SECTION): Update.
From-SVN: r53593
2002-05-18 21:27:52 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac READONLY_DATA_SECTION
|
final.c (HAVE_READONLY_DATA_SECTION): New.
* final.c (HAVE_READONLY_DATA_SECTION): New.
(shorten_branches): Use it instead of ifdefs.
* varasm.c (enum in_section): Add in_readonly_data.
(text_section, data_section): Tidy.
(readonly_data_section): Use READONLY_DATA_SECTION_ASM_OP if present.
* config/darwin.h, config/nextstep.h, config/h8300/elf.h,
config/i860/paragon.h, config/m68k/dpx2.h, config/m68k/hp320.h
(READONLY_DATA_SECTION): Don't undef.
* config/alpha/unicosmk.h, config/h8300/elf.h, config/i386/aix386ng.h,
config/i860/paragon.h, config/m68k/dpx2.h, config/m68k/hp320.h,
config/rs6000/lynx.h (READONLY_DATA_SECTION_ASM_OP): Undef.
* config/elfos.h, config/svr3.h, config/alpha/alpha-interix.h,
config/alpha/elf.h, config/c4x/c4x.h, config/i386/i386-interix.h,
config/i386/sco5.h, config/i386/svr3gas.h, config/i860/sysv3.h,
config/m88k/m88k.h, config/pa/pa64-hpux.h (USE_CONST_SECTION): Remove.
* config/elfos.h, config/netware.h, config/alpha/alpha-interix.h,
config/alpha/elf.h, config/alpha/vms.h, config/arc/arc.h,
config/arm/coff.h, config/c4x/c4x.h, config/dsp16xx/dsp16xx.h,
config/i386/dgux.h, config/i386/i386-interix.h, config/i386/sco5.h,
config/ia64/hpux.h, config/m32r/m32r.h, config/m68k/tower-as.h,
config/m88k/m88k.h, config/mcore/mcore-pe.h, config/mips/iris6.h,
config/mips/mips.h, config/mmix/mmix.h, config/pa/pa64-hpux.h,
config/sparc/sysv4.h (READONLY_DATA_SECTION_ASM_OP): Rename from
CONST_SECTION_ASM_OP/READONLY_SECTION_ASM_OP/RDATA_SECTION_ASM_OP.
* config/elfos.h, config/netware.h, config/1750a/1750a.h,
config/a29k/a29k.h, config/alpha/alpha-interix.h, config/alpha/alpha.h,
config/arm/coff.h, config/h8300/h8300.h, config/i386/aix386ng.h,
config/i386/i386-interix.h, config/i386/osfrose.h, config/mmix/mmix.h,
config/pa/pa64-hpux.h, config/sparc/litecoff.h
(EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Remove.
* config/elfos.h, config/netware.h, config/svr3.h,
config/alpha/alpha-interix.h, config/alpha/alpha.h, config/alpha/elf.h,
config/arm/coff.h, config/c4x/c4x.h, config/dsp16xx/dsp16xx.h,
config/h8300/h8300.h, config/i386/i386-interix.h,
config/i386/osfrose.h, config/i386/svr3gas.h, config/mmix/mmix.h,
config/pa/pa64-hpux.h (READONLY_DATA_SECTION): Remove.
* config/elfos.h, config/netware.h, config/svr3.h,
config/alpha/alpha-interix.h, config/alpha/alpha.h, config/alpha/elf.h,
config/c4x/c4x.h, config/i386/aix386ng.h, config/i386/i386-interix.h,
config/i386/sco5.h, config/i386/svr3gas.h, config/mmix/mmix.h,
config/pa/pa64-hpux.h (CONST_SECTION_FUNCTION): Remove.
* config/lynx.h, config/svr3.h, config/alpha/elf.h, config/alpha/vms.h,
config/c4x/c4x.h, config/dsp16xx/dsp16xx.h, config/i386/sco5.h,
config/i386/svr3gas.h, config/i860/sysv3.h, config/i860/sysv4.h,
config/ia64/sysv4.h, config/m32r/m32r.h, config/m88k/m88k.h,
config/mcore/mcore-elf.h, config/mcore/mcore-pe.h, config/mips/elf.h,
config/mips/elf64.h, config/mips/iris6.h, config/mips/linux.h,
config/mips/mips.h, config/mips/rtems64.h, config/mips/vxworks.h,
config/rs6000/sysv4.h, config/v850/v850.h
(EXTRA_SECTIONS): Remove in_const/in_rdata.
(EXTRA_SECTION_FUNCTIONS): Remove accompanying function.
* config/svr3.h, config/c4x/c4x.h, config/i386/dgux.h,
config/i386/sco5.h, config/i386/svr3gas.h, config/ia64/aix.h,
config/m88k/dgux.h, config/mcore/mcore-pe.h, config/mmix/mmix.h,
config/sparc/sysv4.h (SELECT_RTX_SECTION): Use readonly_data_section.
* config/alpha/alpha.c (alpha_start_function): Likewise.
(alpha_write_linkage): Likewise.
* config/m32r/m32r.c (m32r_select_section): Likewise.
* config/m88k/m88k.c (m88k_select_section): Likewise.
* config/mips/mips.c (mips_select_rtx_section): Likewise.
* config/rs6000/rs6000.c (rs6000_select_rtx_section): Likewise.
(rs6000_elf_select_section): Likewise.
* config/v850/v850.c (v850_select_section): Likewise.
* config/1750a/1750a.h, config/i860/sysv3.h
(READONLY_DATA_SECTION_ASM_OP): New.
READONLY_DATA_SECTION_ASM_OP.
* config/i386/interix.c, config/i386/winnt.c
(i386_pe_unique_section): Always use .rdata prefix.
* config/pa/som.h (readonly_data): Always switch to read-only section.
(READONLY_DATA_SECTION): Predicate on flag_pic.
* config/we32k/we32k.h (READONLY_DATA_SECTION): Remove parenthesis.
* doc/tm.texi (READONLY_DATA_SECTION_ASM_OP): New.
(READONLY_DATA_SECTION): Update.
From-SVN: r53593
2002-05-18 21:27:52 +02:00
|
|
|
A macro naming a function to call to switch to the proper section for
|
|
|
|
read-only data. The default is to use @code{READONLY_DATA_SECTION_ASM_OP}
|
|
|
|
if defined, else fall back to @code{text_section}.
|
|
|
|
|
|
|
|
The most common definition will be @code{data_section}, if the target
|
|
|
|
does not have a special read-only data section, and does not put data
|
|
|
|
in the text section.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
final.c (HAVE_READONLY_DATA_SECTION): New.
* final.c (HAVE_READONLY_DATA_SECTION): New.
(shorten_branches): Use it instead of ifdefs.
* varasm.c (enum in_section): Add in_readonly_data.
(text_section, data_section): Tidy.
(readonly_data_section): Use READONLY_DATA_SECTION_ASM_OP if present.
* config/darwin.h, config/nextstep.h, config/h8300/elf.h,
config/i860/paragon.h, config/m68k/dpx2.h, config/m68k/hp320.h
(READONLY_DATA_SECTION): Don't undef.
* config/alpha/unicosmk.h, config/h8300/elf.h, config/i386/aix386ng.h,
config/i860/paragon.h, config/m68k/dpx2.h, config/m68k/hp320.h,
config/rs6000/lynx.h (READONLY_DATA_SECTION_ASM_OP): Undef.
* config/elfos.h, config/svr3.h, config/alpha/alpha-interix.h,
config/alpha/elf.h, config/c4x/c4x.h, config/i386/i386-interix.h,
config/i386/sco5.h, config/i386/svr3gas.h, config/i860/sysv3.h,
config/m88k/m88k.h, config/pa/pa64-hpux.h (USE_CONST_SECTION): Remove.
* config/elfos.h, config/netware.h, config/alpha/alpha-interix.h,
config/alpha/elf.h, config/alpha/vms.h, config/arc/arc.h,
config/arm/coff.h, config/c4x/c4x.h, config/dsp16xx/dsp16xx.h,
config/i386/dgux.h, config/i386/i386-interix.h, config/i386/sco5.h,
config/ia64/hpux.h, config/m32r/m32r.h, config/m68k/tower-as.h,
config/m88k/m88k.h, config/mcore/mcore-pe.h, config/mips/iris6.h,
config/mips/mips.h, config/mmix/mmix.h, config/pa/pa64-hpux.h,
config/sparc/sysv4.h (READONLY_DATA_SECTION_ASM_OP): Rename from
CONST_SECTION_ASM_OP/READONLY_SECTION_ASM_OP/RDATA_SECTION_ASM_OP.
* config/elfos.h, config/netware.h, config/1750a/1750a.h,
config/a29k/a29k.h, config/alpha/alpha-interix.h, config/alpha/alpha.h,
config/arm/coff.h, config/h8300/h8300.h, config/i386/aix386ng.h,
config/i386/i386-interix.h, config/i386/osfrose.h, config/mmix/mmix.h,
config/pa/pa64-hpux.h, config/sparc/litecoff.h
(EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Remove.
* config/elfos.h, config/netware.h, config/svr3.h,
config/alpha/alpha-interix.h, config/alpha/alpha.h, config/alpha/elf.h,
config/arm/coff.h, config/c4x/c4x.h, config/dsp16xx/dsp16xx.h,
config/h8300/h8300.h, config/i386/i386-interix.h,
config/i386/osfrose.h, config/i386/svr3gas.h, config/mmix/mmix.h,
config/pa/pa64-hpux.h (READONLY_DATA_SECTION): Remove.
* config/elfos.h, config/netware.h, config/svr3.h,
config/alpha/alpha-interix.h, config/alpha/alpha.h, config/alpha/elf.h,
config/c4x/c4x.h, config/i386/aix386ng.h, config/i386/i386-interix.h,
config/i386/sco5.h, config/i386/svr3gas.h, config/mmix/mmix.h,
config/pa/pa64-hpux.h (CONST_SECTION_FUNCTION): Remove.
* config/lynx.h, config/svr3.h, config/alpha/elf.h, config/alpha/vms.h,
config/c4x/c4x.h, config/dsp16xx/dsp16xx.h, config/i386/sco5.h,
config/i386/svr3gas.h, config/i860/sysv3.h, config/i860/sysv4.h,
config/ia64/sysv4.h, config/m32r/m32r.h, config/m88k/m88k.h,
config/mcore/mcore-elf.h, config/mcore/mcore-pe.h, config/mips/elf.h,
config/mips/elf64.h, config/mips/iris6.h, config/mips/linux.h,
config/mips/mips.h, config/mips/rtems64.h, config/mips/vxworks.h,
config/rs6000/sysv4.h, config/v850/v850.h
(EXTRA_SECTIONS): Remove in_const/in_rdata.
(EXTRA_SECTION_FUNCTIONS): Remove accompanying function.
* config/svr3.h, config/c4x/c4x.h, config/i386/dgux.h,
config/i386/sco5.h, config/i386/svr3gas.h, config/ia64/aix.h,
config/m88k/dgux.h, config/mcore/mcore-pe.h, config/mmix/mmix.h,
config/sparc/sysv4.h (SELECT_RTX_SECTION): Use readonly_data_section.
* config/alpha/alpha.c (alpha_start_function): Likewise.
(alpha_write_linkage): Likewise.
* config/m32r/m32r.c (m32r_select_section): Likewise.
* config/m88k/m88k.c (m88k_select_section): Likewise.
* config/mips/mips.c (mips_select_rtx_section): Likewise.
* config/rs6000/rs6000.c (rs6000_select_rtx_section): Likewise.
(rs6000_elf_select_section): Likewise.
* config/v850/v850.c (v850_select_section): Likewise.
* config/1750a/1750a.h, config/i860/sysv3.h
(READONLY_DATA_SECTION_ASM_OP): New.
READONLY_DATA_SECTION_ASM_OP.
* config/i386/interix.c, config/i386/winnt.c
(i386_pe_unique_section): Always use .rdata prefix.
* config/pa/som.h (readonly_data): Always switch to read-only section.
(READONLY_DATA_SECTION): Predicate on flag_pic.
* config/we32k/we32k.h (READONLY_DATA_SECTION): Remove parenthesis.
* doc/tm.texi (READONLY_DATA_SECTION_ASM_OP): New.
(READONLY_DATA_SECTION): Update.
From-SVN: r53593
2002-05-18 21:27:52 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac BSS_SECTION_ASM_OP
|
2000-09-25 15:50:51 +02:00
|
|
|
If defined, a C expression whose value is a string, including spacing,
|
|
|
|
containing the assembler operation to identify the following data as
|
|
|
|
uninitialized global data. If not defined, and neither
|
|
|
|
@code{ASM_OUTPUT_BSS} nor @code{ASM_OUTPUT_ALIGNED_BSS} are defined,
|
|
|
|
uninitialized global data will be output in the data section if
|
c-tree.texi, [...]: Use more logical markup.
* doc/c-tree.texi, doc/contrib.texi, doc/extend.texi,
doc/gcc.texi, doc/gcov.texi, doc/install-old.texi,
doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: Use more
logical markup. Use TeX quotes and dashes. Use @dots{} and
@minus{}. Avoid spaces inside @var. Update last modification
date in gcc.texi.
* doc/gcc.1, doc/gcov.1: Regenerate.
From-SVN: r43369
2001-06-14 13:08:04 +02:00
|
|
|
@option{-fno-common} is passed, otherwise @code{ASM_OUTPUT_COMMON} will be
|
2000-09-25 15:50:51 +02:00
|
|
|
used.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac INIT_SECTION_ASM_OP
|
2000-09-25 15:50:51 +02:00
|
|
|
If defined, a C expression whose value is a string, including spacing,
|
|
|
|
containing the assembler operation to identify the following data as
|
|
|
|
initialization code. If not defined, GCC will assume such a section does
|
|
|
|
not exist.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac FINI_SECTION_ASM_OP
|
2000-09-25 15:50:51 +02:00
|
|
|
If defined, a C expression whose value is a string, including spacing,
|
|
|
|
containing the assembler operation to identify the following data as
|
|
|
|
finalization code. If not defined, GCC will assume such a section does
|
|
|
|
not exist.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
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
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac CRT_CALL_STATIC_FUNCTION (@var{section_op}, @var{function})
|
Makefile.in (CRTSTUFF_CFLAGS): New.
* Makefile.in (CRTSTUFF_CFLAGS): New.
(crtbegin.o, crtend.o, crtbeginS.o, crtendS.o, crtbeginT.o): Use it.
* config.gcc (alpha-linux, alpha-freebsd, alpha-netbsd): Use plain
crtstuff.c instead of alpha assembly version.
* crtstuff.c (CRT_CALL_STATIC_FUNCTION): Rewrite to assume the
entire dummy function sequence. Use FORCE_CODE_SECTION_ALIGN
not FORCE_{INIT,FINI}_SECTION_ALIGN.
(__do_global_dtors_aux): Mark used.
(frame_dummy, __do_global_ctors_aux): Mark used.
(fini_dummy, init_dummy): Remove.
* config/alpha/crtbegin.asm: Remove file.
* config/alpha/crtend.asm: Remove file.
* config/alpha/t-crtbe: Remove file.
* config/alpha/elf.h (CRT_CALL_STATIC_FUNCTION): New.
(LINK_EH_SPEC): New.
* config/cris/cris.h (CRT_CALL_STATIC_FUNCTION): Rewrite old
FORCE_INIT_SECTION_ALIGN hack. Register __fini_start before
calling constructors.
* config/cris/linux.h (CRT_CALL_STATIC_FUNCTION): Undef.
* config/i386/i386.h (CRT_CALL_STATIC_FUNCTION): New.
* config/i386/linux.h (CRT_CALL_STATIC_FUNCTION): Replace old
CRT_END_INIT_DUMMY hack.
* config/i386/sol2.h (FORCE_CODE_SECTION_ALIGN): Replace
FORCE_{INIT,FINI}_SECTION_ALIGN.
* config/mcore/mcore-elf.h (FORCE_CODE_SECTION_ALIGN): Replace
FORCE_{INIT,FINI}_SECTION_ALIGN.
* config/s390/s390.h (CRT_CALL_STATIC_FUNCTION): Update for new
invocation sequence.
* config/sh/sh.h (CRT_CALL_STATIC_FUNCTION): Likewise.
* doc/tm.texi (CRT_CALL_STATIC_FUNCTION): Update.
(FORCE_CODE_SECTION_ALIGN): New.
From-SVN: r49261
2002-01-27 05:18:12 +01:00
|
|
|
If defined, an ASM statement that switches to a different section
|
|
|
|
via @var{section_op}, calls @var{function}, and switches back to
|
|
|
|
the text section. This is used in @file{crtstuff.c} if
|
|
|
|
@code{INIT_SECTION_ASM_OP} or @code{FINI_SECTION_ASM_OP} to calls
|
|
|
|
to initialization and finalization functions from the init and fini
|
|
|
|
sections. By default, this macro uses a simple function call. Some
|
2000-08-27 00:25:44 +02:00
|
|
|
ports need hand-crafted assembly code to avoid dependencies on
|
|
|
|
registers initialized in the function prologue or to ensure that
|
|
|
|
constant pools don't end up too far way in the text section.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2000-08-27 00:25:44 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac FORCE_CODE_SECTION_ALIGN
|
Makefile.in (CRTSTUFF_CFLAGS): New.
* Makefile.in (CRTSTUFF_CFLAGS): New.
(crtbegin.o, crtend.o, crtbeginS.o, crtendS.o, crtbeginT.o): Use it.
* config.gcc (alpha-linux, alpha-freebsd, alpha-netbsd): Use plain
crtstuff.c instead of alpha assembly version.
* crtstuff.c (CRT_CALL_STATIC_FUNCTION): Rewrite to assume the
entire dummy function sequence. Use FORCE_CODE_SECTION_ALIGN
not FORCE_{INIT,FINI}_SECTION_ALIGN.
(__do_global_dtors_aux): Mark used.
(frame_dummy, __do_global_ctors_aux): Mark used.
(fini_dummy, init_dummy): Remove.
* config/alpha/crtbegin.asm: Remove file.
* config/alpha/crtend.asm: Remove file.
* config/alpha/t-crtbe: Remove file.
* config/alpha/elf.h (CRT_CALL_STATIC_FUNCTION): New.
(LINK_EH_SPEC): New.
* config/cris/cris.h (CRT_CALL_STATIC_FUNCTION): Rewrite old
FORCE_INIT_SECTION_ALIGN hack. Register __fini_start before
calling constructors.
* config/cris/linux.h (CRT_CALL_STATIC_FUNCTION): Undef.
* config/i386/i386.h (CRT_CALL_STATIC_FUNCTION): New.
* config/i386/linux.h (CRT_CALL_STATIC_FUNCTION): Replace old
CRT_END_INIT_DUMMY hack.
* config/i386/sol2.h (FORCE_CODE_SECTION_ALIGN): Replace
FORCE_{INIT,FINI}_SECTION_ALIGN.
* config/mcore/mcore-elf.h (FORCE_CODE_SECTION_ALIGN): Replace
FORCE_{INIT,FINI}_SECTION_ALIGN.
* config/s390/s390.h (CRT_CALL_STATIC_FUNCTION): Update for new
invocation sequence.
* config/sh/sh.h (CRT_CALL_STATIC_FUNCTION): Likewise.
* doc/tm.texi (CRT_CALL_STATIC_FUNCTION): Update.
(FORCE_CODE_SECTION_ALIGN): New.
From-SVN: r49261
2002-01-27 05:18:12 +01:00
|
|
|
If defined, an ASM statement that aligns a code section to some
|
|
|
|
arbitrary boundary. This is used to force all fragments of the
|
|
|
|
@code{.init} and @code{.fini} sections to have to same alignment
|
|
|
|
and thus prevent the linker from having to add any padding.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
Makefile.in (CRTSTUFF_CFLAGS): New.
* Makefile.in (CRTSTUFF_CFLAGS): New.
(crtbegin.o, crtend.o, crtbeginS.o, crtendS.o, crtbeginT.o): Use it.
* config.gcc (alpha-linux, alpha-freebsd, alpha-netbsd): Use plain
crtstuff.c instead of alpha assembly version.
* crtstuff.c (CRT_CALL_STATIC_FUNCTION): Rewrite to assume the
entire dummy function sequence. Use FORCE_CODE_SECTION_ALIGN
not FORCE_{INIT,FINI}_SECTION_ALIGN.
(__do_global_dtors_aux): Mark used.
(frame_dummy, __do_global_ctors_aux): Mark used.
(fini_dummy, init_dummy): Remove.
* config/alpha/crtbegin.asm: Remove file.
* config/alpha/crtend.asm: Remove file.
* config/alpha/t-crtbe: Remove file.
* config/alpha/elf.h (CRT_CALL_STATIC_FUNCTION): New.
(LINK_EH_SPEC): New.
* config/cris/cris.h (CRT_CALL_STATIC_FUNCTION): Rewrite old
FORCE_INIT_SECTION_ALIGN hack. Register __fini_start before
calling constructors.
* config/cris/linux.h (CRT_CALL_STATIC_FUNCTION): Undef.
* config/i386/i386.h (CRT_CALL_STATIC_FUNCTION): New.
* config/i386/linux.h (CRT_CALL_STATIC_FUNCTION): Replace old
CRT_END_INIT_DUMMY hack.
* config/i386/sol2.h (FORCE_CODE_SECTION_ALIGN): Replace
FORCE_{INIT,FINI}_SECTION_ALIGN.
* config/mcore/mcore-elf.h (FORCE_CODE_SECTION_ALIGN): Replace
FORCE_{INIT,FINI}_SECTION_ALIGN.
* config/s390/s390.h (CRT_CALL_STATIC_FUNCTION): Update for new
invocation sequence.
* config/sh/sh.h (CRT_CALL_STATIC_FUNCTION): Likewise.
* doc/tm.texi (CRT_CALL_STATIC_FUNCTION): Update.
(FORCE_CODE_SECTION_ALIGN): New.
From-SVN: r49261
2002-01-27 05:18:12 +01:00
|
|
|
|
1996-09-25 01:21:45 +02:00
|
|
|
@findex in_text
|
|
|
|
@findex in_data
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac EXTRA_SECTIONS
|
1996-09-25 01:21:45 +02:00
|
|
|
A list of names for sections other than the standard two, which are
|
|
|
|
@code{in_text} and @code{in_data}. You need not define this macro
|
|
|
|
on a system with no other sections (that GCC needs to use).
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
@findex text_section
|
|
|
|
@findex data_section
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac EXTRA_SECTION_FUNCTIONS
|
1996-09-25 01:21:45 +02:00
|
|
|
One or more functions to be defined in @file{varasm.c}. These
|
|
|
|
functions should do jobs analogous to those of @code{text_section} and
|
|
|
|
@code{data_section}, for your additional sections. Do not define this
|
|
|
|
macro if you do not define @code{EXTRA_SECTIONS}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac JUMP_TABLES_IN_TEXT_SECTION
|
2001-10-10 01:11:55 +02:00
|
|
|
Define this macro to be an expression with a nonzero value if jump
|
1998-05-22 02:01:23 +02:00
|
|
|
tables (for @code{tablejump} insns) should be output in the text
|
|
|
|
section, along with the assembler instructions. Otherwise, the
|
|
|
|
readonly data section is used.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
This macro is irrelevant if there is no separate readonly data section.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
hooks.c (hook_tree_bool_false): New.
* hooks.c (hook_tree_bool_false): New.
* hooks.h: Declare it.
* target-def.h (TARGET_ASM_SELECT_SECTION): New.
(TARGET_ASM_UNIQUE_SECTION, TARGET_IN_SMALL_DATA_P): New.
* target.h (select_section, unique_section): New.
(in_small_data_p): New.
* varasm.c (resolve_unique_section): Use hooks instead of macros.
(variable_section, output_constant_def_contents): Likewise.
(default_select_section, default_unique_section): New.
(categorize_decl_for_section, default_elf_select_section): New.
* output.h: Declare them.
* config/darwin.h (ALIAS_SECTION, try_section_alias): Remove.
(TARGET_ASM_SELECT_SECTION): New.
(SELECT_SECTION): Move ...
* config/darwin.c (machopic_select_section): ... here.
* config/darwin-protos.h: Update.
* config/nextstep.h (TARGET_ASM_SELECT_SECTION): New.
(SELECT_SECTION): Move ...
* config/nextstep.c (nextstep_select_section): ... here.
* config/nextstep-protos.h: Update.
* config/elfos.h (UNIQUE_SECTION, SELECT_SECTION): Remove.
(TARGET_ASM_SELECT_SECTION): New.
* config/svr3.h (SELECT_SECTION): Remove.
* config/alpha/alpha.c (unicosmk_unique_section): Make static.
(TARGET_ASM_UNIQUE_SECTION) [UNICOS]: New.
(TARGET_IN_SMALL_DATA_P, alpha_in_small_data_p): New.
(alpha_encode_section_info): Use it.
* config/alpha/alpha-protos.h: Update.
* config/alpha/elf.h (DO_SELECT_SECTION): Remove.
(SELECT_SECTION, UNIQUE_SECTION): Remove.
(TARGET_ASM_SELECT_SECTION): New.
* config/alpha/unicosmk.h (UNIQUE_SECTION): Remove.
* config/arm/pe.h (UNIQUE_SECTION): Remove.
(TARGET_ASM_UNIQUE_SECTION): New.
* config/avr/avr.c (TARGET_ASM_UNIQUE_SECTION): New.
(avr_unique_section): Rename from unique_section; make static.
* config/avr/avr-protos.h: Update.
* config/avr/avr.h (UNIQUE_SECTION): Remove.
* config/c4x/c4x.h (SELECT_SECTION): Remove.
* config/i386/cygwin.h (UNIQUE_SECTION): Remove.
(TARGET_ASM_UNIQUE_SECTION): New.
* config/i386/i386-interix.h: Likewise.
* config/i386/win32.h: Likewise.
* config/i386/djgpp.h (UNIQUE_SECTION): Remove.
* config/i386/i386.c (ix86_asm_file_end): Use target hook not macro.
* config/i386/sco5.h (SELECT_SECTION): Remove.
(TARGET_ASM_SELECT_SECTION): New.
* config/i386/svr3gas.h (SELECT_SECTION): Remove.
* config/i860/paragon.h: Undef TARGET_ASM_SELECT_SECTION
instead of SELECT_SECTION.
* config/m68k/dpx2.h: Likewise.
* config/rs6000/lynx.h: Likewise.
* config/ia64/aix.h (SELECT_SECTION, UNIQUE_SECTION): Remove.
(TARGET_ASM_SELECT_SECTION, TARGET_ASM_UNIQUE_SECTION): New.
* config/ia64/ia64.c (TARGET_IN_SMALL_DATA_P): New.
(ia64_in_small_data_p): New.
(ia64_encode_section_info): Use it. Reorganize overlarge conditional.
(ia64_aix_select_section, ia64_aix_unique_section): New.
* config/ia64/sysv4.h (DO_SELECT_SECTION): Remove.
(SELECT_SECTION, UNIQUE_SECTION): Remove.
* config/m32r/m32r.h (SELECT_SECTION): Remove.
(TARGET_ASM_SELECT_SECTION): New.
* config/m32r/m32r.c (m32r_select_section): Take align argument.
* config/m32r/m32r-protos.h: Update.
* config/m88k/m88k.h (TARGET_ASM_SELECT_SECTION): New.
(SELECT_SECTION): Move ...
* config/m88k/m88k.c (m88k_select_section): ... here.
* config/mcore/mcore-pe.h (SELECT_SECTION): Remove.
* config/mcore/mcore.h (UNIQUE_SECTION): Remove.
* config/mcore/mcore.c (TARGET_ASM_UNIQUE_SECTION): New.
(mcore_unique_section): Make static.
* config/mcore/mcore-protos.h: Update.
* config/mips/elf.h (UNIQUE_SECTION): Remove.
(TARGET_ASM_UNIQUE_SECTION): New.
* config/mips/elf64.h: Likewise.
* config/mips/iris6gld.h: Likewise.
* config/mips/linux.h: Likewise.
* config/mips/mips-protos.h: Update.
* config/mips/mips.c (mips_select_section): Add align argument.
* config/mips/mips.h (SELECT_SECTION): Remove.
(TARGET_ASM_SELECT_SECTION): New.
* config/mmix/mmix.h (SELECT_SECTION, UNIQUE_SECTION): Remove.
* config/mmix/mmix.c (mmix_select_section): Remove.
(mmix_unique_section): Remove.
* config/mmix/mmix-protos.h: Update.
* config/pa/pa.h (TARGET_ASM_SELECT_SECTION): New.
(SELECT_SECTION): Move ...
* config/pa/pa.c (pa_select_section): ... here.
* config/pa/pa64-hpux.h (UNIQUE_SECTION): Remove.
* config/rs6000/rs6000.c (rs6000_elf_select_section): Rename
from rs6000_select_section and make static.
(rs6000_elf_unique_section): Similarly.
(rs6000_xcoff_select_section): From xcoff.h.
(rs6000_xcoff_unique_section): Likewise.
* config/rs6000/rs6000-protos.h: Update.
* config/rs6000/sysv4.h (SELECT_SECTION, UNIQUE_SECTION): Remove.
(TARGET_ASM_SELECT_SECTION, TARGET_ASM_UNIQUE_SECTION): New.
* config/rs6000/xcoff.h: Likewise.
* config/sparc/aout.h (TARGET_ASM_SELECT_SECTION): New.
(SELECT_SECTION): Move ...
* config/sparc/sparc.c (sparc_aout_select_section): ... here.
* config/v850/v850.h (SELECT_SECTION): Move ...
* config/v850/v850.c (v850_select_section): ... here.
(TARGET_ASM_SELECT_SECTION): New.
* config/vax/vms.h (SELECT_SECTION): Move ...
* config/vax/vax.c (vms_select_section): ... here.
(TARGET_ASM_SELECT_SECTION): New.
* doc/tm.texi: Update SELECT_SECTION and UNIQUE_SECTION docs
for the target hooks.
From-SVN: r53550
2002-05-17 09:43:41 +02:00
|
|
|
@deftypefn {Target Hook} void TARGET_ASM_SELECT_SECTION (tree @var{exp}, int @var{reloc}, unsigned HOST_WIDE_INT @var{align})
|
|
|
|
Switches to the appropriate section for output of @var{exp}. You can
|
|
|
|
assume that @var{exp} is either a @code{VAR_DECL} node or a constant of
|
|
|
|
some sort. @var{reloc} indicates whether the initial value of @var{exp}
|
|
|
|
requires link-time relocations. Bit 0 is set when variable contains
|
|
|
|
local relocations only, while bit 1 is set for global relocations.
|
|
|
|
Select the section by calling @code{data_section} or one of the
|
|
|
|
alternatives for other sections. @var{align} is the constant alignment
|
|
|
|
in bits.
|
|
|
|
|
|
|
|
The default version of this function takes care of putting read-only
|
|
|
|
variables in @code{readonly_data_section}.
|
2004-10-27 23:17:08 +02:00
|
|
|
|
|
|
|
See also @var{USE_SELECT_SECTION_FOR_FUNCTIONS}.
|
hooks.c (hook_tree_bool_false): New.
* hooks.c (hook_tree_bool_false): New.
* hooks.h: Declare it.
* target-def.h (TARGET_ASM_SELECT_SECTION): New.
(TARGET_ASM_UNIQUE_SECTION, TARGET_IN_SMALL_DATA_P): New.
* target.h (select_section, unique_section): New.
(in_small_data_p): New.
* varasm.c (resolve_unique_section): Use hooks instead of macros.
(variable_section, output_constant_def_contents): Likewise.
(default_select_section, default_unique_section): New.
(categorize_decl_for_section, default_elf_select_section): New.
* output.h: Declare them.
* config/darwin.h (ALIAS_SECTION, try_section_alias): Remove.
(TARGET_ASM_SELECT_SECTION): New.
(SELECT_SECTION): Move ...
* config/darwin.c (machopic_select_section): ... here.
* config/darwin-protos.h: Update.
* config/nextstep.h (TARGET_ASM_SELECT_SECTION): New.
(SELECT_SECTION): Move ...
* config/nextstep.c (nextstep_select_section): ... here.
* config/nextstep-protos.h: Update.
* config/elfos.h (UNIQUE_SECTION, SELECT_SECTION): Remove.
(TARGET_ASM_SELECT_SECTION): New.
* config/svr3.h (SELECT_SECTION): Remove.
* config/alpha/alpha.c (unicosmk_unique_section): Make static.
(TARGET_ASM_UNIQUE_SECTION) [UNICOS]: New.
(TARGET_IN_SMALL_DATA_P, alpha_in_small_data_p): New.
(alpha_encode_section_info): Use it.
* config/alpha/alpha-protos.h: Update.
* config/alpha/elf.h (DO_SELECT_SECTION): Remove.
(SELECT_SECTION, UNIQUE_SECTION): Remove.
(TARGET_ASM_SELECT_SECTION): New.
* config/alpha/unicosmk.h (UNIQUE_SECTION): Remove.
* config/arm/pe.h (UNIQUE_SECTION): Remove.
(TARGET_ASM_UNIQUE_SECTION): New.
* config/avr/avr.c (TARGET_ASM_UNIQUE_SECTION): New.
(avr_unique_section): Rename from unique_section; make static.
* config/avr/avr-protos.h: Update.
* config/avr/avr.h (UNIQUE_SECTION): Remove.
* config/c4x/c4x.h (SELECT_SECTION): Remove.
* config/i386/cygwin.h (UNIQUE_SECTION): Remove.
(TARGET_ASM_UNIQUE_SECTION): New.
* config/i386/i386-interix.h: Likewise.
* config/i386/win32.h: Likewise.
* config/i386/djgpp.h (UNIQUE_SECTION): Remove.
* config/i386/i386.c (ix86_asm_file_end): Use target hook not macro.
* config/i386/sco5.h (SELECT_SECTION): Remove.
(TARGET_ASM_SELECT_SECTION): New.
* config/i386/svr3gas.h (SELECT_SECTION): Remove.
* config/i860/paragon.h: Undef TARGET_ASM_SELECT_SECTION
instead of SELECT_SECTION.
* config/m68k/dpx2.h: Likewise.
* config/rs6000/lynx.h: Likewise.
* config/ia64/aix.h (SELECT_SECTION, UNIQUE_SECTION): Remove.
(TARGET_ASM_SELECT_SECTION, TARGET_ASM_UNIQUE_SECTION): New.
* config/ia64/ia64.c (TARGET_IN_SMALL_DATA_P): New.
(ia64_in_small_data_p): New.
(ia64_encode_section_info): Use it. Reorganize overlarge conditional.
(ia64_aix_select_section, ia64_aix_unique_section): New.
* config/ia64/sysv4.h (DO_SELECT_SECTION): Remove.
(SELECT_SECTION, UNIQUE_SECTION): Remove.
* config/m32r/m32r.h (SELECT_SECTION): Remove.
(TARGET_ASM_SELECT_SECTION): New.
* config/m32r/m32r.c (m32r_select_section): Take align argument.
* config/m32r/m32r-protos.h: Update.
* config/m88k/m88k.h (TARGET_ASM_SELECT_SECTION): New.
(SELECT_SECTION): Move ...
* config/m88k/m88k.c (m88k_select_section): ... here.
* config/mcore/mcore-pe.h (SELECT_SECTION): Remove.
* config/mcore/mcore.h (UNIQUE_SECTION): Remove.
* config/mcore/mcore.c (TARGET_ASM_UNIQUE_SECTION): New.
(mcore_unique_section): Make static.
* config/mcore/mcore-protos.h: Update.
* config/mips/elf.h (UNIQUE_SECTION): Remove.
(TARGET_ASM_UNIQUE_SECTION): New.
* config/mips/elf64.h: Likewise.
* config/mips/iris6gld.h: Likewise.
* config/mips/linux.h: Likewise.
* config/mips/mips-protos.h: Update.
* config/mips/mips.c (mips_select_section): Add align argument.
* config/mips/mips.h (SELECT_SECTION): Remove.
(TARGET_ASM_SELECT_SECTION): New.
* config/mmix/mmix.h (SELECT_SECTION, UNIQUE_SECTION): Remove.
* config/mmix/mmix.c (mmix_select_section): Remove.
(mmix_unique_section): Remove.
* config/mmix/mmix-protos.h: Update.
* config/pa/pa.h (TARGET_ASM_SELECT_SECTION): New.
(SELECT_SECTION): Move ...
* config/pa/pa.c (pa_select_section): ... here.
* config/pa/pa64-hpux.h (UNIQUE_SECTION): Remove.
* config/rs6000/rs6000.c (rs6000_elf_select_section): Rename
from rs6000_select_section and make static.
(rs6000_elf_unique_section): Similarly.
(rs6000_xcoff_select_section): From xcoff.h.
(rs6000_xcoff_unique_section): Likewise.
* config/rs6000/rs6000-protos.h: Update.
* config/rs6000/sysv4.h (SELECT_SECTION, UNIQUE_SECTION): Remove.
(TARGET_ASM_SELECT_SECTION, TARGET_ASM_UNIQUE_SECTION): New.
* config/rs6000/xcoff.h: Likewise.
* config/sparc/aout.h (TARGET_ASM_SELECT_SECTION): New.
(SELECT_SECTION): Move ...
* config/sparc/sparc.c (sparc_aout_select_section): ... here.
* config/v850/v850.h (SELECT_SECTION): Move ...
* config/v850/v850.c (v850_select_section): ... here.
(TARGET_ASM_SELECT_SECTION): New.
* config/vax/vms.h (SELECT_SECTION): Move ...
* config/vax/vax.c (vms_select_section): ... here.
(TARGET_ASM_SELECT_SECTION): New.
* doc/tm.texi: Update SELECT_SECTION and UNIQUE_SECTION docs
for the target hooks.
From-SVN: r53550
2002-05-17 09:43:41 +02:00
|
|
|
@end deftypefn
|
|
|
|
|
2004-10-27 23:17:08 +02:00
|
|
|
@defmac USE_SELECT_SECTION_FOR_FUNCTIONS
|
|
|
|
Define this macro if you wish TARGET_ASM_SELECT_SECTION to be called
|
|
|
|
for @code{FUNCTION_DECL}s as well as for variables and constants.
|
|
|
|
|
|
|
|
In the case of a @code{FUNCTION_DECL}, @var{reloc} will be zero if the
|
|
|
|
function has been determined to be likely to be called, and nonzero if
|
|
|
|
it is unlikely to be called.
|
|
|
|
@end defmac
|
|
|
|
|
hooks.c (hook_tree_bool_false): New.
* hooks.c (hook_tree_bool_false): New.
* hooks.h: Declare it.
* target-def.h (TARGET_ASM_SELECT_SECTION): New.
(TARGET_ASM_UNIQUE_SECTION, TARGET_IN_SMALL_DATA_P): New.
* target.h (select_section, unique_section): New.
(in_small_data_p): New.
* varasm.c (resolve_unique_section): Use hooks instead of macros.
(variable_section, output_constant_def_contents): Likewise.
(default_select_section, default_unique_section): New.
(categorize_decl_for_section, default_elf_select_section): New.
* output.h: Declare them.
* config/darwin.h (ALIAS_SECTION, try_section_alias): Remove.
(TARGET_ASM_SELECT_SECTION): New.
(SELECT_SECTION): Move ...
* config/darwin.c (machopic_select_section): ... here.
* config/darwin-protos.h: Update.
* config/nextstep.h (TARGET_ASM_SELECT_SECTION): New.
(SELECT_SECTION): Move ...
* config/nextstep.c (nextstep_select_section): ... here.
* config/nextstep-protos.h: Update.
* config/elfos.h (UNIQUE_SECTION, SELECT_SECTION): Remove.
(TARGET_ASM_SELECT_SECTION): New.
* config/svr3.h (SELECT_SECTION): Remove.
* config/alpha/alpha.c (unicosmk_unique_section): Make static.
(TARGET_ASM_UNIQUE_SECTION) [UNICOS]: New.
(TARGET_IN_SMALL_DATA_P, alpha_in_small_data_p): New.
(alpha_encode_section_info): Use it.
* config/alpha/alpha-protos.h: Update.
* config/alpha/elf.h (DO_SELECT_SECTION): Remove.
(SELECT_SECTION, UNIQUE_SECTION): Remove.
(TARGET_ASM_SELECT_SECTION): New.
* config/alpha/unicosmk.h (UNIQUE_SECTION): Remove.
* config/arm/pe.h (UNIQUE_SECTION): Remove.
(TARGET_ASM_UNIQUE_SECTION): New.
* config/avr/avr.c (TARGET_ASM_UNIQUE_SECTION): New.
(avr_unique_section): Rename from unique_section; make static.
* config/avr/avr-protos.h: Update.
* config/avr/avr.h (UNIQUE_SECTION): Remove.
* config/c4x/c4x.h (SELECT_SECTION): Remove.
* config/i386/cygwin.h (UNIQUE_SECTION): Remove.
(TARGET_ASM_UNIQUE_SECTION): New.
* config/i386/i386-interix.h: Likewise.
* config/i386/win32.h: Likewise.
* config/i386/djgpp.h (UNIQUE_SECTION): Remove.
* config/i386/i386.c (ix86_asm_file_end): Use target hook not macro.
* config/i386/sco5.h (SELECT_SECTION): Remove.
(TARGET_ASM_SELECT_SECTION): New.
* config/i386/svr3gas.h (SELECT_SECTION): Remove.
* config/i860/paragon.h: Undef TARGET_ASM_SELECT_SECTION
instead of SELECT_SECTION.
* config/m68k/dpx2.h: Likewise.
* config/rs6000/lynx.h: Likewise.
* config/ia64/aix.h (SELECT_SECTION, UNIQUE_SECTION): Remove.
(TARGET_ASM_SELECT_SECTION, TARGET_ASM_UNIQUE_SECTION): New.
* config/ia64/ia64.c (TARGET_IN_SMALL_DATA_P): New.
(ia64_in_small_data_p): New.
(ia64_encode_section_info): Use it. Reorganize overlarge conditional.
(ia64_aix_select_section, ia64_aix_unique_section): New.
* config/ia64/sysv4.h (DO_SELECT_SECTION): Remove.
(SELECT_SECTION, UNIQUE_SECTION): Remove.
* config/m32r/m32r.h (SELECT_SECTION): Remove.
(TARGET_ASM_SELECT_SECTION): New.
* config/m32r/m32r.c (m32r_select_section): Take align argument.
* config/m32r/m32r-protos.h: Update.
* config/m88k/m88k.h (TARGET_ASM_SELECT_SECTION): New.
(SELECT_SECTION): Move ...
* config/m88k/m88k.c (m88k_select_section): ... here.
* config/mcore/mcore-pe.h (SELECT_SECTION): Remove.
* config/mcore/mcore.h (UNIQUE_SECTION): Remove.
* config/mcore/mcore.c (TARGET_ASM_UNIQUE_SECTION): New.
(mcore_unique_section): Make static.
* config/mcore/mcore-protos.h: Update.
* config/mips/elf.h (UNIQUE_SECTION): Remove.
(TARGET_ASM_UNIQUE_SECTION): New.
* config/mips/elf64.h: Likewise.
* config/mips/iris6gld.h: Likewise.
* config/mips/linux.h: Likewise.
* config/mips/mips-protos.h: Update.
* config/mips/mips.c (mips_select_section): Add align argument.
* config/mips/mips.h (SELECT_SECTION): Remove.
(TARGET_ASM_SELECT_SECTION): New.
* config/mmix/mmix.h (SELECT_SECTION, UNIQUE_SECTION): Remove.
* config/mmix/mmix.c (mmix_select_section): Remove.
(mmix_unique_section): Remove.
* config/mmix/mmix-protos.h: Update.
* config/pa/pa.h (TARGET_ASM_SELECT_SECTION): New.
(SELECT_SECTION): Move ...
* config/pa/pa.c (pa_select_section): ... here.
* config/pa/pa64-hpux.h (UNIQUE_SECTION): Remove.
* config/rs6000/rs6000.c (rs6000_elf_select_section): Rename
from rs6000_select_section and make static.
(rs6000_elf_unique_section): Similarly.
(rs6000_xcoff_select_section): From xcoff.h.
(rs6000_xcoff_unique_section): Likewise.
* config/rs6000/rs6000-protos.h: Update.
* config/rs6000/sysv4.h (SELECT_SECTION, UNIQUE_SECTION): Remove.
(TARGET_ASM_SELECT_SECTION, TARGET_ASM_UNIQUE_SECTION): New.
* config/rs6000/xcoff.h: Likewise.
* config/sparc/aout.h (TARGET_ASM_SELECT_SECTION): New.
(SELECT_SECTION): Move ...
* config/sparc/sparc.c (sparc_aout_select_section): ... here.
* config/v850/v850.h (SELECT_SECTION): Move ...
* config/v850/v850.c (v850_select_section): ... here.
(TARGET_ASM_SELECT_SECTION): New.
* config/vax/vms.h (SELECT_SECTION): Move ...
* config/vax/vax.c (vms_select_section): ... here.
(TARGET_ASM_SELECT_SECTION): New.
* doc/tm.texi: Update SELECT_SECTION and UNIQUE_SECTION docs
for the target hooks.
From-SVN: r53550
2002-05-17 09:43:41 +02:00
|
|
|
@deftypefn {Target Hook} void TARGET_ASM_UNIQUE_SECTION (tree @var{decl}, int @var{reloc})
|
|
|
|
Build up a unique section name, expressed as a @code{STRING_CST} node,
|
|
|
|
and assign it to @samp{DECL_SECTION_NAME (@var{decl})}.
|
|
|
|
As with @code{TARGET_ASM_SELECT_SECTION}, @var{reloc} indicates whether
|
|
|
|
the initial value of @var{exp} requires link-time relocations.
|
|
|
|
|
|
|
|
The default version of this function appends the symbol name to the
|
|
|
|
ELF section name that would normally be used for the symbol. For
|
|
|
|
example, the function @code{foo} would be placed in @code{.text.foo}.
|
|
|
|
Whatever the actual target object format, this is often good enough.
|
|
|
|
@end deftypefn
|
|
|
|
|
2004-08-12 15:57:04 +02:00
|
|
|
@deftypefn {Target Hook} void TARGET_ASM_FUNCTION_RODATA_SECTION (tree @var{decl})
|
|
|
|
Switches to a readonly data section associated with
|
|
|
|
@samp{DECL_SECTION_NAME (@var{decl})}.
|
|
|
|
The default version of this function switches to @code{.gnu.linkonce.r.name}
|
|
|
|
section if function's section is @code{.gnu.linkonce.t.name}, to
|
|
|
|
@code{.rodata.name} if function is in @code{.text.name} section
|
|
|
|
and otherwise switches to the normal readonly data section.
|
|
|
|
@end deftypefn
|
|
|
|
|
system.h (SELECT_RTX_SECTION): Poison.
* system.h (SELECT_RTX_SECTION): Poison.
* target-def.h (TARGET_ASM_SELECT_RTX_SECTION): New.
* target.h (select_rtx_section): New.
* varasm.c (output_constant_pool): Use it.
(default_select_rtx_section, default_elf_select_rtx_section): New.
* output.h: Declare them.
* config/darwin.h (SELECT_RTX_SECTION): Move ...
* config/darwin.c (machopic_select_rtx_section): ... here.
* config/darwin-protos.h: Update.
* config/nextstep.h (SELECT_RTX_SECTION): Move ...
* config/nextstep.c (machopic_select_rtx_section): ... here.
(nextstep_select_section): Rename variable to avoid macro clash.
* config/nextstep-protos.h: Update.
* config/elfos.h, config/svr3.h, config/arm/aof.h, config/c4x/c4x.h,
config/i386/dgux.h, config/i386/osfrose.h, config/i386/sco5.h,
config/i386/svr3gas.h, config/i860/paragon.h, config/ia64/aix.h,
config/m32r/m32r.h, config/m68k/dpx2.h, config/m68k/lynx.h,
config/m68k/m68k.h, config/m68k/tower-as.h, config/m88k/dgux.h,
config/mcore/mcore-pe.h, config/mips/mips.h, config/mmix/mmix.h,
config/pa/pa-linux.h, config/pa/pa.h, config/romp/romp.h,
config/rs6000/lynx.h, config/rs6000/sysv4.h, config/s390/linux.h,
config/sparc/sysv4.h, config/xtensa/elf.h, config/xtensa/linux.h
(SELECT_RTX_SECTION): Remove.
* config/darwin.h, config/elfos.h, config/nextstep.h,
config/ia64/aix.h, config/ia64/sysv4.h, config/alpha/alpha.c,
config/mips/mips.c, config/romp/romp.c, config/rs6000/sysv4.h,
config/rs6000/xcoff.h, config/s390/s390.c, config/sparc/aout.h,
config/sparc/lynx.h, config/xtensa/xtensa.c
(TARGET_ASM_SELECT_RTX_SECTION): New.
* config/alpha/elf.h (SELECT_RTX_SECTION): Move ...
* config/alpha/alpha.c (alpha_elf_select_rtx_section): ... here.
* config/ia64/sysv4.h (SELECT_RTX_SECTION): Move ...
* config/ia64/ia64.c (ia64_select_rtx_section): ... here.
(ia64_aix_select_rtx_section): New.
* config/mips/iris6.h (READONLY_DATA_SECTION_ASM_OP): Undef before
redefining.
* config/mips/mips.c (mips_select_rtx_section): Make static.
Support ELF SHF_MERGE features.
* config/mips/mips-protos.h: Update.
* config/rs6000/xcoff.h (SELECT_RTX_SECTION): Move ...
* config/rs6000/rs6000.c (rs6000_xcoff_select_rtx_section): ... here.
(rs6000_elf_select_rtx_section): Rename from rs6000_select_rtx_section;
make static, fall back to default_elf_select_rtx_section.
* config/rs6000/rs6000-protos.h: Update.
* config/sparc/sparc.h (SELECT_RTX_SECTION): Move ...
* config/sparc/sparc.c (sparc_aout_select_rtx_section): ... here.
* config/sparc/sunos4.h (on_exit): Declare only if IN_LIBGCC2.
* config/romp/romp.c (romp_select_rtx_section): New.
* config/s390/s390.c (s390_select_rtx_section): New.
* config/xtensa/xtensa.c: Include output.h. Shuffle local function
declarations before target macro definition.
(xtensa_emit_call): Use static buffer.
(xtensa_select_rtx_section): New.
* config/xtensa/xtensa.h (MAX_INT_TYPE_SIZE): Remove.
(IMPLICIT_FIX_EXPR, EASY_DIV_EXPR): Remove.
(ASM_OUTPUT_POOL_PROLOGUE): Update call to resolve_unique_section.
* doc/tm.texi (TARGET_ASM_SELECT_RTX_SECTION): Update from
SELECT_RTX_SECTION docs.
From-SVN: r53600
2002-05-19 01:47:22 +02:00
|
|
|
@deftypefn {Target Hook} void TARGET_ASM_SELECT_RTX_SECTION (enum machine_mode @var{mode}, rtx @var{x}, unsigned HOST_WIDE_INT @var{align})
|
|
|
|
Switches to the appropriate section for output of constant pool entry
|
|
|
|
@var{x} in @var{mode}. You can assume that @var{x} is some kind of
|
|
|
|
constant in RTL@. The argument @var{mode} is redundant except in the
|
|
|
|
case of a @code{const_int} rtx. Select the section by calling
|
|
|
|
@code{readonly_data_section} or one of the alternatives for other
|
|
|
|
sections. @var{align} is the constant alignment in bits.
|
|
|
|
|
|
|
|
The default version of this function takes care of putting symbolic
|
|
|
|
constants in @code{flag_pic} mode in @code{data_section} and everything
|
|
|
|
else in @code{readonly_data_section}.
|
|
|
|
@end deftypefn
|
|
|
|
|
target.h (encode_section_info): Add new argument carrying the RTL to be modified by the hook.
* target.h (encode_section_info): Add new argument carrying
the RTL to be modified by the hook.
* varasm.c (make_decl_rtl, output_constant_def): Update calls
to encode_section_info.
(default_encode_section_info): Take and use RTL argument,
don't use TREE_CST_RTL or DECL_RTL.
* output.h: Update prototype of default_encode_section_info.
* config/darwin.h (ASM_DECLARE_OBJECT_NAME)
(ASM_DECLARE_FUNCTION_NAME, ASM_OUTPUT_ALIGNED_DECL_LOCAL):
Update calls to encode_section_info.
* config/darwin.c, config/arm/arm.c, config/arm/pe.c
* config/h8300/h8300.c, config/i386/winnt.c, config/m32r/m32r.c
* config/m68hc11/m68hc11.c, config/m88k/m88k.c, config/mcore/mcore.c
* config/mips/mips.c, config/mmix/mmix.c, config/pa/pa.c
* config/romp/romp.c, config/rs6000/rs6000.c, config/s390/s390.c
* config/v850/v850.c (TARGET_ENCODE_SECTION_INFO definitions):
Take and use RTL argument, don't use TREE_CST_RTL or DECL_RTL,
except for PE dllimport/dllexport. Update calls to
default_encode_section_info.
* config/darwin-protos.h, config/arm/arm-protos.h, config/i386-protos.h:
Update prototypes.
* doc/tm.texi (TARGET_ENCODE_SECTION_INFO): Update.
From-SVN: r65859
2003-04-20 20:20:39 +02:00
|
|
|
@deftypefn {Target Hook} void TARGET_ENCODE_SECTION_INFO (tree @var{decl}, rtx @var{rtl}, int @var{new_decl_p})
|
system.h (ENCODE_SECTION_INFO): Poison it.
* system.h (ENCODE_SECTION_INFO): Poison it.
* target-def.h (TARGET_ENCODE_SECTION_INFO): New.
* target.h (encode_section_info): New.
* varasm.c (make_decl_rtl, output_constant_def): Use it.
* hooks.c (hook_tree_int_void): New.
* hooks.h: Declare it.
* config/darwin.h, config/alpha/alpha-protos.h, config/alpha/alpha.c,
config/alpha/alpha.h, config/arm/pe.h, config/avr/avr-protos.h,
config/avr/avr.c, config/avr/avr.h, config/c4x/c4x-protos.h,
config/c4x/c4x.c, config/c4x/c4x.h, config/cris/cris-protos.h,
config/cris/cris.c, config/cris/cris.h, config/i386/cygwin.h,
config/i386/win32.h, config/ia64/ia64-protos.h, config/ia64/ia64.c,
config/ia64/ia64.h, config/m32r/m32r-protos.h, config/m32r/m32r.c,
config/m32r/m32r.h, config/m68hc11/m68hc11-protos.h,
config/m68hc11/m68hc11.c, config/m68hc11/m68hc11.h,
config/mcore/mcore-protos.h, config/mcore/mcore.c,
config/mcore/mcore.h, config/mmix/mmix-protos.h, config/mmix/mmix.c,
config/mmix/mmix.h, config/rs6000/rs6000-protos.h,
config/rs6000/sysv4.h, config/stormy16/stormy16-protos.h,
config/stormy16/stormy16.c, config/stormy16/stormy16.h:
Replace ENCODE_SECTION_INFO with TARGET_ENCODE_SECTION_INFO
referencing existing function. Make function static.
* config/a29k/a29k.c, config/a29k/a29k.h, config/arc/arc.c,
config/arc/arc.h, config/arm/arm.c, config/arm/arm.h,
config/h8300/h8300.c, config/h8300/h8300.h, config/i370/i370.c,
config/i370/i370.h, config/i386/i386-interix.h, config/i386/i386.c,
config/i386/i386.h, config/i386/interix.c, config/m88k/m88k.c,
config/m88k/m88k.h, config/mips/mips.c, config/mips/mips.h,
config/ns32k/ns32k.c, config/ns32k/ns32k.h, config/pa/pa.c,
config/pa/pa.h, config/romp/romp.c, config/romp/romp.h,
config/rs6000/linux64.h, config/rs6000/xcoff.h, config/s390/s390.c,
config/s390/s390.h, config/sh/sh.c, config/sh/sh.h,
config/sparc/sparc.c, config/sparc/sparc.h, config/v850/v850.c,
config/v850/v850.h, config/vax/vax.c, config/vax/vms.h,
config/xtensa/xtensa.c, config/xtensa/xtensa.h:
Move ENCODE_SECTION_INFO to out-of-line function and add
TARGET_ENCODE_SECTION_INFO.
* config/darwin.h (ASM_DECLARE_FUNCTION_NAME): Use hook, not macro.
(ASM_DECLARE_OBJECT_NAME, ASM_OUTPUT_ALIGNED_DECL_LOCAL): Likewise.
* config/arm/pe.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Rename
from SUBTARGET_*
(switch_to_section): Replace in_rdata case with in_readonly_data.
* config/h8300/h8300.c (h8300_encode_label): Make static.
* config/h8300/h8300-protos.h: Update.
* config/rs6000/rs6000.c (rs6000_elf_encode_section_info): Rename
from rs6000_encode_section_info; make static.
(rs6000_xcoff_encode_section_info): New.
* config/v850/v850.c (v850_encode_data_area): Make static.
* config/v850/v850-protos.h: Update.
* config/vax/vax.c: Include flags.h.
(vms_select_section): Fix typo.
* doc/tm.texi (TARGET_ENCODE_SECTION_INFO): Update from previous
ENCODE_SECTION_INFO docs.
From-SVN: r53606
2002-05-19 07:23:27 +02:00
|
|
|
Define this hook if references to a symbol or a constant must be
|
|
|
|
treated differently depending on something about the variable or
|
|
|
|
function named by the symbol (such as what section it is in).
|
|
|
|
|
target.h (encode_section_info): Add new argument carrying the RTL to be modified by the hook.
* target.h (encode_section_info): Add new argument carrying
the RTL to be modified by the hook.
* varasm.c (make_decl_rtl, output_constant_def): Update calls
to encode_section_info.
(default_encode_section_info): Take and use RTL argument,
don't use TREE_CST_RTL or DECL_RTL.
* output.h: Update prototype of default_encode_section_info.
* config/darwin.h (ASM_DECLARE_OBJECT_NAME)
(ASM_DECLARE_FUNCTION_NAME, ASM_OUTPUT_ALIGNED_DECL_LOCAL):
Update calls to encode_section_info.
* config/darwin.c, config/arm/arm.c, config/arm/pe.c
* config/h8300/h8300.c, config/i386/winnt.c, config/m32r/m32r.c
* config/m68hc11/m68hc11.c, config/m88k/m88k.c, config/mcore/mcore.c
* config/mips/mips.c, config/mmix/mmix.c, config/pa/pa.c
* config/romp/romp.c, config/rs6000/rs6000.c, config/s390/s390.c
* config/v850/v850.c (TARGET_ENCODE_SECTION_INFO definitions):
Take and use RTL argument, don't use TREE_CST_RTL or DECL_RTL,
except for PE dllimport/dllexport. Update calls to
default_encode_section_info.
* config/darwin-protos.h, config/arm/arm-protos.h, config/i386-protos.h:
Update prototypes.
* doc/tm.texi (TARGET_ENCODE_SECTION_INFO): Update.
From-SVN: r65859
2003-04-20 20:20:39 +02:00
|
|
|
The hook is executed immediately after rtl has been created for
|
|
|
|
@var{decl}, which may be a variable or function declaration or
|
|
|
|
an entry in the constant pool. In either case, @var{rtl} is the
|
|
|
|
rtl in question. Do @emph{not} use @code{DECL_RTL (@var{decl})}
|
2003-04-28 22:02:28 +02:00
|
|
|
in this hook; that field may not have been initialized yet.
|
target.h (encode_section_info): Add new argument carrying the RTL to be modified by the hook.
* target.h (encode_section_info): Add new argument carrying
the RTL to be modified by the hook.
* varasm.c (make_decl_rtl, output_constant_def): Update calls
to encode_section_info.
(default_encode_section_info): Take and use RTL argument,
don't use TREE_CST_RTL or DECL_RTL.
* output.h: Update prototype of default_encode_section_info.
* config/darwin.h (ASM_DECLARE_OBJECT_NAME)
(ASM_DECLARE_FUNCTION_NAME, ASM_OUTPUT_ALIGNED_DECL_LOCAL):
Update calls to encode_section_info.
* config/darwin.c, config/arm/arm.c, config/arm/pe.c
* config/h8300/h8300.c, config/i386/winnt.c, config/m32r/m32r.c
* config/m68hc11/m68hc11.c, config/m88k/m88k.c, config/mcore/mcore.c
* config/mips/mips.c, config/mmix/mmix.c, config/pa/pa.c
* config/romp/romp.c, config/rs6000/rs6000.c, config/s390/s390.c
* config/v850/v850.c (TARGET_ENCODE_SECTION_INFO definitions):
Take and use RTL argument, don't use TREE_CST_RTL or DECL_RTL,
except for PE dllimport/dllexport. Update calls to
default_encode_section_info.
* config/darwin-protos.h, config/arm/arm-protos.h, config/i386-protos.h:
Update prototypes.
* doc/tm.texi (TARGET_ENCODE_SECTION_INFO): Update.
From-SVN: r65859
2003-04-20 20:20:39 +02:00
|
|
|
|
|
|
|
In the case of a constant, it is safe to assume that the rtl is
|
|
|
|
a @code{mem} whose address is a @code{symbol_ref}. Most decls
|
|
|
|
will also have this form, but that is not guaranteed. Global
|
|
|
|
register variables, for instance, will have a @code{reg} for their
|
|
|
|
rtl. (Normally the right thing to do with such unusual rtl is
|
|
|
|
leave it alone.)
|
system.h (ENCODE_SECTION_INFO): Poison it.
* system.h (ENCODE_SECTION_INFO): Poison it.
* target-def.h (TARGET_ENCODE_SECTION_INFO): New.
* target.h (encode_section_info): New.
* varasm.c (make_decl_rtl, output_constant_def): Use it.
* hooks.c (hook_tree_int_void): New.
* hooks.h: Declare it.
* config/darwin.h, config/alpha/alpha-protos.h, config/alpha/alpha.c,
config/alpha/alpha.h, config/arm/pe.h, config/avr/avr-protos.h,
config/avr/avr.c, config/avr/avr.h, config/c4x/c4x-protos.h,
config/c4x/c4x.c, config/c4x/c4x.h, config/cris/cris-protos.h,
config/cris/cris.c, config/cris/cris.h, config/i386/cygwin.h,
config/i386/win32.h, config/ia64/ia64-protos.h, config/ia64/ia64.c,
config/ia64/ia64.h, config/m32r/m32r-protos.h, config/m32r/m32r.c,
config/m32r/m32r.h, config/m68hc11/m68hc11-protos.h,
config/m68hc11/m68hc11.c, config/m68hc11/m68hc11.h,
config/mcore/mcore-protos.h, config/mcore/mcore.c,
config/mcore/mcore.h, config/mmix/mmix-protos.h, config/mmix/mmix.c,
config/mmix/mmix.h, config/rs6000/rs6000-protos.h,
config/rs6000/sysv4.h, config/stormy16/stormy16-protos.h,
config/stormy16/stormy16.c, config/stormy16/stormy16.h:
Replace ENCODE_SECTION_INFO with TARGET_ENCODE_SECTION_INFO
referencing existing function. Make function static.
* config/a29k/a29k.c, config/a29k/a29k.h, config/arc/arc.c,
config/arc/arc.h, config/arm/arm.c, config/arm/arm.h,
config/h8300/h8300.c, config/h8300/h8300.h, config/i370/i370.c,
config/i370/i370.h, config/i386/i386-interix.h, config/i386/i386.c,
config/i386/i386.h, config/i386/interix.c, config/m88k/m88k.c,
config/m88k/m88k.h, config/mips/mips.c, config/mips/mips.h,
config/ns32k/ns32k.c, config/ns32k/ns32k.h, config/pa/pa.c,
config/pa/pa.h, config/romp/romp.c, config/romp/romp.h,
config/rs6000/linux64.h, config/rs6000/xcoff.h, config/s390/s390.c,
config/s390/s390.h, config/sh/sh.c, config/sh/sh.h,
config/sparc/sparc.c, config/sparc/sparc.h, config/v850/v850.c,
config/v850/v850.h, config/vax/vax.c, config/vax/vms.h,
config/xtensa/xtensa.c, config/xtensa/xtensa.h:
Move ENCODE_SECTION_INFO to out-of-line function and add
TARGET_ENCODE_SECTION_INFO.
* config/darwin.h (ASM_DECLARE_FUNCTION_NAME): Use hook, not macro.
(ASM_DECLARE_OBJECT_NAME, ASM_OUTPUT_ALIGNED_DECL_LOCAL): Likewise.
* config/arm/pe.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Rename
from SUBTARGET_*
(switch_to_section): Replace in_rdata case with in_readonly_data.
* config/h8300/h8300.c (h8300_encode_label): Make static.
* config/h8300/h8300-protos.h: Update.
* config/rs6000/rs6000.c (rs6000_elf_encode_section_info): Rename
from rs6000_encode_section_info; make static.
(rs6000_xcoff_encode_section_info): New.
* config/v850/v850.c (v850_encode_data_area): Make static.
* config/v850/v850-protos.h: Update.
* config/vax/vax.c: Include flags.h.
(vms_select_section): Fix typo.
* doc/tm.texi (TARGET_ENCODE_SECTION_INFO): Update from previous
ENCODE_SECTION_INFO docs.
From-SVN: r53606
2002-05-19 07:23:27 +02:00
|
|
|
|
|
|
|
The @var{new_decl_p} argument will be true if this is the first time
|
target.h (encode_section_info): Add new argument carrying the RTL to be modified by the hook.
* target.h (encode_section_info): Add new argument carrying
the RTL to be modified by the hook.
* varasm.c (make_decl_rtl, output_constant_def): Update calls
to encode_section_info.
(default_encode_section_info): Take and use RTL argument,
don't use TREE_CST_RTL or DECL_RTL.
* output.h: Update prototype of default_encode_section_info.
* config/darwin.h (ASM_DECLARE_OBJECT_NAME)
(ASM_DECLARE_FUNCTION_NAME, ASM_OUTPUT_ALIGNED_DECL_LOCAL):
Update calls to encode_section_info.
* config/darwin.c, config/arm/arm.c, config/arm/pe.c
* config/h8300/h8300.c, config/i386/winnt.c, config/m32r/m32r.c
* config/m68hc11/m68hc11.c, config/m88k/m88k.c, config/mcore/mcore.c
* config/mips/mips.c, config/mmix/mmix.c, config/pa/pa.c
* config/romp/romp.c, config/rs6000/rs6000.c, config/s390/s390.c
* config/v850/v850.c (TARGET_ENCODE_SECTION_INFO definitions):
Take and use RTL argument, don't use TREE_CST_RTL or DECL_RTL,
except for PE dllimport/dllexport. Update calls to
default_encode_section_info.
* config/darwin-protos.h, config/arm/arm-protos.h, config/i386-protos.h:
Update prototypes.
* doc/tm.texi (TARGET_ENCODE_SECTION_INFO): Update.
From-SVN: r65859
2003-04-20 20:20:39 +02:00
|
|
|
that @code{TARGET_ENCODE_SECTION_INFO} has been invoked on this decl. It will
|
system.h (ENCODE_SECTION_INFO): Poison it.
* system.h (ENCODE_SECTION_INFO): Poison it.
* target-def.h (TARGET_ENCODE_SECTION_INFO): New.
* target.h (encode_section_info): New.
* varasm.c (make_decl_rtl, output_constant_def): Use it.
* hooks.c (hook_tree_int_void): New.
* hooks.h: Declare it.
* config/darwin.h, config/alpha/alpha-protos.h, config/alpha/alpha.c,
config/alpha/alpha.h, config/arm/pe.h, config/avr/avr-protos.h,
config/avr/avr.c, config/avr/avr.h, config/c4x/c4x-protos.h,
config/c4x/c4x.c, config/c4x/c4x.h, config/cris/cris-protos.h,
config/cris/cris.c, config/cris/cris.h, config/i386/cygwin.h,
config/i386/win32.h, config/ia64/ia64-protos.h, config/ia64/ia64.c,
config/ia64/ia64.h, config/m32r/m32r-protos.h, config/m32r/m32r.c,
config/m32r/m32r.h, config/m68hc11/m68hc11-protos.h,
config/m68hc11/m68hc11.c, config/m68hc11/m68hc11.h,
config/mcore/mcore-protos.h, config/mcore/mcore.c,
config/mcore/mcore.h, config/mmix/mmix-protos.h, config/mmix/mmix.c,
config/mmix/mmix.h, config/rs6000/rs6000-protos.h,
config/rs6000/sysv4.h, config/stormy16/stormy16-protos.h,
config/stormy16/stormy16.c, config/stormy16/stormy16.h:
Replace ENCODE_SECTION_INFO with TARGET_ENCODE_SECTION_INFO
referencing existing function. Make function static.
* config/a29k/a29k.c, config/a29k/a29k.h, config/arc/arc.c,
config/arc/arc.h, config/arm/arm.c, config/arm/arm.h,
config/h8300/h8300.c, config/h8300/h8300.h, config/i370/i370.c,
config/i370/i370.h, config/i386/i386-interix.h, config/i386/i386.c,
config/i386/i386.h, config/i386/interix.c, config/m88k/m88k.c,
config/m88k/m88k.h, config/mips/mips.c, config/mips/mips.h,
config/ns32k/ns32k.c, config/ns32k/ns32k.h, config/pa/pa.c,
config/pa/pa.h, config/romp/romp.c, config/romp/romp.h,
config/rs6000/linux64.h, config/rs6000/xcoff.h, config/s390/s390.c,
config/s390/s390.h, config/sh/sh.c, config/sh/sh.h,
config/sparc/sparc.c, config/sparc/sparc.h, config/v850/v850.c,
config/v850/v850.h, config/vax/vax.c, config/vax/vms.h,
config/xtensa/xtensa.c, config/xtensa/xtensa.h:
Move ENCODE_SECTION_INFO to out-of-line function and add
TARGET_ENCODE_SECTION_INFO.
* config/darwin.h (ASM_DECLARE_FUNCTION_NAME): Use hook, not macro.
(ASM_DECLARE_OBJECT_NAME, ASM_OUTPUT_ALIGNED_DECL_LOCAL): Likewise.
* config/arm/pe.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Rename
from SUBTARGET_*
(switch_to_section): Replace in_rdata case with in_readonly_data.
* config/h8300/h8300.c (h8300_encode_label): Make static.
* config/h8300/h8300-protos.h: Update.
* config/rs6000/rs6000.c (rs6000_elf_encode_section_info): Rename
from rs6000_encode_section_info; make static.
(rs6000_xcoff_encode_section_info): New.
* config/v850/v850.c (v850_encode_data_area): Make static.
* config/v850/v850-protos.h: Update.
* config/vax/vax.c: Include flags.h.
(vms_select_section): Fix typo.
* doc/tm.texi (TARGET_ENCODE_SECTION_INFO): Update from previous
ENCODE_SECTION_INFO docs.
From-SVN: r53606
2002-05-19 07:23:27 +02:00
|
|
|
be false for subsequent invocations, which will happen for duplicate
|
|
|
|
declarations. Whether or not anything must be done for the duplicate
|
|
|
|
declaration depends on whether the hook examines @code{DECL_ATTRIBUTES}.
|
target.h (encode_section_info): Add new argument carrying the RTL to be modified by the hook.
* target.h (encode_section_info): Add new argument carrying
the RTL to be modified by the hook.
* varasm.c (make_decl_rtl, output_constant_def): Update calls
to encode_section_info.
(default_encode_section_info): Take and use RTL argument,
don't use TREE_CST_RTL or DECL_RTL.
* output.h: Update prototype of default_encode_section_info.
* config/darwin.h (ASM_DECLARE_OBJECT_NAME)
(ASM_DECLARE_FUNCTION_NAME, ASM_OUTPUT_ALIGNED_DECL_LOCAL):
Update calls to encode_section_info.
* config/darwin.c, config/arm/arm.c, config/arm/pe.c
* config/h8300/h8300.c, config/i386/winnt.c, config/m32r/m32r.c
* config/m68hc11/m68hc11.c, config/m88k/m88k.c, config/mcore/mcore.c
* config/mips/mips.c, config/mmix/mmix.c, config/pa/pa.c
* config/romp/romp.c, config/rs6000/rs6000.c, config/s390/s390.c
* config/v850/v850.c (TARGET_ENCODE_SECTION_INFO definitions):
Take and use RTL argument, don't use TREE_CST_RTL or DECL_RTL,
except for PE dllimport/dllexport. Update calls to
default_encode_section_info.
* config/darwin-protos.h, config/arm/arm-protos.h, config/i386-protos.h:
Update prototypes.
* doc/tm.texi (TARGET_ENCODE_SECTION_INFO): Update.
From-SVN: r65859
2003-04-20 20:20:39 +02:00
|
|
|
@var{new_decl_p} is always true when the hook is called for a constant.
|
system.h (ENCODE_SECTION_INFO): Poison it.
* system.h (ENCODE_SECTION_INFO): Poison it.
* target-def.h (TARGET_ENCODE_SECTION_INFO): New.
* target.h (encode_section_info): New.
* varasm.c (make_decl_rtl, output_constant_def): Use it.
* hooks.c (hook_tree_int_void): New.
* hooks.h: Declare it.
* config/darwin.h, config/alpha/alpha-protos.h, config/alpha/alpha.c,
config/alpha/alpha.h, config/arm/pe.h, config/avr/avr-protos.h,
config/avr/avr.c, config/avr/avr.h, config/c4x/c4x-protos.h,
config/c4x/c4x.c, config/c4x/c4x.h, config/cris/cris-protos.h,
config/cris/cris.c, config/cris/cris.h, config/i386/cygwin.h,
config/i386/win32.h, config/ia64/ia64-protos.h, config/ia64/ia64.c,
config/ia64/ia64.h, config/m32r/m32r-protos.h, config/m32r/m32r.c,
config/m32r/m32r.h, config/m68hc11/m68hc11-protos.h,
config/m68hc11/m68hc11.c, config/m68hc11/m68hc11.h,
config/mcore/mcore-protos.h, config/mcore/mcore.c,
config/mcore/mcore.h, config/mmix/mmix-protos.h, config/mmix/mmix.c,
config/mmix/mmix.h, config/rs6000/rs6000-protos.h,
config/rs6000/sysv4.h, config/stormy16/stormy16-protos.h,
config/stormy16/stormy16.c, config/stormy16/stormy16.h:
Replace ENCODE_SECTION_INFO with TARGET_ENCODE_SECTION_INFO
referencing existing function. Make function static.
* config/a29k/a29k.c, config/a29k/a29k.h, config/arc/arc.c,
config/arc/arc.h, config/arm/arm.c, config/arm/arm.h,
config/h8300/h8300.c, config/h8300/h8300.h, config/i370/i370.c,
config/i370/i370.h, config/i386/i386-interix.h, config/i386/i386.c,
config/i386/i386.h, config/i386/interix.c, config/m88k/m88k.c,
config/m88k/m88k.h, config/mips/mips.c, config/mips/mips.h,
config/ns32k/ns32k.c, config/ns32k/ns32k.h, config/pa/pa.c,
config/pa/pa.h, config/romp/romp.c, config/romp/romp.h,
config/rs6000/linux64.h, config/rs6000/xcoff.h, config/s390/s390.c,
config/s390/s390.h, config/sh/sh.c, config/sh/sh.h,
config/sparc/sparc.c, config/sparc/sparc.h, config/v850/v850.c,
config/v850/v850.h, config/vax/vax.c, config/vax/vms.h,
config/xtensa/xtensa.c, config/xtensa/xtensa.h:
Move ENCODE_SECTION_INFO to out-of-line function and add
TARGET_ENCODE_SECTION_INFO.
* config/darwin.h (ASM_DECLARE_FUNCTION_NAME): Use hook, not macro.
(ASM_DECLARE_OBJECT_NAME, ASM_OUTPUT_ALIGNED_DECL_LOCAL): Likewise.
* config/arm/pe.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Rename
from SUBTARGET_*
(switch_to_section): Replace in_rdata case with in_readonly_data.
* config/h8300/h8300.c (h8300_encode_label): Make static.
* config/h8300/h8300-protos.h: Update.
* config/rs6000/rs6000.c (rs6000_elf_encode_section_info): Rename
from rs6000_encode_section_info; make static.
(rs6000_xcoff_encode_section_info): New.
* config/v850/v850.c (v850_encode_data_area): Make static.
* config/v850/v850-protos.h: Update.
* config/vax/vax.c: Include flags.h.
(vms_select_section): Fix typo.
* doc/tm.texi (TARGET_ENCODE_SECTION_INFO): Update from previous
ENCODE_SECTION_INFO docs.
From-SVN: r53606
2002-05-19 07:23:27 +02:00
|
|
|
|
|
|
|
@cindex @code{SYMBOL_REF_FLAG}, in @code{TARGET_ENCODE_SECTION_INFO}
|
target.h (encode_section_info): Add new argument carrying the RTL to be modified by the hook.
* target.h (encode_section_info): Add new argument carrying
the RTL to be modified by the hook.
* varasm.c (make_decl_rtl, output_constant_def): Update calls
to encode_section_info.
(default_encode_section_info): Take and use RTL argument,
don't use TREE_CST_RTL or DECL_RTL.
* output.h: Update prototype of default_encode_section_info.
* config/darwin.h (ASM_DECLARE_OBJECT_NAME)
(ASM_DECLARE_FUNCTION_NAME, ASM_OUTPUT_ALIGNED_DECL_LOCAL):
Update calls to encode_section_info.
* config/darwin.c, config/arm/arm.c, config/arm/pe.c
* config/h8300/h8300.c, config/i386/winnt.c, config/m32r/m32r.c
* config/m68hc11/m68hc11.c, config/m88k/m88k.c, config/mcore/mcore.c
* config/mips/mips.c, config/mmix/mmix.c, config/pa/pa.c
* config/romp/romp.c, config/rs6000/rs6000.c, config/s390/s390.c
* config/v850/v850.c (TARGET_ENCODE_SECTION_INFO definitions):
Take and use RTL argument, don't use TREE_CST_RTL or DECL_RTL,
except for PE dllimport/dllexport. Update calls to
default_encode_section_info.
* config/darwin-protos.h, config/arm/arm-protos.h, config/i386-protos.h:
Update prototypes.
* doc/tm.texi (TARGET_ENCODE_SECTION_INFO): Update.
From-SVN: r65859
2003-04-20 20:20:39 +02:00
|
|
|
The usual thing for this hook to do is to record flags in the
|
|
|
|
@code{symbol_ref}, using @code{SYMBOL_REF_FLAG} or @code{SYMBOL_REF_FLAGS}.
|
|
|
|
Historically, the name string was modified if it was necessary to
|
|
|
|
encode more than one bit of information, but this practice is now
|
|
|
|
discouraged; use @code{SYMBOL_REF_FLAGS}.
|
|
|
|
|
|
|
|
The default definition of this hook, @code{default_encode_section_info}
|
|
|
|
in @file{varasm.c}, sets a number of commonly-useful bits in
|
|
|
|
@code{SYMBOL_REF_FLAGS}. Check whether the default does what you need
|
|
|
|
before overriding it.
|
system.h (ENCODE_SECTION_INFO): Poison it.
* system.h (ENCODE_SECTION_INFO): Poison it.
* target-def.h (TARGET_ENCODE_SECTION_INFO): New.
* target.h (encode_section_info): New.
* varasm.c (make_decl_rtl, output_constant_def): Use it.
* hooks.c (hook_tree_int_void): New.
* hooks.h: Declare it.
* config/darwin.h, config/alpha/alpha-protos.h, config/alpha/alpha.c,
config/alpha/alpha.h, config/arm/pe.h, config/avr/avr-protos.h,
config/avr/avr.c, config/avr/avr.h, config/c4x/c4x-protos.h,
config/c4x/c4x.c, config/c4x/c4x.h, config/cris/cris-protos.h,
config/cris/cris.c, config/cris/cris.h, config/i386/cygwin.h,
config/i386/win32.h, config/ia64/ia64-protos.h, config/ia64/ia64.c,
config/ia64/ia64.h, config/m32r/m32r-protos.h, config/m32r/m32r.c,
config/m32r/m32r.h, config/m68hc11/m68hc11-protos.h,
config/m68hc11/m68hc11.c, config/m68hc11/m68hc11.h,
config/mcore/mcore-protos.h, config/mcore/mcore.c,
config/mcore/mcore.h, config/mmix/mmix-protos.h, config/mmix/mmix.c,
config/mmix/mmix.h, config/rs6000/rs6000-protos.h,
config/rs6000/sysv4.h, config/stormy16/stormy16-protos.h,
config/stormy16/stormy16.c, config/stormy16/stormy16.h:
Replace ENCODE_SECTION_INFO with TARGET_ENCODE_SECTION_INFO
referencing existing function. Make function static.
* config/a29k/a29k.c, config/a29k/a29k.h, config/arc/arc.c,
config/arc/arc.h, config/arm/arm.c, config/arm/arm.h,
config/h8300/h8300.c, config/h8300/h8300.h, config/i370/i370.c,
config/i370/i370.h, config/i386/i386-interix.h, config/i386/i386.c,
config/i386/i386.h, config/i386/interix.c, config/m88k/m88k.c,
config/m88k/m88k.h, config/mips/mips.c, config/mips/mips.h,
config/ns32k/ns32k.c, config/ns32k/ns32k.h, config/pa/pa.c,
config/pa/pa.h, config/romp/romp.c, config/romp/romp.h,
config/rs6000/linux64.h, config/rs6000/xcoff.h, config/s390/s390.c,
config/s390/s390.h, config/sh/sh.c, config/sh/sh.h,
config/sparc/sparc.c, config/sparc/sparc.h, config/v850/v850.c,
config/v850/v850.h, config/vax/vax.c, config/vax/vms.h,
config/xtensa/xtensa.c, config/xtensa/xtensa.h:
Move ENCODE_SECTION_INFO to out-of-line function and add
TARGET_ENCODE_SECTION_INFO.
* config/darwin.h (ASM_DECLARE_FUNCTION_NAME): Use hook, not macro.
(ASM_DECLARE_OBJECT_NAME, ASM_OUTPUT_ALIGNED_DECL_LOCAL): Likewise.
* config/arm/pe.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Rename
from SUBTARGET_*
(switch_to_section): Replace in_rdata case with in_readonly_data.
* config/h8300/h8300.c (h8300_encode_label): Make static.
* config/h8300/h8300-protos.h: Update.
* config/rs6000/rs6000.c (rs6000_elf_encode_section_info): Rename
from rs6000_encode_section_info; make static.
(rs6000_xcoff_encode_section_info): New.
* config/v850/v850.c (v850_encode_data_area): Make static.
* config/v850/v850-protos.h: Update.
* config/vax/vax.c: Include flags.h.
(vms_select_section): Fix typo.
* doc/tm.texi (TARGET_ENCODE_SECTION_INFO): Update from previous
ENCODE_SECTION_INFO docs.
From-SVN: r53606
2002-05-19 07:23:27 +02:00
|
|
|
@end deftypefn
|
|
|
|
|
system.h (STRIP_NAME_ENCODING): Poison it.
* system.h (STRIP_NAME_ENCODING): Poison it.
* output.h (STRIP_NAME_ENCODING): Remove.
(default_strip_name_encoding): Declare.
* target-def.h (TARGET_STRIP_NAME_ENCODING): New.
* target.h (strip_name_encoding): New.
* varasm.c (default_strip_name_encoding): New.
* dwarf2asm.c, varasm.c, config/darwin.c, config/darwin.h,
config/alpha/alpha.c, config/arm/pe.c, config/avr/avr.c,
config/cris/cris.c, config/i386/cygwin.h, config/i386/interix.c,
config/i386/winnt.c, config/m32r/m32r.h, config/mcore/mcore-elf.h,
config/mcore/mcore-pe.h, config/mcore/mcore.c, config/mcore/mcore.h,
config/mips/mips.c, config/mn10200/mn10200.h, config/mn10300/mn10300.h,
config/pa/pa.c, config/pa/pa.h, config/pa/som.h,
config/rs6000/rs6000.c, config/rs6000/sysv4.h, config/rs6000/xcoff.h,
config/v850/v850.h: Use the hook, not the macro.
* config/darwin-protos.h, config/darwin.c, config/darwin.h,
config/alpha/alpha.c, config/alpha/alpha.h, config/h8300/h8300.c,
config/h8300/h8300.h, config/i386/cygwin.h, config/i386/i386-interix.h,
config/i386/i386-protos.h, config/i386/win32.h, config/i386/winnt.c,
config/ia64/ia64.c, config/ia64/ia64.h, config/m32r/m32r.c,
config/m32r/m32r.h, config/mcore/mcore.c, config/mcore/mcore.h,
config/pa/pa.c, config/rs6000/rs6000.c, config/rs6000/sysv4.h,
config/rs6000/xcoff.h, config/sh/sh.c, config/sh/sh.h,
config/v850/v850.c, config/v850/v850.h:
Move STRIP_NAME_ENCODING to out-of-line function and add
TARGET_STRIP_NAME_ENCODING.
* config/arm/arm.c, config/arm/arm.h, config/mmix/mmix-protos.h,
config/mmix/mmix.c, config/mmix/mmix.h: Replace STRIP_NAME_ENCODING
with TARGET_STRIP_NAME_ENCODING referencing existing function;
make function static.
* xcoffout.c: Include target.h
* Makefile.in (xcoffout.o): Update.
* config/avr/avr.c (avr_encode_section_info): Correct prototype.
* config/avr/avr.h (STRIP_NAME_ENCODING): Remove.
* config/rs6000/rs6000.c (rs6000_xcoff_unique_section): Mark
reloc argument unused.
* config/sh/sh.c (TARGET_ENCODE_SECTION_INFO): New.
* doc/tm.texi (TARGET_STRIP_NAME_ENCODING): Update from previous
STRIP_NAME_ENCODING docs.
From-SVN: r53615
2002-05-19 09:55:48 +02:00
|
|
|
@deftypefn {Target Hook} const char *TARGET_STRIP_NAME_ENCODING (const char *name)
|
|
|
|
Decode @var{name} and return the real name part, sans
|
|
|
|
the characters that @code{TARGET_ENCODE_SECTION_INFO}
|
|
|
|
may have added.
|
|
|
|
@end deftypefn
|
|
|
|
|
2002-05-19 11:50:27 +02:00
|
|
|
@deftypefn {Target Hook} bool TARGET_IN_SMALL_DATA_P (tree @var{exp})
|
|
|
|
Returns true if @var{exp} should be placed into a ``small data'' section.
|
|
|
|
The default version of this hook always returns false.
|
|
|
|
@end deftypefn
|
|
|
|
|
2002-09-09 22:04:32 +02:00
|
|
|
@deftypevar {Target Hook} bool TARGET_HAVE_SRODATA_SECTION
|
|
|
|
Contains the value true if the target places read-only
|
|
|
|
``small data'' into a separate section. The default value is false.
|
|
|
|
@end deftypevar
|
|
|
|
|
2002-05-19 11:50:27 +02:00
|
|
|
@deftypefn {Target Hook} bool TARGET_BINDS_LOCAL_P (tree @var{exp})
|
|
|
|
Returns true if @var{exp} names an object for which name resolution
|
|
|
|
rules must resolve to the current ``module'' (dynamic shared library
|
|
|
|
or executable image).
|
|
|
|
|
|
|
|
The default version of this hook implements the name resolution rules
|
|
|
|
for ELF, which has a looser model of global name binding than other
|
|
|
|
currently supported object file formats.
|
|
|
|
@end deftypefn
|
|
|
|
|
2002-09-09 22:04:32 +02:00
|
|
|
@deftypevar {Target Hook} bool TARGET_HAVE_TLS
|
|
|
|
Contains the value true if the target supports thread-local storage.
|
|
|
|
The default value is false.
|
|
|
|
@end deftypevar
|
|
|
|
|
|
|
|
|
1996-09-25 01:21:45 +02:00
|
|
|
@node PIC
|
|
|
|
@section Position Independent Code
|
|
|
|
@cindex position independent code
|
|
|
|
@cindex PIC
|
|
|
|
|
|
|
|
This section describes macros that help implement generation of position
|
|
|
|
independent code. Simply defining these macros is not enough to
|
|
|
|
generate valid PIC; you must also add support to the macros
|
|
|
|
@code{GO_IF_LEGITIMATE_ADDRESS} and @code{PRINT_OPERAND_ADDRESS}, as
|
|
|
|
well as @code{LEGITIMIZE_ADDRESS}. You must modify the definition of
|
|
|
|
@samp{movsi} to do something appropriate when the source operand
|
|
|
|
contains a symbolic address. You may also need to alter the handling of
|
|
|
|
switch statements so that they use relative addresses.
|
|
|
|
@c i rearranged the order of the macros above to try to force one of
|
|
|
|
@c them to the next line, to eliminate an overfull hbox. --mew 10feb93
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac PIC_OFFSET_TABLE_REGNUM
|
1996-09-25 01:21:45 +02:00
|
|
|
The register number of the register used to address a table of static
|
|
|
|
data addresses in memory. In some cases this register is defined by a
|
c-tree.texi, [...]: Replace . at end of sentences preceded by a capital letter with @..
* doc/c-tree.texi, doc/contrib.texi, doc/cpp.texi,
doc/cppinternals.texi, doc/extend.texi, doc/gcc.texi,
doc/gcov.texi, doc/install-old.texi, doc/install.texi,
doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: Replace
. at end of sentences preceded by a capital letter with @..
From-SVN: r43611
2001-06-27 17:04:16 +02:00
|
|
|
processor's ``application binary interface'' (ABI)@. When this macro
|
1996-09-25 01:21:45 +02:00
|
|
|
is defined, RTL is generated for this register once, as with the stack
|
|
|
|
pointer and frame pointer registers. If this macro is not defined, it
|
|
|
|
is up to the machine-dependent files to allocate such a register (if
|
2002-01-30 00:01:10 +01:00
|
|
|
necessary). Note that this register must be fixed when in use (e.g.@:
|
2002-01-29 23:34:48 +01:00
|
|
|
when @code{flag_pic} is true).
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac PIC_OFFSET_TABLE_REG_CALL_CLOBBERED
|
1996-09-25 01:21:45 +02:00
|
|
|
Define this macro if the register defined by
|
|
|
|
@code{PIC_OFFSET_TABLE_REGNUM} is clobbered by calls. Do not define
|
1998-08-19 14:54:49 +02:00
|
|
|
this macro if @code{PIC_OFFSET_TABLE_REGNUM} is not defined.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac FINALIZE_PIC
|
1996-09-25 01:21:45 +02:00
|
|
|
By generating position-independent code, when two different programs (A
|
|
|
|
and B) share a common library (libC.a), the text of the library can be
|
|
|
|
shared whether or not the library is linked at the same address for both
|
|
|
|
programs. In some of these environments, position-independent code
|
|
|
|
requires not only the use of different addressing modes, but also
|
|
|
|
special code to enable the use of these addressing modes.
|
|
|
|
|
|
|
|
The @code{FINALIZE_PIC} macro serves as a hook to emit these special
|
|
|
|
codes once the function is being compiled into assembly code, but not
|
|
|
|
before. (It is not done before, because in the case of compiling an
|
|
|
|
inline function, it would lead to multiple PIC prologues being
|
|
|
|
included in functions which used inline functions and were compiled to
|
|
|
|
assembly language.)
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac LEGITIMATE_PIC_OPERAND_P (@var{x})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C expression that is nonzero if @var{x} is a legitimate immediate
|
|
|
|
operand on the target machine when generating position independent code.
|
|
|
|
You can assume that @var{x} satisfies @code{CONSTANT_P}, so you need not
|
|
|
|
check this. You can also assume @var{flag_pic} is true, so you need not
|
|
|
|
check it either. You need not define this macro if all constants
|
|
|
|
(including @code{SYMBOL_REF}) can be immediate operands when generating
|
|
|
|
position independent code.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
@node Assembler Format
|
|
|
|
@section Defining the Output Assembler Language
|
|
|
|
|
|
|
|
This section describes macros whose principal purpose is to describe how
|
2001-07-09 00:39:06 +02:00
|
|
|
to write instructions in assembler language---rather than what the
|
1996-09-25 01:21:45 +02:00
|
|
|
instructions do.
|
|
|
|
|
|
|
|
@menu
|
|
|
|
* File Framework:: Structural information for the assembler file.
|
|
|
|
* Data Output:: Output of constants (numbers, strings, addresses).
|
|
|
|
* Uninitialized Data:: Output of uninitialized variables.
|
|
|
|
* Label Output:: Output and generation of labels.
|
|
|
|
* Initialization:: General principles of initialization
|
|
|
|
and termination routines.
|
|
|
|
* Macros for Initialization::
|
|
|
|
Specific macros that control the handling of
|
|
|
|
initialization and termination routines.
|
|
|
|
* Instruction Output:: Output of actual instructions.
|
|
|
|
* Dispatch Tables:: Output of jump tables.
|
|
|
|
* Exception Region Output:: Output of exception region code.
|
|
|
|
* Alignment Output:: Pseudo ops for alignment and skipping data.
|
|
|
|
@end menu
|
|
|
|
|
|
|
|
@node File Framework
|
|
|
|
@subsection The Overall Framework of an Assembler File
|
|
|
|
@cindex assembler format
|
|
|
|
@cindex output of assembler code
|
|
|
|
|
|
|
|
@c prevent bad page break with this line
|
target.h (asm_out.file_start, [...]): New hooks.
* target.h (asm_out.file_start, file_start_app_off,
file_start_file_directive): New hooks.
* target-def.h (TARGET_ASM_FILE_START_FILE_DIRECTIVE,
TARGET_ASM_FILE_START_APP_OFF, TARGET_ASM_FILE_START):
New hook-definition macros.
* doc/tm.texi: Document new hooks; remove docs of ASM_FILE_START.
* varasm.c (default_file_start): New.
* output.h: Prototype it.
* toplev.c (init_asm_output): Use targetm.asm_out.file_start.
* system.h: Poison ASM_FILE_START.
* config/alpha/alpha.c (alpha_write_verstamp): Delete.
(alpha_file_start): New, define if !TARGET_ABI_UNICOSMK.
(unicosmk_asm_file_start): Rename unicosmk_file_start,
make static, take no arguments.
(TARGET_ASM_FILE_START, TARGET_ASM_FILE_END,
TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set as appropriate.
* config/alpha/unicosmk.h: Don't define ASM_FILE_START nor
TARGET_ASM_FILE_END. Remove reference to ASM_FILE_START in
comment.
* config/arc/arc.c (arc_asm_file_start): Rename
arc_file_start, take no arguments, make static.
(TARGET_ASM_FILE_START): Set it.
* config/arm/arm.c (aof_file_start): New static function.
(TARGET_ASM_FILE_START): Set it, when appropriate.
* config/arm/coff.h, config/arm/elf.h:
Set TARGET_ASM_FILE_START_APP_OFF to true.
* config/avr/avr.c (asm_file_start): Rename avr_file_start,
take no arguments, make static.
(TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE):
Set them.
* config/c4x/c4x.c (c4x_file_start): New static function.
(TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE):
Set them.
* config/cris/cris.c (cris_file_start): New static function.
(TARGET_ASM_FILE_START): Set it.
* config/dsp16xx/dsp16xx.c (coff_dsp16xx_file_start): Rename
dsp16xx_file_start, make static.
(luxworks_dsp16xx_file_start): Delete.
(TARGET_ASM_FILE_START): Set it.
* config/h8300/h8300.c (asm_file_start): Rename
h8300_file_start, make static, take no arguments.
(TARGET_ASM_FILE_START): Set it.
* config/i370/i370.c (i370_file_start): New static function.
(TARGET_ASM_FILE_START): Set it.
* config/i386/i386.c (x86_file_start): New static function.
(TARGET_ASM_FILE_START): Set it.
* config/i386/i386.h (X86_FILE_START_VERSION_DIRECTIVE,
X86_FILE_START_FLTUSED): New macros, default to false.
* config/i386/i386-interix.h: Override X86_FILE_START_FLTUSED to 1.
* config/i386/sysv4.h, config/i386/sco5.h: Override
X86_FILE_START_VERSION_DIRECTIVE to true.
* config/ia64/ia64.c (ia64_file_start): New static function.
(TARGET_ASM_FILE_START): Set it.
(emit_safe_across_calls): Take no arguments.
* config/ia64/ia64.md: Update to match.
* config/m32r/m32r.c (m32r_asm_file_start): Rename
m32r_file_start, make static, take no arguments.
(TARGET_ASM_FILE_START): Set it.
* config/m68hc11/m68hc11.c (m68hc11_asm_file_start): Rename
m68hc11_file_start, make static, take no arguments.
(TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set.
(print_options): Delete.
* config/m68k/m68k.c (m68k_hp320_file_start): New static function.
(TARGET_ASM_FILE_START_APP_OFF): Set.
* config/m68k/hp320.h: Set TARGET_ASM_FILE_START to
m68k_hp320_file_start.
* config/mips/mips.c (iris6_asm_file_start, mips_asm_file_start):
Make static, take no arguments.
(TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set.
* config/mmix/mmix.c (mmix_asm_file_start): Rename
mmix_file_start, make static, take no arguments.
(TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set.
* config/mn10300/mn10300.c (asm_file_start): Rename
mn10300_file_start, make static, take no arguments.
(TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set.
* config/ns32k/ns32k.c (TARGET_ASM_FILE_START_APP_OFF): Set.
* config/pa/pa.c (pa_file_start_level, pa_file_start_space,
pa_file_start_file, pa_file_start_mcount, pa_elf_file_start,
pa_som_file_start, pa_linux_file_start, pa_hpux64_gas_file_start,
pa_hpux64_hpas_file_start): New static functions.
* config/pa/elf.h: Set TARGET_ASM_FILE_START to pa_elf_file_start.
* config/pa/pa-linux.h: Set TARGET_ASM_FILE_START to
pa_linux_file_start.
* config/pa/pa64-hpux.h: Set TARGET_ASM_FILE_START to
pa_hpux64_gas_file_start or pa_hpux64_hpas_file_start, as
appropriate.
* config/pa/som.h: Set TARGET_ASM_FILE_START to pa_som_file_start.
* config/rs6000/rs6000.c: Include xcoffout.h when TARGET_XCOFF.
(rs6000_file_start): Make static, take no arguments. Reset
default_cpu under certain conditions.
(rs6000_xcoff_file_start): New function.
* config/rs6000/rs6000.h (TARGET_ASM_FILE_START): Set.
* config/rs6000/xcoff.h (TARGET_ASM_FILE_START,
TARGET_ASM_FILE_START_FILE_DIRECTIVE): Override.
* config/sh/sh.c (output_file_start): Rename
sh_file_start, make static, take no arguments. Merge in old
code from sh/elf.h's ASM_FILE_START, conditioned on TARGET_ELF.
(TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set.
* config/sh/sh.c (TARGET_ELF): Define to 0.
* config/sh/elf.h (TARGET_ELF): Redefine to 1.
* config/v850/v850.c (asm_file_start): Delete.
(TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set.
* config/vax/vax.c (vax_file_start): New static function.
(TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_APP_OFF): Set.
* config/darwin.h: Override ASM_FILE_START_FILE_DIRECTIVE to false.
* config/elfos.h, config/svr3.h, config/arm/elf.h, config/arm/pe.h
* config/i386/att.h, config/i386/gas.h, config/i386/linux.h
* config/i386/sysv4.h, config/i386/sco5.h, config/i960/i960-coff.h
* config/m68k/coff.h, config/m68k/hp320.h, config/mcore/mcore-pe.h
* config/vax/vaxv.h: Set ASM_FILE_START_FILE_DIRECTIVE to true.
* config/darwin.h, config/elfos.h, config/alpha/elf.h
* config/alpha/openbsd.h, config/alpha/osf.h, config/alpha/vms.h
* config/arc/arc.h, config/arm/aof.h, config/arm/aout.h
* config/arm/coff.h, config/arm/elf.h, config/arm/pe.h
* config/avr/avr.h, config/c4x/c4x.h, config/cris/cris.h
* config/dsp16xx/dsp16xx.h, config/h8300/elf.h, config/h8300/h8300.h
* config/i370/i370.h, config/i386/att.h, config/i386/gas.h
* config/i386/i386-interix.h, config/i386/linux.h, config/i386/sysv4.h
* config/i386/sco5.h, config/i960/i960-coff.h, config/i960/i960.h
* config/ia64/ia64.h, config/ia64/sysv4.h, config/m32r/m32r.h
* config/m68hc11/m68hc11.h, config/m68k/coff.h, config/m68k/m68k.h
* config/mcore/mcore-pe.h, config/mips/iris6.h, config/mips/mips.h
* config/mmix/mmix.h, config/mn10300/mn10300.h, config/ns32k/ns32k.h
* config/pa/elf.h, config/pa/pa-linux.h, config/pa/pa64-hpux.h
* config/pa/som.h, config/pdp11/pdp11.h, config/rs6000/linux64.h
* config/rs6000/lynx.h, config/rs6000/xcoff.h, config/sh/elf.h
* config/sh/sh.h, config/sparc/sparc.h, config/v850/v850.h
* config/vax/vax.h, config/vax/vaxv.h: Don't (re)define ASM_FILE_START.
* config/alpha/alpha-protos.h, config/arc/arc-protos.h
* config/avr/avr-protos.h, config/dsp16xx/dsp16xx-protos.h
* config/h8300/h8300-protos.h, config/ia64/ia64-protos.h
* config/m32r/m32r-protos.h, config/m68hc11/m68hc11-protos.h
* config/mips/mips-protos.h, config/mmix/mmix-protos.h
* config/mn10300/mn10300-protos.h, config/rs6000/rs6000-protos.h
* config/sh/sh-protos.h, config/v850/v850-protos.h: Update.
* xcoffout.h, config/rs6000/aix.h, config/rs6000/xcoff.h:
Remove reference to ASM_FILE_START in comment.
* config/arm/aof.h, config/arm/aout.h, config/arm/freebsd.h
* config/arm/linux-gas.h, config/arm/netbsd-elf.h
* config/arm/netbsd.h: Delete definition of ARM_OS_NAME.
From-SVN: r68229
2003-06-19 23:47:26 +02:00
|
|
|
This describes the overall framework of an assembly file.
|
|
|
|
|
|
|
|
@deftypefn {Target Hook} void TARGET_ASM_FILE_START ()
|
|
|
|
@findex default_file_start
|
|
|
|
Output to @code{asm_out_file} any text which the assembler expects to
|
|
|
|
find at the beginning of a file. The default behavior is controlled
|
|
|
|
by two flags, documented below. Unless your target's assembler is
|
|
|
|
quite unusual, if you override the default, you should call
|
|
|
|
@code{default_file_start} at some point in your target hook. This
|
|
|
|
lets other target files rely on these variables.
|
|
|
|
@end deftypefn
|
1996-09-25 01:21:45 +02:00
|
|
|
|
target.h (asm_out.file_start, [...]): New hooks.
* target.h (asm_out.file_start, file_start_app_off,
file_start_file_directive): New hooks.
* target-def.h (TARGET_ASM_FILE_START_FILE_DIRECTIVE,
TARGET_ASM_FILE_START_APP_OFF, TARGET_ASM_FILE_START):
New hook-definition macros.
* doc/tm.texi: Document new hooks; remove docs of ASM_FILE_START.
* varasm.c (default_file_start): New.
* output.h: Prototype it.
* toplev.c (init_asm_output): Use targetm.asm_out.file_start.
* system.h: Poison ASM_FILE_START.
* config/alpha/alpha.c (alpha_write_verstamp): Delete.
(alpha_file_start): New, define if !TARGET_ABI_UNICOSMK.
(unicosmk_asm_file_start): Rename unicosmk_file_start,
make static, take no arguments.
(TARGET_ASM_FILE_START, TARGET_ASM_FILE_END,
TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set as appropriate.
* config/alpha/unicosmk.h: Don't define ASM_FILE_START nor
TARGET_ASM_FILE_END. Remove reference to ASM_FILE_START in
comment.
* config/arc/arc.c (arc_asm_file_start): Rename
arc_file_start, take no arguments, make static.
(TARGET_ASM_FILE_START): Set it.
* config/arm/arm.c (aof_file_start): New static function.
(TARGET_ASM_FILE_START): Set it, when appropriate.
* config/arm/coff.h, config/arm/elf.h:
Set TARGET_ASM_FILE_START_APP_OFF to true.
* config/avr/avr.c (asm_file_start): Rename avr_file_start,
take no arguments, make static.
(TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE):
Set them.
* config/c4x/c4x.c (c4x_file_start): New static function.
(TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE):
Set them.
* config/cris/cris.c (cris_file_start): New static function.
(TARGET_ASM_FILE_START): Set it.
* config/dsp16xx/dsp16xx.c (coff_dsp16xx_file_start): Rename
dsp16xx_file_start, make static.
(luxworks_dsp16xx_file_start): Delete.
(TARGET_ASM_FILE_START): Set it.
* config/h8300/h8300.c (asm_file_start): Rename
h8300_file_start, make static, take no arguments.
(TARGET_ASM_FILE_START): Set it.
* config/i370/i370.c (i370_file_start): New static function.
(TARGET_ASM_FILE_START): Set it.
* config/i386/i386.c (x86_file_start): New static function.
(TARGET_ASM_FILE_START): Set it.
* config/i386/i386.h (X86_FILE_START_VERSION_DIRECTIVE,
X86_FILE_START_FLTUSED): New macros, default to false.
* config/i386/i386-interix.h: Override X86_FILE_START_FLTUSED to 1.
* config/i386/sysv4.h, config/i386/sco5.h: Override
X86_FILE_START_VERSION_DIRECTIVE to true.
* config/ia64/ia64.c (ia64_file_start): New static function.
(TARGET_ASM_FILE_START): Set it.
(emit_safe_across_calls): Take no arguments.
* config/ia64/ia64.md: Update to match.
* config/m32r/m32r.c (m32r_asm_file_start): Rename
m32r_file_start, make static, take no arguments.
(TARGET_ASM_FILE_START): Set it.
* config/m68hc11/m68hc11.c (m68hc11_asm_file_start): Rename
m68hc11_file_start, make static, take no arguments.
(TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set.
(print_options): Delete.
* config/m68k/m68k.c (m68k_hp320_file_start): New static function.
(TARGET_ASM_FILE_START_APP_OFF): Set.
* config/m68k/hp320.h: Set TARGET_ASM_FILE_START to
m68k_hp320_file_start.
* config/mips/mips.c (iris6_asm_file_start, mips_asm_file_start):
Make static, take no arguments.
(TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set.
* config/mmix/mmix.c (mmix_asm_file_start): Rename
mmix_file_start, make static, take no arguments.
(TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set.
* config/mn10300/mn10300.c (asm_file_start): Rename
mn10300_file_start, make static, take no arguments.
(TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set.
* config/ns32k/ns32k.c (TARGET_ASM_FILE_START_APP_OFF): Set.
* config/pa/pa.c (pa_file_start_level, pa_file_start_space,
pa_file_start_file, pa_file_start_mcount, pa_elf_file_start,
pa_som_file_start, pa_linux_file_start, pa_hpux64_gas_file_start,
pa_hpux64_hpas_file_start): New static functions.
* config/pa/elf.h: Set TARGET_ASM_FILE_START to pa_elf_file_start.
* config/pa/pa-linux.h: Set TARGET_ASM_FILE_START to
pa_linux_file_start.
* config/pa/pa64-hpux.h: Set TARGET_ASM_FILE_START to
pa_hpux64_gas_file_start or pa_hpux64_hpas_file_start, as
appropriate.
* config/pa/som.h: Set TARGET_ASM_FILE_START to pa_som_file_start.
* config/rs6000/rs6000.c: Include xcoffout.h when TARGET_XCOFF.
(rs6000_file_start): Make static, take no arguments. Reset
default_cpu under certain conditions.
(rs6000_xcoff_file_start): New function.
* config/rs6000/rs6000.h (TARGET_ASM_FILE_START): Set.
* config/rs6000/xcoff.h (TARGET_ASM_FILE_START,
TARGET_ASM_FILE_START_FILE_DIRECTIVE): Override.
* config/sh/sh.c (output_file_start): Rename
sh_file_start, make static, take no arguments. Merge in old
code from sh/elf.h's ASM_FILE_START, conditioned on TARGET_ELF.
(TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set.
* config/sh/sh.c (TARGET_ELF): Define to 0.
* config/sh/elf.h (TARGET_ELF): Redefine to 1.
* config/v850/v850.c (asm_file_start): Delete.
(TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set.
* config/vax/vax.c (vax_file_start): New static function.
(TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_APP_OFF): Set.
* config/darwin.h: Override ASM_FILE_START_FILE_DIRECTIVE to false.
* config/elfos.h, config/svr3.h, config/arm/elf.h, config/arm/pe.h
* config/i386/att.h, config/i386/gas.h, config/i386/linux.h
* config/i386/sysv4.h, config/i386/sco5.h, config/i960/i960-coff.h
* config/m68k/coff.h, config/m68k/hp320.h, config/mcore/mcore-pe.h
* config/vax/vaxv.h: Set ASM_FILE_START_FILE_DIRECTIVE to true.
* config/darwin.h, config/elfos.h, config/alpha/elf.h
* config/alpha/openbsd.h, config/alpha/osf.h, config/alpha/vms.h
* config/arc/arc.h, config/arm/aof.h, config/arm/aout.h
* config/arm/coff.h, config/arm/elf.h, config/arm/pe.h
* config/avr/avr.h, config/c4x/c4x.h, config/cris/cris.h
* config/dsp16xx/dsp16xx.h, config/h8300/elf.h, config/h8300/h8300.h
* config/i370/i370.h, config/i386/att.h, config/i386/gas.h
* config/i386/i386-interix.h, config/i386/linux.h, config/i386/sysv4.h
* config/i386/sco5.h, config/i960/i960-coff.h, config/i960/i960.h
* config/ia64/ia64.h, config/ia64/sysv4.h, config/m32r/m32r.h
* config/m68hc11/m68hc11.h, config/m68k/coff.h, config/m68k/m68k.h
* config/mcore/mcore-pe.h, config/mips/iris6.h, config/mips/mips.h
* config/mmix/mmix.h, config/mn10300/mn10300.h, config/ns32k/ns32k.h
* config/pa/elf.h, config/pa/pa-linux.h, config/pa/pa64-hpux.h
* config/pa/som.h, config/pdp11/pdp11.h, config/rs6000/linux64.h
* config/rs6000/lynx.h, config/rs6000/xcoff.h, config/sh/elf.h
* config/sh/sh.h, config/sparc/sparc.h, config/v850/v850.h
* config/vax/vax.h, config/vax/vaxv.h: Don't (re)define ASM_FILE_START.
* config/alpha/alpha-protos.h, config/arc/arc-protos.h
* config/avr/avr-protos.h, config/dsp16xx/dsp16xx-protos.h
* config/h8300/h8300-protos.h, config/ia64/ia64-protos.h
* config/m32r/m32r-protos.h, config/m68hc11/m68hc11-protos.h
* config/mips/mips-protos.h, config/mmix/mmix-protos.h
* config/mn10300/mn10300-protos.h, config/rs6000/rs6000-protos.h
* config/sh/sh-protos.h, config/v850/v850-protos.h: Update.
* xcoffout.h, config/rs6000/aix.h, config/rs6000/xcoff.h:
Remove reference to ASM_FILE_START in comment.
* config/arm/aof.h, config/arm/aout.h, config/arm/freebsd.h
* config/arm/linux-gas.h, config/arm/netbsd-elf.h
* config/arm/netbsd.h: Delete definition of ARM_OS_NAME.
From-SVN: r68229
2003-06-19 23:47:26 +02:00
|
|
|
@deftypevr {Target Hook} bool TARGET_ASM_FILE_START_APP_OFF
|
|
|
|
If this flag is true, the text of the macro @code{ASM_APP_OFF} will be
|
|
|
|
printed as the very first line in the assembly file, unless
|
|
|
|
@option{-fverbose-asm} is in effect. (If that macro has been defined
|
|
|
|
to the empty string, this variable has no effect.) With the normal
|
|
|
|
definition of @code{ASM_APP_OFF}, the effect is to notify the GNU
|
|
|
|
assembler that it need not bother stripping comments or extra
|
|
|
|
whitespace from its input. This allows it to work a bit faster.
|
|
|
|
|
|
|
|
The default is false. You should not set it to true unless you have
|
|
|
|
verified that your port does not generate any extra whitespace or
|
|
|
|
comments that will cause GAS to issue errors in NO_APP mode.
|
|
|
|
@end deftypevr
|
|
|
|
|
|
|
|
@deftypevr {Target Hook} bool TARGET_ASM_FILE_START_FILE_DIRECTIVE
|
|
|
|
If this flag is true, @code{output_file_directive} will be called
|
|
|
|
for the primary source file, immediately after printing
|
|
|
|
@code{ASM_APP_OFF} (if that is enabled). Most ELF assemblers expect
|
|
|
|
this to be done. The default is false.
|
|
|
|
@end deftypevr
|
1996-09-25 01:21:45 +02:00
|
|
|
|
config.gcc (with_cpu handling): Translate sparc64 in $machine to --with-cpu=v9.
* config.gcc (with_cpu handling): Translate sparc64 in
$machine to --with-cpu=v9.
* config/alpha/alpha.c
(TARGET_ASM_GLOBALIZE_LABEL [TARGET_ABI_UNICOSMK]): Correct definition.
(alpha_setup_incoming_varargs): #ifdef out when TARGET_ABI_UNICOSMK.
* target.h: New hook asm_out.file_end.
* target.h: Update to match. New hook macro TARGET_ASM_FILE_END.
* toplev.c (compile_file: Use targetm.asm_out.file_end.
* system.h: Poison ASM_FILE_END.
* varasm.c (file_end_indicate_exec_stack): New.
* output.h: Prototype it.
* doc/tm.texi: Document TARGET_ASM_FILE_END and
file_end_indicate_exec_stack. Delete references to attasm.h.
* config/darwin.h (TARGET_ASM_FILE_END): Reset to darwin_file_end.
(ASM_FILE_END): Delete; move code...
* config/darwin.c (darwin_file_end): Here; new function.
* config/darwin-protos.h: Prototype it.
* config/alpha/alpha.c (unicosmk_asm_file_end): Make static,
rename unicosmk_file_end.
* config/arm/aof.h (ASM_FILE_END): Delete; move code...
* config/arm/arm.c (aof_file_end): ... here; new static function.
Set TARGET_ASM_FILE_END to aof_file_end if AOF_ASSEMBLER.
Make aof_dump_imports and aof_dump_pic_table static.
* config/avr/avr.c (asm_file_end): Rename avr_file_end, make static.
Set TARGET_ASM_FILE_END to avr_file_end.
* config/c4x/c4x.c (c4x_file_end): Make static. Take no arguments.
Set TARGET_ASM_FILE_END to c4x_file_end.
* config/h8300/h8300.c (asm_file_end): Rename h8300_file_end,
make static. Take no arguments. Set TARGET_ASM_FILE_END to
h8300_file_end.
* config/i370/i370.h (ASM_FILE_END): Delete; move code...
* config/i370/i370.c (i370_file_end): ... here; new static function.
Set TARGET_ASM_FILE_END to i370_file_end.
* config/i386/i386.c (ix86_asm_file_end): Rename ix86_file_end.
Take no arguments. Call file_end_indicate_exec_stack if
NEED_INDICATE_EXEC_STACK; don't use SUBTARGET_FILE_END.
* config/i386/i386.h: Set TARGET_ASM_FILE_END, not ASM_FILE_END.
Define NEED_INDICATE_EXEC_STACK to 0.
* config/i386/linux.h, config/i386/linux64.h: Redefine
NEED_INDICATE_EXEC_STACK to 1 instead of setting SUBTARGET_FILE_END.
* config/i386/winnt.c (i386_pe_asm_file_end): Rename to
i386_pe_file_end. Take no arguments. Use ix86_file_end.
* config/ia64/ia64.c (ia64_hpux_asm_file_end): Rename to
ia64_hpux_file_end, make static. Take no arguments.
* config/ip2k/ip2k.c (asm_file_start, asm_file_end,
commands_in_prologues, commands_in_epilogues): Delete.
(function_epilogue): Update to match.
* config/mips/mips.c (mips_asm_file_end): Rename mips_file_end,
make static. Take no arguments.
(iris6_asm_file_end): Rename iris6_file_end, make static, use
mips_file_end, take no arguments.
Set TARGET_ASM_FILE_END to iris6_file_end or mips_file_end as
appropriate.
* config/mmix/mmix.c (mmix_asm_file_end): Rename mmix_file_end,
make static, take no arguments. Set TARGET_ASM_FILE_END to
mmix_file_end.
* config/pa/pa.c (output_deferred_plabels): Make static, take
no arguments. Set TARGET_ASM_FILE_END to output_deferred_plabels.
* config/rs6000/xcoff.h (TARGET_ASM_FILE_END): Set it.
(ASM_FILE_END): Delete; move code...
* config/rs6000/rs6000.c (rs6000_xcoff_file_end): ... here;
new static function.
* config/avr/avr.h, config/cris/cris.h, config/h8300/h8300.h
* config/mmix/mmix.h, config/mips/iris6.h, config/mips/mips.h:
Don't set ASM_FILE_END.
* config/alpha/linux-elf.h, config/m68k/linux.h, config/rs6000/linux.h
* config/rs6000/linux64.h, config/s390/linux.h, config/sparc/linux.h
* config/sparc/linux64.h: Set TARGET_ASM_FILE_END to
file_end_indicate_exec_stack; don't set ASM_FILE_END.
* config/alpha/unicosmk.h, config/i386/cygming.h
* config/ia64/hpux.h: Set TARGET_ASM_FILE_END, not ASM_FILE_END.
* config/arm/arm-protos.h, config/alpha/alpha-protos.h
* config/avr/avr-protos.h, config/c4x/c4x-protos.h
* config/h8300/h8300-protos.h, config/ia64/ia64-protos.h
* config/ip2k/ip2k-protos.h, config/mips/mips-protos.h
* config/mmix/mmix-protos.h, config/pa/pa-protos.h: Update.
From-SVN: r67591
2003-06-07 19:11:48 +02:00
|
|
|
@deftypefn {Target Hook} void TARGET_ASM_FILE_END ()
|
|
|
|
Output to @code{asm_out_file} any text which the assembler expects
|
|
|
|
to find at the end of a file. The default is to output nothing.
|
|
|
|
@end deftypefn
|
1996-09-25 01:21:45 +02:00
|
|
|
|
config.gcc (with_cpu handling): Translate sparc64 in $machine to --with-cpu=v9.
* config.gcc (with_cpu handling): Translate sparc64 in
$machine to --with-cpu=v9.
* config/alpha/alpha.c
(TARGET_ASM_GLOBALIZE_LABEL [TARGET_ABI_UNICOSMK]): Correct definition.
(alpha_setup_incoming_varargs): #ifdef out when TARGET_ABI_UNICOSMK.
* target.h: New hook asm_out.file_end.
* target.h: Update to match. New hook macro TARGET_ASM_FILE_END.
* toplev.c (compile_file: Use targetm.asm_out.file_end.
* system.h: Poison ASM_FILE_END.
* varasm.c (file_end_indicate_exec_stack): New.
* output.h: Prototype it.
* doc/tm.texi: Document TARGET_ASM_FILE_END and
file_end_indicate_exec_stack. Delete references to attasm.h.
* config/darwin.h (TARGET_ASM_FILE_END): Reset to darwin_file_end.
(ASM_FILE_END): Delete; move code...
* config/darwin.c (darwin_file_end): Here; new function.
* config/darwin-protos.h: Prototype it.
* config/alpha/alpha.c (unicosmk_asm_file_end): Make static,
rename unicosmk_file_end.
* config/arm/aof.h (ASM_FILE_END): Delete; move code...
* config/arm/arm.c (aof_file_end): ... here; new static function.
Set TARGET_ASM_FILE_END to aof_file_end if AOF_ASSEMBLER.
Make aof_dump_imports and aof_dump_pic_table static.
* config/avr/avr.c (asm_file_end): Rename avr_file_end, make static.
Set TARGET_ASM_FILE_END to avr_file_end.
* config/c4x/c4x.c (c4x_file_end): Make static. Take no arguments.
Set TARGET_ASM_FILE_END to c4x_file_end.
* config/h8300/h8300.c (asm_file_end): Rename h8300_file_end,
make static. Take no arguments. Set TARGET_ASM_FILE_END to
h8300_file_end.
* config/i370/i370.h (ASM_FILE_END): Delete; move code...
* config/i370/i370.c (i370_file_end): ... here; new static function.
Set TARGET_ASM_FILE_END to i370_file_end.
* config/i386/i386.c (ix86_asm_file_end): Rename ix86_file_end.
Take no arguments. Call file_end_indicate_exec_stack if
NEED_INDICATE_EXEC_STACK; don't use SUBTARGET_FILE_END.
* config/i386/i386.h: Set TARGET_ASM_FILE_END, not ASM_FILE_END.
Define NEED_INDICATE_EXEC_STACK to 0.
* config/i386/linux.h, config/i386/linux64.h: Redefine
NEED_INDICATE_EXEC_STACK to 1 instead of setting SUBTARGET_FILE_END.
* config/i386/winnt.c (i386_pe_asm_file_end): Rename to
i386_pe_file_end. Take no arguments. Use ix86_file_end.
* config/ia64/ia64.c (ia64_hpux_asm_file_end): Rename to
ia64_hpux_file_end, make static. Take no arguments.
* config/ip2k/ip2k.c (asm_file_start, asm_file_end,
commands_in_prologues, commands_in_epilogues): Delete.
(function_epilogue): Update to match.
* config/mips/mips.c (mips_asm_file_end): Rename mips_file_end,
make static. Take no arguments.
(iris6_asm_file_end): Rename iris6_file_end, make static, use
mips_file_end, take no arguments.
Set TARGET_ASM_FILE_END to iris6_file_end or mips_file_end as
appropriate.
* config/mmix/mmix.c (mmix_asm_file_end): Rename mmix_file_end,
make static, take no arguments. Set TARGET_ASM_FILE_END to
mmix_file_end.
* config/pa/pa.c (output_deferred_plabels): Make static, take
no arguments. Set TARGET_ASM_FILE_END to output_deferred_plabels.
* config/rs6000/xcoff.h (TARGET_ASM_FILE_END): Set it.
(ASM_FILE_END): Delete; move code...
* config/rs6000/rs6000.c (rs6000_xcoff_file_end): ... here;
new static function.
* config/avr/avr.h, config/cris/cris.h, config/h8300/h8300.h
* config/mmix/mmix.h, config/mips/iris6.h, config/mips/mips.h:
Don't set ASM_FILE_END.
* config/alpha/linux-elf.h, config/m68k/linux.h, config/rs6000/linux.h
* config/rs6000/linux64.h, config/s390/linux.h, config/sparc/linux.h
* config/sparc/linux64.h: Set TARGET_ASM_FILE_END to
file_end_indicate_exec_stack; don't set ASM_FILE_END.
* config/alpha/unicosmk.h, config/i386/cygming.h
* config/ia64/hpux.h: Set TARGET_ASM_FILE_END, not ASM_FILE_END.
* config/arm/arm-protos.h, config/alpha/alpha-protos.h
* config/avr/avr-protos.h, config/c4x/c4x-protos.h
* config/h8300/h8300-protos.h, config/ia64/ia64-protos.h
* config/ip2k/ip2k-protos.h, config/mips/mips-protos.h
* config/mmix/mmix-protos.h, config/pa/pa-protos.h: Update.
From-SVN: r67591
2003-06-07 19:11:48 +02:00
|
|
|
@deftypefun void file_end_indicate_exec_stack ()
|
|
|
|
Some systems use a common convention, the @samp{.note.GNU-stack}
|
|
|
|
special section, to indicate whether or not an object file relies on
|
|
|
|
the stack being executable. If your system uses this convention, you
|
|
|
|
should define @code{TARGET_ASM_FILE_END} to this function. If you
|
|
|
|
need to do other things in that hook, have your hook function call
|
|
|
|
this function.
|
|
|
|
@end deftypefun
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ASM_COMMENT_START
|
1996-09-25 01:21:45 +02:00
|
|
|
A C string constant describing how to begin a comment in the target
|
|
|
|
assembler language. The compiler assumes that the comment will end at
|
|
|
|
the end of the line.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ASM_APP_ON
|
1996-09-25 01:21:45 +02:00
|
|
|
A C string constant for text to be output before each @code{asm}
|
|
|
|
statement or group of consecutive ones. Normally this is
|
|
|
|
@code{"#APP"}, which is a comment that has no effect on most
|
|
|
|
assemblers but tells the GNU assembler that it must check the lines
|
|
|
|
that follow for all valid assembler constructs.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ASM_APP_OFF
|
1996-09-25 01:21:45 +02:00
|
|
|
A C string constant for text to be output after each @code{asm}
|
|
|
|
statement or group of consecutive ones. Normally this is
|
|
|
|
@code{"#NO_APP"}, which tells the GNU assembler to resume making the
|
|
|
|
time-saving assumptions that are valid for ordinary compiler output.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ASM_OUTPUT_SOURCE_FILENAME (@var{stream}, @var{name})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C statement to output COFF information or DWARF debugging information
|
|
|
|
which indicates that filename @var{name} is the current source file to
|
|
|
|
the stdio stream @var{stream}.
|
|
|
|
|
|
|
|
This macro need not be defined if the standard form of output
|
|
|
|
for the file format in use is appropriate.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac OUTPUT_QUOTED_STRING (@var{stream}, @var{string})
|
1997-11-02 22:19:36 +01:00
|
|
|
A C statement to output the string @var{string} to the stdio stream
|
|
|
|
@var{stream}. If you do not call the function @code{output_quoted_string}
|
1999-08-25 09:27:13 +02:00
|
|
|
in your config files, GCC will only call it to output filenames to
|
1997-11-02 22:19:36 +01:00
|
|
|
the assembler source. So you can use it to canonicalize the format
|
|
|
|
of the filename using this macro.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1997-11-02 22:19:36 +01:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ASM_OUTPUT_IDENT (@var{stream}, @var{string})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C statement to output something to the assembler file to handle a
|
|
|
|
@samp{#ident} directive containing the text @var{string}. If this
|
|
|
|
macro is not defined, nothing is output for a @samp{#ident} directive.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
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
|
|
|
@deftypefn {Target Hook} void TARGET_ASM_NAMED_SECTION (const char *@var{name}, unsigned int @var{flags}, unsigned int @var{align})
|
|
|
|
Output assembly directives to switch to section @var{name}. The section
|
|
|
|
should have attributes as specified by @var{flags}, which is a bit mask
|
|
|
|
of the @code{SECTION_*} flags defined in @file{output.h}. If @var{align}
|
2001-10-10 01:11:55 +02:00
|
|
|
is nonzero, it contains an alignment in bytes to be used for the section,
|
2002-02-23 13:59:09 +01:00
|
|
|
otherwise some target default should be used. Only targets that must
|
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
|
|
|
specify an alignment within the section directive need pay attention to
|
|
|
|
@var{align} -- we will still use @code{ASM_OUTPUT_ALIGN}.
|
|
|
|
@end deftypefn
|
|
|
|
|
|
|
|
@deftypefn {Target Hook} bool TARGET_HAVE_NAMED_SECTIONS
|
|
|
|
This flag is true if the target supports @code{TARGET_ASM_NAMED_SECTION}.
|
|
|
|
@end deftypefn
|
|
|
|
|
|
|
|
@deftypefn {Target Hook} {unsigned int} TARGET_SECTION_TYPE_FLAGS (tree @var{decl}, const char *@var{name}, int @var{reloc})
|
|
|
|
Choose a set of section attributes for use by @code{TARGET_ASM_NAMED_SECTION}
|
|
|
|
based on a variable or function decl, a section name, and whether or not the
|
|
|
|
declaration's initializer may contain runtime relocations. @var{decl} may be
|
|
|
|
null, in which case read-write data should be assumed.
|
|
|
|
|
|
|
|
The default version if this function handles choosing code vs data,
|
|
|
|
read-only vs read-write data, and @code{flag_pic}. You should only
|
|
|
|
need to override this if your target has special flags that might be
|
|
|
|
set via @code{__attribute__}.
|
|
|
|
@end deftypefn
|
|
|
|
|
1996-09-25 01:21:45 +02:00
|
|
|
@need 2000
|
|
|
|
@node Data Output
|
|
|
|
@subsection Output of Data
|
|
|
|
|
target.h (asm_out.byte_op, [...]): New fields.
* target.h (asm_out.byte_op, asm_out.aligned_op, asm_out.unaligned_op,
asm_out.integer): New fields.
* target-def.h (TARGET_ASM_BYTE_OP, TARGET_ASM_ALIGNED_[HSDT]I_OP,
TARGET_ASM_UNALIGNED_[HSDT]I_OP, TARGET_ASM_INTEGER): New initialisers.
(TARGET_ASM_ALIGNED_INT_OP, TARGET_ASM_UNALIGNED_INT_OP): Collect
the individual initialisers together.
(TARGET_ASM_OUT): Add the new initialisers.
* output.h (assemble_integer): Return bool.
(integer_asm_op): Declare.
(default_assemble_integer): Declare.
(assemble_aligned_integer): New interface to assemble_integer.
* varasm.c (integer_asm_op): New function to select pseudo-op.
(default_assemble_integer): Default implementation of asm_out.integer.
(assemble_integer): Use the new target hook. Split objects into
words or bytes if the target hook fails. Return bool.
* doc/tm.texi (ASM_OUTPUT_CHAR, ASM_OUTPUT_BYTE, ASM_OUTPUT_SHORT,
ASM_OUTPUT_INT, ASM_OUTPUT_DOUBLE_INT, ASM_OUTPUT_QUADRUPLE_INT,
UNALIGNED_SHORT_ASM_OP, UNALIGNED_INT_ASM_OP,
UNALIGNED_DOUBLE_INT_ASM_OP): Undocument.
Document new target hooks.
* defaults.h (ASM_OUTPUT_ADDR_VEC_ELT): Use integer_asm_op.
* dwarf2asm.c (unaligned_integer_asm_op): Remove.
(dw2_assemble_integer): New.
(dw2_asm_output_data, dw2_asm_output_delta, dw2_asm_output_offset,
dw2_asm_output_pcrel, dw2_asm_output_addr, dw2_asm_output_addr_rtx,
dw2_asm_output_encoded_addr_rtx): Use it.
(dw2_asm_output_nstring): Use assemble_integer for the null terminator.
(dw2_asm_output_data_uleb128, dw2_asm_output_data_sleb128): Use
integer_asm_op to get the byte pseudo-op. Use assemble_integer
if it returns NULL.
* dwarf2asm.h (dw2_assemble_integer): Declare.
* dwarfout.c: Include dwarf2asm.h. Use dwarf2 functions for the
default implementation of most macros.
(output_unsigned_leb128): Use dw2_asm_output_data.
(output_signed_leb128, dwarfout_source_line): Likewise.
(output_reg_number): Use dw2_assemble_integer.
(generate_macinfo_entry): Separate the type and offset arguments.
Use assemble_integer to write the value.
(dwarfout_start_source_file): Update generate_macinfo_entry usage.
(dwarfout_end_source_file, dwarfout_define, dwarfout_undef): Likewise.
* final.c (output_addr_const): Don't put brackets round a subtracted
symbol value or ".".
* halfpic.c (half_pic_finish): Use assemble_aligned_integer.
* config/1750a/1750a.c (assemble_integer_1750a): New,
* config/alpha/alpha.h (literal_section): Avoid ASM_OUTPUT_INT.
* config/arc/arc.c (arc_assemble_integer): New.
* config/arc/arc.h (TRAMPOLINE_TEMPLATE): Avoid ASM_OUTPUT_INT.
* config/arm/arm.c (arm_poke_function_name): Likewise.
(arm_assemble_integer): New, extracted from...
* config/arm/arm.h (OUTPUT_INT_ADDR_CONST): ...here, now removed.
(ARM_TRAMPOLINE_TEMPLATE, ARM_FUNCTION_PROFILER): Avoid ASM_OUTPUT_INT.
(ARM_FUNCTION_PROFILER): Likewise.
* config/avr/avr-protos.h (asm_output_byte): Remove.
(asm_output_char, asm_output_short): Remove.
* config/avr/avr.c (avr_assemble_integer): New.
(asm_output_byte, asm_output_char, asm_output_short): Remove.
* config/clipper/clipper.h (ASM_LONG): Remove.
* config/dsp16xx/dsp16xx-protos.h (asm_output_long): Remove.
* config/dsp16xx/dsp16xx.c (asm_output_long): Remove.
* config/elxsi/elxsi.c (elxsi_assemble_integer): New.
* config/i370/i370.c (i370_hlasm_assemble_integer): New.
* config/i370/i370.h (TRAMPOLINE_TEMPLATE): Avoid ASM_OUTPUT_SHORT.
(ASM_BYTE, ASM_SHORT, ASM_LONG): Delete.
* config/i386/att.h, (ASM_OUTPUT_ASCII): Avoid ASM_BYTE_OP.
* config/i386/linux.h (ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX): Use
ASM_LONG instead of UNALIGNED_INT_ASM_OP.
* config/i386/sco5.h (ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX): Likewise.
(ASM_OUTPUT_ASCII): Avoid ASM_BYTE_OP.
* config/i386/sysv4.h (ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX): Use
ASM_LONG instead of UNALIGNED_INT_ASM_OP.
* config/i860/fx2800.h (ASM_FILE_END): Avoid ASM_LONG.
* config/i860/i860.c (i860_output_function_epilogue): Likewise.
* config/i860/i860.h (TRAMPOLINE_TEMPLATE): Avoid ASM_OUTPUT_INT.
(ASM_SHORT, ASM_LONG): Undefine.
* config/i860/paragon.h (ASM_OUTPUT_ASCII): Avoid ASM_BYTE_OP.
* config/i860/sysv3.h (ASM_OUTPUT_ASCII): Likewise.
* config/i960/i960.h (TRAMPOLINE_TEMPLATE): Avoid ASM_OUTPUT_INT.
* config/ia64/ia64.c (ia64_assemble_integer): New.
* config/ia64/ia64.h (ASM_OUTPUT_DWARF_OFFSET): Use integer_asm_op.
(ASM_OUTPUT_DWARF_PCREL): Likewise.
* config/m68hc11/m68hc11.h (ASM_OUTPUT_DOUBLE, ASM_OUTPUT_FLOAT,
ASM_OUTPUT_ADDR_DIFF_ELT, ASM_OUTPUT_ADDR_VEC_ELT): Avoid ASM_LONG.
(ASM_SHORT, ASM_LONG): Remove.
* config/m68k/m68k.h (INT_OP_GROUP): New macro.
(INT_OP_STANDARD, INT_OP_DOT_WORD, INT_OP_NO_DOT, INT_OP_DC): New
macros, the allowed values for INT_OP_GROUP.
* config/m68k/amix.h (ASM_OUTPUT_ASCII): Avoid ASM_BYTE_OP
* config/m68k/atari.h (ASM_OUTPUT_ASCII): Likewise
* config/m68k/m68kelf.h (ASM_OUTPUT_ASCII): Likewise
* config/m68k/auxas.h (BYTE_ASM_OP, WORD_ASM_OP, LONG_ASM_OP): Remove.
(INT_OP_GROUP): Define to INT_OP_NO_DOT.
* config/m68k/dpx2.h (ASM_LONG): Undefine.
(INT_OP_GROUP): Define to INT_OP_DC.
* config/m68k/dpx2g.h (ASM_LONG): Undefine.
* config/m68k/hp320.h (INT_OP_GROUP): Define to INT_OP_NO_DOT.
* config/m68k/lynx.h (ASM_LONG): Undefine.
* config/m68k/dpx2g.h (ASM_LONG): Undefine.
* config/m68k/m68kelf.h (ASM_OUTPUT_ASCII): Avoid ASM_BYTE_OP.
* config/m68k/m68kv4.h (ASM_OUTPUT_ASCII): Likewise.
(TRAMPOLINE_TEMPLATE): Avoid ASM_OUTPUT_*.
* config/m68k/mot3300.h (INT_OP_GROUP): Define to INT_OP_STANDARD
for GAS and INT_OP_NO_DOT otherwise.
(ASM_CHAR, ASM_BYTE, ASM_SHORT, ASM_LONG): Remove.
(ASM_OUTPUT_LONG_DOUBLE, ASM_OUTPUT_DOUBLE, ASM_OUTPUT_FLOAT,
ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Avoid ASM_LONG.
(ASM_OUTPUT_ASCII): Avoid ASM_BYTE_OP.
* config/m68k/sgs.h (BYTE_ASM_OP, WORD_ASM_OP, LONG_ASM_OP): Remove.
(INT_OP_GROUP): Define to INT_OP_STANDARD.
(ASM_OUTPUT_LONG_DOUBLE, ASM_OUTPUT_DOUBLE, ASM_OUTPUT_FLOAT,
ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Avoid LONG_ASM_OP.
(ASM_OUTPUT_ASCII): Avoid BYTE_ASM_OP.
* config/m68k/tower-as.h (ASM_LONG): Remove.
(INT_OP_GROUP): Define to INT_OP_NO_DOT.
* config/m88k/m88k.c (output_tdesc): Avoid ASM_LONG.
* config/m88k/m88k.h (TRAMPOLINE_TEMPLATE): Avoid ASM_OUTPUT_INT.
(ASM_OUTPUT_DOUBLE, ASM_OUTPUT_FLOAT): Avoid ASM_LONG.
* config/mips/iris5.h (TARGET_IRIX5): Define.
* config/mips/mips.c (mips_assemble_integer): New.
* config/mips/sni-svr4.h (ASM_LONG): Undefine.
* config/mmix/mmix-protos.h (mmix_asm_output_double_int): Remove.
* config/mmix/mmix.c (mmix_assemble_integer): New.
(mmix_asm_output_double_int): Remove.
(mmix_print_operand): Call mmix_output_octa directly.
* config/mmix/mmix.h (ASM_LONG): Remove.
* config/ns32k/ns32k.h (TRAMPOLINE_TEMPLATE): Avoid ASM_OUTPUT_INT.
* config/pa/pa.c (pa_assemble_integer): New.
(pa_override_options): Only use aligned DI ops on 64-bit targets.
Only use the unaligned ops if TARGET_GAS.
* config/pdp11/pdp11.c (pdp11_assemble_integer): New.
* config/pdp11/pdp11.h (TRAMPOLINE_TEMPLATE): Avoid ASM_OUTPUT_SHORT.
* config/pj/pj.h (ASM_LONG): Undefine.
* config/rs6000/linux64.h (RELOCATABLE_NEEDS_FIXUP): Undefine.
* config/rs6000/rs6000.c (rs6000_assemble_integer): New, mostly
extracted from ASM_OUTPUT_INT in sysv4.h. Use in_text_section()
and in_toc_section() rather than the in_section variable.
(rs6000_override_options): Only use DI ops when TARGET_POWERPC64.
* config/rs6000/sysv4.h (TOC_SECTION_FUNCTION): Add in_toc_section().
(RELOCATABLE_NEEDS_FIXUP): Define.
* config/rs6000/xcoff.h (DOUBLE_INT_ASM_OP): Change space to tab.
* config/s390/linux.h (ASM_SHORT, ASM_LONG, ASM_QUAD): Remove.
(ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Use integer_asm_op
to get the word directive.
(ASM_OUTPUT_ASCII): Avoid ASM_BYTE_OP.
* config/s390/s390.c (s390_assemble_integer): New.
* config/s390/s390.h (ASM_OUTPUT_SPECIAL_POOL_ENTRY): Use
integer_asm_op to get the word directive.
* config/sparc/sol2.h (ASM_SHORT, ASM_LONG): Remove.
* config/sparc/sparc-protos.h (output_double_int): Remove.
* config/sparc/sparc.c (output_double_int): Move to...
(sparc_assemble_integer): ...this new function.
(sparc_override_options): Only use .uaxword if TARGET_ARCH64.
* config/sparc/sparc.h (ASM_SHORT, ASM_LONG, ASM_LONGLONG): Remove.
* config/sparc/sysv4.h (ASM_LONG): Remove.
(ASM_OUTPUT_LONG_DOUBLE, ASM_OUTPUT_DOUBLE, ASM_OUTPUT_FLOAT): Avoid
ASM_LONG.
* config/vax/vax.h (TRAMPOLINE_TEMPLATE): Use assemble_aligned_integer.
* config/we32k/we32k.h (TRAMPOLINE_TEMPLATE): Likewise.
* config/1750a/1750a.c, config/a29k/a29k.c, config/alpha/alpha.c,
config/arc/arc.c, config/arm/arm.c, config/avr/avr.c, config/c4x/c4x.c,
config/clipper/clipper.c, config/convex/convex.c, config/cris/cris.c,
config/d30v/d30v.c, config/dsp16xx/dsp16xx.c, config/elxsi/elxsi.c,
config/fr30/fr30.c, config/h8300/h8300.c, config/i370/i370.c,
config/i386/i386.c, config/i860/i860.c, config/i960/i960.c,
config/ia64/ia64.c, config/m32r/m32r.c, config/m68hc11/m68hc11.c,
config/m68k/m68k.c, config/m88k/m88k.c, config/mips/mips.c,
config/mmix/mmix.c, config/mn10200/mn10200.c, config/mn10300/mn10300.c,
config/ns32k/ns32k.c, config/pa/pa.c, config/pdp11/pdp11.c,
config/sh/sh.c, config/sparc/sparc.c, config/stormy16/stormy16.c,
config/v850/v850.c, config/vax/vax.c, config/we32k/we32k.c
(TARGET_ASM_BYTE_OP, TARGET_ASM_ALIGNED_HI_OP,
TARGET_ASM_ALIGNED_SI_OP, TARGET_ASM_ALIGNED_DI_OP,
TARGET_ASM_UNALIGNED_HI_OP, TARGET_ASM_UNALIGNED_SI_OP,
TARGET_ASM_UNALIGNED_DI_OP, TARGET_ASM_INTEGER): Redefine as
appropriate.
* config/defaults.h, config/darwin.h, config/elfos.h, config/svr3.h,
config/1750a/1750a.h, config/a29k/a29k.h, config/alpha/alpha.h,
config/arc/arc.h, config/arm/arm.h, config/avr/avr.h, config/c4x/c4x.h,
config/clipper/clipper.h, config/convex/convex.h, config/cris/cris.h,
config/d30v/d30v.h, config/dsp16xx/dsp16xx.h, config/elxsi/elxsi.h,
config/fr30/fr30.h, config/h8300/h8300.h, config/i370/i370.h,
config/i386/bsd.h, config/i386/djgpp.h, config/i386/i386.h,
config/i386/sco5.h, config/i386/sol2.h, config/i386/sun386.h,
config/i860/i860.h, config/i960/i960.h, config/ia64/ia64.h,
config/m32r/m32r.h, config/m68hc11/m68hc11.h, config/m68k/auxas.h,
config/m68k/dpx2.h, config/m68k/hp320.h, config/m68k/m68k.h,
config/m68k/mot3300.h, config/m68k/sgs.h, config/m68k/tower-as.h,
config/m88k/m88k.h, config/mcore/mcore-elf.h, config/mcore/mcore.h,
config/mips/iris5.h, config/mips/iris6.h, config/mips/mips.h,
config/mmix/mmix.h, config/mn10200/mn10200.h, config/mn10300/mn10300.h
config/ns32k/encore.h, config/ns32k/ns32k.h, config/pa/pa-64.h,
config/pa/pa.h, config/pdp11/pdp11.h, config/pj/pj.h,
config/romp/romp.h, config/rs6000/linux64.h, config/rs6000/rs6000.h,
config/rs6000/sysv4.h, config/rs6000/xcoff.h, config/s390/linux.h,
config/sh/sh.h, config/sparc/linux64.h, config/sparc/sol2.h,
config/sparc/sp64-elf.h, config/sparc/sparc.h, config/sparc/sysv4.h,
config/stormy16/stormy16.h, config/v850/v850.h, config/vax/vax.h,
config/we32k/we32k.h (ASM_OUTPUT_CHAR, ASM_OUTPUT_BYTE, ASM_BYTE_OP,
ASM_BYTE, ASM_OUTPUT_SHORT, ASM_OUTPUT_INT, ASM_OUTPUT_DOUBLE_INT,
UNALIGNED_SHORT_ASM_OP, UNALIGNED_INT_ASM_OP,
UNALIGNED_DOUBLE_INT_ASM_OP): Undefine, where defined.
From-SVN: r48101
2001-12-17 16:05:40 +01:00
|
|
|
|
|
|
|
@deftypevr {Target Hook} {const char *} TARGET_ASM_BYTE_OP
|
|
|
|
@deftypevrx {Target Hook} {const char *} TARGET_ASM_ALIGNED_HI_OP
|
|
|
|
@deftypevrx {Target Hook} {const char *} TARGET_ASM_ALIGNED_SI_OP
|
|
|
|
@deftypevrx {Target Hook} {const char *} TARGET_ASM_ALIGNED_DI_OP
|
|
|
|
@deftypevrx {Target Hook} {const char *} TARGET_ASM_ALIGNED_TI_OP
|
|
|
|
@deftypevrx {Target Hook} {const char *} TARGET_ASM_UNALIGNED_HI_OP
|
|
|
|
@deftypevrx {Target Hook} {const char *} TARGET_ASM_UNALIGNED_SI_OP
|
|
|
|
@deftypevrx {Target Hook} {const char *} TARGET_ASM_UNALIGNED_DI_OP
|
|
|
|
@deftypevrx {Target Hook} {const char *} TARGET_ASM_UNALIGNED_TI_OP
|
|
|
|
These hooks specify assembly directives for creating certain kinds
|
|
|
|
of integer object. The @code{TARGET_ASM_BYTE_OP} directive creates a
|
|
|
|
byte-sized object, the @code{TARGET_ASM_ALIGNED_HI_OP} one creates an
|
|
|
|
aligned two-byte object, and so on. Any of the hooks may be
|
|
|
|
@code{NULL}, indicating that no suitable directive is available.
|
|
|
|
|
|
|
|
The compiler will print these strings at the start of a new line,
|
|
|
|
followed immediately by the object's initial value. In most cases,
|
|
|
|
the string should contain a tab, a pseudo-op, and then another tab.
|
|
|
|
@end deftypevr
|
|
|
|
|
|
|
|
@deftypefn {Target Hook} bool TARGET_ASM_INTEGER (rtx @var{x}, unsigned int @var{size}, int @var{aligned_p})
|
|
|
|
The @code{assemble_integer} function uses this hook to output an
|
|
|
|
integer object. @var{x} is the object's value, @var{size} is its size
|
|
|
|
in bytes and @var{aligned_p} indicates whether it is aligned. The
|
|
|
|
function should return @code{true} if it was able to output the
|
|
|
|
object. If it returns false, @code{assemble_integer} will try to
|
|
|
|
split the object into smaller parts.
|
|
|
|
|
|
|
|
The default implementation of this hook will use the
|
|
|
|
@code{TARGET_ASM_BYTE_OP} family of strings, returning @code{false}
|
|
|
|
when the relevant string is @code{NULL}.
|
|
|
|
@end deftypefn
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac OUTPUT_ADDR_CONST_EXTRA (@var{stream}, @var{x}, @var{fail})
|
2000-11-23 07:37:23 +01:00
|
|
|
A C statement to recognize @var{rtx} patterns that
|
|
|
|
@code{output_addr_const} can't deal with, and output assembly code to
|
|
|
|
@var{stream} corresponding to the pattern @var{x}. This may be used to
|
|
|
|
allow machine-dependent @code{UNSPEC}s to appear within constants.
|
|
|
|
|
|
|
|
If @code{OUTPUT_ADDR_CONST_EXTRA} fails to recognize a pattern, it must
|
|
|
|
@code{goto fail}, so that a standard error message is printed. If it
|
|
|
|
prints an error message itself, by calling, for example,
|
|
|
|
@code{output_operand_lossage}, it may just complete normally.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2000-11-23 07:37:23 +01:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ASM_OUTPUT_ASCII (@var{stream}, @var{ptr}, @var{len})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C statement to output to the stdio stream @var{stream} an assembler
|
|
|
|
instruction to assemble a string constant containing the @var{len}
|
|
|
|
bytes at @var{ptr}. @var{ptr} will be a C expression of type
|
|
|
|
@code{char *} and @var{len} a C expression of type @code{int}.
|
|
|
|
|
|
|
|
If the assembler has a @code{.ascii} pseudo-op as found in the
|
|
|
|
Berkeley Unix assembler, do not define the macro
|
|
|
|
@code{ASM_OUTPUT_ASCII}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ASM_OUTPUT_FDESC (@var{stream}, @var{decl}, @var{n})
|
2001-09-21 18:58:22 +02:00
|
|
|
A C statement to output word @var{n} of a function descriptor for
|
|
|
|
@var{decl}. This must be defined if @code{TARGET_VTABLE_USES_DESCRIPTORS}
|
|
|
|
is defined, and is otherwise unused.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2001-09-21 18:58:22 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac CONSTANT_POOL_BEFORE_FUNCTION
|
1997-08-11 17:56:58 +02:00
|
|
|
You may define this macro as a C expression. You should define the
|
2001-10-10 01:11:55 +02:00
|
|
|
expression to have a nonzero value if GCC should output the constant
|
1997-08-11 17:56:58 +02:00
|
|
|
pool for a function before the code for the function, or a zero value if
|
1999-08-25 09:27:13 +02:00
|
|
|
GCC should output the constant pool after the function. If you do
|
|
|
|
not define this macro, the usual case, GCC will output the constant
|
1997-08-11 17:56:58 +02:00
|
|
|
pool before the function.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1997-08-11 17:56:58 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ASM_OUTPUT_POOL_PROLOGUE (@var{file}, @var{funname}, @var{fundecl}, @var{size})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C statement to output assembler commands to define the start of the
|
|
|
|
constant pool for a function. @var{funname} is a string giving
|
|
|
|
the name of the function. Should the return type of the function
|
|
|
|
be required, it can be obtained via @var{fundecl}. @var{size}
|
|
|
|
is the size, in bytes, of the constant pool that will be written
|
|
|
|
immediately after this call.
|
|
|
|
|
|
|
|
If no constant-pool prefix is required, the usual case, this macro need
|
|
|
|
not be defined.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ASM_OUTPUT_SPECIAL_POOL_ENTRY (@var{file}, @var{x}, @var{mode}, @var{align}, @var{labelno}, @var{jumpto})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C statement (with or without semicolon) to output a constant in the
|
|
|
|
constant pool, if it needs special treatment. (This macro need not do
|
|
|
|
anything for RTL expressions that can be output normally.)
|
|
|
|
|
|
|
|
The argument @var{file} is the standard I/O stream to output the
|
|
|
|
assembler code on. @var{x} is the RTL expression for the constant to
|
|
|
|
output, and @var{mode} is the machine mode (in case @var{x} is a
|
|
|
|
@samp{const_int}). @var{align} is the required alignment for the value
|
|
|
|
@var{x}; you should output an assembler directive to force this much
|
|
|
|
alignment.
|
|
|
|
|
|
|
|
The argument @var{labelno} is a number to use in an internal label for
|
|
|
|
the address of this pool entry. The definition of this macro is
|
|
|
|
responsible for outputting the label definition at the proper place.
|
|
|
|
Here is how to do this:
|
|
|
|
|
c-tree.texi, [...]: Use @smallexample instead of @example.
* doc/c-tree.texi, doc/compat.texi, doc/cpp.texi,
doc/cppopts.texi, doc/extend.texi, doc/install.texi,
doc/interface.texi, doc/invoke.texi, doc/libgcc.texi, doc/md.texi,
doc/objc.texi, doc/rtl.texi, doc/tm.texi, doc/trouble.texi: Use
@smallexample instead of @example.
From-SVN: r76075
2004-01-18 02:20:48 +01:00
|
|
|
@smallexample
|
2002-12-16 19:23:00 +01:00
|
|
|
@code{(*targetm.asm_out.internal_label)} (@var{file}, "LC", @var{labelno});
|
c-tree.texi, [...]: Use @smallexample instead of @example.
* doc/c-tree.texi, doc/compat.texi, doc/cpp.texi,
doc/cppopts.texi, doc/extend.texi, doc/install.texi,
doc/interface.texi, doc/invoke.texi, doc/libgcc.texi, doc/md.texi,
doc/objc.texi, doc/rtl.texi, doc/tm.texi, doc/trouble.texi: Use
@smallexample instead of @example.
From-SVN: r76075
2004-01-18 02:20:48 +01:00
|
|
|
@end smallexample
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
When you output a pool entry specially, you should end with a
|
|
|
|
@code{goto} to the label @var{jumpto}. This will prevent the same pool
|
|
|
|
entry from being output a second time in the usual manner.
|
|
|
|
|
|
|
|
You need not define this macro if it would do nothing.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ASM_OUTPUT_POOL_EPILOGUE (@var{file} @var{funname} @var{fundecl} @var{size})
|
1997-08-11 17:56:58 +02:00
|
|
|
A C statement to output assembler commands to at the end of the constant
|
|
|
|
pool for a function. @var{funname} is a string giving the name of the
|
|
|
|
function. Should the return type of the function be required, you can
|
|
|
|
obtain it via @var{fundecl}. @var{size} is the size, in bytes, of the
|
1999-08-25 09:27:13 +02:00
|
|
|
constant pool that GCC wrote immediately before this call.
|
1997-08-11 17:56:58 +02:00
|
|
|
|
|
|
|
If no constant-pool epilogue is required, the usual case, you need not
|
|
|
|
define this macro.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1997-08-11 17:56:58 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac IS_ASM_LOGICAL_LINE_SEPARATOR (@var{C})
|
1996-09-25 01:21:45 +02:00
|
|
|
Define this macro as a C expression which is nonzero if @var{C} is
|
|
|
|
used as a logical line separator by the assembler.
|
|
|
|
|
|
|
|
If you do not define this macro, the default is that only
|
|
|
|
the character @samp{;} is treated as a logical line separator.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2001-07-09 08:17:25 +02:00
|
|
|
@deftypevr {Target Hook} {const char *} TARGET_ASM_OPEN_PAREN
|
2001-07-10 20:07:41 +02:00
|
|
|
@deftypevrx {Target Hook} {const char *} TARGET_ASM_CLOSE_PAREN
|
2001-07-09 08:10:09 +02:00
|
|
|
These target hooks are C string constants, describing the syntax in the
|
|
|
|
assembler for grouping arithmetic expressions. If not overridden, they
|
|
|
|
default to normal parentheses, which is correct for most assemblers.
|
2001-07-09 08:17:25 +02:00
|
|
|
@end deftypevr
|
2001-07-09 08:10:09 +02:00
|
|
|
|
1996-09-25 01:21:45 +02:00
|
|
|
These macros are provided by @file{real.h} for writing the definitions
|
|
|
|
of @code{ASM_OUTPUT_DOUBLE} and the like:
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac REAL_VALUE_TO_TARGET_SINGLE (@var{x}, @var{l})
|
|
|
|
@defmacx REAL_VALUE_TO_TARGET_DOUBLE (@var{x}, @var{l})
|
|
|
|
@defmacx REAL_VALUE_TO_TARGET_LONG_DOUBLE (@var{x}, @var{l})
|
1996-09-25 01:21:45 +02:00
|
|
|
These translate @var{x}, of type @code{REAL_VALUE_TYPE}, to the target's
|
real.h: Don't define REAL_INFINITY or REAL_IS_NOT_DOUBLE.
* real.h: Don't define REAL_INFINITY or REAL_IS_NOT_DOUBLE.
Always make REAL_VALUE_TYPE a struct containing an array of
HOST_WIDE_INT, not a double. Tidy up the code deciding how
big it is. Don't declare or use union real_extract.
* emit-rtl.c (init_emit_once), varasm.c (immed_real_const_1,
decode_rtx_const, output_constant_pool), config/a29k/a29k.c
(print_operand), config/arm/arm.c (output_move_double),
config/arm/arm.md (consttable_4, consttable_8),
config/romp/romp.c (output_fpops), config/s390/s390.h
(ASM_OUTPUT_SPECIAL_POOL_ENTRY), config/xtensa/xtensa.c
(xtensa_output_literal): Don't use union real_extract.
* config/dsp16xx/dsp16xx.c (print_operand), config/i860/i860.c
(sfmode_constant_to_ulong), config/ns32k/merlin.h
(PRINT_OPERAND), config/ns32k/ns32k.c (print_operand),
config/pdp11/pdp11.h (PRINT_OPERAND), config/we32k/we32k.h
(PRINT_OPERAND): Don't use local version of union
real_extract.
* config/convex/convex.c (check_float_value), config/vax/vax.c
(vax_float_literal), config/m88k/m88k.md (divdf3),
config/dsp16xx/dsp16xx.md (fixuns_trunchfhi2),
config/pdp11/pdp11.c (output_move_quad): Don't do host
arithmetic on target floating point quantities.
* config/a29k/a29k.md, config/dsp16xx/dsp16xx.c
(output_dsp16xx_float_const): Don't test HOST_FLOAT_FORMAT.
* fold-const.c (fold), simplify-rtx.c (simplify_binary_real):
Use MODE_HAS_INFINITIES rather than #ifdef REAL_INFINITY.
* real.c (earith): Test INFINITY rather than REAL_INFINITY;
NANS implies INFINITY, so can drop #ifdef NANS inside #ifndef
INFINITY.
* print-rtl.c (print_rtx): Disable code which needs
floating-point emulator.
* libgcc2.c: Include float.h and use DBL_MANT_DIG,
FLT_MANT_DIG, to define DF_SIZE and SF_SIZE, rather than
depending on HOST_FLOAT_FORMAT to be defined properly.
* ch/grant.c, cp/error.c: Always use REAL_VALUE_TO_DECIMAL;
don't test REAL_IS_NOT_DOUBLE.
* config/1750a/1750a.c (get_double, float_label): Delete.
(print_operand): Delete huge commented-out chunk. Use
REAL_VALUE_TO_DECIMAL.
* config/1750a/1750a-protos.h: Delete prototypes of deleted
functions.
* config/convex/convex.h: Always set TARGET_FLOAT_FORMAT to
IEEE_FLOAT_FORMAT.
* config/i370/i370.h (PRINT_OPERAND [TARGET_HLASM version]):
Use REAL_VALUE_TO_DECIMAL as ELF version does.
* config/m88k/m88k.c (real_power_of_2_operand,
legitimize_operand): Take the REAL_VALUE_TYPE and/or union
real_extract out of the union; run the input through
REAL_VALUE_TO_TARGET_DOUBLE, then plug the pair of longwords
from that into the union.
* config/pdp11/pdp11.c (output_move_double): Rearrange
parentheses to make automatic indenter happy.
* doc/tm.texi (Cross-compilation): Rename node to "Floating
Point" and rewrite to describe current situation. Also adjust
documentation of REAL_VALUE_TO_TARGET_SINGLE and friends to
match code.
* doc/rtl.texi: Adjust cross reference.
From-SVN: r51210
2002-03-23 02:10:56 +01:00
|
|
|
floating point representation, and store its bit pattern in the variable
|
|
|
|
@var{l}. For @code{REAL_VALUE_TO_TARGET_SINGLE}, this variable should
|
|
|
|
be a simple @code{long int}. For the others, it should be an array of
|
|
|
|
@code{long int}. The number of elements in this array is determined by
|
|
|
|
the size of the desired target floating point data type: 32 bits of it
|
|
|
|
go in each @code{long int} array element. Each array element holds 32
|
|
|
|
bits of the result, even if @code{long int} is wider than 32 bits on the
|
|
|
|
host machine.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
The array element values are designed so that you can print them out
|
|
|
|
using @code{fprintf} in the order they should appear in the target
|
|
|
|
machine's memory.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
@node Uninitialized Data
|
|
|
|
@subsection Output of Uninitialized Variables
|
|
|
|
|
|
|
|
Each of the macros in this section is used to do the whole job of
|
|
|
|
outputting a single uninitialized variable.
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ASM_OUTPUT_COMMON (@var{stream}, @var{name}, @var{size}, @var{rounded})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C statement (sans semicolon) to output to the stdio stream
|
|
|
|
@var{stream} the assembler definition of a common-label named
|
|
|
|
@var{name} whose size is @var{size} bytes. The variable @var{rounded}
|
|
|
|
is the size rounded up to whatever alignment the caller wants.
|
|
|
|
|
|
|
|
Use the expression @code{assemble_name (@var{stream}, @var{name})} to
|
|
|
|
output the name itself; before and after that, output the additional
|
|
|
|
assembler syntax for defining the name, and a newline.
|
|
|
|
|
|
|
|
This macro controls how the assembler definitions of uninitialized
|
|
|
|
common global variables are output.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ASM_OUTPUT_ALIGNED_COMMON (@var{stream}, @var{name}, @var{size}, @var{alignment})
|
1996-09-25 01:21:45 +02:00
|
|
|
Like @code{ASM_OUTPUT_COMMON} except takes the required alignment as a
|
|
|
|
separate, explicit argument. If you define this macro, it is used in
|
|
|
|
place of @code{ASM_OUTPUT_COMMON}, and gives you more flexibility in
|
|
|
|
handling the required alignment of the variable. The alignment is specified
|
|
|
|
as the number of bits.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ASM_OUTPUT_ALIGNED_DECL_COMMON (@var{stream}, @var{decl}, @var{name}, @var{size}, @var{alignment})
|
1997-11-02 22:19:36 +01:00
|
|
|
Like @code{ASM_OUTPUT_ALIGNED_COMMON} except that @var{decl} of the
|
|
|
|
variable to be output, if there is one, or @code{NULL_TREE} if there
|
2000-02-04 11:30:26 +01:00
|
|
|
is no corresponding variable. If you define this macro, GCC will use it
|
1997-11-02 22:19:36 +01:00
|
|
|
in place of both @code{ASM_OUTPUT_COMMON} and
|
|
|
|
@code{ASM_OUTPUT_ALIGNED_COMMON}. Define this macro when you need to see
|
|
|
|
the variable's decl in order to chose what to output.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1997-11-02 22:19:36 +01:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ASM_OUTPUT_SHARED_COMMON (@var{stream}, @var{name}, @var{size}, @var{rounded})
|
1996-09-25 01:21:45 +02:00
|
|
|
If defined, it is similar to @code{ASM_OUTPUT_COMMON}, except that it
|
|
|
|
is used when @var{name} is shared. If not defined, @code{ASM_OUTPUT_COMMON}
|
|
|
|
will be used.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ASM_OUTPUT_BSS (@var{stream}, @var{decl}, @var{name}, @var{size}, @var{rounded})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C statement (sans semicolon) to output to the stdio stream
|
|
|
|
@var{stream} the assembler definition of uninitialized global @var{decl} named
|
|
|
|
@var{name} whose size is @var{size} bytes. The variable @var{rounded}
|
|
|
|
is the size rounded up to whatever alignment the caller wants.
|
|
|
|
|
|
|
|
Try to use function @code{asm_output_bss} defined in @file{varasm.c} when
|
|
|
|
defining this macro. If unable, use the expression
|
|
|
|
@code{assemble_name (@var{stream}, @var{name})} to output the name itself;
|
|
|
|
before and after that, output the additional assembler syntax for defining
|
|
|
|
the name, and a newline.
|
|
|
|
|
|
|
|
This macro controls how the assembler definitions of uninitialized global
|
|
|
|
variables are output. This macro exists to properly support languages like
|
2001-07-03 02:46:05 +02:00
|
|
|
C++ which do not have @code{common} data. However, this macro currently
|
1996-09-25 01:21:45 +02:00
|
|
|
is not defined for all targets. If this macro and
|
|
|
|
@code{ASM_OUTPUT_ALIGNED_BSS} are not defined then @code{ASM_OUTPUT_COMMON}
|
1997-11-02 22:19:36 +01:00
|
|
|
or @code{ASM_OUTPUT_ALIGNED_COMMON} or
|
|
|
|
@code{ASM_OUTPUT_ALIGNED_DECL_COMMON} is used.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ASM_OUTPUT_ALIGNED_BSS (@var{stream}, @var{decl}, @var{name}, @var{size}, @var{alignment})
|
1996-09-25 01:21:45 +02:00
|
|
|
Like @code{ASM_OUTPUT_BSS} except takes the required alignment as a
|
|
|
|
separate, explicit argument. If you define this macro, it is used in
|
|
|
|
place of @code{ASM_OUTPUT_BSS}, and gives you more flexibility in
|
|
|
|
handling the required alignment of the variable. The alignment is specified
|
|
|
|
as the number of bits.
|
|
|
|
|
|
|
|
Try to use function @code{asm_output_aligned_bss} defined in file
|
|
|
|
@file{varasm.c} when defining this macro.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ASM_OUTPUT_SHARED_BSS (@var{stream}, @var{decl}, @var{name}, @var{size}, @var{rounded})
|
1996-09-25 01:21:45 +02:00
|
|
|
If defined, it is similar to @code{ASM_OUTPUT_BSS}, except that it
|
|
|
|
is used when @var{name} is shared. If not defined, @code{ASM_OUTPUT_BSS}
|
|
|
|
will be used.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ASM_OUTPUT_LOCAL (@var{stream}, @var{name}, @var{size}, @var{rounded})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C statement (sans semicolon) to output to the stdio stream
|
|
|
|
@var{stream} the assembler definition of a local-common-label named
|
|
|
|
@var{name} whose size is @var{size} bytes. The variable @var{rounded}
|
|
|
|
is the size rounded up to whatever alignment the caller wants.
|
|
|
|
|
|
|
|
Use the expression @code{assemble_name (@var{stream}, @var{name})} to
|
|
|
|
output the name itself; before and after that, output the additional
|
|
|
|
assembler syntax for defining the name, and a newline.
|
|
|
|
|
|
|
|
This macro controls how the assembler definitions of uninitialized
|
|
|
|
static variables are output.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ASM_OUTPUT_ALIGNED_LOCAL (@var{stream}, @var{name}, @var{size}, @var{alignment})
|
1996-09-25 01:21:45 +02:00
|
|
|
Like @code{ASM_OUTPUT_LOCAL} except takes the required alignment as a
|
|
|
|
separate, explicit argument. If you define this macro, it is used in
|
|
|
|
place of @code{ASM_OUTPUT_LOCAL}, and gives you more flexibility in
|
|
|
|
handling the required alignment of the variable. The alignment is specified
|
|
|
|
as the number of bits.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ASM_OUTPUT_ALIGNED_DECL_LOCAL (@var{stream}, @var{decl}, @var{name}, @var{size}, @var{alignment})
|
1997-11-02 22:19:36 +01:00
|
|
|
Like @code{ASM_OUTPUT_ALIGNED_DECL} except that @var{decl} of the
|
|
|
|
variable to be output, if there is one, or @code{NULL_TREE} if there
|
2000-02-04 11:30:26 +01:00
|
|
|
is no corresponding variable. If you define this macro, GCC will use it
|
1997-11-02 22:19:36 +01:00
|
|
|
in place of both @code{ASM_OUTPUT_DECL} and
|
|
|
|
@code{ASM_OUTPUT_ALIGNED_DECL}. Define this macro when you need to see
|
|
|
|
the variable's decl in order to chose what to output.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1997-11-02 22:19:36 +01:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ASM_OUTPUT_SHARED_LOCAL (@var{stream}, @var{name}, @var{size}, @var{rounded})
|
1996-09-25 01:21:45 +02:00
|
|
|
If defined, it is similar to @code{ASM_OUTPUT_LOCAL}, except that it
|
|
|
|
is used when @var{name} is shared. If not defined, @code{ASM_OUTPUT_LOCAL}
|
|
|
|
will be used.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
@node Label Output
|
|
|
|
@subsection Output and Generation of Labels
|
|
|
|
|
|
|
|
@c prevent bad page break with this line
|
|
|
|
This is about outputting labels.
|
|
|
|
|
|
|
|
@findex assemble_name
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ASM_OUTPUT_LABEL (@var{stream}, @var{name})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C statement (sans semicolon) to output to the stdio stream
|
|
|
|
@var{stream} the assembler definition of a label named @var{name}.
|
|
|
|
Use the expression @code{assemble_name (@var{stream}, @var{name})} to
|
|
|
|
output the name itself; before and after that, output the additional
|
alpha.h, [...] (ASM_OUTPUT_LABEL): Delete definition.
* alpha.h, arc.h, arm/aout.h, avr.h, c4x.h, cris.h, d30v.h,
darwin.h, dsp16xx.h, fr30.h, h8300.h, i370.h, i386.h, i960.h,
ip2k.h, m32r.h, m68hc11.h, m68k.h, m88k.h, mcore.h, mips.h,
mn10200.h, mn10300.h, ns32k.h, pa/pa-linux.h, pdp11.h, romp.h,
rs6000/sysv4.h, s390/linux.h, sh.h, sparc.h, stormy16.h,
v850.h, vax.h, xtensa.h (ASM_OUTPUT_LABEL): Delete definition.
* defaults.h (ASM_OUTPUT_LABEL): Provide a default.
* doc/tm.texi (ASM_OUTPUT_LABEL): Update docs.
From-SVN: r55872
2002-07-30 14:34:31 +02:00
|
|
|
assembler syntax for defining the name, and a newline. A default
|
|
|
|
definition of this macro is provided which is correct for most systems.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2004-12-20 03:08:57 +01:00
|
|
|
@findex assemble_name_raw
|
|
|
|
@defmac ASM_OUTPUT_INTERNAL_LABEL (@var{stream}, @var{name})
|
|
|
|
Identical to @code{ASM_OUTPUT_lABEL}, except that @var{name} is known
|
|
|
|
to refer to a compiler-generated label. The default definition uses
|
|
|
|
@code{assemble_name_raw}, which is like @code{assemble_name} except
|
|
|
|
that it is more efficient.
|
|
|
|
@end defmac
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac SIZE_ASM_OP
|
defaults.h (ASM_OUTPUT_TYPE_DIRECTIVE, [...]): New default definitions of new macros.
* defaults.h (ASM_OUTPUT_TYPE_DIRECTIVE, ASM_OUTPUT_SIZE_DIRECTIVE,
ASM_OUTPUT_MEASURED_SIZE): New default definitions of new macros.
* doc/tm.texi: Document them. Also document SIZE_ASM_OP,
TYPE_ASM_OP, and TYPE_OPERAND_FMT.
* config/elfos.h, config/netbsd-aout.h, config/openbsd.h,
config/alpha/elf.h, config/arm/elf.h, config/avr/avr.h,
config/cris/aout.h, config/i386/freebsd-aout.h,
config/i386/sco5.h, config/ia64/ia64.c, config/ip2k/ip2k.h,
config/m68k/m68kelf.h, config/m68k/m68kv4.h, config/m88k/m88k.h,
config/mcore/mcore-elf.h, config/mips/elf.h, config/mips/elf64.h,
config/mips/iris6.h, config/mips/linux.h, config/pa/pa-linux.h,
config/pa/pa64-hpux.h, config/rs6000/sysv4.h,
config/xtensa/elf.h, config/xtensa/linux.h:
Use the new macros.
Where possible, remove redundant definitions of SIZE_ASM_OP,
TYPE_ASM_OP, and TYPE_OPERAND_FMT.
From-SVN: r55735
2002-07-25 07:14:23 +02:00
|
|
|
A C string containing the appropriate assembler directive to specify the
|
|
|
|
size of a symbol, without any arguments. On systems that use ELF, the
|
|
|
|
default (in @file{config/elfos.h}) is @samp{"\t.size\t"}; on other
|
|
|
|
systems, the default is not to define this macro.
|
|
|
|
|
|
|
|
Define this macro only if it is correct to use the default definitions
|
|
|
|
of @code{ASM_OUTPUT_SIZE_DIRECTIVE} and @code{ASM_OUTPUT_MEASURED_SIZE}
|
|
|
|
for your system. If you need your own custom definitions of those
|
|
|
|
macros, or if you do not need explicit symbol sizes at all, do not
|
|
|
|
define this macro.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
defaults.h (ASM_OUTPUT_TYPE_DIRECTIVE, [...]): New default definitions of new macros.
* defaults.h (ASM_OUTPUT_TYPE_DIRECTIVE, ASM_OUTPUT_SIZE_DIRECTIVE,
ASM_OUTPUT_MEASURED_SIZE): New default definitions of new macros.
* doc/tm.texi: Document them. Also document SIZE_ASM_OP,
TYPE_ASM_OP, and TYPE_OPERAND_FMT.
* config/elfos.h, config/netbsd-aout.h, config/openbsd.h,
config/alpha/elf.h, config/arm/elf.h, config/avr/avr.h,
config/cris/aout.h, config/i386/freebsd-aout.h,
config/i386/sco5.h, config/ia64/ia64.c, config/ip2k/ip2k.h,
config/m68k/m68kelf.h, config/m68k/m68kv4.h, config/m88k/m88k.h,
config/mcore/mcore-elf.h, config/mips/elf.h, config/mips/elf64.h,
config/mips/iris6.h, config/mips/linux.h, config/pa/pa-linux.h,
config/pa/pa64-hpux.h, config/rs6000/sysv4.h,
config/xtensa/elf.h, config/xtensa/linux.h:
Use the new macros.
Where possible, remove redundant definitions of SIZE_ASM_OP,
TYPE_ASM_OP, and TYPE_OPERAND_FMT.
From-SVN: r55735
2002-07-25 07:14:23 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ASM_OUTPUT_SIZE_DIRECTIVE (@var{stream}, @var{name}, @var{size})
|
defaults.h (ASM_OUTPUT_TYPE_DIRECTIVE, [...]): New default definitions of new macros.
* defaults.h (ASM_OUTPUT_TYPE_DIRECTIVE, ASM_OUTPUT_SIZE_DIRECTIVE,
ASM_OUTPUT_MEASURED_SIZE): New default definitions of new macros.
* doc/tm.texi: Document them. Also document SIZE_ASM_OP,
TYPE_ASM_OP, and TYPE_OPERAND_FMT.
* config/elfos.h, config/netbsd-aout.h, config/openbsd.h,
config/alpha/elf.h, config/arm/elf.h, config/avr/avr.h,
config/cris/aout.h, config/i386/freebsd-aout.h,
config/i386/sco5.h, config/ia64/ia64.c, config/ip2k/ip2k.h,
config/m68k/m68kelf.h, config/m68k/m68kv4.h, config/m88k/m88k.h,
config/mcore/mcore-elf.h, config/mips/elf.h, config/mips/elf64.h,
config/mips/iris6.h, config/mips/linux.h, config/pa/pa-linux.h,
config/pa/pa64-hpux.h, config/rs6000/sysv4.h,
config/xtensa/elf.h, config/xtensa/linux.h:
Use the new macros.
Where possible, remove redundant definitions of SIZE_ASM_OP,
TYPE_ASM_OP, and TYPE_OPERAND_FMT.
From-SVN: r55735
2002-07-25 07:14:23 +02:00
|
|
|
A C statement (sans semicolon) to output to the stdio stream
|
|
|
|
@var{stream} a directive telling the assembler that the size of the
|
|
|
|
symbol @var{name} is @var{size}. @var{size} is a @code{HOST_WIDE_INT}.
|
|
|
|
If you define @code{SIZE_ASM_OP}, a default definition of this macro is
|
|
|
|
provided.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
defaults.h (ASM_OUTPUT_TYPE_DIRECTIVE, [...]): New default definitions of new macros.
* defaults.h (ASM_OUTPUT_TYPE_DIRECTIVE, ASM_OUTPUT_SIZE_DIRECTIVE,
ASM_OUTPUT_MEASURED_SIZE): New default definitions of new macros.
* doc/tm.texi: Document them. Also document SIZE_ASM_OP,
TYPE_ASM_OP, and TYPE_OPERAND_FMT.
* config/elfos.h, config/netbsd-aout.h, config/openbsd.h,
config/alpha/elf.h, config/arm/elf.h, config/avr/avr.h,
config/cris/aout.h, config/i386/freebsd-aout.h,
config/i386/sco5.h, config/ia64/ia64.c, config/ip2k/ip2k.h,
config/m68k/m68kelf.h, config/m68k/m68kv4.h, config/m88k/m88k.h,
config/mcore/mcore-elf.h, config/mips/elf.h, config/mips/elf64.h,
config/mips/iris6.h, config/mips/linux.h, config/pa/pa-linux.h,
config/pa/pa64-hpux.h, config/rs6000/sysv4.h,
config/xtensa/elf.h, config/xtensa/linux.h:
Use the new macros.
Where possible, remove redundant definitions of SIZE_ASM_OP,
TYPE_ASM_OP, and TYPE_OPERAND_FMT.
From-SVN: r55735
2002-07-25 07:14:23 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ASM_OUTPUT_MEASURED_SIZE (@var{stream}, @var{name})
|
defaults.h (ASM_OUTPUT_TYPE_DIRECTIVE, [...]): New default definitions of new macros.
* defaults.h (ASM_OUTPUT_TYPE_DIRECTIVE, ASM_OUTPUT_SIZE_DIRECTIVE,
ASM_OUTPUT_MEASURED_SIZE): New default definitions of new macros.
* doc/tm.texi: Document them. Also document SIZE_ASM_OP,
TYPE_ASM_OP, and TYPE_OPERAND_FMT.
* config/elfos.h, config/netbsd-aout.h, config/openbsd.h,
config/alpha/elf.h, config/arm/elf.h, config/avr/avr.h,
config/cris/aout.h, config/i386/freebsd-aout.h,
config/i386/sco5.h, config/ia64/ia64.c, config/ip2k/ip2k.h,
config/m68k/m68kelf.h, config/m68k/m68kv4.h, config/m88k/m88k.h,
config/mcore/mcore-elf.h, config/mips/elf.h, config/mips/elf64.h,
config/mips/iris6.h, config/mips/linux.h, config/pa/pa-linux.h,
config/pa/pa64-hpux.h, config/rs6000/sysv4.h,
config/xtensa/elf.h, config/xtensa/linux.h:
Use the new macros.
Where possible, remove redundant definitions of SIZE_ASM_OP,
TYPE_ASM_OP, and TYPE_OPERAND_FMT.
From-SVN: r55735
2002-07-25 07:14:23 +02:00
|
|
|
A C statement (sans semicolon) to output to the stdio stream
|
|
|
|
@var{stream} a directive telling the assembler to calculate the size of
|
defaults.h (ASM_OUTPUT_MEASURED_SIZE): Take only two arguments.
* defaults.h (ASM_OUTPUT_MEASURED_SIZE): Take only two
arguments. Always use ".-symbol" as expression argument.
* doc/tm.texi: Update to match. Document requirement for
".size symbol, .-symbol" to be acceptable to assembler.
* config/elfos.h, config/netbsd-aout.h, config/openbsd.h,
config/arm/elf.h, config/avr/avr.h, config/cris/aout.h,
config/i386/freebsd-aout.h, config/i386/sco5.h,
config/ip2k/ip2k.h, config/m88k/m88k.h, config/xtensa/elf.h,
config/xtensa/linux.h: Update uses of ASM_OUTPUT_MEASURED_SIZE.
From-SVN: r55820
2002-07-28 20:44:34 +02:00
|
|
|
the symbol @var{name} by subtracting its address from the current
|
2003-10-10 23:28:56 +02:00
|
|
|
address.
|
defaults.h (ASM_OUTPUT_MEASURED_SIZE): Take only two arguments.
* defaults.h (ASM_OUTPUT_MEASURED_SIZE): Take only two
arguments. Always use ".-symbol" as expression argument.
* doc/tm.texi: Update to match. Document requirement for
".size symbol, .-symbol" to be acceptable to assembler.
* config/elfos.h, config/netbsd-aout.h, config/openbsd.h,
config/arm/elf.h, config/avr/avr.h, config/cris/aout.h,
config/i386/freebsd-aout.h, config/i386/sco5.h,
config/ip2k/ip2k.h, config/m88k/m88k.h, config/xtensa/elf.h,
config/xtensa/linux.h: Update uses of ASM_OUTPUT_MEASURED_SIZE.
From-SVN: r55820
2002-07-28 20:44:34 +02:00
|
|
|
|
|
|
|
If you define @code{SIZE_ASM_OP}, a default definition of this macro is
|
|
|
|
provided. The default assumes that the assembler recognizes a special
|
|
|
|
@samp{.} symbol as referring to the current address, and can calculate
|
|
|
|
the difference between this and another symbol. If your assembler does
|
|
|
|
not recognize @samp{.} or cannot do calculations with it, you will need
|
|
|
|
to redefine @code{ASM_OUTPUT_MEASURED_SIZE} to use some other technique.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
defaults.h (ASM_OUTPUT_TYPE_DIRECTIVE, [...]): New default definitions of new macros.
* defaults.h (ASM_OUTPUT_TYPE_DIRECTIVE, ASM_OUTPUT_SIZE_DIRECTIVE,
ASM_OUTPUT_MEASURED_SIZE): New default definitions of new macros.
* doc/tm.texi: Document them. Also document SIZE_ASM_OP,
TYPE_ASM_OP, and TYPE_OPERAND_FMT.
* config/elfos.h, config/netbsd-aout.h, config/openbsd.h,
config/alpha/elf.h, config/arm/elf.h, config/avr/avr.h,
config/cris/aout.h, config/i386/freebsd-aout.h,
config/i386/sco5.h, config/ia64/ia64.c, config/ip2k/ip2k.h,
config/m68k/m68kelf.h, config/m68k/m68kv4.h, config/m88k/m88k.h,
config/mcore/mcore-elf.h, config/mips/elf.h, config/mips/elf64.h,
config/mips/iris6.h, config/mips/linux.h, config/pa/pa-linux.h,
config/pa/pa64-hpux.h, config/rs6000/sysv4.h,
config/xtensa/elf.h, config/xtensa/linux.h:
Use the new macros.
Where possible, remove redundant definitions of SIZE_ASM_OP,
TYPE_ASM_OP, and TYPE_OPERAND_FMT.
From-SVN: r55735
2002-07-25 07:14:23 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac TYPE_ASM_OP
|
defaults.h (ASM_OUTPUT_TYPE_DIRECTIVE, [...]): New default definitions of new macros.
* defaults.h (ASM_OUTPUT_TYPE_DIRECTIVE, ASM_OUTPUT_SIZE_DIRECTIVE,
ASM_OUTPUT_MEASURED_SIZE): New default definitions of new macros.
* doc/tm.texi: Document them. Also document SIZE_ASM_OP,
TYPE_ASM_OP, and TYPE_OPERAND_FMT.
* config/elfos.h, config/netbsd-aout.h, config/openbsd.h,
config/alpha/elf.h, config/arm/elf.h, config/avr/avr.h,
config/cris/aout.h, config/i386/freebsd-aout.h,
config/i386/sco5.h, config/ia64/ia64.c, config/ip2k/ip2k.h,
config/m68k/m68kelf.h, config/m68k/m68kv4.h, config/m88k/m88k.h,
config/mcore/mcore-elf.h, config/mips/elf.h, config/mips/elf64.h,
config/mips/iris6.h, config/mips/linux.h, config/pa/pa-linux.h,
config/pa/pa64-hpux.h, config/rs6000/sysv4.h,
config/xtensa/elf.h, config/xtensa/linux.h:
Use the new macros.
Where possible, remove redundant definitions of SIZE_ASM_OP,
TYPE_ASM_OP, and TYPE_OPERAND_FMT.
From-SVN: r55735
2002-07-25 07:14:23 +02:00
|
|
|
A C string containing the appropriate assembler directive to specify the
|
|
|
|
type of a symbol, without any arguments. On systems that use ELF, the
|
|
|
|
default (in @file{config/elfos.h}) is @samp{"\t.type\t"}; on other
|
|
|
|
systems, the default is not to define this macro.
|
|
|
|
|
|
|
|
Define this macro only if it is correct to use the default definition of
|
|
|
|
@code{ASM_OUTPUT_TYPE_DIRECTIVE} for your system. If you need your own
|
|
|
|
custom definition of this macro, or if you do not need explicit symbol
|
|
|
|
types at all, do not define this macro.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
defaults.h (ASM_OUTPUT_TYPE_DIRECTIVE, [...]): New default definitions of new macros.
* defaults.h (ASM_OUTPUT_TYPE_DIRECTIVE, ASM_OUTPUT_SIZE_DIRECTIVE,
ASM_OUTPUT_MEASURED_SIZE): New default definitions of new macros.
* doc/tm.texi: Document them. Also document SIZE_ASM_OP,
TYPE_ASM_OP, and TYPE_OPERAND_FMT.
* config/elfos.h, config/netbsd-aout.h, config/openbsd.h,
config/alpha/elf.h, config/arm/elf.h, config/avr/avr.h,
config/cris/aout.h, config/i386/freebsd-aout.h,
config/i386/sco5.h, config/ia64/ia64.c, config/ip2k/ip2k.h,
config/m68k/m68kelf.h, config/m68k/m68kv4.h, config/m88k/m88k.h,
config/mcore/mcore-elf.h, config/mips/elf.h, config/mips/elf64.h,
config/mips/iris6.h, config/mips/linux.h, config/pa/pa-linux.h,
config/pa/pa64-hpux.h, config/rs6000/sysv4.h,
config/xtensa/elf.h, config/xtensa/linux.h:
Use the new macros.
Where possible, remove redundant definitions of SIZE_ASM_OP,
TYPE_ASM_OP, and TYPE_OPERAND_FMT.
From-SVN: r55735
2002-07-25 07:14:23 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac TYPE_OPERAND_FMT
|
defaults.h (ASM_OUTPUT_TYPE_DIRECTIVE, [...]): New default definitions of new macros.
* defaults.h (ASM_OUTPUT_TYPE_DIRECTIVE, ASM_OUTPUT_SIZE_DIRECTIVE,
ASM_OUTPUT_MEASURED_SIZE): New default definitions of new macros.
* doc/tm.texi: Document them. Also document SIZE_ASM_OP,
TYPE_ASM_OP, and TYPE_OPERAND_FMT.
* config/elfos.h, config/netbsd-aout.h, config/openbsd.h,
config/alpha/elf.h, config/arm/elf.h, config/avr/avr.h,
config/cris/aout.h, config/i386/freebsd-aout.h,
config/i386/sco5.h, config/ia64/ia64.c, config/ip2k/ip2k.h,
config/m68k/m68kelf.h, config/m68k/m68kv4.h, config/m88k/m88k.h,
config/mcore/mcore-elf.h, config/mips/elf.h, config/mips/elf64.h,
config/mips/iris6.h, config/mips/linux.h, config/pa/pa-linux.h,
config/pa/pa64-hpux.h, config/rs6000/sysv4.h,
config/xtensa/elf.h, config/xtensa/linux.h:
Use the new macros.
Where possible, remove redundant definitions of SIZE_ASM_OP,
TYPE_ASM_OP, and TYPE_OPERAND_FMT.
From-SVN: r55735
2002-07-25 07:14:23 +02:00
|
|
|
A C string which specifies (using @code{printf} syntax) the format of
|
|
|
|
the second operand to @code{TYPE_ASM_OP}. On systems that use ELF, the
|
|
|
|
default (in @file{config/elfos.h}) is @samp{"@@%s"}; on other systems,
|
|
|
|
the default is not to define this macro.
|
|
|
|
|
|
|
|
Define this macro only if it is correct to use the default definition of
|
|
|
|
@code{ASM_OUTPUT_TYPE_DIRECTIVE} for your system. If you need your own
|
|
|
|
custom definition of this macro, or if you do not need explicit symbol
|
|
|
|
types at all, do not define this macro.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
defaults.h (ASM_OUTPUT_TYPE_DIRECTIVE, [...]): New default definitions of new macros.
* defaults.h (ASM_OUTPUT_TYPE_DIRECTIVE, ASM_OUTPUT_SIZE_DIRECTIVE,
ASM_OUTPUT_MEASURED_SIZE): New default definitions of new macros.
* doc/tm.texi: Document them. Also document SIZE_ASM_OP,
TYPE_ASM_OP, and TYPE_OPERAND_FMT.
* config/elfos.h, config/netbsd-aout.h, config/openbsd.h,
config/alpha/elf.h, config/arm/elf.h, config/avr/avr.h,
config/cris/aout.h, config/i386/freebsd-aout.h,
config/i386/sco5.h, config/ia64/ia64.c, config/ip2k/ip2k.h,
config/m68k/m68kelf.h, config/m68k/m68kv4.h, config/m88k/m88k.h,
config/mcore/mcore-elf.h, config/mips/elf.h, config/mips/elf64.h,
config/mips/iris6.h, config/mips/linux.h, config/pa/pa-linux.h,
config/pa/pa64-hpux.h, config/rs6000/sysv4.h,
config/xtensa/elf.h, config/xtensa/linux.h:
Use the new macros.
Where possible, remove redundant definitions of SIZE_ASM_OP,
TYPE_ASM_OP, and TYPE_OPERAND_FMT.
From-SVN: r55735
2002-07-25 07:14:23 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ASM_OUTPUT_TYPE_DIRECTIVE (@var{stream}, @var{type})
|
defaults.h (ASM_OUTPUT_TYPE_DIRECTIVE, [...]): New default definitions of new macros.
* defaults.h (ASM_OUTPUT_TYPE_DIRECTIVE, ASM_OUTPUT_SIZE_DIRECTIVE,
ASM_OUTPUT_MEASURED_SIZE): New default definitions of new macros.
* doc/tm.texi: Document them. Also document SIZE_ASM_OP,
TYPE_ASM_OP, and TYPE_OPERAND_FMT.
* config/elfos.h, config/netbsd-aout.h, config/openbsd.h,
config/alpha/elf.h, config/arm/elf.h, config/avr/avr.h,
config/cris/aout.h, config/i386/freebsd-aout.h,
config/i386/sco5.h, config/ia64/ia64.c, config/ip2k/ip2k.h,
config/m68k/m68kelf.h, config/m68k/m68kv4.h, config/m88k/m88k.h,
config/mcore/mcore-elf.h, config/mips/elf.h, config/mips/elf64.h,
config/mips/iris6.h, config/mips/linux.h, config/pa/pa-linux.h,
config/pa/pa64-hpux.h, config/rs6000/sysv4.h,
config/xtensa/elf.h, config/xtensa/linux.h:
Use the new macros.
Where possible, remove redundant definitions of SIZE_ASM_OP,
TYPE_ASM_OP, and TYPE_OPERAND_FMT.
From-SVN: r55735
2002-07-25 07:14:23 +02:00
|
|
|
A C statement (sans semicolon) to output to the stdio stream
|
|
|
|
@var{stream} a directive telling the assembler that the type of the
|
|
|
|
symbol @var{name} is @var{type}. @var{type} is a C string; currently,
|
|
|
|
that string is always either @samp{"function"} or @samp{"object"}, but
|
|
|
|
you should not count on this.
|
|
|
|
|
|
|
|
If you define @code{TYPE_ASM_OP} and @code{TYPE_OPERAND_FMT}, a default
|
|
|
|
definition of this macro is provided.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
defaults.h (ASM_OUTPUT_TYPE_DIRECTIVE, [...]): New default definitions of new macros.
* defaults.h (ASM_OUTPUT_TYPE_DIRECTIVE, ASM_OUTPUT_SIZE_DIRECTIVE,
ASM_OUTPUT_MEASURED_SIZE): New default definitions of new macros.
* doc/tm.texi: Document them. Also document SIZE_ASM_OP,
TYPE_ASM_OP, and TYPE_OPERAND_FMT.
* config/elfos.h, config/netbsd-aout.h, config/openbsd.h,
config/alpha/elf.h, config/arm/elf.h, config/avr/avr.h,
config/cris/aout.h, config/i386/freebsd-aout.h,
config/i386/sco5.h, config/ia64/ia64.c, config/ip2k/ip2k.h,
config/m68k/m68kelf.h, config/m68k/m68kv4.h, config/m88k/m88k.h,
config/mcore/mcore-elf.h, config/mips/elf.h, config/mips/elf64.h,
config/mips/iris6.h, config/mips/linux.h, config/pa/pa-linux.h,
config/pa/pa64-hpux.h, config/rs6000/sysv4.h,
config/xtensa/elf.h, config/xtensa/linux.h:
Use the new macros.
Where possible, remove redundant definitions of SIZE_ASM_OP,
TYPE_ASM_OP, and TYPE_OPERAND_FMT.
From-SVN: r55735
2002-07-25 07:14:23 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ASM_DECLARE_FUNCTION_NAME (@var{stream}, @var{name}, @var{decl})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C statement (sans semicolon) to output to the stdio stream
|
|
|
|
@var{stream} any text necessary for declaring the name @var{name} of a
|
|
|
|
function which is being defined. This macro is responsible for
|
|
|
|
outputting the label definition (perhaps using
|
|
|
|
@code{ASM_OUTPUT_LABEL}). The argument @var{decl} is the
|
|
|
|
@code{FUNCTION_DECL} tree node representing the function.
|
|
|
|
|
|
|
|
If this macro is not defined, then the function name is defined in the
|
|
|
|
usual manner as a label (by means of @code{ASM_OUTPUT_LABEL}).
|
|
|
|
|
defaults.h (ASM_OUTPUT_TYPE_DIRECTIVE, [...]): New default definitions of new macros.
* defaults.h (ASM_OUTPUT_TYPE_DIRECTIVE, ASM_OUTPUT_SIZE_DIRECTIVE,
ASM_OUTPUT_MEASURED_SIZE): New default definitions of new macros.
* doc/tm.texi: Document them. Also document SIZE_ASM_OP,
TYPE_ASM_OP, and TYPE_OPERAND_FMT.
* config/elfos.h, config/netbsd-aout.h, config/openbsd.h,
config/alpha/elf.h, config/arm/elf.h, config/avr/avr.h,
config/cris/aout.h, config/i386/freebsd-aout.h,
config/i386/sco5.h, config/ia64/ia64.c, config/ip2k/ip2k.h,
config/m68k/m68kelf.h, config/m68k/m68kv4.h, config/m88k/m88k.h,
config/mcore/mcore-elf.h, config/mips/elf.h, config/mips/elf64.h,
config/mips/iris6.h, config/mips/linux.h, config/pa/pa-linux.h,
config/pa/pa64-hpux.h, config/rs6000/sysv4.h,
config/xtensa/elf.h, config/xtensa/linux.h:
Use the new macros.
Where possible, remove redundant definitions of SIZE_ASM_OP,
TYPE_ASM_OP, and TYPE_OPERAND_FMT.
From-SVN: r55735
2002-07-25 07:14:23 +02:00
|
|
|
You may wish to use @code{ASM_OUTPUT_TYPE_DIRECTIVE} in the definition
|
|
|
|
of this macro.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
defaults.h (ASM_OUTPUT_TYPE_DIRECTIVE, [...]): New default definitions of new macros.
* defaults.h (ASM_OUTPUT_TYPE_DIRECTIVE, ASM_OUTPUT_SIZE_DIRECTIVE,
ASM_OUTPUT_MEASURED_SIZE): New default definitions of new macros.
* doc/tm.texi: Document them. Also document SIZE_ASM_OP,
TYPE_ASM_OP, and TYPE_OPERAND_FMT.
* config/elfos.h, config/netbsd-aout.h, config/openbsd.h,
config/alpha/elf.h, config/arm/elf.h, config/avr/avr.h,
config/cris/aout.h, config/i386/freebsd-aout.h,
config/i386/sco5.h, config/ia64/ia64.c, config/ip2k/ip2k.h,
config/m68k/m68kelf.h, config/m68k/m68kv4.h, config/m88k/m88k.h,
config/mcore/mcore-elf.h, config/mips/elf.h, config/mips/elf64.h,
config/mips/iris6.h, config/mips/linux.h, config/pa/pa-linux.h,
config/pa/pa64-hpux.h, config/rs6000/sysv4.h,
config/xtensa/elf.h, config/xtensa/linux.h:
Use the new macros.
Where possible, remove redundant definitions of SIZE_ASM_OP,
TYPE_ASM_OP, and TYPE_OPERAND_FMT.
From-SVN: r55735
2002-07-25 07:14:23 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ASM_DECLARE_FUNCTION_SIZE (@var{stream}, @var{name}, @var{decl})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C statement (sans semicolon) to output to the stdio stream
|
|
|
|
@var{stream} any text necessary for declaring the size of a function
|
|
|
|
which is being defined. The argument @var{name} is the name of the
|
|
|
|
function. The argument @var{decl} is the @code{FUNCTION_DECL} tree node
|
|
|
|
representing the function.
|
|
|
|
|
|
|
|
If this macro is not defined, then the function size is not defined.
|
|
|
|
|
defaults.h (ASM_OUTPUT_TYPE_DIRECTIVE, [...]): New default definitions of new macros.
* defaults.h (ASM_OUTPUT_TYPE_DIRECTIVE, ASM_OUTPUT_SIZE_DIRECTIVE,
ASM_OUTPUT_MEASURED_SIZE): New default definitions of new macros.
* doc/tm.texi: Document them. Also document SIZE_ASM_OP,
TYPE_ASM_OP, and TYPE_OPERAND_FMT.
* config/elfos.h, config/netbsd-aout.h, config/openbsd.h,
config/alpha/elf.h, config/arm/elf.h, config/avr/avr.h,
config/cris/aout.h, config/i386/freebsd-aout.h,
config/i386/sco5.h, config/ia64/ia64.c, config/ip2k/ip2k.h,
config/m68k/m68kelf.h, config/m68k/m68kv4.h, config/m88k/m88k.h,
config/mcore/mcore-elf.h, config/mips/elf.h, config/mips/elf64.h,
config/mips/iris6.h, config/mips/linux.h, config/pa/pa-linux.h,
config/pa/pa64-hpux.h, config/rs6000/sysv4.h,
config/xtensa/elf.h, config/xtensa/linux.h:
Use the new macros.
Where possible, remove redundant definitions of SIZE_ASM_OP,
TYPE_ASM_OP, and TYPE_OPERAND_FMT.
From-SVN: r55735
2002-07-25 07:14:23 +02:00
|
|
|
You may wish to use @code{ASM_OUTPUT_MEASURED_SIZE} in the definition
|
|
|
|
of this macro.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
defaults.h (ASM_OUTPUT_TYPE_DIRECTIVE, [...]): New default definitions of new macros.
* defaults.h (ASM_OUTPUT_TYPE_DIRECTIVE, ASM_OUTPUT_SIZE_DIRECTIVE,
ASM_OUTPUT_MEASURED_SIZE): New default definitions of new macros.
* doc/tm.texi: Document them. Also document SIZE_ASM_OP,
TYPE_ASM_OP, and TYPE_OPERAND_FMT.
* config/elfos.h, config/netbsd-aout.h, config/openbsd.h,
config/alpha/elf.h, config/arm/elf.h, config/avr/avr.h,
config/cris/aout.h, config/i386/freebsd-aout.h,
config/i386/sco5.h, config/ia64/ia64.c, config/ip2k/ip2k.h,
config/m68k/m68kelf.h, config/m68k/m68kv4.h, config/m88k/m88k.h,
config/mcore/mcore-elf.h, config/mips/elf.h, config/mips/elf64.h,
config/mips/iris6.h, config/mips/linux.h, config/pa/pa-linux.h,
config/pa/pa64-hpux.h, config/rs6000/sysv4.h,
config/xtensa/elf.h, config/xtensa/linux.h:
Use the new macros.
Where possible, remove redundant definitions of SIZE_ASM_OP,
TYPE_ASM_OP, and TYPE_OPERAND_FMT.
From-SVN: r55735
2002-07-25 07:14:23 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ASM_DECLARE_OBJECT_NAME (@var{stream}, @var{name}, @var{decl})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C statement (sans semicolon) to output to the stdio stream
|
|
|
|
@var{stream} any text necessary for declaring the name @var{name} of an
|
|
|
|
initialized variable which is being defined. This macro must output the
|
|
|
|
label definition (perhaps using @code{ASM_OUTPUT_LABEL}). The argument
|
|
|
|
@var{decl} is the @code{VAR_DECL} tree node representing the variable.
|
|
|
|
|
|
|
|
If this macro is not defined, then the variable name is defined in the
|
|
|
|
usual manner as a label (by means of @code{ASM_OUTPUT_LABEL}).
|
|
|
|
|
defaults.h (ASM_OUTPUT_TYPE_DIRECTIVE, [...]): New default definitions of new macros.
* defaults.h (ASM_OUTPUT_TYPE_DIRECTIVE, ASM_OUTPUT_SIZE_DIRECTIVE,
ASM_OUTPUT_MEASURED_SIZE): New default definitions of new macros.
* doc/tm.texi: Document them. Also document SIZE_ASM_OP,
TYPE_ASM_OP, and TYPE_OPERAND_FMT.
* config/elfos.h, config/netbsd-aout.h, config/openbsd.h,
config/alpha/elf.h, config/arm/elf.h, config/avr/avr.h,
config/cris/aout.h, config/i386/freebsd-aout.h,
config/i386/sco5.h, config/ia64/ia64.c, config/ip2k/ip2k.h,
config/m68k/m68kelf.h, config/m68k/m68kv4.h, config/m88k/m88k.h,
config/mcore/mcore-elf.h, config/mips/elf.h, config/mips/elf64.h,
config/mips/iris6.h, config/mips/linux.h, config/pa/pa-linux.h,
config/pa/pa64-hpux.h, config/rs6000/sysv4.h,
config/xtensa/elf.h, config/xtensa/linux.h:
Use the new macros.
Where possible, remove redundant definitions of SIZE_ASM_OP,
TYPE_ASM_OP, and TYPE_OPERAND_FMT.
From-SVN: r55735
2002-07-25 07:14:23 +02:00
|
|
|
You may wish to use @code{ASM_OUTPUT_TYPE_DIRECTIVE} and/or
|
|
|
|
@code{ASM_OUTPUT_SIZE_DIRECTIVE} in the definition of this macro.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
defaults.h (ASM_OUTPUT_TYPE_DIRECTIVE, [...]): New default definitions of new macros.
* defaults.h (ASM_OUTPUT_TYPE_DIRECTIVE, ASM_OUTPUT_SIZE_DIRECTIVE,
ASM_OUTPUT_MEASURED_SIZE): New default definitions of new macros.
* doc/tm.texi: Document them. Also document SIZE_ASM_OP,
TYPE_ASM_OP, and TYPE_OPERAND_FMT.
* config/elfos.h, config/netbsd-aout.h, config/openbsd.h,
config/alpha/elf.h, config/arm/elf.h, config/avr/avr.h,
config/cris/aout.h, config/i386/freebsd-aout.h,
config/i386/sco5.h, config/ia64/ia64.c, config/ip2k/ip2k.h,
config/m68k/m68kelf.h, config/m68k/m68kv4.h, config/m88k/m88k.h,
config/mcore/mcore-elf.h, config/mips/elf.h, config/mips/elf64.h,
config/mips/iris6.h, config/mips/linux.h, config/pa/pa-linux.h,
config/pa/pa64-hpux.h, config/rs6000/sysv4.h,
config/xtensa/elf.h, config/xtensa/linux.h:
Use the new macros.
Where possible, remove redundant definitions of SIZE_ASM_OP,
TYPE_ASM_OP, and TYPE_OPERAND_FMT.
From-SVN: r55735
2002-07-25 07:14:23 +02:00
|
|
|
|
2003-07-27 03:48:11 +02:00
|
|
|
@defmac ASM_DECLARE_CONSTANT_NAME (@var{stream}, @var{name}, @var{exp}, @var{size})
|
|
|
|
A C statement (sans semicolon) to output to the stdio stream
|
|
|
|
@var{stream} any text necessary for declaring the name @var{name} of a
|
|
|
|
constant which is being defined. This macro is responsible for
|
|
|
|
outputting the label definition (perhaps using
|
|
|
|
@code{ASM_OUTPUT_LABEL}). The argument @var{exp} is the
|
|
|
|
value of the constant, and @var{size} is the size of the constant
|
|
|
|
in bytes. @var{name} will be an internal label.
|
|
|
|
|
|
|
|
If this macro is not defined, then the @var{name} is defined in the
|
|
|
|
usual manner as a label (by means of @code{ASM_OUTPUT_LABEL}).
|
|
|
|
|
|
|
|
You may wish to use @code{ASM_OUTPUT_TYPE_DIRECTIVE} in the definition
|
|
|
|
of this macro.
|
|
|
|
@end defmac
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ASM_DECLARE_REGISTER_GLOBAL (@var{stream}, @var{decl}, @var{regno}, @var{name})
|
1999-08-03 00:58:04 +02:00
|
|
|
A C statement (sans semicolon) to output to the stdio stream
|
|
|
|
@var{stream} any text necessary for claiming a register @var{regno}
|
|
|
|
for a global variable @var{decl} with name @var{name}.
|
|
|
|
|
|
|
|
If you don't define this macro, that is equivalent to defining it to do
|
|
|
|
nothing.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1999-08-03 00:58:04 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ASM_FINISH_DECLARE_OBJECT (@var{stream}, @var{decl}, @var{toplevel}, @var{atend})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C statement (sans semicolon) to finish up declaring a variable name
|
|
|
|
once the compiler has processed its initializer fully and thus has had a
|
|
|
|
chance to determine the size of an array when controlled by an
|
|
|
|
initializer. This is used on systems where it's necessary to declare
|
|
|
|
something about the size of the object.
|
|
|
|
|
|
|
|
If you don't define this macro, that is equivalent to defining it to do
|
|
|
|
nothing.
|
|
|
|
|
defaults.h (ASM_OUTPUT_TYPE_DIRECTIVE, [...]): New default definitions of new macros.
* defaults.h (ASM_OUTPUT_TYPE_DIRECTIVE, ASM_OUTPUT_SIZE_DIRECTIVE,
ASM_OUTPUT_MEASURED_SIZE): New default definitions of new macros.
* doc/tm.texi: Document them. Also document SIZE_ASM_OP,
TYPE_ASM_OP, and TYPE_OPERAND_FMT.
* config/elfos.h, config/netbsd-aout.h, config/openbsd.h,
config/alpha/elf.h, config/arm/elf.h, config/avr/avr.h,
config/cris/aout.h, config/i386/freebsd-aout.h,
config/i386/sco5.h, config/ia64/ia64.c, config/ip2k/ip2k.h,
config/m68k/m68kelf.h, config/m68k/m68kv4.h, config/m88k/m88k.h,
config/mcore/mcore-elf.h, config/mips/elf.h, config/mips/elf64.h,
config/mips/iris6.h, config/mips/linux.h, config/pa/pa-linux.h,
config/pa/pa64-hpux.h, config/rs6000/sysv4.h,
config/xtensa/elf.h, config/xtensa/linux.h:
Use the new macros.
Where possible, remove redundant definitions of SIZE_ASM_OP,
TYPE_ASM_OP, and TYPE_OPERAND_FMT.
From-SVN: r55735
2002-07-25 07:14:23 +02:00
|
|
|
You may wish to use @code{ASM_OUTPUT_SIZE_DIRECTIVE} and/or
|
|
|
|
@code{ASM_OUTPUT_MEASURED_SIZE} in the definition of this macro.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
defaults.h (ASM_OUTPUT_TYPE_DIRECTIVE, [...]): New default definitions of new macros.
* defaults.h (ASM_OUTPUT_TYPE_DIRECTIVE, ASM_OUTPUT_SIZE_DIRECTIVE,
ASM_OUTPUT_MEASURED_SIZE): New default definitions of new macros.
* doc/tm.texi: Document them. Also document SIZE_ASM_OP,
TYPE_ASM_OP, and TYPE_OPERAND_FMT.
* config/elfos.h, config/netbsd-aout.h, config/openbsd.h,
config/alpha/elf.h, config/arm/elf.h, config/avr/avr.h,
config/cris/aout.h, config/i386/freebsd-aout.h,
config/i386/sco5.h, config/ia64/ia64.c, config/ip2k/ip2k.h,
config/m68k/m68kelf.h, config/m68k/m68kv4.h, config/m88k/m88k.h,
config/mcore/mcore-elf.h, config/mips/elf.h, config/mips/elf64.h,
config/mips/iris6.h, config/mips/linux.h, config/pa/pa-linux.h,
config/pa/pa64-hpux.h, config/rs6000/sysv4.h,
config/xtensa/elf.h, config/xtensa/linux.h:
Use the new macros.
Where possible, remove redundant definitions of SIZE_ASM_OP,
TYPE_ASM_OP, and TYPE_OPERAND_FMT.
From-SVN: r55735
2002-07-25 07:14:23 +02:00
|
|
|
|
2002-08-21 04:41:51 +02:00
|
|
|
@deftypefn {Target Hook} void TARGET_ASM_GLOBALIZE_LABEL (FILE *@var{stream}, const char *@var{name})
|
|
|
|
This target hook is a function to output to the stdio stream
|
1996-09-25 01:21:45 +02:00
|
|
|
@var{stream} some commands that will make the label @var{name} global;
|
2002-08-21 04:41:51 +02:00
|
|
|
that is, available for reference from other files.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2002-08-21 04:41:51 +02:00
|
|
|
The default implementation relies on a proper definition of
|
|
|
|
@code{GLOBAL_ASM_OP}.
|
2002-08-21 16:33:54 +02:00
|
|
|
@end deftypefn
|
2002-07-31 04:10:06 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ASM_WEAKEN_LABEL (@var{stream}, @var{name})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C statement (sans semicolon) to output to the stdio stream
|
|
|
|
@var{stream} some commands that will make the label @var{name} weak;
|
|
|
|
that is, available for reference from other files but only used if
|
|
|
|
no other definition is available. Use the expression
|
|
|
|
@code{assemble_name (@var{stream}, @var{name})} to output the name
|
|
|
|
itself; before and after that, output the additional assembler syntax
|
|
|
|
for making that name weak, and a newline.
|
|
|
|
|
2002-03-01 07:00:38 +01:00
|
|
|
If you don't define this macro or @code{ASM_WEAKEN_DECL}, GCC will not
|
|
|
|
support weak symbols and you should not define the @code{SUPPORTS_WEAK}
|
|
|
|
macro.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2002-03-01 07:00:38 +01:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ASM_WEAKEN_DECL (@var{stream}, @var{decl}, @var{name}, @var{value})
|
2002-03-01 07:00:38 +01:00
|
|
|
Combines (and replaces) the function of @code{ASM_WEAKEN_LABEL} and
|
|
|
|
@code{ASM_OUTPUT_WEAK_ALIAS}, allowing access to the associated function
|
|
|
|
or variable decl. If @var{value} is not @code{NULL}, this C statement
|
|
|
|
should output to the stdio stream @var{stream} assembler code which
|
|
|
|
defines (equates) the weak symbol @var{name} to have the value
|
|
|
|
@var{value}. If @var{value} is @code{NULL}, it should output commands
|
|
|
|
to make @var{name} weak.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac SUPPORTS_WEAK
|
1996-09-25 01:21:45 +02:00
|
|
|
A C expression which evaluates to true if the target supports weak symbols.
|
|
|
|
|
|
|
|
If you don't define this macro, @file{defaults.h} provides a default
|
2002-03-01 07:00:38 +01:00
|
|
|
definition. If either @code{ASM_WEAKEN_LABEL} or @code{ASM_WEAKEN_DECL}
|
|
|
|
is defined, the default definition is @samp{1}; otherwise, it is
|
|
|
|
@samp{0}. Define this macro if you want to control weak symbol support
|
|
|
|
with a compiler flag such as @option{-melf}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac MAKE_DECL_ONE_ONLY (@var{decl})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C statement (sans semicolon) to mark @var{decl} to be emitted as a
|
|
|
|
public symbol such that extra copies in multiple translation units will
|
|
|
|
be discarded by the linker. Define this macro if your object file
|
|
|
|
format provides support for this concept, such as the @samp{COMDAT}
|
|
|
|
section flags in the Microsoft Windows PE/COFF format, and this support
|
|
|
|
requires changes to @var{decl}, such as putting it in a separate section.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac SUPPORTS_ONE_ONLY
|
1996-09-25 01:21:45 +02:00
|
|
|
A C expression which evaluates to true if the target supports one-only
|
|
|
|
semantics.
|
|
|
|
|
|
|
|
If you don't define this macro, @file{varasm.c} provides a default
|
|
|
|
definition. If @code{MAKE_DECL_ONE_ONLY} is defined, the default
|
|
|
|
definition is @samp{1}; otherwise, it is @samp{0}. Define this macro if
|
1997-11-02 22:19:36 +01:00
|
|
|
you want to control one-only symbol support with a compiler flag, or if
|
1996-09-25 01:21:45 +02:00
|
|
|
setting the @code{DECL_ONE_ONLY} flag is enough to mark a declaration to
|
|
|
|
be emitted as one-only.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2002-09-07 02:19:27 +02:00
|
|
|
@deftypefn {Target Hook} void TARGET_ASM_ASSEMBLE_VISIBILITY (tree @var{decl}, const char *@var{visibility})
|
|
|
|
This target hook is a function to output to @var{asm_out_file} some
|
|
|
|
commands that will make the symbol(s) associated with @var{decl} have
|
|
|
|
hidden, protected or internal visibility as specified by @var{visibility}.
|
|
|
|
@end deftypefn
|
|
|
|
|
2004-06-04 01:15:01 +02:00
|
|
|
@defmac TARGET_WEAK_NOT_IN_ARCHIVE_TOC
|
2004-03-12 18:09:03 +01:00
|
|
|
A C expression that evaluates to true if the target's linker expects
|
2004-06-04 01:15:01 +02:00
|
|
|
that weak symbols do not appear in a static archive's table of contents.
|
2004-08-24 02:30:52 +02:00
|
|
|
The default is @code{0}.
|
2004-06-04 01:15:01 +02:00
|
|
|
|
|
|
|
Leaving weak symbols out of an archive's table of contents means that,
|
|
|
|
if a symbol will only have a definition in one translation unit and
|
|
|
|
will have undefined references from other translation units, that
|
|
|
|
symbol should not be weak. Defining this macro to be nonzero will
|
|
|
|
thus have the effect that certain symbols that would normally be weak
|
|
|
|
(explicit template instantiations, and vtables for polymorphic classes
|
|
|
|
with noninline key methods) will instead be nonweak.
|
|
|
|
|
|
|
|
The C++ ABI requires this macro to be zero. Define this macro for
|
|
|
|
targets where full C++ ABI compliance is impossible and where linker
|
|
|
|
restrictions require weak symbols to be left out of a static archive's
|
|
|
|
table of contents.
|
2004-03-12 18:09:03 +01:00
|
|
|
@end defmac
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ASM_OUTPUT_EXTERNAL (@var{stream}, @var{decl}, @var{name})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C statement (sans semicolon) to output to the stdio stream
|
|
|
|
@var{stream} any text necessary for declaring the name of an external
|
|
|
|
symbol named @var{name} which is referenced in this compilation but
|
|
|
|
not defined. The value of @var{decl} is the tree node for the
|
|
|
|
declaration.
|
|
|
|
|
|
|
|
This macro need not be defined if it does not need to output anything.
|
|
|
|
The GNU assembler and most Unix assemblers don't require anything.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-09-23 21:17:49 +02:00
|
|
|
@deftypefn {Target Hook} void TARGET_ASM_EXTERNAL_LIBCALL (rtx @var{symref})
|
|
|
|
This target hook is a function to output to @var{asm_out_file} an assembler
|
1996-09-25 01:21:45 +02:00
|
|
|
pseudo-op to declare a library function name external. The name of the
|
2003-09-23 21:17:49 +02:00
|
|
|
library function is given by @var{symref}, which is a @code{symbol_ref}.
|
|
|
|
@end deftypefn
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2004-08-16 22:54:43 +02:00
|
|
|
@deftypefn {Target Hook} void TARGET_ASM_MARK_DECL_PRESERVED (tree @var{decl})
|
|
|
|
This target hook is a function to output to @var{asm_out_file} an assembler
|
|
|
|
directive to annotate used symbol. Darwin target use .no_dead_code_strip
|
|
|
|
directive.
|
|
|
|
@end deftypefn
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ASM_OUTPUT_LABELREF (@var{stream}, @var{name})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C statement (sans semicolon) to output to the stdio stream
|
|
|
|
@var{stream} a reference in assembler syntax to a label named
|
|
|
|
@var{name}. This should add @samp{_} to the front of the name, if that
|
|
|
|
is customary on your operating system, as it is in most Berkeley Unix
|
|
|
|
systems. This macro is used in @code{assemble_name}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ASM_OUTPUT_SYMBOL_REF (@var{stream}, @var{sym})
|
2000-12-20 10:03:23 +01:00
|
|
|
A C statement (sans semicolon) to output a reference to
|
2001-11-10 22:44:53 +01:00
|
|
|
@code{SYMBOL_REF} @var{sym}. If not defined, @code{assemble_name}
|
2000-12-20 10:03:23 +01:00
|
|
|
will be used to output the name of the symbol. This macro may be used
|
|
|
|
to modify the way a symbol is referenced depending on information
|
system.h (ENCODE_SECTION_INFO): Poison it.
* system.h (ENCODE_SECTION_INFO): Poison it.
* target-def.h (TARGET_ENCODE_SECTION_INFO): New.
* target.h (encode_section_info): New.
* varasm.c (make_decl_rtl, output_constant_def): Use it.
* hooks.c (hook_tree_int_void): New.
* hooks.h: Declare it.
* config/darwin.h, config/alpha/alpha-protos.h, config/alpha/alpha.c,
config/alpha/alpha.h, config/arm/pe.h, config/avr/avr-protos.h,
config/avr/avr.c, config/avr/avr.h, config/c4x/c4x-protos.h,
config/c4x/c4x.c, config/c4x/c4x.h, config/cris/cris-protos.h,
config/cris/cris.c, config/cris/cris.h, config/i386/cygwin.h,
config/i386/win32.h, config/ia64/ia64-protos.h, config/ia64/ia64.c,
config/ia64/ia64.h, config/m32r/m32r-protos.h, config/m32r/m32r.c,
config/m32r/m32r.h, config/m68hc11/m68hc11-protos.h,
config/m68hc11/m68hc11.c, config/m68hc11/m68hc11.h,
config/mcore/mcore-protos.h, config/mcore/mcore.c,
config/mcore/mcore.h, config/mmix/mmix-protos.h, config/mmix/mmix.c,
config/mmix/mmix.h, config/rs6000/rs6000-protos.h,
config/rs6000/sysv4.h, config/stormy16/stormy16-protos.h,
config/stormy16/stormy16.c, config/stormy16/stormy16.h:
Replace ENCODE_SECTION_INFO with TARGET_ENCODE_SECTION_INFO
referencing existing function. Make function static.
* config/a29k/a29k.c, config/a29k/a29k.h, config/arc/arc.c,
config/arc/arc.h, config/arm/arm.c, config/arm/arm.h,
config/h8300/h8300.c, config/h8300/h8300.h, config/i370/i370.c,
config/i370/i370.h, config/i386/i386-interix.h, config/i386/i386.c,
config/i386/i386.h, config/i386/interix.c, config/m88k/m88k.c,
config/m88k/m88k.h, config/mips/mips.c, config/mips/mips.h,
config/ns32k/ns32k.c, config/ns32k/ns32k.h, config/pa/pa.c,
config/pa/pa.h, config/romp/romp.c, config/romp/romp.h,
config/rs6000/linux64.h, config/rs6000/xcoff.h, config/s390/s390.c,
config/s390/s390.h, config/sh/sh.c, config/sh/sh.h,
config/sparc/sparc.c, config/sparc/sparc.h, config/v850/v850.c,
config/v850/v850.h, config/vax/vax.c, config/vax/vms.h,
config/xtensa/xtensa.c, config/xtensa/xtensa.h:
Move ENCODE_SECTION_INFO to out-of-line function and add
TARGET_ENCODE_SECTION_INFO.
* config/darwin.h (ASM_DECLARE_FUNCTION_NAME): Use hook, not macro.
(ASM_DECLARE_OBJECT_NAME, ASM_OUTPUT_ALIGNED_DECL_LOCAL): Likewise.
* config/arm/pe.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Rename
from SUBTARGET_*
(switch_to_section): Replace in_rdata case with in_readonly_data.
* config/h8300/h8300.c (h8300_encode_label): Make static.
* config/h8300/h8300-protos.h: Update.
* config/rs6000/rs6000.c (rs6000_elf_encode_section_info): Rename
from rs6000_encode_section_info; make static.
(rs6000_xcoff_encode_section_info): New.
* config/v850/v850.c (v850_encode_data_area): Make static.
* config/v850/v850-protos.h: Update.
* config/vax/vax.c: Include flags.h.
(vms_select_section): Fix typo.
* doc/tm.texi (TARGET_ENCODE_SECTION_INFO): Update from previous
ENCODE_SECTION_INFO docs.
From-SVN: r53606
2002-05-19 07:23:27 +02:00
|
|
|
encoded by @code{TARGET_ENCODE_SECTION_INFO}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2000-12-20 10:03:23 +01:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ASM_OUTPUT_LABEL_REF (@var{stream}, @var{buf})
|
2001-11-10 22:44:53 +01:00
|
|
|
A C statement (sans semicolon) to output a reference to @var{buf}, the
|
2002-08-30 21:18:51 +02:00
|
|
|
result of @code{ASM_GENERATE_INTERNAL_LABEL}. If not defined,
|
2001-11-10 22:44:53 +01:00
|
|
|
@code{assemble_name} will be used to output the name of the symbol.
|
|
|
|
This macro is not used by @code{output_asm_label}, or the @code{%l}
|
|
|
|
specifier that calls it; the intention is that this macro should be set
|
2002-08-30 21:18:51 +02:00
|
|
|
when it is necessary to output a label differently when its address is
|
|
|
|
being taken.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2001-11-10 22:44:53 +01:00
|
|
|
|
2002-12-16 19:23:00 +01:00
|
|
|
@deftypefn {Target Hook} void TARGET_ASM_INTERNAL_LABEL (FILE *@var{stream}, const char *@var{prefix}, unsigned long @var{labelno})
|
|
|
|
A function to output to the stdio stream @var{stream} a label whose
|
|
|
|
name is made from the string @var{prefix} and the number @var{labelno}.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
It is absolutely essential that these labels be distinct from the labels
|
|
|
|
used for user-level functions and variables. Otherwise, certain programs
|
|
|
|
will have name conflicts with internal labels.
|
|
|
|
|
|
|
|
It is desirable to exclude internal labels from the symbol table of the
|
|
|
|
object file. Most assemblers have a naming convention for labels that
|
|
|
|
should be excluded; on many systems, the letter @samp{L} at the
|
|
|
|
beginning of a label has this effect. You should find out what
|
|
|
|
convention your system uses, and follow it.
|
|
|
|
|
c-tree.texi, [...]: Correct end-of-sentence markup and markup of "etc.", "e.g." and "i.e.".
* doc/c-tree.texi, doc/cfg.texi, doc/contrib.texi, doc/cpp.texi,
doc/cppopts.texi, doc/extend.texi, doc/fragments.texi,
doc/frontends.texi, doc/gcov.texi, doc/hostconfig.texi,
doc/implement-c.texi, doc/install.texi, doc/invoke.texi,
doc/libgcc.texi, doc/md.texi, doc/passes.texi,
doc/portability.texi, doc/rtl.texi, doc/sourcebuild.texi,
doc/standards.texi, doc/tm.texi, doc/tree-ssa.texi,
doc/trouble.texi: Correct end-of-sentence markup and markup of
"etc.", "e.g." and "i.e.". Use @code in various places where
appropriate.
From-SVN: r90101
2004-11-05 02:36:57 +01:00
|
|
|
The default version of this function utilizes @code{ASM_GENERATE_INTERNAL_LABEL}.
|
2002-12-16 19:23:00 +01:00
|
|
|
@end deftypefn
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ASM_OUTPUT_DEBUG_LABEL (@var{stream}, @var{prefix}, @var{num})
|
2000-11-01 01:20:34 +01:00
|
|
|
A C statement to output to the stdio stream @var{stream} a debug info
|
|
|
|
label whose name is made from the string @var{prefix} and the number
|
|
|
|
@var{num}. This is useful for VLIW targets, where debug info labels
|
|
|
|
may need to be treated differently than branch target labels. On some
|
|
|
|
systems, branch target labels must be at the beginning of instruction
|
|
|
|
bundles, but debug info labels can occur in the middle of instruction
|
|
|
|
bundles.
|
|
|
|
|
2002-12-16 19:23:00 +01:00
|
|
|
If this macro is not defined, then @code{(*targetm.asm_out.internal_label)} will be
|
2000-11-01 01:20:34 +01:00
|
|
|
used.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2000-11-01 01:20:34 +01:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ASM_GENERATE_INTERNAL_LABEL (@var{string}, @var{prefix}, @var{num})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C statement to store into the string @var{string} a label whose name
|
|
|
|
is made from the string @var{prefix} and the number @var{num}.
|
|
|
|
|
|
|
|
This string, when output subsequently by @code{assemble_name}, should
|
2002-12-16 19:23:00 +01:00
|
|
|
produce the output that @code{(*targetm.asm_out.internal_label)} would produce
|
1996-09-25 01:21:45 +02:00
|
|
|
with the same @var{prefix} and @var{num}.
|
|
|
|
|
|
|
|
If the string begins with @samp{*}, then @code{assemble_name} will
|
|
|
|
output the rest of the string unchanged. It is often convenient for
|
|
|
|
@code{ASM_GENERATE_INTERNAL_LABEL} to use @samp{*} in this way. If the
|
|
|
|
string doesn't start with @samp{*}, then @code{ASM_OUTPUT_LABELREF} gets
|
|
|
|
to output the string, and may change it. (Of course,
|
|
|
|
@code{ASM_OUTPUT_LABELREF} is also part of your machine description, so
|
|
|
|
you should know what it does on your machine.)
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ASM_FORMAT_PRIVATE_NAME (@var{outvar}, @var{name}, @var{number})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C expression to assign to @var{outvar} (which is a variable of type
|
|
|
|
@code{char *}) a newly allocated string made from the string
|
|
|
|
@var{name} and the number @var{number}, with some suitable punctuation
|
|
|
|
added. Use @code{alloca} to get space for the string.
|
|
|
|
|
|
|
|
The string will be used as an argument to @code{ASM_OUTPUT_LABELREF} to
|
|
|
|
produce an assembler label for an internal static variable whose name is
|
|
|
|
@var{name}. Therefore, the string must be such as to result in valid
|
|
|
|
assembler code. The argument @var{number} is different each time this
|
|
|
|
macro is executed; it prevents conflicts between similarly-named
|
|
|
|
internal static variables in different scopes.
|
|
|
|
|
|
|
|
Ideally this string should not be a valid C identifier, to prevent any
|
|
|
|
conflict with the user's own symbols. Most assemblers allow periods
|
|
|
|
or percent signs in assembler symbols; putting at least one of these
|
|
|
|
between the name and the number will suffice.
|
|
|
|
|
2002-12-16 19:23:00 +01:00
|
|
|
If this macro is not defined, a default definition will be provided
|
|
|
|
which is correct for most systems.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2002-12-16 19:23:00 +01:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ASM_OUTPUT_DEF (@var{stream}, @var{name}, @var{value})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C statement to output to the stdio stream @var{stream} assembler code
|
|
|
|
which defines (equates) the symbol @var{name} to have the value @var{value}.
|
|
|
|
|
1999-08-27 23:03:30 +02:00
|
|
|
@findex SET_ASM_OP
|
2001-07-03 02:46:05 +02:00
|
|
|
If @code{SET_ASM_OP} is defined, a default definition is provided which is
|
1996-09-25 01:21:45 +02:00
|
|
|
correct for most systems.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-11-11 21:12:06 +01:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ASM_OUTPUT_DEF_FROM_DECLS (@var{stream}, @var{decl_of_name}, @var{decl_of_value})
|
1999-06-18 03:03:36 +02:00
|
|
|
A C statement to output to the stdio stream @var{stream} assembler code
|
2000-11-10 06:56:47 +01:00
|
|
|
which defines (equates) the symbol whose tree node is @var{decl_of_name}
|
1999-06-18 03:03:36 +02:00
|
|
|
to have the value of the tree node @var{decl_of_value}. This macro will
|
|
|
|
be used in preference to @samp{ASM_OUTPUT_DEF} if it is defined and if
|
|
|
|
the tree nodes are available.
|
|
|
|
|
1999-08-27 23:03:30 +02:00
|
|
|
@findex SET_ASM_OP
|
2001-07-03 02:46:05 +02:00
|
|
|
If @code{SET_ASM_OP} is defined, a default definition is provided which is
|
1997-12-07 01:31:01 +01:00
|
|
|
correct for most systems.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1997-12-07 01:31:01 +01:00
|
|
|
|
2005-01-16 16:28:18 +01:00
|
|
|
@defmac TARGET_DEFERRED_OUTPUT_DEFS (@var{decl_of_name}, @var{decl_of_value})
|
|
|
|
A C statement that evaluates to true if the assembler code which defines
|
|
|
|
(equates) the symbol whose tree node is @var{decl_of_name} to have the value
|
|
|
|
of the tree node @var{decl_of_value} should be emitted near the end of the
|
|
|
|
current compilation unit. The default is to not defer output of defines.
|
|
|
|
This macro affects defines output by @samp{ASM_OUTPUT_DEF} and
|
|
|
|
@samp{ASM_OUTPUT_DEF_FROM_DECLS}.
|
|
|
|
@end defmac
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ASM_OUTPUT_WEAK_ALIAS (@var{stream}, @var{name}, @var{value})
|
1996-11-11 21:12:06 +01:00
|
|
|
A C statement to output to the stdio stream @var{stream} assembler code
|
|
|
|
which defines (equates) the weak symbol @var{name} to have the value
|
2001-07-17 14:55:19 +02:00
|
|
|
@var{value}. If @var{value} is @code{NULL}, it defines @var{name} as
|
|
|
|
an undefined weak symbol.
|
1996-11-11 21:12:06 +01:00
|
|
|
|
|
|
|
Define this macro if the target only supports weak aliases; define
|
2001-07-03 02:46:05 +02:00
|
|
|
@code{ASM_OUTPUT_DEF} instead if possible.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-11-11 21:12:06 +01:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac OBJC_GEN_METHOD_LABEL (@var{buf}, @var{is_inst}, @var{class_name}, @var{cat_name}, @var{sel_name})
|
1996-09-25 01:21:45 +02:00
|
|
|
Define this macro to override the default assembler names used for
|
2001-06-21 17:25:56 +02:00
|
|
|
Objective-C methods.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
The default name is a unique method number followed by the name of the
|
|
|
|
class (e.g.@: @samp{_1_Foo}). For methods in categories, the name of
|
|
|
|
the category is also included in the assembler name (e.g.@:
|
|
|
|
@samp{_1_Foo_Bar}).
|
|
|
|
|
|
|
|
These names are safe on most systems, but make debugging difficult since
|
|
|
|
the method's selector is not present in the name. Therefore, particular
|
|
|
|
systems define other ways of computing names.
|
|
|
|
|
|
|
|
@var{buf} is an expression of type @code{char *} which gives you a
|
|
|
|
buffer in which to store the name; its length is as long as
|
|
|
|
@var{class_name}, @var{cat_name} and @var{sel_name} put together, plus
|
|
|
|
50 characters extra.
|
|
|
|
|
|
|
|
The argument @var{is_inst} specifies whether the method is an instance
|
|
|
|
method or a class method; @var{class_name} is the name of the class;
|
2001-10-07 13:05:45 +02:00
|
|
|
@var{cat_name} is the name of the category (or @code{NULL} if the method is not
|
1996-09-25 01:21:45 +02:00
|
|
|
in a category); and @var{sel_name} is the name of the selector.
|
|
|
|
|
|
|
|
On systems where the assembler can handle quoted names, you can use this
|
|
|
|
macro to provide more human-readable names.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2001-04-29 02:12:51 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ASM_DECLARE_CLASS_REFERENCE (@var{stream}, @var{name})
|
2001-06-28 03:34:25 +02:00
|
|
|
A C statement (sans semicolon) to output to the stdio stream
|
|
|
|
@var{stream} commands to declare that the label @var{name} is an
|
|
|
|
Objective-C class reference. This is only needed for targets whose
|
|
|
|
linkers have special support for NeXT-style runtimes.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2001-06-28 03:34:25 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ASM_DECLARE_UNRESOLVED_REFERENCE (@var{stream}, @var{name})
|
2001-04-29 02:12:51 +02:00
|
|
|
A C statement (sans semicolon) to output to the stdio stream
|
|
|
|
@var{stream} commands to declare that the label @var{name} is an
|
|
|
|
unresolved Objective-C class reference. This is only needed for targets
|
|
|
|
whose linkers have special support for NeXT-style runtimes.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
@node Initialization
|
|
|
|
@subsection How Initialization Functions Are Handled
|
|
|
|
@cindex initialization routines
|
|
|
|
@cindex termination routines
|
|
|
|
@cindex constructors, output of
|
|
|
|
@cindex destructors, output of
|
|
|
|
|
|
|
|
The compiled code for certain languages includes @dfn{constructors}
|
|
|
|
(also called @dfn{initialization routines})---functions to initialize
|
|
|
|
data in the program when the program is started. These functions need
|
|
|
|
to be called before the program is ``started''---that is to say, before
|
|
|
|
@code{main} is called.
|
|
|
|
|
|
|
|
Compiling some languages generates @dfn{destructors} (also called
|
|
|
|
@dfn{termination routines}) that should be called when the program
|
|
|
|
terminates.
|
|
|
|
|
|
|
|
To make the initialization and termination functions work, the compiler
|
|
|
|
must output something in the assembler code to cause those functions to
|
|
|
|
be called at the appropriate time. When you port the compiler to a new
|
|
|
|
system, you need to specify how to do this.
|
|
|
|
|
|
|
|
There are two major ways that GCC currently supports the execution of
|
|
|
|
initialization and termination functions. Each way has two variants.
|
|
|
|
Much of the structure is common to all four variations.
|
|
|
|
|
|
|
|
@findex __CTOR_LIST__
|
|
|
|
@findex __DTOR_LIST__
|
|
|
|
The linker must build two lists of these functions---a list of
|
|
|
|
initialization functions, called @code{__CTOR_LIST__}, and a list of
|
|
|
|
termination functions, called @code{__DTOR_LIST__}.
|
|
|
|
|
|
|
|
Each list always begins with an ignored function pointer (which may hold
|
|
|
|
0, @minus{}1, or a count of the function pointers after it, depending on
|
|
|
|
the environment). This is followed by a series of zero or more function
|
|
|
|
pointers to constructors (or destructors), followed by a function
|
|
|
|
pointer containing zero.
|
|
|
|
|
|
|
|
Depending on the operating system and its executable file format, either
|
|
|
|
@file{crtstuff.c} or @file{libgcc2.c} traverses these lists at startup
|
|
|
|
time and exit time. Constructors are called in reverse order of the
|
|
|
|
list; destructors in forward order.
|
|
|
|
|
|
|
|
The best way to handle static constructors works only for object file
|
|
|
|
formats which provide arbitrarily-named sections. A section is set
|
|
|
|
aside for a list of constructors, and another for a list of destructors.
|
|
|
|
Traditionally these are called @samp{.ctors} and @samp{.dtors}. Each
|
|
|
|
object file that defines an initialization function also puts a word in
|
|
|
|
the constructor section to point to that function. The linker
|
|
|
|
accumulates all these words into one contiguous @samp{.ctors} section.
|
|
|
|
Termination functions are handled similarly.
|
|
|
|
|
2001-08-10 00:33:35 +02:00
|
|
|
This method will be chosen as the default by @file{target-def.h} if
|
|
|
|
@code{TARGET_ASM_NAMED_SECTION} is defined. A target that does not
|
2002-02-23 13:59:09 +01:00
|
|
|
support arbitrary sections, but does support special designated
|
2001-08-10 00:33:35 +02:00
|
|
|
constructor and destructor sections may define @code{CTORS_SECTION_ASM_OP}
|
|
|
|
and @code{DTORS_SECTION_ASM_OP} to achieve the same effect.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
When arbitrary sections are available, there are two variants, depending
|
|
|
|
upon how the code in @file{crtstuff.c} is called. On systems that
|
2001-08-10 00:33:35 +02:00
|
|
|
support a @dfn{.init} section which is executed at program startup,
|
1996-09-25 01:21:45 +02:00
|
|
|
parts of @file{crtstuff.c} are compiled into that section. The
|
2003-01-24 16:57:41 +01:00
|
|
|
program is linked by the @command{gcc} driver like this:
|
1996-09-25 01:21:45 +02:00
|
|
|
|
c-tree.texi, [...]: Use @smallexample instead of @example.
* doc/c-tree.texi, doc/compat.texi, doc/cpp.texi,
doc/cppopts.texi, doc/extend.texi, doc/install.texi,
doc/interface.texi, doc/invoke.texi, doc/libgcc.texi, doc/md.texi,
doc/objc.texi, doc/rtl.texi, doc/tm.texi, doc/trouble.texi: Use
@smallexample instead of @example.
From-SVN: r76075
2004-01-18 02:20:48 +01:00
|
|
|
@smallexample
|
2001-08-10 00:33:35 +02:00
|
|
|
ld -o @var{output_file} crti.o crtbegin.o @dots{} -lgcc crtend.o crtn.o
|
c-tree.texi, [...]: Use @smallexample instead of @example.
* doc/c-tree.texi, doc/compat.texi, doc/cpp.texi,
doc/cppopts.texi, doc/extend.texi, doc/install.texi,
doc/interface.texi, doc/invoke.texi, doc/libgcc.texi, doc/md.texi,
doc/objc.texi, doc/rtl.texi, doc/tm.texi, doc/trouble.texi: Use
@smallexample instead of @example.
From-SVN: r76075
2004-01-18 02:20:48 +01:00
|
|
|
@end smallexample
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2001-08-10 00:33:35 +02:00
|
|
|
The prologue of a function (@code{__init}) appears in the @code{.init}
|
|
|
|
section of @file{crti.o}; the epilogue appears in @file{crtn.o}. Likewise
|
|
|
|
for the function @code{__fini} in the @dfn{.fini} section. Normally these
|
|
|
|
files are provided by the operating system or by the GNU C library, but
|
|
|
|
are provided by GCC for a few targets.
|
|
|
|
|
|
|
|
The objects @file{crtbegin.o} and @file{crtend.o} are (for most targets)
|
|
|
|
compiled from @file{crtstuff.c}. They contain, among other things, code
|
|
|
|
fragments within the @code{.init} and @code{.fini} sections that branch
|
|
|
|
to routines in the @code{.text} section. The linker will pull all parts
|
|
|
|
of a section together, which results in a complete @code{__init} function
|
|
|
|
that invokes the routines we need at startup.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
To use this variant, you must define the @code{INIT_SECTION_ASM_OP}
|
|
|
|
macro properly.
|
|
|
|
|
2001-08-10 00:33:35 +02:00
|
|
|
If no init section is available, when GCC compiles any function called
|
|
|
|
@code{main} (or more accurately, any function designated as a program
|
|
|
|
entry point by the language front end calling @code{expand_main_function}),
|
|
|
|
it inserts a procedure call to @code{__main} as the first executable code
|
|
|
|
after the function prologue. The @code{__main} function is defined
|
|
|
|
in @file{libgcc2.c} and runs the global constructors.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
In file formats that don't support arbitrary sections, there are again
|
|
|
|
two variants. In the simplest variant, the GNU linker (GNU @code{ld})
|
|
|
|
and an `a.out' format must be used. In this case,
|
2001-08-10 00:33:35 +02:00
|
|
|
@code{TARGET_ASM_CONSTRUCTOR} is defined to produce a @code{.stabs}
|
1996-09-25 01:21:45 +02:00
|
|
|
entry of type @samp{N_SETT}, referencing the name @code{__CTOR_LIST__},
|
|
|
|
and with the address of the void function containing the initialization
|
|
|
|
code as its value. The GNU linker recognizes this as a request to add
|
2001-08-10 00:33:35 +02:00
|
|
|
the value to a @dfn{set}; the values are accumulated, and are eventually
|
1996-09-25 01:21:45 +02:00
|
|
|
placed in the executable as a vector in the format described above, with
|
|
|
|
a leading (ignored) count and a trailing zero element.
|
2001-08-10 00:33:35 +02:00
|
|
|
@code{TARGET_ASM_DESTRUCTOR} is handled similarly. Since no init
|
1996-09-25 01:21:45 +02:00
|
|
|
section is available, the absence of @code{INIT_SECTION_ASM_OP} causes
|
|
|
|
the compilation of @code{main} to call @code{__main} as above, starting
|
|
|
|
the initialization process.
|
|
|
|
|
|
|
|
The last variant uses neither arbitrary sections nor the GNU linker.
|
|
|
|
This is preferable when you want to do dynamic linking and when using
|
c-tree.texi, [...]: Replace . at end of sentences preceded by a capital letter with @..
* doc/c-tree.texi, doc/contrib.texi, doc/cpp.texi,
doc/cppinternals.texi, doc/extend.texi, doc/gcc.texi,
doc/gcov.texi, doc/install-old.texi, doc/install.texi,
doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: Replace
. at end of sentences preceded by a capital letter with @..
From-SVN: r43611
2001-06-27 17:04:16 +02:00
|
|
|
file formats which the GNU linker does not support, such as `ECOFF'@. In
|
2001-08-10 00:33:35 +02:00
|
|
|
this case, @code{TARGET_HAVE_CTORS_DTORS} is false, initialization and
|
|
|
|
termination functions are recognized simply by their names. This requires
|
|
|
|
an extra program in the linkage step, called @command{collect2}. This program
|
|
|
|
pretends to be the linker, for use with GCC; it does its job by running
|
|
|
|
the ordinary linker, but also arranges to include the vectors of
|
|
|
|
initialization and termination functions. These functions are called
|
|
|
|
via @code{__main} as described above. In order to use this method,
|
|
|
|
@code{use_collect2} must be defined in the target in @file{config.gcc}.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
@ifinfo
|
|
|
|
The following section describes the specific macros that control and
|
|
|
|
customize the handling of initialization and termination functions.
|
|
|
|
@end ifinfo
|
|
|
|
|
|
|
|
@node Macros for Initialization
|
|
|
|
@subsection Macros Controlling Initialization Routines
|
|
|
|
|
|
|
|
Here are the macros that control how the compiler handles initialization
|
|
|
|
and termination functions:
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac INIT_SECTION_ASM_OP
|
2000-09-25 15:50:51 +02:00
|
|
|
If defined, a C string constant, including spacing, for the assembler
|
|
|
|
operation to identify the following data as initialization code. If not
|
|
|
|
defined, GCC will assume such a section does not exist. When you are
|
|
|
|
using special sections for initialization and termination functions, this
|
|
|
|
macro also controls how @file{crtstuff.c} and @file{libgcc2.c} arrange to
|
|
|
|
run the initialization functions.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac HAS_INIT_SECTION
|
1996-09-25 01:21:45 +02:00
|
|
|
If defined, @code{main} will not call @code{__main} as described above.
|
2001-08-10 00:33:35 +02:00
|
|
|
This macro should be defined for systems that control start-up code
|
|
|
|
on a symbol-by-symbol basis, such as OSF/1, and should not
|
|
|
|
be defined explicitly for systems that support @code{INIT_SECTION_ASM_OP}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac LD_INIT_SWITCH
|
1996-09-25 01:21:45 +02:00
|
|
|
If defined, a C string constant for a switch that tells the linker that
|
|
|
|
the following symbol is an initialization routine.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac LD_FINI_SWITCH
|
1996-09-25 01:21:45 +02:00
|
|
|
If defined, a C string constant for a switch that tells the linker that
|
|
|
|
the following symbol is a finalization routine.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac COLLECT_SHARED_INIT_FUNC (@var{stream}, @var{func})
|
2001-12-13 15:24:03 +01:00
|
|
|
If defined, a C statement that will write a function that can be
|
|
|
|
automatically called when a shared library is loaded. The function
|
|
|
|
should call @var{func}, which takes no arguments. If not defined, and
|
|
|
|
the object format requires an explicit initialization function, then a
|
2001-12-14 12:03:49 +01:00
|
|
|
function called @code{_GLOBAL__DI} will be generated.
|
2001-12-13 15:24:03 +01:00
|
|
|
|
|
|
|
This function and the following one are used by collect2 when linking a
|
2002-02-23 13:59:09 +01:00
|
|
|
shared library that needs constructors or destructors, or has DWARF2
|
2001-12-13 15:24:03 +01:00
|
|
|
exception tables embedded in the code.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2001-12-13 15:24:03 +01:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac COLLECT_SHARED_FINI_FUNC (@var{stream}, @var{func})
|
2001-12-13 15:24:03 +01:00
|
|
|
If defined, a C statement that will write a function that can be
|
|
|
|
automatically called when a shared library is unloaded. The function
|
|
|
|
should call @var{func}, which takes no arguments. If not defined, and
|
|
|
|
the object format requires an explicit finalization function, then a
|
2001-12-14 12:03:49 +01:00
|
|
|
function called @code{_GLOBAL__DD} will be generated.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2001-12-13 15:24:03 +01:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac INVOKE__main
|
1996-09-25 01:21:45 +02:00
|
|
|
If defined, @code{main} will call @code{__main} despite the presence of
|
|
|
|
@code{INIT_SECTION_ASM_OP}. This macro should be defined for systems
|
|
|
|
where the init section is not actually run automatically, but is still
|
|
|
|
useful for collecting the lists of constructors and destructors.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac SUPPORTS_INIT_PRIORITY
|
2001-01-15 04:33:56 +01:00
|
|
|
If nonzero, the C++ @code{init_priority} attribute is supported and the
|
|
|
|
compiler should emit instructions to control the order of initialization
|
|
|
|
of objects. If zero, the compiler will issue an error message upon
|
|
|
|
encountering an @code{init_priority} attribute.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2001-08-10 00:33:35 +02:00
|
|
|
|
|
|
|
@deftypefn {Target Hook} bool TARGET_HAVE_CTORS_DTORS
|
|
|
|
This value is true if the target supports some ``native'' method of
|
|
|
|
collecting constructors and destructors to be run at startup and exit.
|
|
|
|
It is false if we must use @command{collect2}.
|
|
|
|
@end deftypefn
|
|
|
|
|
|
|
|
@deftypefn {Target Hook} void TARGET_ASM_CONSTRUCTOR (rtx @var{symbol}, int @var{priority})
|
|
|
|
If defined, a function that outputs assembler code to arrange to call
|
|
|
|
the function referenced by @var{symbol} at initialization time.
|
2001-01-15 04:33:56 +01:00
|
|
|
|
2001-08-10 00:33:35 +02:00
|
|
|
Assume that @var{symbol} is a @code{SYMBOL_REF} for a function taking
|
|
|
|
no arguments and with no return value. If the target supports initialization
|
|
|
|
priorities, @var{priority} is a value between 0 and @code{MAX_INIT_PRIORITY};
|
|
|
|
otherwise it must be @code{DEFAULT_INIT_PRIORITY}.
|
|
|
|
|
2001-10-17 10:44:09 +02:00
|
|
|
If this macro is not defined by the target, a suitable default will
|
2001-08-10 00:33:35 +02:00
|
|
|
be chosen if (1) the target supports arbitrary section names, (2) the
|
|
|
|
target defines @code{CTORS_SECTION_ASM_OP}, or (3) @code{USE_COLLECT2}
|
|
|
|
is not defined.
|
|
|
|
@end deftypefn
|
|
|
|
|
|
|
|
@deftypefn {Target Hook} void TARGET_ASM_DESTRUCTOR (rtx @var{symbol}, int @var{priority})
|
|
|
|
This is like @code{TARGET_ASM_CONSTRUCTOR} but used for termination
|
1996-09-25 01:21:45 +02:00
|
|
|
functions rather than initialization functions.
|
2001-08-10 00:33:35 +02:00
|
|
|
@end deftypefn
|
1999-02-21 20:58:22 +01:00
|
|
|
|
2001-08-10 00:33:35 +02:00
|
|
|
If @code{TARGET_HAVE_CTORS_DTORS} is true, the initialization routine
|
|
|
|
generated for the generated object file will have static linkage.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2001-08-10 00:33:35 +02:00
|
|
|
If your system uses @command{collect2} as the means of processing
|
|
|
|
constructors, then that program normally uses @command{nm} to scan
|
|
|
|
an object file for constructor functions to be called.
|
1999-02-21 20:58:22 +01:00
|
|
|
|
2003-06-29 20:34:38 +02:00
|
|
|
On certain kinds of systems, you can define this macro to make
|
2001-08-10 00:33:35 +02:00
|
|
|
@command{collect2} work faster (and, in some cases, make it work at all):
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac OBJECT_FORMAT_COFF
|
1996-09-25 01:21:45 +02:00
|
|
|
Define this macro if the system uses COFF (Common Object File Format)
|
2001-08-10 00:33:35 +02:00
|
|
|
object files, so that @command{collect2} can assume this format and scan
|
1996-09-25 01:21:45 +02:00
|
|
|
object files directly for dynamic constructor/destructor functions.
|
|
|
|
|
2003-06-29 20:34:38 +02:00
|
|
|
This macro is effective only in a native compiler; @command{collect2} as
|
2001-08-10 00:33:35 +02:00
|
|
|
part of a cross compiler always uses @command{nm} for the target machine.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac REAL_NM_FILE_NAME
|
1996-09-25 01:21:45 +02:00
|
|
|
Define this macro as a C string constant containing the file name to use
|
2001-08-10 00:33:35 +02:00
|
|
|
to execute @command{nm}. The default is to search the path normally for
|
|
|
|
@command{nm}.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
If your system supports shared libraries and has a program to list the
|
|
|
|
dynamic dependencies of a given library or executable, you can define
|
|
|
|
these macros to enable support for running initialization and
|
|
|
|
termination functions in shared libraries:
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac LDD_SUFFIX
|
2001-08-10 00:33:35 +02:00
|
|
|
Define this macro to a C string constant containing the name of the program
|
|
|
|
which lists dynamic dependencies, like @command{"ldd"} under SunOS 4.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac PARSE_LDD_OUTPUT (@var{ptr})
|
1996-09-25 01:21:45 +02:00
|
|
|
Define this macro to be C code that extracts filenames from the output
|
2001-07-03 02:46:05 +02:00
|
|
|
of the program denoted by @code{LDD_SUFFIX}. @var{ptr} is a variable
|
1996-09-25 01:21:45 +02:00
|
|
|
of type @code{char *} that points to the beginning of a line of output
|
|
|
|
from @code{LDD_SUFFIX}. If the line lists a dynamic dependency, the
|
2001-07-03 02:46:05 +02:00
|
|
|
code must advance @var{ptr} to the beginning of the filename on that
|
|
|
|
line. Otherwise, it must set @var{ptr} to @code{NULL}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
@node Instruction Output
|
|
|
|
@subsection Output of Assembler Instructions
|
|
|
|
|
|
|
|
@c prevent bad page break with this line
|
|
|
|
This describes assembler instruction output.
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac REGISTER_NAMES
|
1996-09-25 01:21:45 +02:00
|
|
|
A C initializer containing the assembler's names for the machine
|
|
|
|
registers, each one as a C string constant. This is what translates
|
|
|
|
register numbers in the compiler into assembler language.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ADDITIONAL_REGISTER_NAMES
|
1996-09-25 01:21:45 +02:00
|
|
|
If defined, a C initializer for an array of structures containing a name
|
|
|
|
and a register number. This macro defines additional names for hard
|
|
|
|
registers, thus allowing the @code{asm} option in declarations to refer
|
|
|
|
to registers using alternate names.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ASM_OUTPUT_OPCODE (@var{stream}, @var{ptr})
|
1996-09-25 01:21:45 +02:00
|
|
|
Define this macro if you are using an unusual assembler that
|
|
|
|
requires different names for the machine instructions.
|
|
|
|
|
|
|
|
The definition is a C statement or statements which output an
|
|
|
|
assembler instruction opcode to the stdio stream @var{stream}. The
|
|
|
|
macro-operand @var{ptr} is a variable of type @code{char *} which
|
|
|
|
points to the opcode name in its ``internal'' form---the form that is
|
|
|
|
written in the machine description. The definition should output the
|
|
|
|
opcode name to @var{stream}, performing any translation you desire, and
|
|
|
|
increment the variable @var{ptr} to point at the end of the opcode
|
|
|
|
so that it will not be output twice.
|
|
|
|
|
|
|
|
In fact, your macro definition may process less than the entire opcode
|
|
|
|
name, or more than the opcode name; but if you want to process text
|
|
|
|
that includes @samp{%}-sequences to substitute operands, you must take
|
|
|
|
care of the substitution yourself. Just be sure to increment
|
|
|
|
@var{ptr} over whatever text should not be output normally.
|
|
|
|
|
2001-12-20 15:39:53 +01:00
|
|
|
@findex recog_data.operand
|
1996-09-25 01:21:45 +02:00
|
|
|
If you need to look at the operand values, they can be found as the
|
2001-12-20 15:39:53 +01:00
|
|
|
elements of @code{recog_data.operand}.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
If the macro definition does nothing, the instruction is output
|
|
|
|
in the usual way.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac FINAL_PRESCAN_INSN (@var{insn}, @var{opvec}, @var{noperands})
|
1996-09-25 01:21:45 +02:00
|
|
|
If defined, a C statement to be executed just prior to the output of
|
|
|
|
assembler code for @var{insn}, to modify the extracted operands so
|
|
|
|
they will be output differently.
|
|
|
|
|
|
|
|
Here the argument @var{opvec} is the vector containing the operands
|
|
|
|
extracted from @var{insn}, and @var{noperands} is the number of
|
|
|
|
elements of the vector which contain meaningful data for this insn.
|
|
|
|
The contents of this vector are what will be used to convert the insn
|
|
|
|
template into assembler code, so you can change the assembler output
|
|
|
|
by changing the contents of the vector.
|
|
|
|
|
|
|
|
This macro is useful when various assembler syntaxes share a single
|
|
|
|
file of instruction patterns; by defining this macro differently, you
|
|
|
|
can cause a large class of instructions to be output differently (such
|
|
|
|
as with rearranged operands). Naturally, variations in assembler
|
|
|
|
syntax affecting individual insn patterns ought to be handled by
|
|
|
|
writing conditional output routines in those patterns.
|
|
|
|
|
|
|
|
If this macro is not defined, it is equivalent to a null statement.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac PRINT_OPERAND (@var{stream}, @var{x}, @var{code})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C compound statement to output to stdio stream @var{stream} the
|
|
|
|
assembler syntax for an instruction operand @var{x}. @var{x} is an
|
|
|
|
RTL expression.
|
|
|
|
|
|
|
|
@var{code} is a value that can be used to specify one of several ways
|
|
|
|
of printing the operand. It is used when identical operands must be
|
|
|
|
printed differently depending on the context. @var{code} comes from
|
|
|
|
the @samp{%} specification that was used to request printing of the
|
|
|
|
operand. If the specification was just @samp{%@var{digit}} then
|
|
|
|
@var{code} is 0; if the specification was @samp{%@var{ltr}
|
|
|
|
@var{digit}} then @var{code} is the ASCII code for @var{ltr}.
|
|
|
|
|
|
|
|
@findex reg_names
|
|
|
|
If @var{x} is a register, this macro should print the register's name.
|
|
|
|
The names can be found in an array @code{reg_names} whose type is
|
|
|
|
@code{char *[]}. @code{reg_names} is initialized from
|
|
|
|
@code{REGISTER_NAMES}.
|
|
|
|
|
|
|
|
When the machine description has a specification @samp{%@var{punct}}
|
|
|
|
(a @samp{%} followed by a punctuation character), this macro is called
|
|
|
|
with a null pointer for @var{x} and the punctuation character for
|
|
|
|
@var{code}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac PRINT_OPERAND_PUNCT_VALID_P (@var{code})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C expression which evaluates to true if @var{code} is a valid
|
|
|
|
punctuation character for use in the @code{PRINT_OPERAND} macro. If
|
|
|
|
@code{PRINT_OPERAND_PUNCT_VALID_P} is not defined, it means that no
|
|
|
|
punctuation characters (except for the standard one, @samp{%}) are used
|
|
|
|
in this way.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac PRINT_OPERAND_ADDRESS (@var{stream}, @var{x})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C compound statement to output to stdio stream @var{stream} the
|
|
|
|
assembler syntax for an instruction operand that is a memory reference
|
|
|
|
whose address is @var{x}. @var{x} is an RTL expression.
|
|
|
|
|
system.h (ENCODE_SECTION_INFO): Poison it.
* system.h (ENCODE_SECTION_INFO): Poison it.
* target-def.h (TARGET_ENCODE_SECTION_INFO): New.
* target.h (encode_section_info): New.
* varasm.c (make_decl_rtl, output_constant_def): Use it.
* hooks.c (hook_tree_int_void): New.
* hooks.h: Declare it.
* config/darwin.h, config/alpha/alpha-protos.h, config/alpha/alpha.c,
config/alpha/alpha.h, config/arm/pe.h, config/avr/avr-protos.h,
config/avr/avr.c, config/avr/avr.h, config/c4x/c4x-protos.h,
config/c4x/c4x.c, config/c4x/c4x.h, config/cris/cris-protos.h,
config/cris/cris.c, config/cris/cris.h, config/i386/cygwin.h,
config/i386/win32.h, config/ia64/ia64-protos.h, config/ia64/ia64.c,
config/ia64/ia64.h, config/m32r/m32r-protos.h, config/m32r/m32r.c,
config/m32r/m32r.h, config/m68hc11/m68hc11-protos.h,
config/m68hc11/m68hc11.c, config/m68hc11/m68hc11.h,
config/mcore/mcore-protos.h, config/mcore/mcore.c,
config/mcore/mcore.h, config/mmix/mmix-protos.h, config/mmix/mmix.c,
config/mmix/mmix.h, config/rs6000/rs6000-protos.h,
config/rs6000/sysv4.h, config/stormy16/stormy16-protos.h,
config/stormy16/stormy16.c, config/stormy16/stormy16.h:
Replace ENCODE_SECTION_INFO with TARGET_ENCODE_SECTION_INFO
referencing existing function. Make function static.
* config/a29k/a29k.c, config/a29k/a29k.h, config/arc/arc.c,
config/arc/arc.h, config/arm/arm.c, config/arm/arm.h,
config/h8300/h8300.c, config/h8300/h8300.h, config/i370/i370.c,
config/i370/i370.h, config/i386/i386-interix.h, config/i386/i386.c,
config/i386/i386.h, config/i386/interix.c, config/m88k/m88k.c,
config/m88k/m88k.h, config/mips/mips.c, config/mips/mips.h,
config/ns32k/ns32k.c, config/ns32k/ns32k.h, config/pa/pa.c,
config/pa/pa.h, config/romp/romp.c, config/romp/romp.h,
config/rs6000/linux64.h, config/rs6000/xcoff.h, config/s390/s390.c,
config/s390/s390.h, config/sh/sh.c, config/sh/sh.h,
config/sparc/sparc.c, config/sparc/sparc.h, config/v850/v850.c,
config/v850/v850.h, config/vax/vax.c, config/vax/vms.h,
config/xtensa/xtensa.c, config/xtensa/xtensa.h:
Move ENCODE_SECTION_INFO to out-of-line function and add
TARGET_ENCODE_SECTION_INFO.
* config/darwin.h (ASM_DECLARE_FUNCTION_NAME): Use hook, not macro.
(ASM_DECLARE_OBJECT_NAME, ASM_OUTPUT_ALIGNED_DECL_LOCAL): Likewise.
* config/arm/pe.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Rename
from SUBTARGET_*
(switch_to_section): Replace in_rdata case with in_readonly_data.
* config/h8300/h8300.c (h8300_encode_label): Make static.
* config/h8300/h8300-protos.h: Update.
* config/rs6000/rs6000.c (rs6000_elf_encode_section_info): Rename
from rs6000_encode_section_info; make static.
(rs6000_xcoff_encode_section_info): New.
* config/v850/v850.c (v850_encode_data_area): Make static.
* config/v850/v850-protos.h: Update.
* config/vax/vax.c: Include flags.h.
(vms_select_section): Fix typo.
* doc/tm.texi (TARGET_ENCODE_SECTION_INFO): Update from previous
ENCODE_SECTION_INFO docs.
From-SVN: r53606
2002-05-19 07:23:27 +02:00
|
|
|
@cindex @code{TARGET_ENCODE_SECTION_INFO} usage
|
1996-09-25 01:21:45 +02:00
|
|
|
On some machines, the syntax for a symbolic address depends on the
|
system.h (ENCODE_SECTION_INFO): Poison it.
* system.h (ENCODE_SECTION_INFO): Poison it.
* target-def.h (TARGET_ENCODE_SECTION_INFO): New.
* target.h (encode_section_info): New.
* varasm.c (make_decl_rtl, output_constant_def): Use it.
* hooks.c (hook_tree_int_void): New.
* hooks.h: Declare it.
* config/darwin.h, config/alpha/alpha-protos.h, config/alpha/alpha.c,
config/alpha/alpha.h, config/arm/pe.h, config/avr/avr-protos.h,
config/avr/avr.c, config/avr/avr.h, config/c4x/c4x-protos.h,
config/c4x/c4x.c, config/c4x/c4x.h, config/cris/cris-protos.h,
config/cris/cris.c, config/cris/cris.h, config/i386/cygwin.h,
config/i386/win32.h, config/ia64/ia64-protos.h, config/ia64/ia64.c,
config/ia64/ia64.h, config/m32r/m32r-protos.h, config/m32r/m32r.c,
config/m32r/m32r.h, config/m68hc11/m68hc11-protos.h,
config/m68hc11/m68hc11.c, config/m68hc11/m68hc11.h,
config/mcore/mcore-protos.h, config/mcore/mcore.c,
config/mcore/mcore.h, config/mmix/mmix-protos.h, config/mmix/mmix.c,
config/mmix/mmix.h, config/rs6000/rs6000-protos.h,
config/rs6000/sysv4.h, config/stormy16/stormy16-protos.h,
config/stormy16/stormy16.c, config/stormy16/stormy16.h:
Replace ENCODE_SECTION_INFO with TARGET_ENCODE_SECTION_INFO
referencing existing function. Make function static.
* config/a29k/a29k.c, config/a29k/a29k.h, config/arc/arc.c,
config/arc/arc.h, config/arm/arm.c, config/arm/arm.h,
config/h8300/h8300.c, config/h8300/h8300.h, config/i370/i370.c,
config/i370/i370.h, config/i386/i386-interix.h, config/i386/i386.c,
config/i386/i386.h, config/i386/interix.c, config/m88k/m88k.c,
config/m88k/m88k.h, config/mips/mips.c, config/mips/mips.h,
config/ns32k/ns32k.c, config/ns32k/ns32k.h, config/pa/pa.c,
config/pa/pa.h, config/romp/romp.c, config/romp/romp.h,
config/rs6000/linux64.h, config/rs6000/xcoff.h, config/s390/s390.c,
config/s390/s390.h, config/sh/sh.c, config/sh/sh.h,
config/sparc/sparc.c, config/sparc/sparc.h, config/v850/v850.c,
config/v850/v850.h, config/vax/vax.c, config/vax/vms.h,
config/xtensa/xtensa.c, config/xtensa/xtensa.h:
Move ENCODE_SECTION_INFO to out-of-line function and add
TARGET_ENCODE_SECTION_INFO.
* config/darwin.h (ASM_DECLARE_FUNCTION_NAME): Use hook, not macro.
(ASM_DECLARE_OBJECT_NAME, ASM_OUTPUT_ALIGNED_DECL_LOCAL): Likewise.
* config/arm/pe.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Rename
from SUBTARGET_*
(switch_to_section): Replace in_rdata case with in_readonly_data.
* config/h8300/h8300.c (h8300_encode_label): Make static.
* config/h8300/h8300-protos.h: Update.
* config/rs6000/rs6000.c (rs6000_elf_encode_section_info): Rename
from rs6000_encode_section_info; make static.
(rs6000_xcoff_encode_section_info): New.
* config/v850/v850.c (v850_encode_data_area): Make static.
* config/v850/v850-protos.h: Update.
* config/vax/vax.c: Include flags.h.
(vms_select_section): Fix typo.
* doc/tm.texi (TARGET_ENCODE_SECTION_INFO): Update from previous
ENCODE_SECTION_INFO docs.
From-SVN: r53606
2002-05-19 07:23:27 +02:00
|
|
|
section that the address refers to. On these machines, define the hook
|
|
|
|
@code{TARGET_ENCODE_SECTION_INFO} to store the information into the
|
2003-06-20 08:41:12 +02:00
|
|
|
@code{symbol_ref}, and then check for it here. @xref{Assembler
|
|
|
|
Format}.
|
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
@findex dbr_sequence_length
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac DBR_OUTPUT_SEQEND (@var{file})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C statement, to be executed after all slot-filler instructions have
|
|
|
|
been output. If necessary, call @code{dbr_sequence_length} to
|
|
|
|
determine the number of slots filled in a sequence (zero if not
|
|
|
|
currently outputting a sequence), to decide how many no-ops to output,
|
|
|
|
or whatever.
|
|
|
|
|
|
|
|
Don't define this macro if it has nothing to do, but it is helpful in
|
|
|
|
reading assembly output if the extent of the delay sequence is made
|
2001-06-27 02:04:39 +02:00
|
|
|
explicit (e.g.@: with white space).
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
@findex final_sequence
|
|
|
|
Note that output routines for instructions with delay slots must be
|
2001-06-27 02:04:39 +02:00
|
|
|
prepared to deal with not being output as part of a sequence
|
|
|
|
(i.e.@: when the scheduling pass is not run, or when no slot fillers could be
|
1996-09-25 01:21:45 +02:00
|
|
|
found.) The variable @code{final_sequence} is null when not
|
|
|
|
processing a sequence, otherwise it contains the @code{sequence} rtx
|
|
|
|
being output.
|
|
|
|
|
|
|
|
@findex asm_fprintf
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac REGISTER_PREFIX
|
|
|
|
@defmacx LOCAL_LABEL_PREFIX
|
|
|
|
@defmacx USER_LABEL_PREFIX
|
|
|
|
@defmacx IMMEDIATE_PREFIX
|
1996-09-25 01:21:45 +02:00
|
|
|
If defined, C string expressions to be used for the @samp{%R}, @samp{%L},
|
|
|
|
@samp{%U}, and @samp{%I} options of @code{asm_fprintf} (see
|
|
|
|
@file{final.c}). These are useful when a single @file{md} file must
|
|
|
|
support multiple assembler formats. In that case, the various @file{tm.h}
|
|
|
|
files can define these macros differently.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ASM_FPRINTF_EXTENSIONS (@var{file}, @var{argptr}, @var{format})
|
2000-11-10 06:56:47 +01:00
|
|
|
If defined this macro should expand to a series of @code{case}
|
1999-07-26 11:25:29 +02:00
|
|
|
statements which will be parsed inside the @code{switch} statement of
|
|
|
|
the @code{asm_fprintf} function. This allows targets to define extra
|
|
|
|
printf formats which may useful when generating their assembler
|
2003-07-31 03:32:24 +02:00
|
|
|
statements. Note that uppercase letters are reserved for future
|
1999-07-26 11:25:29 +02:00
|
|
|
generic extensions to asm_fprintf, and so are not available to target
|
|
|
|
specific code. The output file is given by the parameter @var{file}.
|
|
|
|
The varargs input pointer is @var{argptr} and the rest of the format
|
|
|
|
string, starting the character after the one that is being switched
|
|
|
|
upon, is pointed to by @var{format}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1999-07-26 11:25:29 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ASSEMBLER_DIALECT
|
1996-09-25 01:21:45 +02:00
|
|
|
If your target supports multiple dialects of assembler language (such as
|
|
|
|
different opcodes), define this macro as a C expression that gives the
|
|
|
|
numeric index of the assembler language dialect to use, with zero as the
|
|
|
|
first variant.
|
|
|
|
|
|
|
|
If this macro is defined, you may use constructs of the form
|
haifa-sched.c: Convert to target hooks.
* haifa-sched.c: Convert to target hooks. Macros replaced
are ISSUE_RATE, ADJUST_COST, ADJUST_PRIORITY, MD_SCHED_INIT,
MD_SCHED_REORDER, MD_SCHED_REORDER2, MD_SCHED_VARIABLE_ISSUE,
MD_SCHED_FINISH, and HAVE_cycle_display.
* target-def.h (TARGET_SCHED_ADJUST_COST,
TARGET_SCHED_ADJUST_PRIORITY, TARGET_SCHED_ISSUE_RATE,
TARGET_SCHED_VARIABLE_ISSUE, TARGET_SCHED_INIT,
TARGET_SCHED_FINISH, TARGET_SCHED_REORDER,
TARGET_SCHED_REORDER2, TARGET_SCHED_CYCLE_DISPLAY):
New hook #defines to be overridden.
(TARGET_SCHED): Bring them all together.
(TARGET_INITIALIZER): Update.
* target.h: Don't forward declare struct rtx_def. Use 'rtx'
instead of 'struct rtx_def *' throughout.
(struct sched): New set of hooks for the scheduler.
* Makefile.in (haifa-sched.o): Depend on target.h.
* doc/tm.texi: Document the new scheduler hooks, together in
their own section, instead of scattered around.
Fix a bunch of underfull/overfull hboxes.
* a29k.h, alpha.h, arm.h, c4x.h, convex.h, d30v.h, i386.h,
ia64.h, m32r.h, m88k.h, mips.h, pa.h, rs6000.h, s390.h, sh.h,
sparc.h: Don't define any of the old scheduler macros.
* a29k.c, alpha.c, arm.c, c4x.c, convex.c, d30v.c, i386.c,
ia64.c, m32r.c, m88k.c, mips.c, pa.c, rs6000.c, s390.c, sh.c,
sparc.c: Create hook functions from code extracted from
corresponding target header, or make existing hooks static, as
appropriate. Set the appropriate entries in targetm.
* alpha-protos.h, arm-protos.h, c4x-protos.h, d30v-protos.h,
i386-protos.h, ia64-protos.h, m32r-protos.h, pa-protos.h,
rs6000-protos.h, s390-protos.h, sparc-protos.h:
Remove prototypes for functions which are now static.
* d30v.h, d30v.c, m32r.h, m32r.c: Remove #ifdef HAIFA and
related gunk; the Haifa scheduler is now the only choice.
From-SVN: r45009
2001-08-18 22:25:54 +02:00
|
|
|
@smallexample
|
2002-02-23 13:59:09 +01:00
|
|
|
@samp{@{option0|option1|option2@dots{}@}}
|
haifa-sched.c: Convert to target hooks.
* haifa-sched.c: Convert to target hooks. Macros replaced
are ISSUE_RATE, ADJUST_COST, ADJUST_PRIORITY, MD_SCHED_INIT,
MD_SCHED_REORDER, MD_SCHED_REORDER2, MD_SCHED_VARIABLE_ISSUE,
MD_SCHED_FINISH, and HAVE_cycle_display.
* target-def.h (TARGET_SCHED_ADJUST_COST,
TARGET_SCHED_ADJUST_PRIORITY, TARGET_SCHED_ISSUE_RATE,
TARGET_SCHED_VARIABLE_ISSUE, TARGET_SCHED_INIT,
TARGET_SCHED_FINISH, TARGET_SCHED_REORDER,
TARGET_SCHED_REORDER2, TARGET_SCHED_CYCLE_DISPLAY):
New hook #defines to be overridden.
(TARGET_SCHED): Bring them all together.
(TARGET_INITIALIZER): Update.
* target.h: Don't forward declare struct rtx_def. Use 'rtx'
instead of 'struct rtx_def *' throughout.
(struct sched): New set of hooks for the scheduler.
* Makefile.in (haifa-sched.o): Depend on target.h.
* doc/tm.texi: Document the new scheduler hooks, together in
their own section, instead of scattered around.
Fix a bunch of underfull/overfull hboxes.
* a29k.h, alpha.h, arm.h, c4x.h, convex.h, d30v.h, i386.h,
ia64.h, m32r.h, m88k.h, mips.h, pa.h, rs6000.h, s390.h, sh.h,
sparc.h: Don't define any of the old scheduler macros.
* a29k.c, alpha.c, arm.c, c4x.c, convex.c, d30v.c, i386.c,
ia64.c, m32r.c, m88k.c, mips.c, pa.c, rs6000.c, s390.c, sh.c,
sparc.c: Create hook functions from code extracted from
corresponding target header, or make existing hooks static, as
appropriate. Set the appropriate entries in targetm.
* alpha-protos.h, arm-protos.h, c4x-protos.h, d30v-protos.h,
i386-protos.h, ia64-protos.h, m32r-protos.h, pa-protos.h,
rs6000-protos.h, s390-protos.h, sparc-protos.h:
Remove prototypes for functions which are now static.
* d30v.h, d30v.c, m32r.h, m32r.c: Remove #ifdef HAIFA and
related gunk; the Haifa scheduler is now the only choice.
From-SVN: r45009
2001-08-18 22:25:54 +02:00
|
|
|
@end smallexample
|
|
|
|
@noindent
|
|
|
|
in the output templates of patterns (@pxref{Output Template}) or in the
|
|
|
|
first argument of @code{asm_fprintf}. This construct outputs
|
|
|
|
@samp{option0}, @samp{option1}, @samp{option2}, etc., if the value of
|
|
|
|
@code{ASSEMBLER_DIALECT} is zero, one, two, etc. Any special characters
|
|
|
|
within these strings retain their usual meaning. If there are fewer
|
|
|
|
alternatives within the braces than the value of
|
|
|
|
@code{ASSEMBLER_DIALECT}, the construct outputs nothing.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
If you do not define this macro, the characters @samp{@{}, @samp{|} and
|
|
|
|
@samp{@}} do not have any special meaning when used in templates or
|
|
|
|
operands to @code{asm_fprintf}.
|
|
|
|
|
|
|
|
Define the macros @code{REGISTER_PREFIX}, @code{LOCAL_LABEL_PREFIX},
|
|
|
|
@code{USER_LABEL_PREFIX} and @code{IMMEDIATE_PREFIX} if you can express
|
1998-04-04 15:32:39 +02:00
|
|
|
the variations in assembler language syntax with that mechanism. Define
|
1996-09-25 01:21:45 +02:00
|
|
|
@code{ASSEMBLER_DIALECT} and use the @samp{@{option0|option1@}} syntax
|
|
|
|
if the syntax variant are larger and involve such things as different
|
|
|
|
opcodes or operand order.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ASM_OUTPUT_REG_PUSH (@var{stream}, @var{regno})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C expression to output to @var{stream} some assembler code
|
|
|
|
which will push hard register number @var{regno} onto the stack.
|
|
|
|
The code need not be optimal, since this macro is used only when
|
|
|
|
profiling.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ASM_OUTPUT_REG_POP (@var{stream}, @var{regno})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C expression to output to @var{stream} some assembler code
|
|
|
|
which will pop hard register number @var{regno} off of the stack.
|
|
|
|
The code need not be optimal, since this macro is used only when
|
|
|
|
profiling.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
@node Dispatch Tables
|
|
|
|
@subsection Output of Dispatch Tables
|
|
|
|
|
|
|
|
@c prevent bad page break with this line
|
|
|
|
This concerns dispatch tables.
|
|
|
|
|
|
|
|
@cindex dispatch table
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ASM_OUTPUT_ADDR_DIFF_ELT (@var{stream}, @var{body}, @var{value}, @var{rel})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C statement to output to the stdio stream @var{stream} an assembler
|
|
|
|
pseudo-instruction to generate a difference between two labels.
|
|
|
|
@var{value} and @var{rel} are the numbers of two internal labels. The
|
|
|
|
definitions of these labels are output using
|
2002-12-16 19:23:00 +01:00
|
|
|
@code{(*targetm.asm_out.internal_label)}, and they must be printed in the same
|
1996-09-25 01:21:45 +02:00
|
|
|
way here. For example,
|
|
|
|
|
c-tree.texi, [...]: Use @smallexample instead of @example.
* doc/c-tree.texi, doc/compat.texi, doc/cpp.texi,
doc/cppopts.texi, doc/extend.texi, doc/install.texi,
doc/interface.texi, doc/invoke.texi, doc/libgcc.texi, doc/md.texi,
doc/objc.texi, doc/rtl.texi, doc/tm.texi, doc/trouble.texi: Use
@smallexample instead of @example.
From-SVN: r76075
2004-01-18 02:20:48 +01:00
|
|
|
@smallexample
|
1996-09-25 01:21:45 +02:00
|
|
|
fprintf (@var{stream}, "\t.word L%d-L%d\n",
|
|
|
|
@var{value}, @var{rel})
|
c-tree.texi, [...]: Use @smallexample instead of @example.
* doc/c-tree.texi, doc/compat.texi, doc/cpp.texi,
doc/cppopts.texi, doc/extend.texi, doc/install.texi,
doc/interface.texi, doc/invoke.texi, doc/libgcc.texi, doc/md.texi,
doc/objc.texi, doc/rtl.texi, doc/tm.texi, doc/trouble.texi: Use
@smallexample instead of @example.
From-SVN: r76075
2004-01-18 02:20:48 +01:00
|
|
|
@end smallexample
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
You must provide this macro on machines where the addresses in a
|
c-tree.texi, [...]: Be more consistent about the use of "GCC" and related terms.
* doc/c-tree.texi, doc/contrib.texi, doc/extend.texi,
doc/gcc.texi, doc/gcov.texi, doc/install.texi, doc/invoke.texi,
doc/md.texi, doc/rtl.texi, doc/tm.texi: Be more consistent about
the use of "GCC" and related terms.
* doc/gcc.1, doc/gcov.1: Regenerate.
From-SVN: r43547
2001-06-25 02:21:28 +02:00
|
|
|
dispatch table are relative to the table's own address. If defined, GCC
|
c-tree.texi, [...]: Replace . at end of sentences preceded by a capital letter with @..
* doc/c-tree.texi, doc/contrib.texi, doc/cpp.texi,
doc/cppinternals.texi, doc/extend.texi, doc/gcc.texi,
doc/gcov.texi, doc/install-old.texi, doc/install.texi,
doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: Replace
. at end of sentences preceded by a capital letter with @..
From-SVN: r43611
2001-06-27 17:04:16 +02:00
|
|
|
will also use this macro on all machines when producing PIC@.
|
2001-07-03 02:46:05 +02:00
|
|
|
@var{body} is the body of the @code{ADDR_DIFF_VEC}; it is provided so that the
|
rtl.h (addr_diff_vec_flags): New typedef.
* rtl.h (addr_diff_vec_flags): New typedef.
(union rtunion_def): New member rt_addr_diff_vec_flags.
(ADDR_DIFF_VEC_FLAGS): New macro.
* sh.c (output_branch): Fix offset overflow problems.
* final.c (shorten_branches): Implement CASE_VECTOR_SHORTEN_MODE.
(final_scan_insn): New argument BODY for ASM_OUTPUT_ADDR_DIFF_ELT.
* rtl.def (ADDR_DIFF_VEC): Three new fields (min, max and flags).
* stmt.c (expand_end_case): Supply new arguments to
gen_rtx_ADDR_DIFF_VEC.
* 1750a.h (ASM_OUTPUT_ADDR_DIFF_ELT): New argument BODY.
* alpha.h, arc.h, clipper.h, convex.h : Likewise.
* dsp16xx.h, elxsi.h, fx80.h, gmicro.h, h8300.h : Likewise.
* i370.h, i386.h, i860.h, i960.h, m32r.h, m68k.h, m88k.h : Likewise.
* mips.h, mn10200.h, mn10300.h, ns32k.h, pa.h, pyr.h : Likewise.
* rs6000.h, sh.h, sparc.h, spur.h, tahoe.h, v850.h : Likewise.
* vax.h, we32k.h, alpha/vms.h, arm/aof.h, arm/aout.h : Likewise.
* i386/386bsd.h, i386/freebsd-elf.h : Likewise.
* i386/freebsd.h, i386/linux.h : Likewise.
* i386/netbsd.h, i386/osfrose.h, i386/ptx4-i.h, i386/sco5.h : Likewise.
* i386/sysv4.h, m68k/3b1.h, m68k/dpx2.h, m68k/hp320.h : Likewise.
* m68k/mot3300.h, m68k/sgs.h : Likewise.
* m68k/tower-as.h, ns32k/encore.h, sparc/pbd.h : Likewise.
* sh.h (INSN_ALIGN, INSN_LENGTH_ALIGNMENT): Define.
(CASE_VECTOR_SHORTEN_MODE): Define.
(short_cbranch_p, align_length, addr_diff_vec_adjust): Don't declare.
(med_branch_p, braf_branch_p): Don't declare.
(mdep_reorg_phase, barrier_align): Declare.
(ADJUST_INSN_LENGTH): Remove alignment handling.
* sh.c (uid_align, uid_align_max): Deleted.
(max_uid_before_fixup_addr_diff_vecs, branch_offset): Deleted.
(short_cbranch_p, med_branch_p, braf_branch_p, align_length): Deleted.
(cache_align_p, fixup_aligns, addr_diff_vec_adjust): Deleted.
(output_far_jump): Don't use braf_branch_p.
(output_branchy_insn): Don't use branch_offset.
(find_barrier): Remove checks for max_uid_before_fixup_addr_diff_vecs.
Remove paired barrier stuff.
Don't use cache_align_p.
Take alignment insns into account.
(fixup_addr_diff_vecs): Reduce to only fixing up the base label of
the addr_diff_vec.
(barrier_align, branch_dest): New function.
(machine_dependent_reorg, split_branches): Remove infrastructure
for branch shortening that is now provided in the backend.
* sh.md (short_cbranch_p, med_branch_p, med_cbranch_p): New attributes.
(braf_branch_p, braf_cbranch_p): Likewise.
(attribute length): Use new attributes.
(casesi_worker): Get mode and unsignednedd from ADDR_DIFF_VEC.
(addr_diff_vec_adjust): Delete.
(align_2): Now a define_expand.
(align_log): Now length 0.
From-SVN: r18433
1998-03-06 15:54:07 +01:00
|
|
|
mode and flags can be read.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ASM_OUTPUT_ADDR_VEC_ELT (@var{stream}, @var{value})
|
1996-09-25 01:21:45 +02:00
|
|
|
This macro should be provided on machines where the addresses
|
|
|
|
in a dispatch table are absolute.
|
|
|
|
|
|
|
|
The definition should be a C statement to output to the stdio stream
|
|
|
|
@var{stream} an assembler pseudo-instruction to generate a reference to
|
|
|
|
a label. @var{value} is the number of an internal label whose
|
2002-12-16 19:23:00 +01:00
|
|
|
definition is output using @code{(*targetm.asm_out.internal_label)}.
|
1996-09-25 01:21:45 +02:00
|
|
|
For example,
|
|
|
|
|
c-tree.texi, [...]: Use @smallexample instead of @example.
* doc/c-tree.texi, doc/compat.texi, doc/cpp.texi,
doc/cppopts.texi, doc/extend.texi, doc/install.texi,
doc/interface.texi, doc/invoke.texi, doc/libgcc.texi, doc/md.texi,
doc/objc.texi, doc/rtl.texi, doc/tm.texi, doc/trouble.texi: Use
@smallexample instead of @example.
From-SVN: r76075
2004-01-18 02:20:48 +01:00
|
|
|
@smallexample
|
1996-09-25 01:21:45 +02:00
|
|
|
fprintf (@var{stream}, "\t.word L%d\n", @var{value})
|
c-tree.texi, [...]: Use @smallexample instead of @example.
* doc/c-tree.texi, doc/compat.texi, doc/cpp.texi,
doc/cppopts.texi, doc/extend.texi, doc/install.texi,
doc/interface.texi, doc/invoke.texi, doc/libgcc.texi, doc/md.texi,
doc/objc.texi, doc/rtl.texi, doc/tm.texi, doc/trouble.texi: Use
@smallexample instead of @example.
From-SVN: r76075
2004-01-18 02:20:48 +01:00
|
|
|
@end smallexample
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ASM_OUTPUT_CASE_LABEL (@var{stream}, @var{prefix}, @var{num}, @var{table})
|
1996-09-25 01:21:45 +02:00
|
|
|
Define this if the label before a jump-table needs to be output
|
|
|
|
specially. The first three arguments are the same as for
|
2002-12-16 19:23:00 +01:00
|
|
|
@code{(*targetm.asm_out.internal_label)}; the fourth argument is the
|
1996-09-25 01:21:45 +02:00
|
|
|
jump-table which follows (a @code{jump_insn} containing an
|
|
|
|
@code{addr_vec} or @code{addr_diff_vec}).
|
|
|
|
|
|
|
|
This feature is used on system V to output a @code{swbeg} statement
|
|
|
|
for the table.
|
|
|
|
|
|
|
|
If this macro is not defined, these labels are output with
|
2002-12-16 19:23:00 +01:00
|
|
|
@code{(*targetm.asm_out.internal_label)}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ASM_OUTPUT_CASE_END (@var{stream}, @var{num}, @var{table})
|
1996-09-25 01:21:45 +02:00
|
|
|
Define this if something special must be output at the end of a
|
|
|
|
jump-table. The definition should be a C statement to be executed
|
|
|
|
after the assembler code for the table is written. It should write
|
|
|
|
the appropriate code to stdio stream @var{stream}. The argument
|
|
|
|
@var{table} is the jump-table insn, and @var{num} is the label-number
|
|
|
|
of the preceding label.
|
|
|
|
|
|
|
|
If this macro is not defined, nothing special is output at the end of
|
|
|
|
the jump-table.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
tm.texi (TARGET_ASM_EMIT_UNWIND_LABEL): Add argument to indicate if this label is for eh.
* doc/tm.texi (TARGET_ASM_EMIT_UNWIND_LABEL): Add argument to indicate
if this label is for eh.
* config/darwin-protos.h (darwin_emit_unwind_label): Likewise.
* config/darwin.c (darwin_emit_unwind_label): Likewise.
* dwarf2out.c (output_call_frame_info): Likewise.
* output.h (default_emit_unwind_label): Likewise.
* target.h (unwind_label): Likewise.
* varasm.c (default_emit_unwind_label): Likewise.
* config/darwin.h (DWARF2_DEBUGGING_INFO, PREFERRED_DEBUGGING_TYPE,
DEBUG_FRAME_SECTION, DEBUG_INFO_SECTION, DEBUG_ABBREV_SECTION,
DEBUG_ARANGES_SECTION, DEBUG_MACINFO_SECTION, DEBUG_LINE_SECTION,
DEBUG_LOC_SECTION, DEBUG_PUBNAMES_SECTION, DEBUG_STR_SECTION,
DEBUG_RANGES_SECTION): Define.
Radar 3657068.
Co-Authored-By: Devang Patel <dpatel@apple.com>
From-SVN: r82016
2004-05-19 04:11:42 +02:00
|
|
|
@deftypefn {Target Hook} void TARGET_ASM_EMIT_UNWIND_LABEL (@var{stream}, @var{decl}, @var{for_eh}, @var{empty})
|
c-tree.texi, [...]: Correct end-of-sentence markup and markup of "etc.", "e.g." and "i.e.".
* doc/c-tree.texi, doc/cfg.texi, doc/contrib.texi, doc/cpp.texi,
doc/cppopts.texi, doc/extend.texi, doc/fragments.texi,
doc/frontends.texi, doc/gcov.texi, doc/hostconfig.texi,
doc/implement-c.texi, doc/install.texi, doc/invoke.texi,
doc/libgcc.texi, doc/md.texi, doc/passes.texi,
doc/portability.texi, doc/rtl.texi, doc/sourcebuild.texi,
doc/standards.texi, doc/tm.texi, doc/tree-ssa.texi,
doc/trouble.texi: Correct end-of-sentence markup and markup of
"etc.", "e.g." and "i.e.". Use @code in various places where
appropriate.
From-SVN: r90101
2004-11-05 02:36:57 +01:00
|
|
|
This target hook emits a label at the beginning of each FDE@. It
|
2004-03-12 18:09:03 +01:00
|
|
|
should be defined on targets where FDEs need special labels, and it
|
|
|
|
should write the appropriate label, for the FDE associated with the
|
|
|
|
function declaration @var{decl}, to the stdio stream @var{stream}.
|
tm.texi (TARGET_ASM_EMIT_UNWIND_LABEL): Add argument to indicate if this label is for eh.
* doc/tm.texi (TARGET_ASM_EMIT_UNWIND_LABEL): Add argument to indicate
if this label is for eh.
* config/darwin-protos.h (darwin_emit_unwind_label): Likewise.
* config/darwin.c (darwin_emit_unwind_label): Likewise.
* dwarf2out.c (output_call_frame_info): Likewise.
* output.h (default_emit_unwind_label): Likewise.
* target.h (unwind_label): Likewise.
* varasm.c (default_emit_unwind_label): Likewise.
* config/darwin.h (DWARF2_DEBUGGING_INFO, PREFERRED_DEBUGGING_TYPE,
DEBUG_FRAME_SECTION, DEBUG_INFO_SECTION, DEBUG_ABBREV_SECTION,
DEBUG_ARANGES_SECTION, DEBUG_MACINFO_SECTION, DEBUG_LINE_SECTION,
DEBUG_LOC_SECTION, DEBUG_PUBNAMES_SECTION, DEBUG_STR_SECTION,
DEBUG_RANGES_SECTION): Define.
Radar 3657068.
Co-Authored-By: Devang Patel <dpatel@apple.com>
From-SVN: r82016
2004-05-19 04:11:42 +02:00
|
|
|
The third argument, @var{for_eh}, is a boolean: true if this is for an
|
|
|
|
exception table. The fourth argument, @var{empty}, is a boolean:
|
c-tree.texi, [...]: Correct end-of-sentence markup and markup of "etc.", "e.g." and "i.e.".
* doc/c-tree.texi, doc/cfg.texi, doc/contrib.texi, doc/cpp.texi,
doc/cppopts.texi, doc/extend.texi, doc/fragments.texi,
doc/frontends.texi, doc/gcov.texi, doc/hostconfig.texi,
doc/implement-c.texi, doc/install.texi, doc/invoke.texi,
doc/libgcc.texi, doc/md.texi, doc/passes.texi,
doc/portability.texi, doc/rtl.texi, doc/sourcebuild.texi,
doc/standards.texi, doc/tm.texi, doc/tree-ssa.texi,
doc/trouble.texi: Correct end-of-sentence markup and markup of
"etc.", "e.g." and "i.e.". Use @code in various places where
appropriate.
From-SVN: r90101
2004-11-05 02:36:57 +01:00
|
|
|
true if this is a placeholder label for an omitted FDE@.
|
2004-03-12 18:09:03 +01:00
|
|
|
|
|
|
|
The default is that FDEs are not given nonlocal labels.
|
|
|
|
@end deftypefn
|
|
|
|
|
2004-07-15 03:07:53 +02:00
|
|
|
@deftypefn {Taget Hook} void TARGET_UNWIND_EMIT (FILE * @var{stream}, rtx @var{insn})
|
|
|
|
This target hook emits and assembly directives required to unwind the
|
|
|
|
given instruction. This is only used when TARGET_UNWIND_INFO is set.
|
|
|
|
@end deftypefn
|
|
|
|
|
2001-04-28 13:35:04 +02:00
|
|
|
@node Exception Region Output
|
1996-09-25 01:21:45 +02:00
|
|
|
@subsection Assembler Commands for Exception Regions
|
|
|
|
|
|
|
|
@c prevent bad page break with this line
|
|
|
|
|
|
|
|
This describes commands marking the start and the end of an exception
|
|
|
|
region.
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac EH_FRAME_SECTION_NAME
|
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
|
|
|
If defined, a C string constant for the name of the section containing
|
|
|
|
exception handling frame unwind information. If not defined, GCC will
|
|
|
|
provide a default definition if the target supports named sections.
|
|
|
|
@file{crtstuff.c} uses this macro to switch to the appropriate section.
|
1997-09-10 20:00:28 +02:00
|
|
|
|
|
|
|
You should define this symbol if your target supports DWARF 2 frame
|
|
|
|
unwind information and the default definition does not work.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1997-09-10 20:00:28 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac EH_FRAME_IN_DATA_SECTION
|
2001-08-13 23:14:01 +02:00
|
|
|
If defined, DWARF 2 frame unwind information will be placed in the
|
|
|
|
data section even though the target supports named sections. This
|
|
|
|
might be necessary, for instance, if the system linker does garbage
|
|
|
|
collection and sections cannot be marked as not to be collected.
|
|
|
|
|
|
|
|
Do not define this macro unless @code{TARGET_ASM_NAMED_SECTION} is
|
|
|
|
also defined.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2001-08-13 23:14:01 +02:00
|
|
|
|
2004-11-24 15:35:31 +01:00
|
|
|
@defmac EH_TABLES_CAN_BE_READ_ONLY
|
|
|
|
Define this macro to 1 if your target is such that no frame unwind
|
|
|
|
information encoding used with non-PIC code will ever require a
|
|
|
|
runtime relocation, but the linker may not support merging read-only
|
|
|
|
and read-write sections into a single read-write section.
|
|
|
|
@end defmac
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac MASK_RETURN_ADDR
|
2001-07-03 02:46:05 +02:00
|
|
|
An rtx used to mask the return address found via @code{RETURN_ADDR_RTX}, so
|
1996-09-25 01:21:45 +02:00
|
|
|
that it does not contain any extraneous set bits in it.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1997-09-10 20:00:28 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac DWARF2_UNWIND_INFO
|
1997-09-10 20:00:28 +02:00
|
|
|
Define this macro to 0 if your target supports DWARF 2 frame unwind
|
|
|
|
information, but it does not yet work with exception handling.
|
|
|
|
Otherwise, if your target supports this information (if it defines
|
|
|
|
@samp{INCOMING_RETURN_ADDR_RTX} and either @samp{UNALIGNED_INT_ASM_OP}
|
|
|
|
or @samp{OBJECT_FORMAT_ELF}), GCC will provide a default definition of
|
|
|
|
1.
|
|
|
|
|
2004-08-12 15:45:44 +02:00
|
|
|
If @code{TARGET_UNWIND_INFO} is defined, the target specific unwinder
|
|
|
|
will be used in all cases. Defining this macro will enable the generation
|
|
|
|
of DWARF 2 frame debugging information.
|
1997-09-10 20:00:28 +02:00
|
|
|
|
2004-08-12 15:45:44 +02:00
|
|
|
If @code{TARGET_UNWIND_INFO} is not defined, and this macro is defined to 1,
|
|
|
|
the DWARF 2 unwinder will be the default exception handling mechanism;
|
|
|
|
otherwise, @code{setjmp}/@code{longjmp} will be used by default.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1997-09-10 20:00:28 +02:00
|
|
|
|
2004-07-15 03:07:53 +02:00
|
|
|
@defmac TARGET_UNWIND_INFO
|
|
|
|
Define this macro if your target has ABI specified unwind tables. Usually
|
|
|
|
these will be output by @code{TARGET_UNWIND_EMIT}.
|
|
|
|
@end defmac
|
|
|
|
|
2003-10-01 20:54:46 +02:00
|
|
|
@defmac MUST_USE_SJLJ_EXCEPTIONS
|
|
|
|
This macro need only be defined if @code{DWARF2_UNWIND_INFO} is
|
|
|
|
runtime-variable. In that case, @file{except.h} cannot correctly
|
|
|
|
determine the corresponding definition of
|
|
|
|
@code{MUST_USE_SJLJ_EXCEPTIONS}, so the target must provide it directly.
|
|
|
|
@end defmac
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac DWARF_CIE_DATA_ALIGNMENT
|
2000-10-18 14:49:47 +02:00
|
|
|
This macro need only be defined if the target might save registers in the
|
|
|
|
function prologue at an offset to the stack pointer that is not aligned to
|
|
|
|
@code{UNITS_PER_WORD}. The definition should be the negative minimum
|
|
|
|
alignment if @code{STACK_GROWS_DOWNWARD} is defined, and the positive
|
|
|
|
minimum alignment otherwise. @xref{SDB and DWARF}. Only applicable if
|
|
|
|
the target supports DWARF 2 frame unwind information.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2001-10-22 16:43:31 +02:00
|
|
|
@deftypefn {Target Hook} void TARGET_ASM_EXCEPTION_SECTION ()
|
|
|
|
If defined, a function that switches to the section in which the main
|
|
|
|
exception table is to be placed (@pxref{Sections}). The default is a
|
|
|
|
function that switches to a section named @code{.gcc_except_table} on
|
|
|
|
machines that support named sections via
|
|
|
|
@code{TARGET_ASM_NAMED_SECTION}, otherwise if @option{-fpic} or
|
|
|
|
@option{-fPIC} is in effect, the @code{data_section}, otherwise the
|
|
|
|
@code{readonly_data_section}.
|
|
|
|
@end deftypefn
|
|
|
|
|
|
|
|
@deftypefn {Target Hook} void TARGET_ASM_EH_FRAME_SECTION ()
|
|
|
|
If defined, a function that switches to the section in which the DWARF 2
|
|
|
|
frame unwind information to be placed (@pxref{Sections}). The default
|
|
|
|
is a function that outputs a standard GAS section directive, if
|
|
|
|
@code{EH_FRAME_SECTION_NAME} is defined, or else a data section
|
|
|
|
directive followed by a synthetic label.
|
|
|
|
@end deftypefn
|
|
|
|
|
2002-09-13 05:44:54 +02:00
|
|
|
@deftypevar {Target Hook} bool TARGET_TERMINATE_DW2_EH_FRAME_INFO
|
|
|
|
Contains the value true if the target should add a zero word onto the
|
|
|
|
end of a Dwarf-2 frame info section when used for exception handling.
|
|
|
|
Default value is false if @code{EH_FRAME_SECTION_NAME} is defined, and
|
|
|
|
true otherwise.
|
|
|
|
@end deftypevar
|
|
|
|
|
2003-03-05 23:37:52 +01:00
|
|
|
@deftypefn {Target Hook} rtx TARGET_DWARF_REGISTER_SPAN (rtx @var{reg})
|
|
|
|
Given a register, this hook should return a parallel of registers to
|
|
|
|
represent where to find the register pieces. Define this hook if the
|
|
|
|
register and its mode are represented in Dwarf in non-contiguous
|
|
|
|
locations, or if the register should be represented in more than one
|
|
|
|
register in Dwarf. Otherwise, this hook should return @code{NULL_RTX}.
|
|
|
|
If not defined, the default is to return @code{NULL_RTX}.
|
|
|
|
@end deftypefn
|
|
|
|
|
1996-09-25 01:21:45 +02:00
|
|
|
@node Alignment Output
|
|
|
|
@subsection Assembler Commands for Alignment
|
|
|
|
|
|
|
|
@c prevent bad page break with this line
|
|
|
|
This describes commands for alignment.
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac JUMP_ALIGN (@var{label})
|
2001-08-20 01:46:10 +02:00
|
|
|
The alignment (log base 2) to put in front of @var{label}, which is
|
alpha.md, [...]: Fix spelling errors.
* config/alpha/alpha.md, config/arm/arm.c, config/arm/arm.h,
config/d30v/d30v.h, config/fr30/fr30.c, config/i370/x-oe,
config/i386/i386.c, config/i386/i386-interix.h,
config/i386/i386.md, config/i386/i386.h, config/i386/sco5.h,
config/i860/i860.h, config/i860/i860.md, config/m68k/aux-exit.c,
config/m68k/m68k.c, config/mcore/mcore.c, config/mips/mips.md,
config/ns32k/ns32k.h, config/pa/pa.c, config/rs6000/rs6000.c,
config/sparc/sparc.c, config/m68hc11/m68hc11.c,
config/cris/cris.c, config/cris/cris.h, config/s390/s390.c,
config/s390/s390.h, config/stormy16/stormy16.h, doc/tm.texi: Fix
spelling errors.
From-SVN: r46582
2001-10-28 14:22:02 +01:00
|
|
|
a common destination of jumps and has no fallthru incoming edge.
|
2001-08-16 17:41:05 +02:00
|
|
|
|
|
|
|
This macro need not be defined if you don't want any special alignment
|
|
|
|
to be done at such a time. Most machine descriptions do not currently
|
|
|
|
define the macro.
|
flags.h: New variables align_loops...
* flags.h: New variables align_loops, align_loops_log,
align_jumps, align_jumps_log, align_labels, align_labels_log,
align_functions, align_functions_log.
* toplev.c: Define them.
(f_options): Handle -falign-* when they have no argument.
(main): Add logic to set variables for -falign-functions,
-falign-jumps, -falign-labels, -falign-loops.
Make it -fsched-verbose=<n> and -finline-limit=<n>.
(display_help): Change help to match options.
* final.c (LABEL_ALIGN): Default to align_labels_log.
(LABEL_ALIGN_MAX_SKIP): Default to align_labels-1.
(LOOP_ALIGN): Default to align_loops_log.
(LOOP_ALIGN_MAX_SKIP): Default to align_loops-1.
(LABEL_ALIGN_AFTER_BARRIER): Default to align_jumps_log.
(LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP): Default to align_jumps-1.
* varasm.c (assemble_start_function): Handle align_functions.
* config/sparc/sparc.h: Don't declare sparc_align_*.
Don't provide LABEL_ALIGN_AFTER_BARRIER or LOOP_ALIGN.
(DEFAULT_SPARC_ALIGN_FUNCS): Delete; take functionality into
sparc.c.
(FUNCTION_BOUNDARY): Fix incorrect use---it's not just a request,
it's a promise.
* config/sparc/sparc.c: Delete sparc_align_loops,
sparc_align_jumps, sparc_align_funcs and the corresponding string
variables.
(sparc_override_options): Default align_functions on ultrasparc.
Delete -malign-* handling.
* config/mips/mips.c (override_options): On 64-bit targets,
try to align code to 64-bit boundaries.
(print_operand): New substitution, %~,
which aligns labels to align_labels_log.
* config/mips/mips.md (div_trap_normal): Use %~.
(div_trap_mips16): Likewise.
(abssi): Likewise.
(absdi2): Likewise.
(ffssi2): Likewise.
(ffsdi2): Likewise.
(ashldi3_internal): Likewise.
(ashrdi3_internal): Likewise.
(lshrdi3_internal): Likewise.
(casesi_internal): Likewise.
Plus corresponding documentation changes.
From-SVN: r29045
1999-09-02 07:42:06 +02:00
|
|
|
|
2001-08-17 15:45:59 +02:00
|
|
|
Unless it's necessary to inspect the @var{label} parameter, it is better
|
|
|
|
to set the variable @var{align_jumps} in the target's
|
2001-12-09 21:21:57 +01:00
|
|
|
@code{OVERRIDE_OPTIONS}. Otherwise, you should try to honor the user's
|
2001-08-20 01:46:10 +02:00
|
|
|
selection in @var{align_jumps} in a @code{JUMP_ALIGN} implementation.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2001-08-20 01:46:10 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac LABEL_ALIGN_AFTER_BARRIER (@var{label})
|
2001-08-20 01:46:10 +02:00
|
|
|
The alignment (log base 2) to put in front of @var{label}, which follows
|
|
|
|
a @code{BARRIER}.
|
|
|
|
|
|
|
|
This macro need not be defined if you don't want any special alignment
|
|
|
|
to be done at such a time. Most machine descriptions do not currently
|
|
|
|
define the macro.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2001-08-17 15:45:59 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP
|
2001-04-28 13:35:04 +02:00
|
|
|
The maximum number of bytes to skip when applying
|
flags.h: New variables align_loops...
* flags.h: New variables align_loops, align_loops_log,
align_jumps, align_jumps_log, align_labels, align_labels_log,
align_functions, align_functions_log.
* toplev.c: Define them.
(f_options): Handle -falign-* when they have no argument.
(main): Add logic to set variables for -falign-functions,
-falign-jumps, -falign-labels, -falign-loops.
Make it -fsched-verbose=<n> and -finline-limit=<n>.
(display_help): Change help to match options.
* final.c (LABEL_ALIGN): Default to align_labels_log.
(LABEL_ALIGN_MAX_SKIP): Default to align_labels-1.
(LOOP_ALIGN): Default to align_loops_log.
(LOOP_ALIGN_MAX_SKIP): Default to align_loops-1.
(LABEL_ALIGN_AFTER_BARRIER): Default to align_jumps_log.
(LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP): Default to align_jumps-1.
* varasm.c (assemble_start_function): Handle align_functions.
* config/sparc/sparc.h: Don't declare sparc_align_*.
Don't provide LABEL_ALIGN_AFTER_BARRIER or LOOP_ALIGN.
(DEFAULT_SPARC_ALIGN_FUNCS): Delete; take functionality into
sparc.c.
(FUNCTION_BOUNDARY): Fix incorrect use---it's not just a request,
it's a promise.
* config/sparc/sparc.c: Delete sparc_align_loops,
sparc_align_jumps, sparc_align_funcs and the corresponding string
variables.
(sparc_override_options): Default align_functions on ultrasparc.
Delete -malign-* handling.
* config/mips/mips.c (override_options): On 64-bit targets,
try to align code to 64-bit boundaries.
(print_operand): New substitution, %~,
which aligns labels to align_labels_log.
* config/mips/mips.md (div_trap_normal): Use %~.
(div_trap_mips16): Likewise.
(abssi): Likewise.
(absdi2): Likewise.
(ffssi2): Likewise.
(ffsdi2): Likewise.
(ashldi3_internal): Likewise.
(ashrdi3_internal): Likewise.
(lshrdi3_internal): Likewise.
(casesi_internal): Likewise.
Plus corresponding documentation changes.
From-SVN: r29045
1999-09-02 07:42:06 +02:00
|
|
|
@code{LABEL_ALIGN_AFTER_BARRIER}. This works only if
|
|
|
|
@code{ASM_OUTPUT_MAX_SKIP_ALIGN} is defined.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
flags.h: New variables align_loops...
* flags.h: New variables align_loops, align_loops_log,
align_jumps, align_jumps_log, align_labels, align_labels_log,
align_functions, align_functions_log.
* toplev.c: Define them.
(f_options): Handle -falign-* when they have no argument.
(main): Add logic to set variables for -falign-functions,
-falign-jumps, -falign-labels, -falign-loops.
Make it -fsched-verbose=<n> and -finline-limit=<n>.
(display_help): Change help to match options.
* final.c (LABEL_ALIGN): Default to align_labels_log.
(LABEL_ALIGN_MAX_SKIP): Default to align_labels-1.
(LOOP_ALIGN): Default to align_loops_log.
(LOOP_ALIGN_MAX_SKIP): Default to align_loops-1.
(LABEL_ALIGN_AFTER_BARRIER): Default to align_jumps_log.
(LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP): Default to align_jumps-1.
* varasm.c (assemble_start_function): Handle align_functions.
* config/sparc/sparc.h: Don't declare sparc_align_*.
Don't provide LABEL_ALIGN_AFTER_BARRIER or LOOP_ALIGN.
(DEFAULT_SPARC_ALIGN_FUNCS): Delete; take functionality into
sparc.c.
(FUNCTION_BOUNDARY): Fix incorrect use---it's not just a request,
it's a promise.
* config/sparc/sparc.c: Delete sparc_align_loops,
sparc_align_jumps, sparc_align_funcs and the corresponding string
variables.
(sparc_override_options): Default align_functions on ultrasparc.
Delete -malign-* handling.
* config/mips/mips.c (override_options): On 64-bit targets,
try to align code to 64-bit boundaries.
(print_operand): New substitution, %~,
which aligns labels to align_labels_log.
* config/mips/mips.md (div_trap_normal): Use %~.
(div_trap_mips16): Likewise.
(abssi): Likewise.
(absdi2): Likewise.
(ffssi2): Likewise.
(ffsdi2): Likewise.
(ashldi3_internal): Likewise.
(ashrdi3_internal): Likewise.
(lshrdi3_internal): Likewise.
(casesi_internal): Likewise.
Plus corresponding documentation changes.
From-SVN: r29045
1999-09-02 07:42:06 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac LOOP_ALIGN (@var{label})
|
final.c (insn_last_address, [...]): New variables.
* final.c (insn_last_address, insn_current_align, uid_align):
New variables.
(in_align_chain, align_fuzz, align_shrink_fuzz): New functions.
(insn_current_reference_address): Likewise.
(shorten_branches, final_scan_insn): Implement LABEL_ALIGN,
LABEL_ALIGN_AFTER_BARRIER and LOOP_ALIGN target macros.
(label_to_alignment): New function.
* genattrtab.c (write_test_expr): If one of LABEL_ALIGN,
LABEL_ALIGN_AFTER_BARRIER or LOOP_ALIGN is defined, call
insn_current_reference_address instead of insn_current_address.
(or_attr_value, write_length_unit_log): New functions.
(main): Call write_length_unit_log.
(write_const_num_delay_slots): Output extra '\n'.
* alpha.h (ASM_OUTPUT_LOOP_ALIGN, ASM_OUTPUT_ALIGN_CODE):
replace with:
(LOOP_ALIGN, ALIGN_LABEL_AFTER_BARRIER).
* i386.h, i386/osfrose.h, i386/svr3dbx.h, m68k.h, sparc.h: Likewise.
* arc.h, m32r.h (ASM_OUTPUT_LOOP_ALIGN): replace with:
(LOOP_ALIGN).
* i960.h, m88k.h: (ASM_OUTPUT_ALIGN_CODE): Replace with:
(LABEL_ALIGN_AFTER_BARRIER).
* ns32k/encore.h, ns32k/merlin.h, ns32k.h, ns32k/sequent.h: Likewise.
* ns32k/tek6000.h: Likewise.
* i386/gas.h (ASM_OUTPUT_LOOP_ALIGN, ASM_OUTPUT_ALIGN_CODE): Delete.
* i386.md (casesi+1): Use ASM_OUTPUT_ALIGN instead of
ASM_OUTPUT_ALIGN_CODE.
From-SVN: r18357
1998-03-02 12:54:35 +01:00
|
|
|
The alignment (log base 2) to put in front of @var{label}, which follows
|
2001-07-03 02:46:05 +02:00
|
|
|
a @code{NOTE_INSN_LOOP_BEG} note.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
This macro need not be defined if you don't want any special alignment
|
|
|
|
to be done at such a time. Most machine descriptions do not currently
|
|
|
|
define the macro.
|
|
|
|
|
flags.h: New variables align_loops...
* flags.h: New variables align_loops, align_loops_log,
align_jumps, align_jumps_log, align_labels, align_labels_log,
align_functions, align_functions_log.
* toplev.c: Define them.
(f_options): Handle -falign-* when they have no argument.
(main): Add logic to set variables for -falign-functions,
-falign-jumps, -falign-labels, -falign-loops.
Make it -fsched-verbose=<n> and -finline-limit=<n>.
(display_help): Change help to match options.
* final.c (LABEL_ALIGN): Default to align_labels_log.
(LABEL_ALIGN_MAX_SKIP): Default to align_labels-1.
(LOOP_ALIGN): Default to align_loops_log.
(LOOP_ALIGN_MAX_SKIP): Default to align_loops-1.
(LABEL_ALIGN_AFTER_BARRIER): Default to align_jumps_log.
(LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP): Default to align_jumps-1.
* varasm.c (assemble_start_function): Handle align_functions.
* config/sparc/sparc.h: Don't declare sparc_align_*.
Don't provide LABEL_ALIGN_AFTER_BARRIER or LOOP_ALIGN.
(DEFAULT_SPARC_ALIGN_FUNCS): Delete; take functionality into
sparc.c.
(FUNCTION_BOUNDARY): Fix incorrect use---it's not just a request,
it's a promise.
* config/sparc/sparc.c: Delete sparc_align_loops,
sparc_align_jumps, sparc_align_funcs and the corresponding string
variables.
(sparc_override_options): Default align_functions on ultrasparc.
Delete -malign-* handling.
* config/mips/mips.c (override_options): On 64-bit targets,
try to align code to 64-bit boundaries.
(print_operand): New substitution, %~,
which aligns labels to align_labels_log.
* config/mips/mips.md (div_trap_normal): Use %~.
(div_trap_mips16): Likewise.
(abssi): Likewise.
(absdi2): Likewise.
(ffssi2): Likewise.
(ffsdi2): Likewise.
(ashldi3_internal): Likewise.
(ashrdi3_internal): Likewise.
(lshrdi3_internal): Likewise.
(casesi_internal): Likewise.
Plus corresponding documentation changes.
From-SVN: r29045
1999-09-02 07:42:06 +02:00
|
|
|
Unless it's necessary to inspect the @var{label} parameter, it is better
|
2001-07-03 02:46:05 +02:00
|
|
|
to set the variable @code{align_loops} in the target's
|
2001-12-09 21:21:57 +01:00
|
|
|
@code{OVERRIDE_OPTIONS}. Otherwise, you should try to honor the user's
|
2001-07-03 02:46:05 +02:00
|
|
|
selection in @code{align_loops} in a @code{LOOP_ALIGN} implementation.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
flags.h: New variables align_loops...
* flags.h: New variables align_loops, align_loops_log,
align_jumps, align_jumps_log, align_labels, align_labels_log,
align_functions, align_functions_log.
* toplev.c: Define them.
(f_options): Handle -falign-* when they have no argument.
(main): Add logic to set variables for -falign-functions,
-falign-jumps, -falign-labels, -falign-loops.
Make it -fsched-verbose=<n> and -finline-limit=<n>.
(display_help): Change help to match options.
* final.c (LABEL_ALIGN): Default to align_labels_log.
(LABEL_ALIGN_MAX_SKIP): Default to align_labels-1.
(LOOP_ALIGN): Default to align_loops_log.
(LOOP_ALIGN_MAX_SKIP): Default to align_loops-1.
(LABEL_ALIGN_AFTER_BARRIER): Default to align_jumps_log.
(LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP): Default to align_jumps-1.
* varasm.c (assemble_start_function): Handle align_functions.
* config/sparc/sparc.h: Don't declare sparc_align_*.
Don't provide LABEL_ALIGN_AFTER_BARRIER or LOOP_ALIGN.
(DEFAULT_SPARC_ALIGN_FUNCS): Delete; take functionality into
sparc.c.
(FUNCTION_BOUNDARY): Fix incorrect use---it's not just a request,
it's a promise.
* config/sparc/sparc.c: Delete sparc_align_loops,
sparc_align_jumps, sparc_align_funcs and the corresponding string
variables.
(sparc_override_options): Default align_functions on ultrasparc.
Delete -malign-* handling.
* config/mips/mips.c (override_options): On 64-bit targets,
try to align code to 64-bit boundaries.
(print_operand): New substitution, %~,
which aligns labels to align_labels_log.
* config/mips/mips.md (div_trap_normal): Use %~.
(div_trap_mips16): Likewise.
(abssi): Likewise.
(absdi2): Likewise.
(ffssi2): Likewise.
(ffsdi2): Likewise.
(ashldi3_internal): Likewise.
(ashrdi3_internal): Likewise.
(lshrdi3_internal): Likewise.
(casesi_internal): Likewise.
Plus corresponding documentation changes.
From-SVN: r29045
1999-09-02 07:42:06 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac LOOP_ALIGN_MAX_SKIP
|
flags.h: New variables align_loops...
* flags.h: New variables align_loops, align_loops_log,
align_jumps, align_jumps_log, align_labels, align_labels_log,
align_functions, align_functions_log.
* toplev.c: Define them.
(f_options): Handle -falign-* when they have no argument.
(main): Add logic to set variables for -falign-functions,
-falign-jumps, -falign-labels, -falign-loops.
Make it -fsched-verbose=<n> and -finline-limit=<n>.
(display_help): Change help to match options.
* final.c (LABEL_ALIGN): Default to align_labels_log.
(LABEL_ALIGN_MAX_SKIP): Default to align_labels-1.
(LOOP_ALIGN): Default to align_loops_log.
(LOOP_ALIGN_MAX_SKIP): Default to align_loops-1.
(LABEL_ALIGN_AFTER_BARRIER): Default to align_jumps_log.
(LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP): Default to align_jumps-1.
* varasm.c (assemble_start_function): Handle align_functions.
* config/sparc/sparc.h: Don't declare sparc_align_*.
Don't provide LABEL_ALIGN_AFTER_BARRIER or LOOP_ALIGN.
(DEFAULT_SPARC_ALIGN_FUNCS): Delete; take functionality into
sparc.c.
(FUNCTION_BOUNDARY): Fix incorrect use---it's not just a request,
it's a promise.
* config/sparc/sparc.c: Delete sparc_align_loops,
sparc_align_jumps, sparc_align_funcs and the corresponding string
variables.
(sparc_override_options): Default align_functions on ultrasparc.
Delete -malign-* handling.
* config/mips/mips.c (override_options): On 64-bit targets,
try to align code to 64-bit boundaries.
(print_operand): New substitution, %~,
which aligns labels to align_labels_log.
* config/mips/mips.md (div_trap_normal): Use %~.
(div_trap_mips16): Likewise.
(abssi): Likewise.
(absdi2): Likewise.
(ffssi2): Likewise.
(ffsdi2): Likewise.
(ashldi3_internal): Likewise.
(ashrdi3_internal): Likewise.
(lshrdi3_internal): Likewise.
(casesi_internal): Likewise.
Plus corresponding documentation changes.
From-SVN: r29045
1999-09-02 07:42:06 +02:00
|
|
|
The maximum number of bytes to skip when applying @code{LOOP_ALIGN}.
|
|
|
|
This works only if @code{ASM_OUTPUT_MAX_SKIP_ALIGN} is defined.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
flags.h: New variables align_loops...
* flags.h: New variables align_loops, align_loops_log,
align_jumps, align_jumps_log, align_labels, align_labels_log,
align_functions, align_functions_log.
* toplev.c: Define them.
(f_options): Handle -falign-* when they have no argument.
(main): Add logic to set variables for -falign-functions,
-falign-jumps, -falign-labels, -falign-loops.
Make it -fsched-verbose=<n> and -finline-limit=<n>.
(display_help): Change help to match options.
* final.c (LABEL_ALIGN): Default to align_labels_log.
(LABEL_ALIGN_MAX_SKIP): Default to align_labels-1.
(LOOP_ALIGN): Default to align_loops_log.
(LOOP_ALIGN_MAX_SKIP): Default to align_loops-1.
(LABEL_ALIGN_AFTER_BARRIER): Default to align_jumps_log.
(LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP): Default to align_jumps-1.
* varasm.c (assemble_start_function): Handle align_functions.
* config/sparc/sparc.h: Don't declare sparc_align_*.
Don't provide LABEL_ALIGN_AFTER_BARRIER or LOOP_ALIGN.
(DEFAULT_SPARC_ALIGN_FUNCS): Delete; take functionality into
sparc.c.
(FUNCTION_BOUNDARY): Fix incorrect use---it's not just a request,
it's a promise.
* config/sparc/sparc.c: Delete sparc_align_loops,
sparc_align_jumps, sparc_align_funcs and the corresponding string
variables.
(sparc_override_options): Default align_functions on ultrasparc.
Delete -malign-* handling.
* config/mips/mips.c (override_options): On 64-bit targets,
try to align code to 64-bit boundaries.
(print_operand): New substitution, %~,
which aligns labels to align_labels_log.
* config/mips/mips.md (div_trap_normal): Use %~.
(div_trap_mips16): Likewise.
(abssi): Likewise.
(absdi2): Likewise.
(ffssi2): Likewise.
(ffsdi2): Likewise.
(ashldi3_internal): Likewise.
(ashrdi3_internal): Likewise.
(lshrdi3_internal): Likewise.
(casesi_internal): Likewise.
Plus corresponding documentation changes.
From-SVN: r29045
1999-09-02 07:42:06 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac LABEL_ALIGN (@var{label})
|
final.c (insn_last_address, [...]): New variables.
* final.c (insn_last_address, insn_current_align, uid_align):
New variables.
(in_align_chain, align_fuzz, align_shrink_fuzz): New functions.
(insn_current_reference_address): Likewise.
(shorten_branches, final_scan_insn): Implement LABEL_ALIGN,
LABEL_ALIGN_AFTER_BARRIER and LOOP_ALIGN target macros.
(label_to_alignment): New function.
* genattrtab.c (write_test_expr): If one of LABEL_ALIGN,
LABEL_ALIGN_AFTER_BARRIER or LOOP_ALIGN is defined, call
insn_current_reference_address instead of insn_current_address.
(or_attr_value, write_length_unit_log): New functions.
(main): Call write_length_unit_log.
(write_const_num_delay_slots): Output extra '\n'.
* alpha.h (ASM_OUTPUT_LOOP_ALIGN, ASM_OUTPUT_ALIGN_CODE):
replace with:
(LOOP_ALIGN, ALIGN_LABEL_AFTER_BARRIER).
* i386.h, i386/osfrose.h, i386/svr3dbx.h, m68k.h, sparc.h: Likewise.
* arc.h, m32r.h (ASM_OUTPUT_LOOP_ALIGN): replace with:
(LOOP_ALIGN).
* i960.h, m88k.h: (ASM_OUTPUT_ALIGN_CODE): Replace with:
(LABEL_ALIGN_AFTER_BARRIER).
* ns32k/encore.h, ns32k/merlin.h, ns32k.h, ns32k/sequent.h: Likewise.
* ns32k/tek6000.h: Likewise.
* i386/gas.h (ASM_OUTPUT_LOOP_ALIGN, ASM_OUTPUT_ALIGN_CODE): Delete.
* i386.md (casesi+1): Use ASM_OUTPUT_ALIGN instead of
ASM_OUTPUT_ALIGN_CODE.
From-SVN: r18357
1998-03-02 12:54:35 +01:00
|
|
|
The alignment (log base 2) to put in front of @var{label}.
|
2001-07-03 02:46:05 +02:00
|
|
|
If @code{LABEL_ALIGN_AFTER_BARRIER} / @code{LOOP_ALIGN} specify a different alignment,
|
final.c (insn_last_address, [...]): New variables.
* final.c (insn_last_address, insn_current_align, uid_align):
New variables.
(in_align_chain, align_fuzz, align_shrink_fuzz): New functions.
(insn_current_reference_address): Likewise.
(shorten_branches, final_scan_insn): Implement LABEL_ALIGN,
LABEL_ALIGN_AFTER_BARRIER and LOOP_ALIGN target macros.
(label_to_alignment): New function.
* genattrtab.c (write_test_expr): If one of LABEL_ALIGN,
LABEL_ALIGN_AFTER_BARRIER or LOOP_ALIGN is defined, call
insn_current_reference_address instead of insn_current_address.
(or_attr_value, write_length_unit_log): New functions.
(main): Call write_length_unit_log.
(write_const_num_delay_slots): Output extra '\n'.
* alpha.h (ASM_OUTPUT_LOOP_ALIGN, ASM_OUTPUT_ALIGN_CODE):
replace with:
(LOOP_ALIGN, ALIGN_LABEL_AFTER_BARRIER).
* i386.h, i386/osfrose.h, i386/svr3dbx.h, m68k.h, sparc.h: Likewise.
* arc.h, m32r.h (ASM_OUTPUT_LOOP_ALIGN): replace with:
(LOOP_ALIGN).
* i960.h, m88k.h: (ASM_OUTPUT_ALIGN_CODE): Replace with:
(LABEL_ALIGN_AFTER_BARRIER).
* ns32k/encore.h, ns32k/merlin.h, ns32k.h, ns32k/sequent.h: Likewise.
* ns32k/tek6000.h: Likewise.
* i386/gas.h (ASM_OUTPUT_LOOP_ALIGN, ASM_OUTPUT_ALIGN_CODE): Delete.
* i386.md (casesi+1): Use ASM_OUTPUT_ALIGN instead of
ASM_OUTPUT_ALIGN_CODE.
From-SVN: r18357
1998-03-02 12:54:35 +01:00
|
|
|
the maximum of the specified values is used.
|
|
|
|
|
flags.h: New variables align_loops...
* flags.h: New variables align_loops, align_loops_log,
align_jumps, align_jumps_log, align_labels, align_labels_log,
align_functions, align_functions_log.
* toplev.c: Define them.
(f_options): Handle -falign-* when they have no argument.
(main): Add logic to set variables for -falign-functions,
-falign-jumps, -falign-labels, -falign-loops.
Make it -fsched-verbose=<n> and -finline-limit=<n>.
(display_help): Change help to match options.
* final.c (LABEL_ALIGN): Default to align_labels_log.
(LABEL_ALIGN_MAX_SKIP): Default to align_labels-1.
(LOOP_ALIGN): Default to align_loops_log.
(LOOP_ALIGN_MAX_SKIP): Default to align_loops-1.
(LABEL_ALIGN_AFTER_BARRIER): Default to align_jumps_log.
(LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP): Default to align_jumps-1.
* varasm.c (assemble_start_function): Handle align_functions.
* config/sparc/sparc.h: Don't declare sparc_align_*.
Don't provide LABEL_ALIGN_AFTER_BARRIER or LOOP_ALIGN.
(DEFAULT_SPARC_ALIGN_FUNCS): Delete; take functionality into
sparc.c.
(FUNCTION_BOUNDARY): Fix incorrect use---it's not just a request,
it's a promise.
* config/sparc/sparc.c: Delete sparc_align_loops,
sparc_align_jumps, sparc_align_funcs and the corresponding string
variables.
(sparc_override_options): Default align_functions on ultrasparc.
Delete -malign-* handling.
* config/mips/mips.c (override_options): On 64-bit targets,
try to align code to 64-bit boundaries.
(print_operand): New substitution, %~,
which aligns labels to align_labels_log.
* config/mips/mips.md (div_trap_normal): Use %~.
(div_trap_mips16): Likewise.
(abssi): Likewise.
(absdi2): Likewise.
(ffssi2): Likewise.
(ffsdi2): Likewise.
(ashldi3_internal): Likewise.
(ashrdi3_internal): Likewise.
(lshrdi3_internal): Likewise.
(casesi_internal): Likewise.
Plus corresponding documentation changes.
From-SVN: r29045
1999-09-02 07:42:06 +02:00
|
|
|
Unless it's necessary to inspect the @var{label} parameter, it is better
|
2001-07-03 02:46:05 +02:00
|
|
|
to set the variable @code{align_labels} in the target's
|
2001-12-09 21:21:57 +01:00
|
|
|
@code{OVERRIDE_OPTIONS}. Otherwise, you should try to honor the user's
|
2001-07-03 02:46:05 +02:00
|
|
|
selection in @code{align_labels} in a @code{LABEL_ALIGN} implementation.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
flags.h: New variables align_loops...
* flags.h: New variables align_loops, align_loops_log,
align_jumps, align_jumps_log, align_labels, align_labels_log,
align_functions, align_functions_log.
* toplev.c: Define them.
(f_options): Handle -falign-* when they have no argument.
(main): Add logic to set variables for -falign-functions,
-falign-jumps, -falign-labels, -falign-loops.
Make it -fsched-verbose=<n> and -finline-limit=<n>.
(display_help): Change help to match options.
* final.c (LABEL_ALIGN): Default to align_labels_log.
(LABEL_ALIGN_MAX_SKIP): Default to align_labels-1.
(LOOP_ALIGN): Default to align_loops_log.
(LOOP_ALIGN_MAX_SKIP): Default to align_loops-1.
(LABEL_ALIGN_AFTER_BARRIER): Default to align_jumps_log.
(LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP): Default to align_jumps-1.
* varasm.c (assemble_start_function): Handle align_functions.
* config/sparc/sparc.h: Don't declare sparc_align_*.
Don't provide LABEL_ALIGN_AFTER_BARRIER or LOOP_ALIGN.
(DEFAULT_SPARC_ALIGN_FUNCS): Delete; take functionality into
sparc.c.
(FUNCTION_BOUNDARY): Fix incorrect use---it's not just a request,
it's a promise.
* config/sparc/sparc.c: Delete sparc_align_loops,
sparc_align_jumps, sparc_align_funcs and the corresponding string
variables.
(sparc_override_options): Default align_functions on ultrasparc.
Delete -malign-* handling.
* config/mips/mips.c (override_options): On 64-bit targets,
try to align code to 64-bit boundaries.
(print_operand): New substitution, %~,
which aligns labels to align_labels_log.
* config/mips/mips.md (div_trap_normal): Use %~.
(div_trap_mips16): Likewise.
(abssi): Likewise.
(absdi2): Likewise.
(ffssi2): Likewise.
(ffsdi2): Likewise.
(ashldi3_internal): Likewise.
(ashrdi3_internal): Likewise.
(lshrdi3_internal): Likewise.
(casesi_internal): Likewise.
Plus corresponding documentation changes.
From-SVN: r29045
1999-09-02 07:42:06 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac LABEL_ALIGN_MAX_SKIP
|
flags.h: New variables align_loops...
* flags.h: New variables align_loops, align_loops_log,
align_jumps, align_jumps_log, align_labels, align_labels_log,
align_functions, align_functions_log.
* toplev.c: Define them.
(f_options): Handle -falign-* when they have no argument.
(main): Add logic to set variables for -falign-functions,
-falign-jumps, -falign-labels, -falign-loops.
Make it -fsched-verbose=<n> and -finline-limit=<n>.
(display_help): Change help to match options.
* final.c (LABEL_ALIGN): Default to align_labels_log.
(LABEL_ALIGN_MAX_SKIP): Default to align_labels-1.
(LOOP_ALIGN): Default to align_loops_log.
(LOOP_ALIGN_MAX_SKIP): Default to align_loops-1.
(LABEL_ALIGN_AFTER_BARRIER): Default to align_jumps_log.
(LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP): Default to align_jumps-1.
* varasm.c (assemble_start_function): Handle align_functions.
* config/sparc/sparc.h: Don't declare sparc_align_*.
Don't provide LABEL_ALIGN_AFTER_BARRIER or LOOP_ALIGN.
(DEFAULT_SPARC_ALIGN_FUNCS): Delete; take functionality into
sparc.c.
(FUNCTION_BOUNDARY): Fix incorrect use---it's not just a request,
it's a promise.
* config/sparc/sparc.c: Delete sparc_align_loops,
sparc_align_jumps, sparc_align_funcs and the corresponding string
variables.
(sparc_override_options): Default align_functions on ultrasparc.
Delete -malign-* handling.
* config/mips/mips.c (override_options): On 64-bit targets,
try to align code to 64-bit boundaries.
(print_operand): New substitution, %~,
which aligns labels to align_labels_log.
* config/mips/mips.md (div_trap_normal): Use %~.
(div_trap_mips16): Likewise.
(abssi): Likewise.
(absdi2): Likewise.
(ffssi2): Likewise.
(ffsdi2): Likewise.
(ashldi3_internal): Likewise.
(ashrdi3_internal): Likewise.
(lshrdi3_internal): Likewise.
(casesi_internal): Likewise.
Plus corresponding documentation changes.
From-SVN: r29045
1999-09-02 07:42:06 +02:00
|
|
|
The maximum number of bytes to skip when applying @code{LABEL_ALIGN}.
|
|
|
|
This works only if @code{ASM_OUTPUT_MAX_SKIP_ALIGN} is defined.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
flags.h: New variables align_loops...
* flags.h: New variables align_loops, align_loops_log,
align_jumps, align_jumps_log, align_labels, align_labels_log,
align_functions, align_functions_log.
* toplev.c: Define them.
(f_options): Handle -falign-* when they have no argument.
(main): Add logic to set variables for -falign-functions,
-falign-jumps, -falign-labels, -falign-loops.
Make it -fsched-verbose=<n> and -finline-limit=<n>.
(display_help): Change help to match options.
* final.c (LABEL_ALIGN): Default to align_labels_log.
(LABEL_ALIGN_MAX_SKIP): Default to align_labels-1.
(LOOP_ALIGN): Default to align_loops_log.
(LOOP_ALIGN_MAX_SKIP): Default to align_loops-1.
(LABEL_ALIGN_AFTER_BARRIER): Default to align_jumps_log.
(LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP): Default to align_jumps-1.
* varasm.c (assemble_start_function): Handle align_functions.
* config/sparc/sparc.h: Don't declare sparc_align_*.
Don't provide LABEL_ALIGN_AFTER_BARRIER or LOOP_ALIGN.
(DEFAULT_SPARC_ALIGN_FUNCS): Delete; take functionality into
sparc.c.
(FUNCTION_BOUNDARY): Fix incorrect use---it's not just a request,
it's a promise.
* config/sparc/sparc.c: Delete sparc_align_loops,
sparc_align_jumps, sparc_align_funcs and the corresponding string
variables.
(sparc_override_options): Default align_functions on ultrasparc.
Delete -malign-* handling.
* config/mips/mips.c (override_options): On 64-bit targets,
try to align code to 64-bit boundaries.
(print_operand): New substitution, %~,
which aligns labels to align_labels_log.
* config/mips/mips.md (div_trap_normal): Use %~.
(div_trap_mips16): Likewise.
(abssi): Likewise.
(absdi2): Likewise.
(ffssi2): Likewise.
(ffsdi2): Likewise.
(ashldi3_internal): Likewise.
(ashrdi3_internal): Likewise.
(lshrdi3_internal): Likewise.
(casesi_internal): Likewise.
Plus corresponding documentation changes.
From-SVN: r29045
1999-09-02 07:42:06 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ASM_OUTPUT_SKIP (@var{stream}, @var{nbytes})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C statement to output to the stdio stream @var{stream} an assembler
|
|
|
|
instruction to advance the location counter by @var{nbytes} bytes.
|
|
|
|
Those bytes should be zero when loaded. @var{nbytes} will be a C
|
|
|
|
expression of type @code{int}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ASM_NO_SKIP_IN_TEXT
|
1996-09-25 01:21:45 +02:00
|
|
|
Define this macro if @code{ASM_OUTPUT_SKIP} should not be used in the
|
1998-02-19 01:04:36 +01:00
|
|
|
text section because it fails to put zeros in the bytes that are skipped.
|
1996-09-25 01:21:45 +02:00
|
|
|
This is true on many Unix systems, where the pseudo--op to skip bytes
|
|
|
|
produces no-op instructions rather than zeros when used in the text
|
|
|
|
section.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ASM_OUTPUT_ALIGN (@var{stream}, @var{power})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C statement to output to the stdio stream @var{stream} an assembler
|
|
|
|
command to advance the location counter to a multiple of 2 to the
|
|
|
|
@var{power} bytes. @var{power} will be a C expression of type @code{int}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1998-10-26 12:59:07 +01:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ASM_OUTPUT_ALIGN_WITH_NOP (@var{stream}, @var{power})
|
2002-09-17 23:36:29 +02:00
|
|
|
Like @code{ASM_OUTPUT_ALIGN}, except that the ``nop'' instruction is used
|
|
|
|
for padding, if necessary.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2002-09-17 23:36:29 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ASM_OUTPUT_MAX_SKIP_ALIGN (@var{stream}, @var{power}, @var{max_skip})
|
1998-10-26 12:59:07 +01:00
|
|
|
A C statement to output to the stdio stream @var{stream} an assembler
|
|
|
|
command to advance the location counter to a multiple of 2 to the
|
|
|
|
@var{power} bytes, but only if @var{max_skip} or fewer bytes are needed to
|
|
|
|
satisfy the alignment request. @var{power} and @var{max_skip} will be
|
|
|
|
a C expression of type @code{int}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
@need 3000
|
|
|
|
@node Debugging Info
|
|
|
|
@section Controlling Debugging Information Format
|
|
|
|
|
|
|
|
@c prevent bad page break with this line
|
|
|
|
This describes how to specify debugging information.
|
|
|
|
|
|
|
|
@menu
|
|
|
|
* All Debuggers:: Macros that affect all debugging formats uniformly.
|
|
|
|
* DBX Options:: Macros enabling specific options in DBX format.
|
|
|
|
* DBX Hooks:: Hook macros for varying DBX format.
|
|
|
|
* File Names and DBX:: Macros controlling output of file names in DBX format.
|
|
|
|
* SDB and DWARF:: Macros for SDB (COFF) and DWARF formats.
|
2001-12-05 13:36:48 +01:00
|
|
|
* VMS Debug:: Macros for VMS debug format.
|
1996-09-25 01:21:45 +02:00
|
|
|
@end menu
|
|
|
|
|
|
|
|
@node All Debuggers
|
|
|
|
@subsection Macros Affecting All Debugging Formats
|
|
|
|
|
|
|
|
@c prevent bad page break with this line
|
|
|
|
These macros affect all debugging formats.
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac DBX_REGISTER_NUMBER (@var{regno})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C expression that returns the DBX register number for the compiler
|
2001-11-22 03:19:58 +01:00
|
|
|
register number @var{regno}. In the default macro provided, the value
|
|
|
|
of this expression will be @var{regno} itself. But sometimes there are
|
|
|
|
some registers that the compiler knows about and DBX does not, or vice
|
|
|
|
versa. In such cases, some register may need to have one number in the
|
|
|
|
compiler and another for DBX@.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
1999-08-25 09:27:13 +02:00
|
|
|
If two registers have consecutive numbers inside GCC, and they can be
|
1996-09-25 01:21:45 +02:00
|
|
|
used as a pair to hold a multiword value, then they @emph{must} have
|
|
|
|
consecutive numbers after renumbering with @code{DBX_REGISTER_NUMBER}.
|
|
|
|
Otherwise, debuggers will be unable to access such a pair, because they
|
|
|
|
expect register pairs to be consecutive in their own numbering scheme.
|
|
|
|
|
|
|
|
If you find yourself defining @code{DBX_REGISTER_NUMBER} in way that
|
|
|
|
does not preserve register pairs, then what you must do instead is
|
|
|
|
redefine the actual register numbering scheme.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac DEBUGGER_AUTO_OFFSET (@var{x})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C expression that returns the integer offset value for an automatic
|
|
|
|
variable having address @var{x} (an RTL expression). The default
|
|
|
|
computation assumes that @var{x} is based on the frame-pointer and
|
|
|
|
gives the offset from the frame-pointer. This is required for targets
|
|
|
|
that produce debugging output for DBX or COFF-style debugging output
|
|
|
|
for SDB and allow the frame-pointer to be eliminated when the
|
c-tree.texi, [...]: Use more logical markup.
* doc/c-tree.texi, doc/contrib.texi, doc/extend.texi,
doc/gcc.texi, doc/gcov.texi, doc/install-old.texi,
doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: Use more
logical markup. Use TeX quotes and dashes. Use @dots{} and
@minus{}. Avoid spaces inside @var. Update last modification
date in gcc.texi.
* doc/gcc.1, doc/gcov.1: Regenerate.
From-SVN: r43369
2001-06-14 13:08:04 +02:00
|
|
|
@option{-g} options is used.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac DEBUGGER_ARG_OFFSET (@var{offset}, @var{x})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C expression that returns the integer offset value for an argument
|
|
|
|
having address @var{x} (an RTL expression). The nominal offset is
|
|
|
|
@var{offset}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac PREFERRED_DEBUGGING_TYPE
|
1999-08-25 09:27:13 +02:00
|
|
|
A C expression that returns the type of debugging output GCC should
|
c-tree.texi, [...]: Use more logical markup.
* doc/c-tree.texi, doc/contrib.texi, doc/extend.texi,
doc/gcc.texi, doc/gcov.texi, doc/install-old.texi,
doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: Use more
logical markup. Use TeX quotes and dashes. Use @dots{} and
@minus{}. Avoid spaces inside @var. Update last modification
date in gcc.texi.
* doc/gcc.1, doc/gcov.1: Regenerate.
From-SVN: r43369
2001-06-14 13:08:04 +02:00
|
|
|
produce when the user specifies just @option{-g}. Define
|
1999-08-25 09:27:13 +02:00
|
|
|
this if you have arranged for GCC to support more than one format of
|
1998-04-04 15:32:39 +02:00
|
|
|
debugging output. Currently, the allowable values are @code{DBX_DEBUG},
|
2001-12-05 13:36:48 +01:00
|
|
|
@code{SDB_DEBUG}, @code{DWARF_DEBUG}, @code{DWARF2_DEBUG},
|
|
|
|
@code{XCOFF_DEBUG}, @code{VMS_DEBUG}, and @code{VMS_AND_DWARF2_DEBUG}.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
c-tree.texi, [...]: Use more logical markup.
* doc/c-tree.texi, doc/contrib.texi, doc/extend.texi,
doc/gcc.texi, doc/gcov.texi, doc/install-old.texi,
doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: Use more
logical markup. Use TeX quotes and dashes. Use @dots{} and
@minus{}. Avoid spaces inside @var. Update last modification
date in gcc.texi.
* doc/gcc.1, doc/gcov.1: Regenerate.
From-SVN: r43369
2001-06-14 13:08:04 +02:00
|
|
|
When the user specifies @option{-ggdb}, GCC normally also uses the
|
1998-04-04 15:32:39 +02:00
|
|
|
value of this macro to select the debugging output format, but with two
|
2004-01-16 17:59:17 +01:00
|
|
|
exceptions. If @code{DWARF2_DEBUGGING_INFO} is defined, GCC uses the
|
1998-04-04 15:32:39 +02:00
|
|
|
value @code{DWARF2_DEBUG}. Otherwise, if @code{DBX_DEBUGGING_INFO} is
|
1999-08-25 09:27:13 +02:00
|
|
|
defined, GCC uses @code{DBX_DEBUG}.
|
1998-02-22 20:09:18 +01:00
|
|
|
|
1996-09-25 01:21:45 +02:00
|
|
|
The value of this macro only affects the default debugging output; the
|
c-tree.texi, [...]: Use more logical markup.
* doc/c-tree.texi, doc/contrib.texi, doc/extend.texi,
doc/gcc.texi, doc/gcov.texi, doc/install-old.texi,
doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: Use more
logical markup. Use TeX quotes and dashes. Use @dots{} and
@minus{}. Avoid spaces inside @var. Update last modification
date in gcc.texi.
* doc/gcc.1, doc/gcov.1: Regenerate.
From-SVN: r43369
2001-06-14 13:08:04 +02:00
|
|
|
user can always get a specific type of output by using @option{-gstabs},
|
2003-12-24 01:14:25 +01:00
|
|
|
@option{-gcoff}, @option{-gdwarf-2}, @option{-gxcoff}, or @option{-gvms}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
@node DBX Options
|
|
|
|
@subsection Specific Options for DBX Output
|
|
|
|
|
|
|
|
@c prevent bad page break with this line
|
|
|
|
These are specific options for DBX output.
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac DBX_DEBUGGING_INFO
|
1999-08-25 09:27:13 +02:00
|
|
|
Define this macro if GCC should produce debugging output for DBX
|
c-tree.texi, [...]: Use more logical markup.
* doc/c-tree.texi, doc/contrib.texi, doc/extend.texi,
doc/gcc.texi, doc/gcov.texi, doc/install-old.texi,
doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: Use more
logical markup. Use TeX quotes and dashes. Use @dots{} and
@minus{}. Avoid spaces inside @var. Update last modification
date in gcc.texi.
* doc/gcc.1, doc/gcov.1: Regenerate.
From-SVN: r43369
2001-06-14 13:08:04 +02:00
|
|
|
in response to the @option{-g} option.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac XCOFF_DEBUGGING_INFO
|
1999-08-25 09:27:13 +02:00
|
|
|
Define this macro if GCC should produce XCOFF format debugging output
|
c-tree.texi, [...]: Use more logical markup.
* doc/c-tree.texi, doc/contrib.texi, doc/extend.texi,
doc/gcc.texi, doc/gcov.texi, doc/install-old.texi,
doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: Use more
logical markup. Use TeX quotes and dashes. Use @dots{} and
@minus{}. Avoid spaces inside @var. Update last modification
date in gcc.texi.
* doc/gcc.1, doc/gcov.1: Regenerate.
From-SVN: r43369
2001-06-14 13:08:04 +02:00
|
|
|
in response to the @option{-g} option. This is a variant of DBX format.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac DEFAULT_GDB_EXTENSIONS
|
1999-08-25 09:27:13 +02:00
|
|
|
Define this macro to control whether GCC should by default generate
|
1996-09-25 01:21:45 +02:00
|
|
|
GDB's extended version of DBX debugging information (assuming DBX-format
|
|
|
|
debugging information is enabled at all). If you don't define the
|
|
|
|
macro, the default is 1: always generate the extended information
|
|
|
|
if there is any occasion to.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac DEBUG_SYMS_TEXT
|
1996-09-25 01:21:45 +02:00
|
|
|
Define this macro if all @code{.stabs} commands should be output while
|
|
|
|
in the text section.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ASM_STABS_OP
|
2000-09-25 15:50:51 +02:00
|
|
|
A C string constant, including spacing, naming the assembler pseudo op to
|
|
|
|
use instead of @code{"\t.stabs\t"} to define an ordinary debugging symbol.
|
|
|
|
If you don't define this macro, @code{"\t.stabs\t"} is used. This macro
|
|
|
|
applies only to DBX debugging information format.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ASM_STABD_OP
|
2000-09-25 15:50:51 +02:00
|
|
|
A C string constant, including spacing, naming the assembler pseudo op to
|
|
|
|
use instead of @code{"\t.stabd\t"} to define a debugging symbol whose
|
|
|
|
value is the current location. If you don't define this macro,
|
|
|
|
@code{"\t.stabd\t"} is used. This macro applies only to DBX debugging
|
|
|
|
information format.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ASM_STABN_OP
|
2000-09-25 15:50:51 +02:00
|
|
|
A C string constant, including spacing, naming the assembler pseudo op to
|
|
|
|
use instead of @code{"\t.stabn\t"} to define a debugging symbol with no
|
|
|
|
name. If you don't define this macro, @code{"\t.stabn\t"} is used. This
|
|
|
|
macro applies only to DBX debugging information format.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac DBX_NO_XREFS
|
1996-09-25 01:21:45 +02:00
|
|
|
Define this macro if DBX on your system does not support the construct
|
|
|
|
@samp{xs@var{tagname}}. On some systems, this construct is used to
|
|
|
|
describe a forward reference to a structure named @var{tagname}.
|
|
|
|
On other systems, this construct is not supported at all.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac DBX_CONTIN_LENGTH
|
1996-09-25 01:21:45 +02:00
|
|
|
A symbol name in DBX-format debugging information is normally
|
|
|
|
continued (split into two separate @code{.stabs} directives) when it
|
|
|
|
exceeds a certain length (by default, 80 characters). On some
|
|
|
|
operating systems, DBX requires this splitting; on others, splitting
|
|
|
|
must not be done. You can inhibit splitting by defining this macro
|
|
|
|
with the value zero. You can override the default splitting-length by
|
|
|
|
defining this macro as an expression for the length you desire.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac DBX_CONTIN_CHAR
|
1996-09-25 01:21:45 +02:00
|
|
|
Normally continuation is indicated by adding a @samp{\} character to
|
|
|
|
the end of a @code{.stabs} string when a continuation follows. To use
|
|
|
|
a different character instead, define this macro as a character
|
|
|
|
constant for the character you want to use. Do not define this macro
|
|
|
|
if backslash is correct for your system.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac DBX_STATIC_STAB_DATA_SECTION
|
1996-09-25 01:21:45 +02:00
|
|
|
Define this macro if it is necessary to go to the data section before
|
|
|
|
outputting the @samp{.stabs} pseudo-op for a non-global static
|
|
|
|
variable.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac DBX_TYPE_DECL_STABS_CODE
|
1996-09-25 01:21:45 +02:00
|
|
|
The value to use in the ``code'' field of the @code{.stabs} directive
|
|
|
|
for a typedef. The default is @code{N_LSYM}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac DBX_STATIC_CONST_VAR_CODE
|
1996-09-25 01:21:45 +02:00
|
|
|
The value to use in the ``code'' field of the @code{.stabs} directive
|
|
|
|
for a static variable located in the text section. DBX format does not
|
|
|
|
provide any ``right'' way to do this. The default is @code{N_FUN}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac DBX_REGPARM_STABS_CODE
|
1996-09-25 01:21:45 +02:00
|
|
|
The value to use in the ``code'' field of the @code{.stabs} directive
|
|
|
|
for a parameter passed in registers. DBX format does not provide any
|
|
|
|
``right'' way to do this. The default is @code{N_RSYM}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac DBX_REGPARM_STABS_LETTER
|
1996-09-25 01:21:45 +02:00
|
|
|
The letter to use in DBX symbol data to identify a symbol as a parameter
|
|
|
|
passed in registers. DBX format does not customarily provide any way to
|
|
|
|
do this. The default is @code{'P'}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac DBX_FUNCTION_FIRST
|
1996-09-25 01:21:45 +02:00
|
|
|
Define this macro if the DBX information for a function and its
|
|
|
|
arguments should precede the assembler code for the function. Normally,
|
|
|
|
in DBX format, the debugging information entirely follows the assembler
|
|
|
|
code.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac DBX_BLOCKS_FUNCTION_RELATIVE
|
dbxout.c (asmfile): Delete.
* dbxout.c (asmfile): Delete. All uses changed to asm_out_file.
(DBX_BLOCKS_FUNCTION_RELATIVE, DBX_LINES_FUNCTION_RELATIVE):
Default to 0.
(dbxout_source_line): Use DBX_OUTPUT_SOURCE_LINE when defined.
When it is not, but DBX_LINES_FUNCTION_RELATIVE is true, emit
an internal label and an N_SLINE .stabn whose value is the
difference between that label and the function entry label.
(dbxout_finish): If DBX_OUTPUT_MAIN_SOURCE_FILE_END is not defined,
but DBX_OUTPUT_NULL_N_SO_AT_MAIN_SOURCE_FILE_END is, emit a
label and an N_SO stab with an empty string referring to it.
(dbx_output_lbrac, dbx_output_rbrac): Use if statement instead
of #ifdef directive to test DBX_BLOCKS_FUNCTION_RELATIVE.
(dbxout_type_methods, dbxout_symbol): Remove #if 0 block.
(dbxout_prepare_symbol): Remove #ifdef WINNING_GDB block, this
macro is never defined.
* sdbout.c (sdbout_source_line_counter): Delete.
(PUT_SDB_SRC_FILE): Delete. Uses replaced with sole definition.
(sdbout_source_line): Use SDB_OUTPUT_SOURCE_LINE, which takes
only two arguments.
* xcoffout.c (ASM_OUTPUT_SOURCE_LINE): Rename ASM_OUTPUT_LINE.
* config/dbxcoff.h, config/dbxelf.h: Remove unncessary #undefs.
* config/c4x/c4x.h, config/pa/pa.h: Remove unnecessary macro
definitions (identical to default).
* config/darwin.h, config/dbxcoff.h, config/dbxelf.h, config/ptx4.h
* config/h8300/coff.h, config/pa/som.h, config/sh/elf.h:
Define DBX_OUTPUT_NULL_N_SO_AT_MAIN_SOURCE_FILE_END, not
DBX_OUTPUT_MAIN_SOURCE_FILE_END.
* config/dbxcoff.h, config/dbxelf.h, config/ptx4.h
* config/mcore/mcore-pe.h, config/pa/som.h, config/sh/elf.h:
Define DBX_LINES_FUNCTION_RELATIVE, not ASM_OUTPUT_SOURCE_LINE.
* config/alpha/alpha-protos.h: Don't prototype alpha_output_lineno.
* config/alpha/alpha.c: Move declaration of num_source_filenames up.
(alpha_start_function): Use SDB_OUTPUT_SOURCE_LINE.
(sym_lineno): Delete.
(alpha_output_filename): Do not emit N_SOL stabs here. Remove
now-unused variable.
(alpha_output_lineno): Delete.
* config/mips/mips-protos.h: Don't prototype mips_output_lineno.
* config/mips/mips.c (mips_output_filename): Don't use
ASM_OUTPUT_FILENAME. Don't emit N_SOL stabs here.
(mips_output_lineno): Delete.
(mips_output_function_prologue: Use SDB_OUTPUT_SOURCE_LINE.
* config/alpha/alpha.h: Define DBX_OUTPUT_SOURCE_LINE and
SDB_OUTPUT_SOURCE_LINE, not ASM_OUTPUT_SOURCE_LINE.
* config/mips/mips.h: Likewise. Don't define ASM_OUTPUT_FILENAME.
* config/mips/sdb.h: Use SDB_OUTPUT_SOURCE_LINE.
* config/avr/avr.h: Don't define ASM_OUTPUT_SOURCE_LINE.
* config/mmix/mmix.h: Likewise.
* config/mmix/mmix.c (mmix_asm_output_source_line): Delete.
* config/mmix/mmix-protos.h: Don't prototype it.
* config/alpha/unicosmk.h: Also #undef PREFERRED_DEBUGGING_TYPE;
no need to #undef ASM_OUTPUT_SOURCE_LINE.
* config/arm/aout.h: Remove RISCiX-specific definition of
DBX_OUTPUT_MAIN_SOURCE_FILENAME.
* config/m32r/m32r.h: Define DBX_OUTPUT_SOURCE_LINE, not
ASM_OUTPUT_SOURCE_LINE.
* config/rs6000/rs6000.h: (ASM_OUTPUT_SOURCE_LINE): Rename
DBX_OUTPUT_SOURCE_LINE. Don't use current_function_func_begin_label.
* config/vax/elf.h: No need to define DBX_OUTPUT_FUNCTION_END.
* doc/tm.texi: Update.
From-SVN: r89357
2004-10-21 02:53:47 +02:00
|
|
|
Define this macro, with value 1, if the value of a symbol describing
|
|
|
|
the scope of a block (@code{N_LBRAC} or @code{N_RBRAC}) should be
|
|
|
|
relative to the start of the enclosing function. Normally, GCC uses
|
|
|
|
an absolute address.
|
|
|
|
@end defmac
|
|
|
|
|
|
|
|
@defmac DBX_LINES_FUNCTION_RELATIVE
|
|
|
|
Define this macro, with value 1, if the value of a symbol indicating
|
|
|
|
the current line number (@code{N_SLINE}) should be relative to the
|
|
|
|
start of the enclosing function. Normally, GCC uses an absolute address.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac DBX_USE_BINCL
|
c-tree.texi, [...]: Be more consistent about the use of "GCC" and related terms.
* doc/c-tree.texi, doc/contrib.texi, doc/extend.texi,
doc/gcc.texi, doc/gcov.texi, doc/install.texi, doc/invoke.texi,
doc/md.texi, doc/rtl.texi, doc/tm.texi: Be more consistent about
the use of "GCC" and related terms.
* doc/gcc.1, doc/gcov.1: Regenerate.
From-SVN: r43547
2001-06-25 02:21:28 +02:00
|
|
|
Define this macro if GCC should generate @code{N_BINCL} and
|
1996-09-25 01:21:45 +02:00
|
|
|
@code{N_EINCL} stabs for included header files, as on Sun systems. This
|
c-tree.texi, [...]: Be more consistent about the use of "GCC" and related terms.
* doc/c-tree.texi, doc/contrib.texi, doc/extend.texi,
doc/gcc.texi, doc/gcov.texi, doc/install.texi, doc/invoke.texi,
doc/md.texi, doc/rtl.texi, doc/tm.texi: Be more consistent about
the use of "GCC" and related terms.
* doc/gcc.1, doc/gcov.1: Regenerate.
From-SVN: r43547
2001-06-25 02:21:28 +02:00
|
|
|
macro also directs GCC to output a type number as a pair of a file
|
|
|
|
number and a type number within the file. Normally, GCC does not
|
1996-09-25 01:21:45 +02:00
|
|
|
generate @code{N_BINCL} or @code{N_EINCL} stabs, and it outputs a single
|
|
|
|
number for a type number.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
@node DBX Hooks
|
|
|
|
@subsection Open-Ended Hooks for DBX Format
|
|
|
|
|
|
|
|
@c prevent bad page break with this line
|
|
|
|
These are hooks for DBX format.
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac DBX_OUTPUT_LBRAC (@var{stream}, @var{name})
|
1996-09-25 01:21:45 +02:00
|
|
|
Define this macro to say how to output to @var{stream} the debugging
|
|
|
|
information for the start of a scope level for variable names. The
|
|
|
|
argument @var{name} is the name of an assembler symbol (for use with
|
|
|
|
@code{assemble_name}) whose value is the address where the scope begins.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac DBX_OUTPUT_RBRAC (@var{stream}, @var{name})
|
1996-09-25 01:21:45 +02:00
|
|
|
Like @code{DBX_OUTPUT_LBRAC}, but for the end of a scope level.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac DBX_OUTPUT_NFUN (@var{stream}, @var{lscope_label}, @var{decl})
|
2002-09-14 01:29:58 +02:00
|
|
|
Define this macro if the target machine requires special handling to
|
|
|
|
output an @code{N_FUN} entry for the function @var{decl}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2002-09-14 01:29:58 +02:00
|
|
|
|
dbxout.c (asmfile): Delete.
* dbxout.c (asmfile): Delete. All uses changed to asm_out_file.
(DBX_BLOCKS_FUNCTION_RELATIVE, DBX_LINES_FUNCTION_RELATIVE):
Default to 0.
(dbxout_source_line): Use DBX_OUTPUT_SOURCE_LINE when defined.
When it is not, but DBX_LINES_FUNCTION_RELATIVE is true, emit
an internal label and an N_SLINE .stabn whose value is the
difference between that label and the function entry label.
(dbxout_finish): If DBX_OUTPUT_MAIN_SOURCE_FILE_END is not defined,
but DBX_OUTPUT_NULL_N_SO_AT_MAIN_SOURCE_FILE_END is, emit a
label and an N_SO stab with an empty string referring to it.
(dbx_output_lbrac, dbx_output_rbrac): Use if statement instead
of #ifdef directive to test DBX_BLOCKS_FUNCTION_RELATIVE.
(dbxout_type_methods, dbxout_symbol): Remove #if 0 block.
(dbxout_prepare_symbol): Remove #ifdef WINNING_GDB block, this
macro is never defined.
* sdbout.c (sdbout_source_line_counter): Delete.
(PUT_SDB_SRC_FILE): Delete. Uses replaced with sole definition.
(sdbout_source_line): Use SDB_OUTPUT_SOURCE_LINE, which takes
only two arguments.
* xcoffout.c (ASM_OUTPUT_SOURCE_LINE): Rename ASM_OUTPUT_LINE.
* config/dbxcoff.h, config/dbxelf.h: Remove unncessary #undefs.
* config/c4x/c4x.h, config/pa/pa.h: Remove unnecessary macro
definitions (identical to default).
* config/darwin.h, config/dbxcoff.h, config/dbxelf.h, config/ptx4.h
* config/h8300/coff.h, config/pa/som.h, config/sh/elf.h:
Define DBX_OUTPUT_NULL_N_SO_AT_MAIN_SOURCE_FILE_END, not
DBX_OUTPUT_MAIN_SOURCE_FILE_END.
* config/dbxcoff.h, config/dbxelf.h, config/ptx4.h
* config/mcore/mcore-pe.h, config/pa/som.h, config/sh/elf.h:
Define DBX_LINES_FUNCTION_RELATIVE, not ASM_OUTPUT_SOURCE_LINE.
* config/alpha/alpha-protos.h: Don't prototype alpha_output_lineno.
* config/alpha/alpha.c: Move declaration of num_source_filenames up.
(alpha_start_function): Use SDB_OUTPUT_SOURCE_LINE.
(sym_lineno): Delete.
(alpha_output_filename): Do not emit N_SOL stabs here. Remove
now-unused variable.
(alpha_output_lineno): Delete.
* config/mips/mips-protos.h: Don't prototype mips_output_lineno.
* config/mips/mips.c (mips_output_filename): Don't use
ASM_OUTPUT_FILENAME. Don't emit N_SOL stabs here.
(mips_output_lineno): Delete.
(mips_output_function_prologue: Use SDB_OUTPUT_SOURCE_LINE.
* config/alpha/alpha.h: Define DBX_OUTPUT_SOURCE_LINE and
SDB_OUTPUT_SOURCE_LINE, not ASM_OUTPUT_SOURCE_LINE.
* config/mips/mips.h: Likewise. Don't define ASM_OUTPUT_FILENAME.
* config/mips/sdb.h: Use SDB_OUTPUT_SOURCE_LINE.
* config/avr/avr.h: Don't define ASM_OUTPUT_SOURCE_LINE.
* config/mmix/mmix.h: Likewise.
* config/mmix/mmix.c (mmix_asm_output_source_line): Delete.
* config/mmix/mmix-protos.h: Don't prototype it.
* config/alpha/unicosmk.h: Also #undef PREFERRED_DEBUGGING_TYPE;
no need to #undef ASM_OUTPUT_SOURCE_LINE.
* config/arm/aout.h: Remove RISCiX-specific definition of
DBX_OUTPUT_MAIN_SOURCE_FILENAME.
* config/m32r/m32r.h: Define DBX_OUTPUT_SOURCE_LINE, not
ASM_OUTPUT_SOURCE_LINE.
* config/rs6000/rs6000.h: (ASM_OUTPUT_SOURCE_LINE): Rename
DBX_OUTPUT_SOURCE_LINE. Don't use current_function_func_begin_label.
* config/vax/elf.h: No need to define DBX_OUTPUT_FUNCTION_END.
* doc/tm.texi: Update.
From-SVN: r89357
2004-10-21 02:53:47 +02:00
|
|
|
@defmac DBX_OUTPUT_SOURCE_LINE (@var{stream}, @var{line}, @var{counter})
|
|
|
|
A C statement to output DBX debugging information before code for line
|
|
|
|
number @var{line} of the current source file to the stdio stream
|
c-tree.texi, [...]: Correct end-of-sentence markup and markup of "etc.", "e.g." and "i.e.".
* doc/c-tree.texi, doc/cfg.texi, doc/contrib.texi, doc/cpp.texi,
doc/cppopts.texi, doc/extend.texi, doc/fragments.texi,
doc/frontends.texi, doc/gcov.texi, doc/hostconfig.texi,
doc/implement-c.texi, doc/install.texi, doc/invoke.texi,
doc/libgcc.texi, doc/md.texi, doc/passes.texi,
doc/portability.texi, doc/rtl.texi, doc/sourcebuild.texi,
doc/standards.texi, doc/tm.texi, doc/tree-ssa.texi,
doc/trouble.texi: Correct end-of-sentence markup and markup of
"etc.", "e.g." and "i.e.". Use @code in various places where
appropriate.
From-SVN: r90101
2004-11-05 02:36:57 +01:00
|
|
|
@var{stream}. @var{counter} is the number of time the macro was
|
dbxout.c (asmfile): Delete.
* dbxout.c (asmfile): Delete. All uses changed to asm_out_file.
(DBX_BLOCKS_FUNCTION_RELATIVE, DBX_LINES_FUNCTION_RELATIVE):
Default to 0.
(dbxout_source_line): Use DBX_OUTPUT_SOURCE_LINE when defined.
When it is not, but DBX_LINES_FUNCTION_RELATIVE is true, emit
an internal label and an N_SLINE .stabn whose value is the
difference between that label and the function entry label.
(dbxout_finish): If DBX_OUTPUT_MAIN_SOURCE_FILE_END is not defined,
but DBX_OUTPUT_NULL_N_SO_AT_MAIN_SOURCE_FILE_END is, emit a
label and an N_SO stab with an empty string referring to it.
(dbx_output_lbrac, dbx_output_rbrac): Use if statement instead
of #ifdef directive to test DBX_BLOCKS_FUNCTION_RELATIVE.
(dbxout_type_methods, dbxout_symbol): Remove #if 0 block.
(dbxout_prepare_symbol): Remove #ifdef WINNING_GDB block, this
macro is never defined.
* sdbout.c (sdbout_source_line_counter): Delete.
(PUT_SDB_SRC_FILE): Delete. Uses replaced with sole definition.
(sdbout_source_line): Use SDB_OUTPUT_SOURCE_LINE, which takes
only two arguments.
* xcoffout.c (ASM_OUTPUT_SOURCE_LINE): Rename ASM_OUTPUT_LINE.
* config/dbxcoff.h, config/dbxelf.h: Remove unncessary #undefs.
* config/c4x/c4x.h, config/pa/pa.h: Remove unnecessary macro
definitions (identical to default).
* config/darwin.h, config/dbxcoff.h, config/dbxelf.h, config/ptx4.h
* config/h8300/coff.h, config/pa/som.h, config/sh/elf.h:
Define DBX_OUTPUT_NULL_N_SO_AT_MAIN_SOURCE_FILE_END, not
DBX_OUTPUT_MAIN_SOURCE_FILE_END.
* config/dbxcoff.h, config/dbxelf.h, config/ptx4.h
* config/mcore/mcore-pe.h, config/pa/som.h, config/sh/elf.h:
Define DBX_LINES_FUNCTION_RELATIVE, not ASM_OUTPUT_SOURCE_LINE.
* config/alpha/alpha-protos.h: Don't prototype alpha_output_lineno.
* config/alpha/alpha.c: Move declaration of num_source_filenames up.
(alpha_start_function): Use SDB_OUTPUT_SOURCE_LINE.
(sym_lineno): Delete.
(alpha_output_filename): Do not emit N_SOL stabs here. Remove
now-unused variable.
(alpha_output_lineno): Delete.
* config/mips/mips-protos.h: Don't prototype mips_output_lineno.
* config/mips/mips.c (mips_output_filename): Don't use
ASM_OUTPUT_FILENAME. Don't emit N_SOL stabs here.
(mips_output_lineno): Delete.
(mips_output_function_prologue: Use SDB_OUTPUT_SOURCE_LINE.
* config/alpha/alpha.h: Define DBX_OUTPUT_SOURCE_LINE and
SDB_OUTPUT_SOURCE_LINE, not ASM_OUTPUT_SOURCE_LINE.
* config/mips/mips.h: Likewise. Don't define ASM_OUTPUT_FILENAME.
* config/mips/sdb.h: Use SDB_OUTPUT_SOURCE_LINE.
* config/avr/avr.h: Don't define ASM_OUTPUT_SOURCE_LINE.
* config/mmix/mmix.h: Likewise.
* config/mmix/mmix.c (mmix_asm_output_source_line): Delete.
* config/mmix/mmix-protos.h: Don't prototype it.
* config/alpha/unicosmk.h: Also #undef PREFERRED_DEBUGGING_TYPE;
no need to #undef ASM_OUTPUT_SOURCE_LINE.
* config/arm/aout.h: Remove RISCiX-specific definition of
DBX_OUTPUT_MAIN_SOURCE_FILENAME.
* config/m32r/m32r.h: Define DBX_OUTPUT_SOURCE_LINE, not
ASM_OUTPUT_SOURCE_LINE.
* config/rs6000/rs6000.h: (ASM_OUTPUT_SOURCE_LINE): Rename
DBX_OUTPUT_SOURCE_LINE. Don't use current_function_func_begin_label.
* config/vax/elf.h: No need to define DBX_OUTPUT_FUNCTION_END.
* doc/tm.texi: Update.
From-SVN: r89357
2004-10-21 02:53:47 +02:00
|
|
|
invoked, including the current invocation; it is intended to generate
|
|
|
|
unique labels in the assembly output.
|
|
|
|
|
|
|
|
This macro should not be defined if the default output is correct, or
|
|
|
|
if it can be made correct by defining @code{DBX_LINES_FUNCTION_RELATIVE}.
|
|
|
|
@end defmac
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac NO_DBX_FUNCTION_END
|
1996-09-25 01:21:45 +02:00
|
|
|
Some stabs encapsulation formats (in particular ECOFF), cannot handle the
|
c-tree.texi, [...]: Fix spelling and typos.
* doc/c-tree.texi, doc/contrib.texi, doc/extend.texi,
doc/gcc.texi, doc/install.texi, doc/invoke.texi, doc/md.texi,
doc/objc.texi, doc/rtl.texi, doc/tm.texi: Fix spelling and typos.
Consistently use "built-in" and "bit-field". Minor logical markup
improvements.
* doc/gcc.1: Regenerate.
From-SVN: r43383
2001-06-15 00:51:18 +02:00
|
|
|
@code{.stabs "",N_FUN,,0,0,Lscope-function-1} gdb dbx extension construct.
|
1996-09-25 01:21:45 +02:00
|
|
|
On those machines, define this macro to turn this feature off without
|
|
|
|
disturbing the rest of the gdb extensions.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2004-09-24 08:17:07 +02:00
|
|
|
@defmac NO_DBX_BNSYM_ENSYM
|
|
|
|
Some assemblers cannot handle the @code{.stabd BNSYM/ENSYM,0,0} gdb dbx
|
|
|
|
extension construct. On those machines, define this macro to turn this
|
|
|
|
feature off without disturbing the rest of the gdb extensions.
|
|
|
|
@end defmac
|
|
|
|
|
1996-09-25 01:21:45 +02:00
|
|
|
@node File Names and DBX
|
|
|
|
@subsection File Names in DBX Format
|
|
|
|
|
|
|
|
@c prevent bad page break with this line
|
|
|
|
This describes file names in DBX format.
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac DBX_OUTPUT_MAIN_SOURCE_FILENAME (@var{stream}, @var{name})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C statement to output DBX debugging information to the stdio stream
|
dbxout.c: Include obstack.h.
* dbxout.c: Include obstack.h.
(ASM_STABS_OP): Take XCOFF_DEBUGGING_INFO into account in
default definition.
(ASM_STABD_OP, NO_DBX_MAIN_SOURCE_DIRECTORY, DBX_CONTIN_CHAR):
Default-define here.
(DBX_CONTIN_LENGTH): Move definition with others.
(DBX_FINISH_STABS): New target macro.
(current_sym_code, current_sym_value, current_sym_addr)
(current_sym_nchars, CHARS, dbxout_continue)
(print_int_cst_octal, print_octal, print_wide_int)
(dbxout_prepare_symbol, dbxout_finish_symbol): Delete.
(stabstr_ob, stabstr_last_contin_point): New variables.
(NUMBER_FMT_LOOP): New improper macro.
(dbxout_int, dbxout_stab_value_zero, dbxout_stab_value_label)
(dbxout_stab_value_label_diff, dbxout_stab_value_internal_label)
(dbxout_stab_value_internal_label_diff, dbxout_stabd)
(dbxout_begin_stabn, dbxout_begin_stabn_sline)
(dbxout_begin_simple_stabs, dbxout_begin_simple_stabs_desc)
(dbxout_begin_complex_stabs, dbxout_finish_complex_stabs)
(stabstr_C, stabstr_S, stabstr_I, stabstr_D, stabstr_U, stabstr_O)
(stabstr_continue, DECL_ACCESSIBILITY_CHAR)
New functions and/or proper function-like macros.
(CONTIN): Use stabstr_continue, unconditionally.
(get_lang_number): Define unconditionally, with ATTRIBUTE_UNUSED.
(dbxout_init): Initialize stabstr_ob. Check
NO_DBX_MAIN_SOURCE_DIRECTORY. Only write out the Ltext label
if it was used. Use the new interfaces.
(dbxout_source_file): Remove file argument; always write to
asm_out_file. Use the new interfaces.
(dbxout_type_method_1): Remove second argument which is always
DECL_ASSEMBLER_NAME of the first argument. Use the new interfaces.
(dbxout_type_methods): Remove write-only variables. Use the
new interfaces.
(dbxout_parms): Refactor to remove code duplicated in each of
several successive if-else-if blocks. Use the new interfaces.
(dbxout_function_end, emit_bincl_stab, dbxout_end_source_file)
(dbxout_source_line, dbxout_finish, dbxout_type_index)
(dbxout_type_fields, dbxout_range_type, dbxout_type, dbxout_type_name)
(dbxout_class_name_qualifiers, dbxout_symbol, dbxout_symbol_location)
(dbxout_symbol_name, dbxout_reg_parms, dbxout_args)
(dbx_output_lbrac, dbx_output_rbrac, dbxout_block):
Use the new interfaces.
* Makefile.in (dbxout.o): Update dependencies.
* defaults.h: Don't define ASM_STABD_OP.
* output.h: Prototype new dbxout_* interfaces.
* system.h: Poison DBX_OUTPUT_GCC_MARKER and DBX_FINISH_SYMBOL.
* varasm.c: Don't define ASM_STABS_OP.
(default_stabs_asm_out_constructor, default_stabs_asm_out_destructor):
Use the new dbxout.c interfaces. Call sorry if neither
DBX_DEBUGGING_INFO nor XCOFF_DEBUGGING_INFO is defined.
* xcoffout.h: Don't define ASM_STABS_OP.
(DBX_FINISH_SYMBOL): Rewrite and rename DBX_FINISH_STABS.
(DBX_OUTPUT_MAIN_SOURCE_DIRECTORY, DBX_OUTPUT_GCC_MARKER): Delete.
(NO_DBX_MAIN_SOURCE_DIRECTORY, NO_DBX_GCC_MARKER): Define.
(DBX_OUTPUT_MAIN_SOURCE_FILE_END): Change bare block to
do { ... } while (0) idiom.
* config/alpha/alpha.c (num_source_filenames): Export.
* config/alpha/alpha.h (num_source_filenames): Declare.
(DBX_OUTPUT_SOURCE_LINE): Use new interfaces.
(SDB_OUTPUT_SOURCE_LINE): Add missing newline.
* config/m32r/m32r.h (DBX_OUTPUT_SOURCE_LINE): Use new interfaces.
Always use .debugsym. Update commentary.
* config/mips/mips.h (DBX_OUTPUT_SOURCE_LINE): Use new interfaces.
(SDB_OUTPUT_SOURCE_LINE): Add missing newline.
* config/rs6000/linux64.h (DBX_OUTPUT_SOURCE_LINE, DBX_OUTPUT_BRAC):
Use new interfaces.
* config/rs6000/rs6000.c: If TARGET_MACHO, include gstab.h.
(macho_branch_islands): Use new interfaces.
* doc/tm.texi: Update.
From-SVN: r89623
2004-10-27 03:29:42 +02:00
|
|
|
@var{stream}, which indicates that file @var{name} is the main source
|
1996-09-25 01:21:45 +02:00
|
|
|
file---the file specified as the input file for compilation.
|
|
|
|
This macro is called only once, at the beginning of compilation.
|
|
|
|
|
|
|
|
This macro need not be defined if the standard form of output
|
|
|
|
for DBX debugging information is appropriate.
|
dbxout.c: Include obstack.h.
* dbxout.c: Include obstack.h.
(ASM_STABS_OP): Take XCOFF_DEBUGGING_INFO into account in
default definition.
(ASM_STABD_OP, NO_DBX_MAIN_SOURCE_DIRECTORY, DBX_CONTIN_CHAR):
Default-define here.
(DBX_CONTIN_LENGTH): Move definition with others.
(DBX_FINISH_STABS): New target macro.
(current_sym_code, current_sym_value, current_sym_addr)
(current_sym_nchars, CHARS, dbxout_continue)
(print_int_cst_octal, print_octal, print_wide_int)
(dbxout_prepare_symbol, dbxout_finish_symbol): Delete.
(stabstr_ob, stabstr_last_contin_point): New variables.
(NUMBER_FMT_LOOP): New improper macro.
(dbxout_int, dbxout_stab_value_zero, dbxout_stab_value_label)
(dbxout_stab_value_label_diff, dbxout_stab_value_internal_label)
(dbxout_stab_value_internal_label_diff, dbxout_stabd)
(dbxout_begin_stabn, dbxout_begin_stabn_sline)
(dbxout_begin_simple_stabs, dbxout_begin_simple_stabs_desc)
(dbxout_begin_complex_stabs, dbxout_finish_complex_stabs)
(stabstr_C, stabstr_S, stabstr_I, stabstr_D, stabstr_U, stabstr_O)
(stabstr_continue, DECL_ACCESSIBILITY_CHAR)
New functions and/or proper function-like macros.
(CONTIN): Use stabstr_continue, unconditionally.
(get_lang_number): Define unconditionally, with ATTRIBUTE_UNUSED.
(dbxout_init): Initialize stabstr_ob. Check
NO_DBX_MAIN_SOURCE_DIRECTORY. Only write out the Ltext label
if it was used. Use the new interfaces.
(dbxout_source_file): Remove file argument; always write to
asm_out_file. Use the new interfaces.
(dbxout_type_method_1): Remove second argument which is always
DECL_ASSEMBLER_NAME of the first argument. Use the new interfaces.
(dbxout_type_methods): Remove write-only variables. Use the
new interfaces.
(dbxout_parms): Refactor to remove code duplicated in each of
several successive if-else-if blocks. Use the new interfaces.
(dbxout_function_end, emit_bincl_stab, dbxout_end_source_file)
(dbxout_source_line, dbxout_finish, dbxout_type_index)
(dbxout_type_fields, dbxout_range_type, dbxout_type, dbxout_type_name)
(dbxout_class_name_qualifiers, dbxout_symbol, dbxout_symbol_location)
(dbxout_symbol_name, dbxout_reg_parms, dbxout_args)
(dbx_output_lbrac, dbx_output_rbrac, dbxout_block):
Use the new interfaces.
* Makefile.in (dbxout.o): Update dependencies.
* defaults.h: Don't define ASM_STABD_OP.
* output.h: Prototype new dbxout_* interfaces.
* system.h: Poison DBX_OUTPUT_GCC_MARKER and DBX_FINISH_SYMBOL.
* varasm.c: Don't define ASM_STABS_OP.
(default_stabs_asm_out_constructor, default_stabs_asm_out_destructor):
Use the new dbxout.c interfaces. Call sorry if neither
DBX_DEBUGGING_INFO nor XCOFF_DEBUGGING_INFO is defined.
* xcoffout.h: Don't define ASM_STABS_OP.
(DBX_FINISH_SYMBOL): Rewrite and rename DBX_FINISH_STABS.
(DBX_OUTPUT_MAIN_SOURCE_DIRECTORY, DBX_OUTPUT_GCC_MARKER): Delete.
(NO_DBX_MAIN_SOURCE_DIRECTORY, NO_DBX_GCC_MARKER): Define.
(DBX_OUTPUT_MAIN_SOURCE_FILE_END): Change bare block to
do { ... } while (0) idiom.
* config/alpha/alpha.c (num_source_filenames): Export.
* config/alpha/alpha.h (num_source_filenames): Declare.
(DBX_OUTPUT_SOURCE_LINE): Use new interfaces.
(SDB_OUTPUT_SOURCE_LINE): Add missing newline.
* config/m32r/m32r.h (DBX_OUTPUT_SOURCE_LINE): Use new interfaces.
Always use .debugsym. Update commentary.
* config/mips/mips.h (DBX_OUTPUT_SOURCE_LINE): Use new interfaces.
(SDB_OUTPUT_SOURCE_LINE): Add missing newline.
* config/rs6000/linux64.h (DBX_OUTPUT_SOURCE_LINE, DBX_OUTPUT_BRAC):
Use new interfaces.
* config/rs6000/rs6000.c: If TARGET_MACHO, include gstab.h.
(macho_branch_islands): Use new interfaces.
* doc/tm.texi: Update.
From-SVN: r89623
2004-10-27 03:29:42 +02:00
|
|
|
|
|
|
|
It may be necessary to refer to a label equal to the beginning of the
|
|
|
|
text section. You can use @samp{assemble_name (stream, ltext_label_name)}
|
|
|
|
to do so. If you do this, you must also set the variable
|
|
|
|
@var{used_ltext_label_name} to @code{true}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
dbxout.c: Include obstack.h.
* dbxout.c: Include obstack.h.
(ASM_STABS_OP): Take XCOFF_DEBUGGING_INFO into account in
default definition.
(ASM_STABD_OP, NO_DBX_MAIN_SOURCE_DIRECTORY, DBX_CONTIN_CHAR):
Default-define here.
(DBX_CONTIN_LENGTH): Move definition with others.
(DBX_FINISH_STABS): New target macro.
(current_sym_code, current_sym_value, current_sym_addr)
(current_sym_nchars, CHARS, dbxout_continue)
(print_int_cst_octal, print_octal, print_wide_int)
(dbxout_prepare_symbol, dbxout_finish_symbol): Delete.
(stabstr_ob, stabstr_last_contin_point): New variables.
(NUMBER_FMT_LOOP): New improper macro.
(dbxout_int, dbxout_stab_value_zero, dbxout_stab_value_label)
(dbxout_stab_value_label_diff, dbxout_stab_value_internal_label)
(dbxout_stab_value_internal_label_diff, dbxout_stabd)
(dbxout_begin_stabn, dbxout_begin_stabn_sline)
(dbxout_begin_simple_stabs, dbxout_begin_simple_stabs_desc)
(dbxout_begin_complex_stabs, dbxout_finish_complex_stabs)
(stabstr_C, stabstr_S, stabstr_I, stabstr_D, stabstr_U, stabstr_O)
(stabstr_continue, DECL_ACCESSIBILITY_CHAR)
New functions and/or proper function-like macros.
(CONTIN): Use stabstr_continue, unconditionally.
(get_lang_number): Define unconditionally, with ATTRIBUTE_UNUSED.
(dbxout_init): Initialize stabstr_ob. Check
NO_DBX_MAIN_SOURCE_DIRECTORY. Only write out the Ltext label
if it was used. Use the new interfaces.
(dbxout_source_file): Remove file argument; always write to
asm_out_file. Use the new interfaces.
(dbxout_type_method_1): Remove second argument which is always
DECL_ASSEMBLER_NAME of the first argument. Use the new interfaces.
(dbxout_type_methods): Remove write-only variables. Use the
new interfaces.
(dbxout_parms): Refactor to remove code duplicated in each of
several successive if-else-if blocks. Use the new interfaces.
(dbxout_function_end, emit_bincl_stab, dbxout_end_source_file)
(dbxout_source_line, dbxout_finish, dbxout_type_index)
(dbxout_type_fields, dbxout_range_type, dbxout_type, dbxout_type_name)
(dbxout_class_name_qualifiers, dbxout_symbol, dbxout_symbol_location)
(dbxout_symbol_name, dbxout_reg_parms, dbxout_args)
(dbx_output_lbrac, dbx_output_rbrac, dbxout_block):
Use the new interfaces.
* Makefile.in (dbxout.o): Update dependencies.
* defaults.h: Don't define ASM_STABD_OP.
* output.h: Prototype new dbxout_* interfaces.
* system.h: Poison DBX_OUTPUT_GCC_MARKER and DBX_FINISH_SYMBOL.
* varasm.c: Don't define ASM_STABS_OP.
(default_stabs_asm_out_constructor, default_stabs_asm_out_destructor):
Use the new dbxout.c interfaces. Call sorry if neither
DBX_DEBUGGING_INFO nor XCOFF_DEBUGGING_INFO is defined.
* xcoffout.h: Don't define ASM_STABS_OP.
(DBX_FINISH_SYMBOL): Rewrite and rename DBX_FINISH_STABS.
(DBX_OUTPUT_MAIN_SOURCE_DIRECTORY, DBX_OUTPUT_GCC_MARKER): Delete.
(NO_DBX_MAIN_SOURCE_DIRECTORY, NO_DBX_GCC_MARKER): Define.
(DBX_OUTPUT_MAIN_SOURCE_FILE_END): Change bare block to
do { ... } while (0) idiom.
* config/alpha/alpha.c (num_source_filenames): Export.
* config/alpha/alpha.h (num_source_filenames): Declare.
(DBX_OUTPUT_SOURCE_LINE): Use new interfaces.
(SDB_OUTPUT_SOURCE_LINE): Add missing newline.
* config/m32r/m32r.h (DBX_OUTPUT_SOURCE_LINE): Use new interfaces.
Always use .debugsym. Update commentary.
* config/mips/mips.h (DBX_OUTPUT_SOURCE_LINE): Use new interfaces.
(SDB_OUTPUT_SOURCE_LINE): Add missing newline.
* config/rs6000/linux64.h (DBX_OUTPUT_SOURCE_LINE, DBX_OUTPUT_BRAC):
Use new interfaces.
* config/rs6000/rs6000.c: If TARGET_MACHO, include gstab.h.
(macho_branch_islands): Use new interfaces.
* doc/tm.texi: Update.
From-SVN: r89623
2004-10-27 03:29:42 +02:00
|
|
|
@defmac NO_DBX_MAIN_SOURCE_DIRECTORY
|
|
|
|
Define this macro, with value 1, if GCC should not emit an indication
|
|
|
|
of the current directory for compilation and current source language at
|
|
|
|
the beginning of the file.
|
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
dbxout.c: Include obstack.h.
* dbxout.c: Include obstack.h.
(ASM_STABS_OP): Take XCOFF_DEBUGGING_INFO into account in
default definition.
(ASM_STABD_OP, NO_DBX_MAIN_SOURCE_DIRECTORY, DBX_CONTIN_CHAR):
Default-define here.
(DBX_CONTIN_LENGTH): Move definition with others.
(DBX_FINISH_STABS): New target macro.
(current_sym_code, current_sym_value, current_sym_addr)
(current_sym_nchars, CHARS, dbxout_continue)
(print_int_cst_octal, print_octal, print_wide_int)
(dbxout_prepare_symbol, dbxout_finish_symbol): Delete.
(stabstr_ob, stabstr_last_contin_point): New variables.
(NUMBER_FMT_LOOP): New improper macro.
(dbxout_int, dbxout_stab_value_zero, dbxout_stab_value_label)
(dbxout_stab_value_label_diff, dbxout_stab_value_internal_label)
(dbxout_stab_value_internal_label_diff, dbxout_stabd)
(dbxout_begin_stabn, dbxout_begin_stabn_sline)
(dbxout_begin_simple_stabs, dbxout_begin_simple_stabs_desc)
(dbxout_begin_complex_stabs, dbxout_finish_complex_stabs)
(stabstr_C, stabstr_S, stabstr_I, stabstr_D, stabstr_U, stabstr_O)
(stabstr_continue, DECL_ACCESSIBILITY_CHAR)
New functions and/or proper function-like macros.
(CONTIN): Use stabstr_continue, unconditionally.
(get_lang_number): Define unconditionally, with ATTRIBUTE_UNUSED.
(dbxout_init): Initialize stabstr_ob. Check
NO_DBX_MAIN_SOURCE_DIRECTORY. Only write out the Ltext label
if it was used. Use the new interfaces.
(dbxout_source_file): Remove file argument; always write to
asm_out_file. Use the new interfaces.
(dbxout_type_method_1): Remove second argument which is always
DECL_ASSEMBLER_NAME of the first argument. Use the new interfaces.
(dbxout_type_methods): Remove write-only variables. Use the
new interfaces.
(dbxout_parms): Refactor to remove code duplicated in each of
several successive if-else-if blocks. Use the new interfaces.
(dbxout_function_end, emit_bincl_stab, dbxout_end_source_file)
(dbxout_source_line, dbxout_finish, dbxout_type_index)
(dbxout_type_fields, dbxout_range_type, dbxout_type, dbxout_type_name)
(dbxout_class_name_qualifiers, dbxout_symbol, dbxout_symbol_location)
(dbxout_symbol_name, dbxout_reg_parms, dbxout_args)
(dbx_output_lbrac, dbx_output_rbrac, dbxout_block):
Use the new interfaces.
* Makefile.in (dbxout.o): Update dependencies.
* defaults.h: Don't define ASM_STABD_OP.
* output.h: Prototype new dbxout_* interfaces.
* system.h: Poison DBX_OUTPUT_GCC_MARKER and DBX_FINISH_SYMBOL.
* varasm.c: Don't define ASM_STABS_OP.
(default_stabs_asm_out_constructor, default_stabs_asm_out_destructor):
Use the new dbxout.c interfaces. Call sorry if neither
DBX_DEBUGGING_INFO nor XCOFF_DEBUGGING_INFO is defined.
* xcoffout.h: Don't define ASM_STABS_OP.
(DBX_FINISH_SYMBOL): Rewrite and rename DBX_FINISH_STABS.
(DBX_OUTPUT_MAIN_SOURCE_DIRECTORY, DBX_OUTPUT_GCC_MARKER): Delete.
(NO_DBX_MAIN_SOURCE_DIRECTORY, NO_DBX_GCC_MARKER): Define.
(DBX_OUTPUT_MAIN_SOURCE_FILE_END): Change bare block to
do { ... } while (0) idiom.
* config/alpha/alpha.c (num_source_filenames): Export.
* config/alpha/alpha.h (num_source_filenames): Declare.
(DBX_OUTPUT_SOURCE_LINE): Use new interfaces.
(SDB_OUTPUT_SOURCE_LINE): Add missing newline.
* config/m32r/m32r.h (DBX_OUTPUT_SOURCE_LINE): Use new interfaces.
Always use .debugsym. Update commentary.
* config/mips/mips.h (DBX_OUTPUT_SOURCE_LINE): Use new interfaces.
(SDB_OUTPUT_SOURCE_LINE): Add missing newline.
* config/rs6000/linux64.h (DBX_OUTPUT_SOURCE_LINE, DBX_OUTPUT_BRAC):
Use new interfaces.
* config/rs6000/rs6000.c: If TARGET_MACHO, include gstab.h.
(macho_branch_islands): Use new interfaces.
* doc/tm.texi: Update.
From-SVN: r89623
2004-10-27 03:29:42 +02:00
|
|
|
@defmac NO_DBX_GCC_MARKER
|
|
|
|
Define this macro, with value 1, if GCC should not emit an indication
|
|
|
|
that this object file was compiled by GCC@. The default is to emit
|
|
|
|
an @code{N_OPT} stab at the beginning of every source file, with
|
|
|
|
@samp{gcc2_compiled.} for the string and value 0.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac DBX_OUTPUT_MAIN_SOURCE_FILE_END (@var{stream}, @var{name})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C statement to output DBX debugging information at the end of
|
dbxout.c: Include obstack.h.
* dbxout.c: Include obstack.h.
(ASM_STABS_OP): Take XCOFF_DEBUGGING_INFO into account in
default definition.
(ASM_STABD_OP, NO_DBX_MAIN_SOURCE_DIRECTORY, DBX_CONTIN_CHAR):
Default-define here.
(DBX_CONTIN_LENGTH): Move definition with others.
(DBX_FINISH_STABS): New target macro.
(current_sym_code, current_sym_value, current_sym_addr)
(current_sym_nchars, CHARS, dbxout_continue)
(print_int_cst_octal, print_octal, print_wide_int)
(dbxout_prepare_symbol, dbxout_finish_symbol): Delete.
(stabstr_ob, stabstr_last_contin_point): New variables.
(NUMBER_FMT_LOOP): New improper macro.
(dbxout_int, dbxout_stab_value_zero, dbxout_stab_value_label)
(dbxout_stab_value_label_diff, dbxout_stab_value_internal_label)
(dbxout_stab_value_internal_label_diff, dbxout_stabd)
(dbxout_begin_stabn, dbxout_begin_stabn_sline)
(dbxout_begin_simple_stabs, dbxout_begin_simple_stabs_desc)
(dbxout_begin_complex_stabs, dbxout_finish_complex_stabs)
(stabstr_C, stabstr_S, stabstr_I, stabstr_D, stabstr_U, stabstr_O)
(stabstr_continue, DECL_ACCESSIBILITY_CHAR)
New functions and/or proper function-like macros.
(CONTIN): Use stabstr_continue, unconditionally.
(get_lang_number): Define unconditionally, with ATTRIBUTE_UNUSED.
(dbxout_init): Initialize stabstr_ob. Check
NO_DBX_MAIN_SOURCE_DIRECTORY. Only write out the Ltext label
if it was used. Use the new interfaces.
(dbxout_source_file): Remove file argument; always write to
asm_out_file. Use the new interfaces.
(dbxout_type_method_1): Remove second argument which is always
DECL_ASSEMBLER_NAME of the first argument. Use the new interfaces.
(dbxout_type_methods): Remove write-only variables. Use the
new interfaces.
(dbxout_parms): Refactor to remove code duplicated in each of
several successive if-else-if blocks. Use the new interfaces.
(dbxout_function_end, emit_bincl_stab, dbxout_end_source_file)
(dbxout_source_line, dbxout_finish, dbxout_type_index)
(dbxout_type_fields, dbxout_range_type, dbxout_type, dbxout_type_name)
(dbxout_class_name_qualifiers, dbxout_symbol, dbxout_symbol_location)
(dbxout_symbol_name, dbxout_reg_parms, dbxout_args)
(dbx_output_lbrac, dbx_output_rbrac, dbxout_block):
Use the new interfaces.
* Makefile.in (dbxout.o): Update dependencies.
* defaults.h: Don't define ASM_STABD_OP.
* output.h: Prototype new dbxout_* interfaces.
* system.h: Poison DBX_OUTPUT_GCC_MARKER and DBX_FINISH_SYMBOL.
* varasm.c: Don't define ASM_STABS_OP.
(default_stabs_asm_out_constructor, default_stabs_asm_out_destructor):
Use the new dbxout.c interfaces. Call sorry if neither
DBX_DEBUGGING_INFO nor XCOFF_DEBUGGING_INFO is defined.
* xcoffout.h: Don't define ASM_STABS_OP.
(DBX_FINISH_SYMBOL): Rewrite and rename DBX_FINISH_STABS.
(DBX_OUTPUT_MAIN_SOURCE_DIRECTORY, DBX_OUTPUT_GCC_MARKER): Delete.
(NO_DBX_MAIN_SOURCE_DIRECTORY, NO_DBX_GCC_MARKER): Define.
(DBX_OUTPUT_MAIN_SOURCE_FILE_END): Change bare block to
do { ... } while (0) idiom.
* config/alpha/alpha.c (num_source_filenames): Export.
* config/alpha/alpha.h (num_source_filenames): Declare.
(DBX_OUTPUT_SOURCE_LINE): Use new interfaces.
(SDB_OUTPUT_SOURCE_LINE): Add missing newline.
* config/m32r/m32r.h (DBX_OUTPUT_SOURCE_LINE): Use new interfaces.
Always use .debugsym. Update commentary.
* config/mips/mips.h (DBX_OUTPUT_SOURCE_LINE): Use new interfaces.
(SDB_OUTPUT_SOURCE_LINE): Add missing newline.
* config/rs6000/linux64.h (DBX_OUTPUT_SOURCE_LINE, DBX_OUTPUT_BRAC):
Use new interfaces.
* config/rs6000/rs6000.c: If TARGET_MACHO, include gstab.h.
(macho_branch_islands): Use new interfaces.
* doc/tm.texi: Update.
From-SVN: r89623
2004-10-27 03:29:42 +02:00
|
|
|
compilation of the main source file @var{name}. Output should be
|
|
|
|
written to the stdio stream @var{stream}.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
If you don't define this macro, nothing special is output at the end
|
|
|
|
of compilation, which is correct for most machines.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
dbxout.c (asmfile): Delete.
* dbxout.c (asmfile): Delete. All uses changed to asm_out_file.
(DBX_BLOCKS_FUNCTION_RELATIVE, DBX_LINES_FUNCTION_RELATIVE):
Default to 0.
(dbxout_source_line): Use DBX_OUTPUT_SOURCE_LINE when defined.
When it is not, but DBX_LINES_FUNCTION_RELATIVE is true, emit
an internal label and an N_SLINE .stabn whose value is the
difference between that label and the function entry label.
(dbxout_finish): If DBX_OUTPUT_MAIN_SOURCE_FILE_END is not defined,
but DBX_OUTPUT_NULL_N_SO_AT_MAIN_SOURCE_FILE_END is, emit a
label and an N_SO stab with an empty string referring to it.
(dbx_output_lbrac, dbx_output_rbrac): Use if statement instead
of #ifdef directive to test DBX_BLOCKS_FUNCTION_RELATIVE.
(dbxout_type_methods, dbxout_symbol): Remove #if 0 block.
(dbxout_prepare_symbol): Remove #ifdef WINNING_GDB block, this
macro is never defined.
* sdbout.c (sdbout_source_line_counter): Delete.
(PUT_SDB_SRC_FILE): Delete. Uses replaced with sole definition.
(sdbout_source_line): Use SDB_OUTPUT_SOURCE_LINE, which takes
only two arguments.
* xcoffout.c (ASM_OUTPUT_SOURCE_LINE): Rename ASM_OUTPUT_LINE.
* config/dbxcoff.h, config/dbxelf.h: Remove unncessary #undefs.
* config/c4x/c4x.h, config/pa/pa.h: Remove unnecessary macro
definitions (identical to default).
* config/darwin.h, config/dbxcoff.h, config/dbxelf.h, config/ptx4.h
* config/h8300/coff.h, config/pa/som.h, config/sh/elf.h:
Define DBX_OUTPUT_NULL_N_SO_AT_MAIN_SOURCE_FILE_END, not
DBX_OUTPUT_MAIN_SOURCE_FILE_END.
* config/dbxcoff.h, config/dbxelf.h, config/ptx4.h
* config/mcore/mcore-pe.h, config/pa/som.h, config/sh/elf.h:
Define DBX_LINES_FUNCTION_RELATIVE, not ASM_OUTPUT_SOURCE_LINE.
* config/alpha/alpha-protos.h: Don't prototype alpha_output_lineno.
* config/alpha/alpha.c: Move declaration of num_source_filenames up.
(alpha_start_function): Use SDB_OUTPUT_SOURCE_LINE.
(sym_lineno): Delete.
(alpha_output_filename): Do not emit N_SOL stabs here. Remove
now-unused variable.
(alpha_output_lineno): Delete.
* config/mips/mips-protos.h: Don't prototype mips_output_lineno.
* config/mips/mips.c (mips_output_filename): Don't use
ASM_OUTPUT_FILENAME. Don't emit N_SOL stabs here.
(mips_output_lineno): Delete.
(mips_output_function_prologue: Use SDB_OUTPUT_SOURCE_LINE.
* config/alpha/alpha.h: Define DBX_OUTPUT_SOURCE_LINE and
SDB_OUTPUT_SOURCE_LINE, not ASM_OUTPUT_SOURCE_LINE.
* config/mips/mips.h: Likewise. Don't define ASM_OUTPUT_FILENAME.
* config/mips/sdb.h: Use SDB_OUTPUT_SOURCE_LINE.
* config/avr/avr.h: Don't define ASM_OUTPUT_SOURCE_LINE.
* config/mmix/mmix.h: Likewise.
* config/mmix/mmix.c (mmix_asm_output_source_line): Delete.
* config/mmix/mmix-protos.h: Don't prototype it.
* config/alpha/unicosmk.h: Also #undef PREFERRED_DEBUGGING_TYPE;
no need to #undef ASM_OUTPUT_SOURCE_LINE.
* config/arm/aout.h: Remove RISCiX-specific definition of
DBX_OUTPUT_MAIN_SOURCE_FILENAME.
* config/m32r/m32r.h: Define DBX_OUTPUT_SOURCE_LINE, not
ASM_OUTPUT_SOURCE_LINE.
* config/rs6000/rs6000.h: (ASM_OUTPUT_SOURCE_LINE): Rename
DBX_OUTPUT_SOURCE_LINE. Don't use current_function_func_begin_label.
* config/vax/elf.h: No need to define DBX_OUTPUT_FUNCTION_END.
* doc/tm.texi: Update.
From-SVN: r89357
2004-10-21 02:53:47 +02:00
|
|
|
@defmac DBX_OUTPUT_NULL_N_SO_AT_MAIN_SOURCE_FILE_END
|
|
|
|
Define this macro @emph{instead of} defining
|
|
|
|
@code{DBX_OUTPUT_MAIN_SOURCE_FILE_END}, if what needs to be output at
|
|
|
|
the end of compilation is a @code{N_SO} stab with an empty string,
|
|
|
|
whose value is the highest absolute text address in the file.
|
|
|
|
@end defmac
|
|
|
|
|
1996-09-25 01:21:45 +02:00
|
|
|
@need 2000
|
|
|
|
@node SDB and DWARF
|
|
|
|
@subsection Macros for SDB and DWARF Output
|
|
|
|
|
|
|
|
@c prevent bad page break with this line
|
|
|
|
Here are macros for SDB and DWARF output.
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac SDB_DEBUGGING_INFO
|
1999-08-25 09:27:13 +02:00
|
|
|
Define this macro if GCC should produce COFF-style debugging output
|
c-tree.texi, [...]: Use more logical markup.
* doc/c-tree.texi, doc/contrib.texi, doc/extend.texi,
doc/gcc.texi, doc/gcov.texi, doc/install-old.texi,
doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: Use more
logical markup. Use TeX quotes and dashes. Use @dots{} and
@minus{}. Avoid spaces inside @var. Update last modification
date in gcc.texi.
* doc/gcc.1, doc/gcov.1: Regenerate.
From-SVN: r43369
2001-06-14 13:08:04 +02:00
|
|
|
for SDB in response to the @option{-g} option.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac DWARF2_DEBUGGING_INFO
|
1999-08-25 09:27:13 +02:00
|
|
|
Define this macro if GCC should produce dwarf version 2 format
|
c-tree.texi, [...]: Use more logical markup.
* doc/c-tree.texi, doc/contrib.texi, doc/extend.texi,
doc/gcc.texi, doc/gcov.texi, doc/install-old.texi,
doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: Use more
logical markup. Use TeX quotes and dashes. Use @dots{} and
@minus{}. Avoid spaces inside @var. Update last modification
date in gcc.texi.
* doc/gcc.1, doc/gcov.1: Regenerate.
From-SVN: r43369
2001-06-14 13:08:04 +02:00
|
|
|
debugging output in response to the @option{-g} option.
|
1996-11-15 08:07:44 +01:00
|
|
|
|
2004-10-01 07:08:59 +02:00
|
|
|
@deftypefn {Target Hook} int TARGET_DWARF_CALLING_CONVENTION (tree @var{function})
|
|
|
|
Define this to enable the dwarf attribute @code{DW_AT_calling_convention} to
|
|
|
|
be emitted for each function. Instead of an integer return the enum
|
|
|
|
value for the @code{DW_CC_} tag.
|
|
|
|
@end deftypefn
|
|
|
|
|
1997-08-11 17:56:58 +02:00
|
|
|
To support optional call frame debugging information, you must also
|
|
|
|
define @code{INCOMING_RETURN_ADDR_RTX} and either set
|
|
|
|
@code{RTX_FRAME_RELATED_P} on the prologue insns if you use RTL for the
|
|
|
|
prologue, or call @code{dwarf2out_def_cfa} and @code{dwarf2out_reg_save}
|
2001-07-06 20:40:17 +02:00
|
|
|
as appropriate from @code{TARGET_ASM_FUNCTION_PROLOGUE} if you don't.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1997-08-11 17:56:58 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac DWARF2_FRAME_INFO
|
1999-08-25 09:27:13 +02:00
|
|
|
Define this macro to a nonzero value if GCC should always output
|
1998-06-29 23:40:49 +02:00
|
|
|
Dwarf 2 frame information. If @code{DWARF2_UNWIND_INFO}
|
1999-08-25 09:27:13 +02:00
|
|
|
(@pxref{Exception Region Output} is nonzero, GCC will output this
|
1998-06-29 23:40:49 +02:00
|
|
|
information not matter how you define @code{DWARF2_FRAME_INFO}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1998-06-29 23:40:49 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac DWARF2_ASM_LINE_DEBUG_INFO
|
1999-08-27 04:37:40 +02:00
|
|
|
Define this macro to be a nonzero value if the assembler can generate Dwarf 2
|
|
|
|
line debug info sections. This will result in much more compact line number
|
|
|
|
tables, and hence is desirable if it works.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1999-08-27 04:37:40 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ASM_OUTPUT_DWARF_DELTA (@var{stream}, @var{size}, @var{label1}, @var{label2})
|
2002-09-13 05:44:54 +02:00
|
|
|
A C statement to issue assembly directives that create a difference
|
|
|
|
between the two given labels, using an integer of the given size.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2002-09-13 05:44:54 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ASM_OUTPUT_DWARF_OFFSET (@var{stream}, @var{size}, @var{label})
|
2002-09-13 05:44:54 +02:00
|
|
|
A C statement to issue assembly directives that create a
|
|
|
|
section-relative reference to the given label, using an integer of the
|
|
|
|
given size.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2002-09-13 05:44:54 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ASM_OUTPUT_DWARF_PCREL (@var{stream}, @var{size}, @var{label})
|
2002-09-13 05:44:54 +02:00
|
|
|
A C statement to issue assembly directives that create a self-relative
|
|
|
|
reference to the given label, using an integer of the given size.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2002-09-13 05:44:54 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac PUT_SDB_@dots{}
|
1996-09-25 01:21:45 +02:00
|
|
|
Define these macros to override the assembler syntax for the special
|
|
|
|
SDB assembler directives. See @file{sdbout.c} for a list of these
|
|
|
|
macros and their arguments. If the standard syntax is used, you need
|
|
|
|
not define them yourself.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac SDB_DELIM
|
1996-09-25 01:21:45 +02:00
|
|
|
Some assemblers do not support a semicolon as a delimiter, even between
|
|
|
|
SDB assembler directives. In that case, define this macro to be the
|
|
|
|
delimiter to use (usually @samp{\n}). It is not necessary to define
|
|
|
|
a new set of @code{PUT_SDB_@var{op}} macros if this is the only change
|
|
|
|
required.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac SDB_ALLOW_UNKNOWN_REFERENCES
|
1996-09-25 01:21:45 +02:00
|
|
|
Define this macro to allow references to unknown structure,
|
|
|
|
union, or enumeration tags to be emitted. Standard COFF does not
|
|
|
|
allow handling of unknown references, MIPS ECOFF has support for
|
|
|
|
it.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac SDB_ALLOW_FORWARD_REFERENCES
|
1996-09-25 01:21:45 +02:00
|
|
|
Define this macro to allow references to structure, union, or
|
|
|
|
enumeration tags that have not yet been seen to be handled. Some
|
|
|
|
assemblers choke if forward tags are used, while some require it.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
dbxout.c (asmfile): Delete.
* dbxout.c (asmfile): Delete. All uses changed to asm_out_file.
(DBX_BLOCKS_FUNCTION_RELATIVE, DBX_LINES_FUNCTION_RELATIVE):
Default to 0.
(dbxout_source_line): Use DBX_OUTPUT_SOURCE_LINE when defined.
When it is not, but DBX_LINES_FUNCTION_RELATIVE is true, emit
an internal label and an N_SLINE .stabn whose value is the
difference between that label and the function entry label.
(dbxout_finish): If DBX_OUTPUT_MAIN_SOURCE_FILE_END is not defined,
but DBX_OUTPUT_NULL_N_SO_AT_MAIN_SOURCE_FILE_END is, emit a
label and an N_SO stab with an empty string referring to it.
(dbx_output_lbrac, dbx_output_rbrac): Use if statement instead
of #ifdef directive to test DBX_BLOCKS_FUNCTION_RELATIVE.
(dbxout_type_methods, dbxout_symbol): Remove #if 0 block.
(dbxout_prepare_symbol): Remove #ifdef WINNING_GDB block, this
macro is never defined.
* sdbout.c (sdbout_source_line_counter): Delete.
(PUT_SDB_SRC_FILE): Delete. Uses replaced with sole definition.
(sdbout_source_line): Use SDB_OUTPUT_SOURCE_LINE, which takes
only two arguments.
* xcoffout.c (ASM_OUTPUT_SOURCE_LINE): Rename ASM_OUTPUT_LINE.
* config/dbxcoff.h, config/dbxelf.h: Remove unncessary #undefs.
* config/c4x/c4x.h, config/pa/pa.h: Remove unnecessary macro
definitions (identical to default).
* config/darwin.h, config/dbxcoff.h, config/dbxelf.h, config/ptx4.h
* config/h8300/coff.h, config/pa/som.h, config/sh/elf.h:
Define DBX_OUTPUT_NULL_N_SO_AT_MAIN_SOURCE_FILE_END, not
DBX_OUTPUT_MAIN_SOURCE_FILE_END.
* config/dbxcoff.h, config/dbxelf.h, config/ptx4.h
* config/mcore/mcore-pe.h, config/pa/som.h, config/sh/elf.h:
Define DBX_LINES_FUNCTION_RELATIVE, not ASM_OUTPUT_SOURCE_LINE.
* config/alpha/alpha-protos.h: Don't prototype alpha_output_lineno.
* config/alpha/alpha.c: Move declaration of num_source_filenames up.
(alpha_start_function): Use SDB_OUTPUT_SOURCE_LINE.
(sym_lineno): Delete.
(alpha_output_filename): Do not emit N_SOL stabs here. Remove
now-unused variable.
(alpha_output_lineno): Delete.
* config/mips/mips-protos.h: Don't prototype mips_output_lineno.
* config/mips/mips.c (mips_output_filename): Don't use
ASM_OUTPUT_FILENAME. Don't emit N_SOL stabs here.
(mips_output_lineno): Delete.
(mips_output_function_prologue: Use SDB_OUTPUT_SOURCE_LINE.
* config/alpha/alpha.h: Define DBX_OUTPUT_SOURCE_LINE and
SDB_OUTPUT_SOURCE_LINE, not ASM_OUTPUT_SOURCE_LINE.
* config/mips/mips.h: Likewise. Don't define ASM_OUTPUT_FILENAME.
* config/mips/sdb.h: Use SDB_OUTPUT_SOURCE_LINE.
* config/avr/avr.h: Don't define ASM_OUTPUT_SOURCE_LINE.
* config/mmix/mmix.h: Likewise.
* config/mmix/mmix.c (mmix_asm_output_source_line): Delete.
* config/mmix/mmix-protos.h: Don't prototype it.
* config/alpha/unicosmk.h: Also #undef PREFERRED_DEBUGGING_TYPE;
no need to #undef ASM_OUTPUT_SOURCE_LINE.
* config/arm/aout.h: Remove RISCiX-specific definition of
DBX_OUTPUT_MAIN_SOURCE_FILENAME.
* config/m32r/m32r.h: Define DBX_OUTPUT_SOURCE_LINE, not
ASM_OUTPUT_SOURCE_LINE.
* config/rs6000/rs6000.h: (ASM_OUTPUT_SOURCE_LINE): Rename
DBX_OUTPUT_SOURCE_LINE. Don't use current_function_func_begin_label.
* config/vax/elf.h: No need to define DBX_OUTPUT_FUNCTION_END.
* doc/tm.texi: Update.
From-SVN: r89357
2004-10-21 02:53:47 +02:00
|
|
|
@defmac SDB_OUTPUT_SOURCE_LINE (@var{stream}, @var{line})
|
|
|
|
A C statement to output SDB debugging information before code for line
|
|
|
|
number @var{line} of the current source file to the stdio stream
|
|
|
|
@var{stream}. The default is to emit an @code{.ln} directive.
|
|
|
|
@end defmac
|
|
|
|
|
2001-12-05 13:36:48 +01:00
|
|
|
@need 2000
|
|
|
|
@node VMS Debug
|
|
|
|
@subsection Macros for VMS Debug Format
|
|
|
|
|
|
|
|
@c prevent bad page break with this line
|
|
|
|
Here are macros for VMS debug format.
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac VMS_DEBUGGING_INFO
|
2001-12-05 13:36:48 +01:00
|
|
|
Define this macro if GCC should produce debugging output for VMS
|
|
|
|
in response to the @option{-g} option. The default behavior for VMS
|
|
|
|
is to generate minimal debug info for a traceback in the absence of
|
|
|
|
@option{-g} unless explicitly overridden with @option{-g0}. This
|
|
|
|
behavior is controlled by @code{OPTIMIZATION_OPTIONS} and
|
|
|
|
@code{OVERRIDE_OPTIONS}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2001-12-05 13:36:48 +01:00
|
|
|
|
real.h: Don't define REAL_INFINITY or REAL_IS_NOT_DOUBLE.
* real.h: Don't define REAL_INFINITY or REAL_IS_NOT_DOUBLE.
Always make REAL_VALUE_TYPE a struct containing an array of
HOST_WIDE_INT, not a double. Tidy up the code deciding how
big it is. Don't declare or use union real_extract.
* emit-rtl.c (init_emit_once), varasm.c (immed_real_const_1,
decode_rtx_const, output_constant_pool), config/a29k/a29k.c
(print_operand), config/arm/arm.c (output_move_double),
config/arm/arm.md (consttable_4, consttable_8),
config/romp/romp.c (output_fpops), config/s390/s390.h
(ASM_OUTPUT_SPECIAL_POOL_ENTRY), config/xtensa/xtensa.c
(xtensa_output_literal): Don't use union real_extract.
* config/dsp16xx/dsp16xx.c (print_operand), config/i860/i860.c
(sfmode_constant_to_ulong), config/ns32k/merlin.h
(PRINT_OPERAND), config/ns32k/ns32k.c (print_operand),
config/pdp11/pdp11.h (PRINT_OPERAND), config/we32k/we32k.h
(PRINT_OPERAND): Don't use local version of union
real_extract.
* config/convex/convex.c (check_float_value), config/vax/vax.c
(vax_float_literal), config/m88k/m88k.md (divdf3),
config/dsp16xx/dsp16xx.md (fixuns_trunchfhi2),
config/pdp11/pdp11.c (output_move_quad): Don't do host
arithmetic on target floating point quantities.
* config/a29k/a29k.md, config/dsp16xx/dsp16xx.c
(output_dsp16xx_float_const): Don't test HOST_FLOAT_FORMAT.
* fold-const.c (fold), simplify-rtx.c (simplify_binary_real):
Use MODE_HAS_INFINITIES rather than #ifdef REAL_INFINITY.
* real.c (earith): Test INFINITY rather than REAL_INFINITY;
NANS implies INFINITY, so can drop #ifdef NANS inside #ifndef
INFINITY.
* print-rtl.c (print_rtx): Disable code which needs
floating-point emulator.
* libgcc2.c: Include float.h and use DBL_MANT_DIG,
FLT_MANT_DIG, to define DF_SIZE and SF_SIZE, rather than
depending on HOST_FLOAT_FORMAT to be defined properly.
* ch/grant.c, cp/error.c: Always use REAL_VALUE_TO_DECIMAL;
don't test REAL_IS_NOT_DOUBLE.
* config/1750a/1750a.c (get_double, float_label): Delete.
(print_operand): Delete huge commented-out chunk. Use
REAL_VALUE_TO_DECIMAL.
* config/1750a/1750a-protos.h: Delete prototypes of deleted
functions.
* config/convex/convex.h: Always set TARGET_FLOAT_FORMAT to
IEEE_FLOAT_FORMAT.
* config/i370/i370.h (PRINT_OPERAND [TARGET_HLASM version]):
Use REAL_VALUE_TO_DECIMAL as ELF version does.
* config/m88k/m88k.c (real_power_of_2_operand,
legitimize_operand): Take the REAL_VALUE_TYPE and/or union
real_extract out of the union; run the input through
REAL_VALUE_TO_TARGET_DOUBLE, then plug the pair of longwords
from that into the union.
* config/pdp11/pdp11.c (output_move_double): Rearrange
parentheses to make automatic indenter happy.
* doc/tm.texi (Cross-compilation): Rename node to "Floating
Point" and rewrite to describe current situation. Also adjust
documentation of REAL_VALUE_TO_TARGET_SINGLE and friends to
match code.
* doc/rtl.texi: Adjust cross reference.
From-SVN: r51210
2002-03-23 02:10:56 +01:00
|
|
|
@node Floating Point
|
1996-09-25 01:21:45 +02:00
|
|
|
@section Cross Compilation and Floating Point
|
|
|
|
@cindex cross compilation and floating point
|
|
|
|
@cindex floating point and cross compilation
|
|
|
|
|
real.h: Don't define REAL_INFINITY or REAL_IS_NOT_DOUBLE.
* real.h: Don't define REAL_INFINITY or REAL_IS_NOT_DOUBLE.
Always make REAL_VALUE_TYPE a struct containing an array of
HOST_WIDE_INT, not a double. Tidy up the code deciding how
big it is. Don't declare or use union real_extract.
* emit-rtl.c (init_emit_once), varasm.c (immed_real_const_1,
decode_rtx_const, output_constant_pool), config/a29k/a29k.c
(print_operand), config/arm/arm.c (output_move_double),
config/arm/arm.md (consttable_4, consttable_8),
config/romp/romp.c (output_fpops), config/s390/s390.h
(ASM_OUTPUT_SPECIAL_POOL_ENTRY), config/xtensa/xtensa.c
(xtensa_output_literal): Don't use union real_extract.
* config/dsp16xx/dsp16xx.c (print_operand), config/i860/i860.c
(sfmode_constant_to_ulong), config/ns32k/merlin.h
(PRINT_OPERAND), config/ns32k/ns32k.c (print_operand),
config/pdp11/pdp11.h (PRINT_OPERAND), config/we32k/we32k.h
(PRINT_OPERAND): Don't use local version of union
real_extract.
* config/convex/convex.c (check_float_value), config/vax/vax.c
(vax_float_literal), config/m88k/m88k.md (divdf3),
config/dsp16xx/dsp16xx.md (fixuns_trunchfhi2),
config/pdp11/pdp11.c (output_move_quad): Don't do host
arithmetic on target floating point quantities.
* config/a29k/a29k.md, config/dsp16xx/dsp16xx.c
(output_dsp16xx_float_const): Don't test HOST_FLOAT_FORMAT.
* fold-const.c (fold), simplify-rtx.c (simplify_binary_real):
Use MODE_HAS_INFINITIES rather than #ifdef REAL_INFINITY.
* real.c (earith): Test INFINITY rather than REAL_INFINITY;
NANS implies INFINITY, so can drop #ifdef NANS inside #ifndef
INFINITY.
* print-rtl.c (print_rtx): Disable code which needs
floating-point emulator.
* libgcc2.c: Include float.h and use DBL_MANT_DIG,
FLT_MANT_DIG, to define DF_SIZE and SF_SIZE, rather than
depending on HOST_FLOAT_FORMAT to be defined properly.
* ch/grant.c, cp/error.c: Always use REAL_VALUE_TO_DECIMAL;
don't test REAL_IS_NOT_DOUBLE.
* config/1750a/1750a.c (get_double, float_label): Delete.
(print_operand): Delete huge commented-out chunk. Use
REAL_VALUE_TO_DECIMAL.
* config/1750a/1750a-protos.h: Delete prototypes of deleted
functions.
* config/convex/convex.h: Always set TARGET_FLOAT_FORMAT to
IEEE_FLOAT_FORMAT.
* config/i370/i370.h (PRINT_OPERAND [TARGET_HLASM version]):
Use REAL_VALUE_TO_DECIMAL as ELF version does.
* config/m88k/m88k.c (real_power_of_2_operand,
legitimize_operand): Take the REAL_VALUE_TYPE and/or union
real_extract out of the union; run the input through
REAL_VALUE_TO_TARGET_DOUBLE, then plug the pair of longwords
from that into the union.
* config/pdp11/pdp11.c (output_move_double): Rearrange
parentheses to make automatic indenter happy.
* doc/tm.texi (Cross-compilation): Rename node to "Floating
Point" and rewrite to describe current situation. Also adjust
documentation of REAL_VALUE_TO_TARGET_SINGLE and friends to
match code.
* doc/rtl.texi: Adjust cross reference.
From-SVN: r51210
2002-03-23 02:10:56 +01:00
|
|
|
While all modern machines use twos-complement representation for integers,
|
1996-09-25 01:21:45 +02:00
|
|
|
there are a variety of representations for floating point numbers. This
|
|
|
|
means that in a cross-compiler the representation of floating point numbers
|
|
|
|
in the compiled program may be different from that used in the machine
|
|
|
|
doing the compilation.
|
|
|
|
|
|
|
|
Because different representation systems may offer different amounts of
|
real.h: Don't define REAL_INFINITY or REAL_IS_NOT_DOUBLE.
* real.h: Don't define REAL_INFINITY or REAL_IS_NOT_DOUBLE.
Always make REAL_VALUE_TYPE a struct containing an array of
HOST_WIDE_INT, not a double. Tidy up the code deciding how
big it is. Don't declare or use union real_extract.
* emit-rtl.c (init_emit_once), varasm.c (immed_real_const_1,
decode_rtx_const, output_constant_pool), config/a29k/a29k.c
(print_operand), config/arm/arm.c (output_move_double),
config/arm/arm.md (consttable_4, consttable_8),
config/romp/romp.c (output_fpops), config/s390/s390.h
(ASM_OUTPUT_SPECIAL_POOL_ENTRY), config/xtensa/xtensa.c
(xtensa_output_literal): Don't use union real_extract.
* config/dsp16xx/dsp16xx.c (print_operand), config/i860/i860.c
(sfmode_constant_to_ulong), config/ns32k/merlin.h
(PRINT_OPERAND), config/ns32k/ns32k.c (print_operand),
config/pdp11/pdp11.h (PRINT_OPERAND), config/we32k/we32k.h
(PRINT_OPERAND): Don't use local version of union
real_extract.
* config/convex/convex.c (check_float_value), config/vax/vax.c
(vax_float_literal), config/m88k/m88k.md (divdf3),
config/dsp16xx/dsp16xx.md (fixuns_trunchfhi2),
config/pdp11/pdp11.c (output_move_quad): Don't do host
arithmetic on target floating point quantities.
* config/a29k/a29k.md, config/dsp16xx/dsp16xx.c
(output_dsp16xx_float_const): Don't test HOST_FLOAT_FORMAT.
* fold-const.c (fold), simplify-rtx.c (simplify_binary_real):
Use MODE_HAS_INFINITIES rather than #ifdef REAL_INFINITY.
* real.c (earith): Test INFINITY rather than REAL_INFINITY;
NANS implies INFINITY, so can drop #ifdef NANS inside #ifndef
INFINITY.
* print-rtl.c (print_rtx): Disable code which needs
floating-point emulator.
* libgcc2.c: Include float.h and use DBL_MANT_DIG,
FLT_MANT_DIG, to define DF_SIZE and SF_SIZE, rather than
depending on HOST_FLOAT_FORMAT to be defined properly.
* ch/grant.c, cp/error.c: Always use REAL_VALUE_TO_DECIMAL;
don't test REAL_IS_NOT_DOUBLE.
* config/1750a/1750a.c (get_double, float_label): Delete.
(print_operand): Delete huge commented-out chunk. Use
REAL_VALUE_TO_DECIMAL.
* config/1750a/1750a-protos.h: Delete prototypes of deleted
functions.
* config/convex/convex.h: Always set TARGET_FLOAT_FORMAT to
IEEE_FLOAT_FORMAT.
* config/i370/i370.h (PRINT_OPERAND [TARGET_HLASM version]):
Use REAL_VALUE_TO_DECIMAL as ELF version does.
* config/m88k/m88k.c (real_power_of_2_operand,
legitimize_operand): Take the REAL_VALUE_TYPE and/or union
real_extract out of the union; run the input through
REAL_VALUE_TO_TARGET_DOUBLE, then plug the pair of longwords
from that into the union.
* config/pdp11/pdp11.c (output_move_double): Rearrange
parentheses to make automatic indenter happy.
* doc/tm.texi (Cross-compilation): Rename node to "Floating
Point" and rewrite to describe current situation. Also adjust
documentation of REAL_VALUE_TO_TARGET_SINGLE and friends to
match code.
* doc/rtl.texi: Adjust cross reference.
From-SVN: r51210
2002-03-23 02:10:56 +01:00
|
|
|
range and precision, all floating point constants must be represented in
|
|
|
|
the target machine's format. Therefore, the cross compiler cannot
|
|
|
|
safely use the host machine's floating point arithmetic; it must emulate
|
|
|
|
the target's arithmetic. To ensure consistency, GCC always uses
|
|
|
|
emulation to work with floating point values, even when the host and
|
|
|
|
target floating point formats are identical.
|
|
|
|
|
|
|
|
The following macros are provided by @file{real.h} for the compiler to
|
|
|
|
use. All parts of the compiler which generate or optimize
|
emit-rtl.c, [...]: Remove all #ifndef REAL_ARITHMETIC blocks...
* emit-rtl.c, final.c, fold-const.c, gengenrtl.c, optabs.c,
print-tree.c, real.c, real.h, recog.c, rtl.c, simplify-rtx.c,
tree.c, config/m68k/m68k.c, f/com.c, f/target.h, java/expr.c,
java/jcf-parse.c, java/lex.c:
Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef
REAL_ARITHMETIC blocks unconditional. Delete some further
#ifdef blocks predicated on REAL_ARITHMETIC.
* flags.h, toplev.c: Delete remaining references to
flag_pretend_float.
* doc/invoke.texi: Remove documentation of -fpretend-float.
* doc/tm.texi: Describe the various REAL_* macros as provided by
real.h, not by the target configuration files.
* config/alpha/alpha.h, config/alpha/unicosmk.h, config/arm/arm.h,
config/avr/avr.h, config/c4x/c4x.h, config/convex/convex.h,
config/cris/cris.h, config/d30v/d30v.h, config/dsp16xx/dsp16xx.h,
config/h8300/h8300.h, config/i370/i370.h, config/i386/i386.h,
config/i386/osf1elf.h, config/i960/i960.h, config/ia64/ia64.h,
config/m32r/m32r.h, config/m68hc11/m68hc11.h, config/m68k/dpx2.h,
config/m68k/linux-aout.h, config/m68k/linux.h, config/m68k/m68k.h,
config/m68k/sun3.h, config/m68k/vxm68k.h, config/mcore/mcore.h,
config/mips/mips.h, config/mmix/mmix.h, config/mn10200/mn10200.h,
config/mn10300/mn10300.h, config/pa/pa.h, config/pj/pj.h,
config/rs6000/rs6000.h, config/s390/s390.h, config/sh/sh.h,
config/sparc/freebsd.h, config/sparc/linux.h, config/sparc/linux64.h,
config/sparc/sol2.h, config/sparc/sparc.h, config/sparc/vxsim.h,
config/stormy16/stormy16.h, config/v850/v850.h, config/vax/vax.h,
config/xtensa/xtensa.h:
Do not define, undefine, or mention in comments any of
REAL_ARITHMETIC, REAL_VALUE_ATOF, REAL_VALUE_HTOF,
REAL_VALUE_ISNAN, REAL_VALUE_ISINF,
REAL_VALUE_TO_TARGET_SINGLE, REAL_VALUE_TO_TARGET_DOUBLE,
REAL_VALUE_TO_TARGET_LONG_DOUBLE, REAL_VALUE_TO_DECIMAL,
REAL_VALUE_TYPE, REAL_VALUES_EQUAL, REAL_VALUES_LESS,
REAL_VALUE_LDEXP, REAL_VALUE_FIX, REAL_VALUE_UNSIGNED_FIX,
REAL_VALUE_RNDZINT, REAL_VALUE_UNSIGNED_RNDZINT,
REAL_INFINITY, REAL_VALUE_NEGATE, REAL_VALUE_TRUNCATE,
REAL_VALUE_TO_INT, or REAL_VALUE_FROM_INT.
From-SVN: r50263
2002-03-03 22:10:09 +01:00
|
|
|
floating-point calculations must use these macros. They may evaluate
|
|
|
|
their operands more than once, so operands must not have side effects.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
real.h: Don't define REAL_INFINITY or REAL_IS_NOT_DOUBLE.
* real.h: Don't define REAL_INFINITY or REAL_IS_NOT_DOUBLE.
Always make REAL_VALUE_TYPE a struct containing an array of
HOST_WIDE_INT, not a double. Tidy up the code deciding how
big it is. Don't declare or use union real_extract.
* emit-rtl.c (init_emit_once), varasm.c (immed_real_const_1,
decode_rtx_const, output_constant_pool), config/a29k/a29k.c
(print_operand), config/arm/arm.c (output_move_double),
config/arm/arm.md (consttable_4, consttable_8),
config/romp/romp.c (output_fpops), config/s390/s390.h
(ASM_OUTPUT_SPECIAL_POOL_ENTRY), config/xtensa/xtensa.c
(xtensa_output_literal): Don't use union real_extract.
* config/dsp16xx/dsp16xx.c (print_operand), config/i860/i860.c
(sfmode_constant_to_ulong), config/ns32k/merlin.h
(PRINT_OPERAND), config/ns32k/ns32k.c (print_operand),
config/pdp11/pdp11.h (PRINT_OPERAND), config/we32k/we32k.h
(PRINT_OPERAND): Don't use local version of union
real_extract.
* config/convex/convex.c (check_float_value), config/vax/vax.c
(vax_float_literal), config/m88k/m88k.md (divdf3),
config/dsp16xx/dsp16xx.md (fixuns_trunchfhi2),
config/pdp11/pdp11.c (output_move_quad): Don't do host
arithmetic on target floating point quantities.
* config/a29k/a29k.md, config/dsp16xx/dsp16xx.c
(output_dsp16xx_float_const): Don't test HOST_FLOAT_FORMAT.
* fold-const.c (fold), simplify-rtx.c (simplify_binary_real):
Use MODE_HAS_INFINITIES rather than #ifdef REAL_INFINITY.
* real.c (earith): Test INFINITY rather than REAL_INFINITY;
NANS implies INFINITY, so can drop #ifdef NANS inside #ifndef
INFINITY.
* print-rtl.c (print_rtx): Disable code which needs
floating-point emulator.
* libgcc2.c: Include float.h and use DBL_MANT_DIG,
FLT_MANT_DIG, to define DF_SIZE and SF_SIZE, rather than
depending on HOST_FLOAT_FORMAT to be defined properly.
* ch/grant.c, cp/error.c: Always use REAL_VALUE_TO_DECIMAL;
don't test REAL_IS_NOT_DOUBLE.
* config/1750a/1750a.c (get_double, float_label): Delete.
(print_operand): Delete huge commented-out chunk. Use
REAL_VALUE_TO_DECIMAL.
* config/1750a/1750a-protos.h: Delete prototypes of deleted
functions.
* config/convex/convex.h: Always set TARGET_FLOAT_FORMAT to
IEEE_FLOAT_FORMAT.
* config/i370/i370.h (PRINT_OPERAND [TARGET_HLASM version]):
Use REAL_VALUE_TO_DECIMAL as ELF version does.
* config/m88k/m88k.c (real_power_of_2_operand,
legitimize_operand): Take the REAL_VALUE_TYPE and/or union
real_extract out of the union; run the input through
REAL_VALUE_TO_TARGET_DOUBLE, then plug the pair of longwords
from that into the union.
* config/pdp11/pdp11.c (output_move_double): Rearrange
parentheses to make automatic indenter happy.
* doc/tm.texi (Cross-compilation): Rename node to "Floating
Point" and rewrite to describe current situation. Also adjust
documentation of REAL_VALUE_TO_TARGET_SINGLE and friends to
match code.
* doc/rtl.texi: Adjust cross reference.
From-SVN: r51210
2002-03-23 02:10:56 +01:00
|
|
|
@defmac REAL_VALUE_TYPE
|
|
|
|
The C data type to be used to hold a floating point value in the target
|
|
|
|
machine's format. Typically this is a @code{struct} containing an
|
|
|
|
array of @code{HOST_WIDE_INT}, but all code should treat it as an opaque
|
|
|
|
quantity.
|
|
|
|
@end defmac
|
|
|
|
|
|
|
|
@deftypefn Macro int REAL_VALUES_EQUAL (REAL_VALUE_TYPE @var{x}, REAL_VALUE_TYPE @var{y})
|
|
|
|
Compares for equality the two values, @var{x} and @var{y}. If the target
|
|
|
|
floating point format supports negative zeroes and/or NaNs,
|
|
|
|
@samp{REAL_VALUES_EQUAL (-0.0, 0.0)} is true, and
|
|
|
|
@samp{REAL_VALUES_EQUAL (NaN, NaN)} is false.
|
|
|
|
@end deftypefn
|
|
|
|
|
|
|
|
@deftypefn Macro int REAL_VALUES_LESS (REAL_VALUE_TYPE @var{x}, REAL_VALUE_TYPE @var{y})
|
|
|
|
Tests whether @var{x} is less than @var{y}.
|
|
|
|
@end deftypefn
|
|
|
|
|
|
|
|
@deftypefn Macro HOST_WIDE_INT REAL_VALUE_FIX (REAL_VALUE_TYPE @var{x})
|
|
|
|
Truncates @var{x} to a signed integer, rounding toward zero.
|
|
|
|
@end deftypefn
|
|
|
|
|
|
|
|
@deftypefn Macro {unsigned HOST_WIDE_INT} REAL_VALUE_UNSIGNED_FIX (REAL_VALUE_TYPE @var{x})
|
|
|
|
Truncates @var{x} to an unsigned integer, rounding toward zero. If
|
|
|
|
@var{x} is negative, returns zero.
|
|
|
|
@end deftypefn
|
|
|
|
|
|
|
|
@deftypefn Macro REAL_VALUE_TYPE REAL_VALUE_ATOF (const char *@var{string}, enum machine_mode @var{mode})
|
|
|
|
Converts @var{string} into a floating point number in the target machine's
|
|
|
|
representation for mode @var{mode}. This routine can handle both
|
|
|
|
decimal and hexadecimal floating point constants, using the syntax
|
|
|
|
defined by the C language for both.
|
|
|
|
@end deftypefn
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2002-03-25 21:52:28 +01:00
|
|
|
@deftypefn Macro int REAL_VALUE_NEGATIVE (REAL_VALUE_TYPE @var{x})
|
tm.texi (Run-time Target): Add comment about flag_iso and strict ANSI.
2002-06-11 Eric Christopher <echristo@redhat.com>
* doc/tm.texi (Run-time Target): Add comment about flag_iso
and strict ANSI.
* config/mips/ecoff.h (CPP_PREDEFINES): Remove.
* config/mips/ecoffl.h: Ditto.
* config/mips/elf64.h (SUBTARGET_CPP_SPEC): Remove.
(CPP_PREDEFINES): Ditto.
* config/mips/elfl64.h: Ditto.
* config/mips/elfl.h: Ditto.
* config/mips/iris3.h (CPP_PREDEFINES, SUBTARGET_CPP_SPEC): #if 0
out until irix header consolidation.
* config/mips/iris5.h (CPP_PREDEFINES, SUBTARGET_CPP_SPEC): Replace
with SUBTARGET_OS_CPP_BUILTINS.
* config/mips/iris6.h: Ditto.
(CPLUSPLUS_CPP_SPEC): Remove.
* config/mips/linux.h: Ditto.
* config/mips/netbsd.h: Ditto.
* config/mips/openbsd.h: Ditto.
* config/mips/rtems.h: Ditto.
* config/mips/rtems64.h: Ditto.
* config/mips/sni-svr4.h: Ditto.
* config/mips/mips.h (ISA_MIPS1, ISA_MIPS2, ISA_MIPS3, ISA_MIPS4,
ISA_MIPS32, ISA_MIPS64): New defines.
(GENERATE_MULT3_SI, HAVE_SQRT_P, ISA_HAS_64BIT_REGS,
ISA_HAS_BRANCHLIKELY, ISA_HAS_CONDMOVE, ISA_HAS_8CC, ISA_HAS_FP4,
ISA_HAS_COND_TRAP, ISA_HAS_MADD_MSUB, ISA_HAS_NMADD_NMSUB,
ISA_HAS_CLZ_CLO, ISA_HAS_DCLZ_DCLO): Use.
(TARGET_CPU_CPP_BUILTINS): Define.
(CPP_PREDEFINES, LONG_MAX_SPEC, CPP_FPR_SPEC, CPP_SPEC): Remove.
* config/mips/mips.md (mulsi3_mult3): Use ISA_MIPS32/64.
(movdicc): Remove check for ISA_MIPS32.
(bunordered, bordered, bungt, bunlt, buneq, bunge, bunle,
sunordered_df, sunordered_sf, sordered_df, sordered_sf,
sunlt_df, sunlt_sf, sungt_df, sungt_sf, suneq_df, suneq_sf, sunge_df,
sunge_sf, sunle_df, sunle_sf): New patterns.
From-SVN: r54493
2002-06-11 09:26:38 +02:00
|
|
|
Returns 1 if @var{x} is negative (including negative zero), 0 otherwise.
|
2002-03-25 21:52:28 +01:00
|
|
|
@end deftypefn
|
|
|
|
|
real.h: Don't define REAL_INFINITY or REAL_IS_NOT_DOUBLE.
* real.h: Don't define REAL_INFINITY or REAL_IS_NOT_DOUBLE.
Always make REAL_VALUE_TYPE a struct containing an array of
HOST_WIDE_INT, not a double. Tidy up the code deciding how
big it is. Don't declare or use union real_extract.
* emit-rtl.c (init_emit_once), varasm.c (immed_real_const_1,
decode_rtx_const, output_constant_pool), config/a29k/a29k.c
(print_operand), config/arm/arm.c (output_move_double),
config/arm/arm.md (consttable_4, consttable_8),
config/romp/romp.c (output_fpops), config/s390/s390.h
(ASM_OUTPUT_SPECIAL_POOL_ENTRY), config/xtensa/xtensa.c
(xtensa_output_literal): Don't use union real_extract.
* config/dsp16xx/dsp16xx.c (print_operand), config/i860/i860.c
(sfmode_constant_to_ulong), config/ns32k/merlin.h
(PRINT_OPERAND), config/ns32k/ns32k.c (print_operand),
config/pdp11/pdp11.h (PRINT_OPERAND), config/we32k/we32k.h
(PRINT_OPERAND): Don't use local version of union
real_extract.
* config/convex/convex.c (check_float_value), config/vax/vax.c
(vax_float_literal), config/m88k/m88k.md (divdf3),
config/dsp16xx/dsp16xx.md (fixuns_trunchfhi2),
config/pdp11/pdp11.c (output_move_quad): Don't do host
arithmetic on target floating point quantities.
* config/a29k/a29k.md, config/dsp16xx/dsp16xx.c
(output_dsp16xx_float_const): Don't test HOST_FLOAT_FORMAT.
* fold-const.c (fold), simplify-rtx.c (simplify_binary_real):
Use MODE_HAS_INFINITIES rather than #ifdef REAL_INFINITY.
* real.c (earith): Test INFINITY rather than REAL_INFINITY;
NANS implies INFINITY, so can drop #ifdef NANS inside #ifndef
INFINITY.
* print-rtl.c (print_rtx): Disable code which needs
floating-point emulator.
* libgcc2.c: Include float.h and use DBL_MANT_DIG,
FLT_MANT_DIG, to define DF_SIZE and SF_SIZE, rather than
depending on HOST_FLOAT_FORMAT to be defined properly.
* ch/grant.c, cp/error.c: Always use REAL_VALUE_TO_DECIMAL;
don't test REAL_IS_NOT_DOUBLE.
* config/1750a/1750a.c (get_double, float_label): Delete.
(print_operand): Delete huge commented-out chunk. Use
REAL_VALUE_TO_DECIMAL.
* config/1750a/1750a-protos.h: Delete prototypes of deleted
functions.
* config/convex/convex.h: Always set TARGET_FLOAT_FORMAT to
IEEE_FLOAT_FORMAT.
* config/i370/i370.h (PRINT_OPERAND [TARGET_HLASM version]):
Use REAL_VALUE_TO_DECIMAL as ELF version does.
* config/m88k/m88k.c (real_power_of_2_operand,
legitimize_operand): Take the REAL_VALUE_TYPE and/or union
real_extract out of the union; run the input through
REAL_VALUE_TO_TARGET_DOUBLE, then plug the pair of longwords
from that into the union.
* config/pdp11/pdp11.c (output_move_double): Rearrange
parentheses to make automatic indenter happy.
* doc/tm.texi (Cross-compilation): Rename node to "Floating
Point" and rewrite to describe current situation. Also adjust
documentation of REAL_VALUE_TO_TARGET_SINGLE and friends to
match code.
* doc/rtl.texi: Adjust cross reference.
From-SVN: r51210
2002-03-23 02:10:56 +01:00
|
|
|
@deftypefn Macro int REAL_VALUE_ISINF (REAL_VALUE_TYPE @var{x})
|
|
|
|
Determines whether @var{x} represents infinity (positive or negative).
|
|
|
|
@end deftypefn
|
|
|
|
|
|
|
|
@deftypefn Macro int REAL_VALUE_ISNAN (REAL_VALUE_TYPE @var{x})
|
|
|
|
Determines whether @var{x} represents a ``NaN'' (not-a-number).
|
|
|
|
@end deftypefn
|
|
|
|
|
|
|
|
@deftypefn Macro void REAL_ARITHMETIC (REAL_VALUE_TYPE @var{output}, enum tree_code @var{code}, REAL_VALUE_TYPE @var{x}, REAL_VALUE_TYPE @var{y})
|
|
|
|
Calculates an arithmetic operation on the two floating point values
|
|
|
|
@var{x} and @var{y}, storing the result in @var{output} (which must be a
|
|
|
|
variable).
|
|
|
|
|
|
|
|
The operation to be performed is specified by @var{code}. Only the
|
|
|
|
following codes are supported: @code{PLUS_EXPR}, @code{MINUS_EXPR},
|
|
|
|
@code{MULT_EXPR}, @code{RDIV_EXPR}, @code{MAX_EXPR}, @code{MIN_EXPR}.
|
|
|
|
|
|
|
|
If @code{REAL_ARITHMETIC} is asked to evaluate division by zero and the
|
|
|
|
target's floating point format cannot represent infinity, it will call
|
|
|
|
@code{abort}. Callers should check for this situation first, using
|
|
|
|
@code{MODE_HAS_INFINITIES}. @xref{Storage Layout}.
|
|
|
|
@end deftypefn
|
|
|
|
|
|
|
|
@deftypefn Macro REAL_VALUE_TYPE REAL_VALUE_NEGATE (REAL_VALUE_TYPE @var{x})
|
|
|
|
Returns the negative of the floating point value @var{x}.
|
|
|
|
@end deftypefn
|
|
|
|
|
2002-03-25 21:52:28 +01:00
|
|
|
@deftypefn Macro REAL_VALUE_TYPE REAL_VALUE_ABS (REAL_VALUE_TYPE @var{x})
|
|
|
|
Returns the absolute value of @var{x}.
|
|
|
|
@end deftypefn
|
|
|
|
|
real.h: Don't define REAL_INFINITY or REAL_IS_NOT_DOUBLE.
* real.h: Don't define REAL_INFINITY or REAL_IS_NOT_DOUBLE.
Always make REAL_VALUE_TYPE a struct containing an array of
HOST_WIDE_INT, not a double. Tidy up the code deciding how
big it is. Don't declare or use union real_extract.
* emit-rtl.c (init_emit_once), varasm.c (immed_real_const_1,
decode_rtx_const, output_constant_pool), config/a29k/a29k.c
(print_operand), config/arm/arm.c (output_move_double),
config/arm/arm.md (consttable_4, consttable_8),
config/romp/romp.c (output_fpops), config/s390/s390.h
(ASM_OUTPUT_SPECIAL_POOL_ENTRY), config/xtensa/xtensa.c
(xtensa_output_literal): Don't use union real_extract.
* config/dsp16xx/dsp16xx.c (print_operand), config/i860/i860.c
(sfmode_constant_to_ulong), config/ns32k/merlin.h
(PRINT_OPERAND), config/ns32k/ns32k.c (print_operand),
config/pdp11/pdp11.h (PRINT_OPERAND), config/we32k/we32k.h
(PRINT_OPERAND): Don't use local version of union
real_extract.
* config/convex/convex.c (check_float_value), config/vax/vax.c
(vax_float_literal), config/m88k/m88k.md (divdf3),
config/dsp16xx/dsp16xx.md (fixuns_trunchfhi2),
config/pdp11/pdp11.c (output_move_quad): Don't do host
arithmetic on target floating point quantities.
* config/a29k/a29k.md, config/dsp16xx/dsp16xx.c
(output_dsp16xx_float_const): Don't test HOST_FLOAT_FORMAT.
* fold-const.c (fold), simplify-rtx.c (simplify_binary_real):
Use MODE_HAS_INFINITIES rather than #ifdef REAL_INFINITY.
* real.c (earith): Test INFINITY rather than REAL_INFINITY;
NANS implies INFINITY, so can drop #ifdef NANS inside #ifndef
INFINITY.
* print-rtl.c (print_rtx): Disable code which needs
floating-point emulator.
* libgcc2.c: Include float.h and use DBL_MANT_DIG,
FLT_MANT_DIG, to define DF_SIZE and SF_SIZE, rather than
depending on HOST_FLOAT_FORMAT to be defined properly.
* ch/grant.c, cp/error.c: Always use REAL_VALUE_TO_DECIMAL;
don't test REAL_IS_NOT_DOUBLE.
* config/1750a/1750a.c (get_double, float_label): Delete.
(print_operand): Delete huge commented-out chunk. Use
REAL_VALUE_TO_DECIMAL.
* config/1750a/1750a-protos.h: Delete prototypes of deleted
functions.
* config/convex/convex.h: Always set TARGET_FLOAT_FORMAT to
IEEE_FLOAT_FORMAT.
* config/i370/i370.h (PRINT_OPERAND [TARGET_HLASM version]):
Use REAL_VALUE_TO_DECIMAL as ELF version does.
* config/m88k/m88k.c (real_power_of_2_operand,
legitimize_operand): Take the REAL_VALUE_TYPE and/or union
real_extract out of the union; run the input through
REAL_VALUE_TO_TARGET_DOUBLE, then plug the pair of longwords
from that into the union.
* config/pdp11/pdp11.c (output_move_double): Rearrange
parentheses to make automatic indenter happy.
* doc/tm.texi (Cross-compilation): Rename node to "Floating
Point" and rewrite to describe current situation. Also adjust
documentation of REAL_VALUE_TO_TARGET_SINGLE and friends to
match code.
* doc/rtl.texi: Adjust cross reference.
From-SVN: r51210
2002-03-23 02:10:56 +01:00
|
|
|
@deftypefn Macro REAL_VALUE_TYPE REAL_VALUE_TRUNCATE (REAL_VALUE_TYPE @var{mode}, enum machine_mode @var{x})
|
|
|
|
Truncates the floating point value @var{x} to fit in @var{mode}. The
|
|
|
|
return value is still a full-size @code{REAL_VALUE_TYPE}, but it has an
|
|
|
|
appropriate bit pattern to be output asa floating constant whose
|
|
|
|
precision accords with mode @var{mode}.
|
|
|
|
@end deftypefn
|
|
|
|
|
|
|
|
@deftypefn Macro void REAL_VALUE_TO_INT (HOST_WIDE_INT @var{low}, HOST_WIDE_INT @var{high}, REAL_VALUE_TYPE @var{x})
|
|
|
|
Converts a floating point value @var{x} into a double-precision integer
|
|
|
|
which is then stored into @var{low} and @var{high}. If the value is not
|
|
|
|
integral, it is truncated.
|
|
|
|
@end deftypefn
|
|
|
|
|
|
|
|
@deftypefn Macro void REAL_VALUE_FROM_INT (REAL_VALUE_TYPE @var{x}, HOST_WIDE_INT @var{low}, HOST_WIDE_INT @var{high}, enum machine_mode @var{mode})
|
|
|
|
Converts a double-precision integer found in @var{low} and @var{high},
|
|
|
|
into a floating point value which is then stored into @var{x}. The
|
|
|
|
value is truncated to fit in mode @var{mode}.
|
|
|
|
@end deftypefn
|
1996-09-25 01:21:45 +02:00
|
|
|
|
Makefile.in (lcm.o): Depend on insn-attr.h.
* Makefile.in (lcm.o): Depend on insn-attr.h.
* basic-block.h (optimize_mode_switching): Declare.
* lcm.c (tm_p.h, insn-attr.h): #include.
(seginfo, bb_info): New structs.
(antic, transp, comp, delete, insert) : New file-scope static variables.
(new_seginfo, add_seginfo, make_preds_opaque, reg_dies): New functions.
(reg_becomes_live, optimize_mode_switching): Likewise.
* tm.texi: Add description of mode switching macros.
* toplev.c (rest_of_compilation): Call optimize_mode_switching.
* sh-protos.h (remove_dead_before_cse): Remove prototype.
(fldi_ok, fpscr_set_from_mem): New prototypes.
* sh.h (OPTIMIZATION_OPTION): Remove sh_flag_remove_dead_before_cse set.
(CONST_DOUBLE_OK_FOR_LETTER_P, SECONDARY_INPUT_RELOAD_CLASS):
Disable fldi for (TARGET_SH4 && ! TARGET_FMOVD).
(sh_flag_remove_dead_before_cse): Remove declaration.
(NUM_MODES_FOR_MODE_SWITCHING, OPTIMIZE_MODE_SWITCHING): New macros.
(MODE_USES_IN_EXIT_BLOCK, MODE_NEEDED, MODE_AT_ENTRY): Likewise.
(MODE_PRIORITY_TO_MODE, EMIT_MODE_SET): Likewise.
* sh.c (broken_move): Disable fldi for (TARGET_SH4 && ! TARGET_FMOVD).
(barrier_align): Allow for JUMP_INSNS containing a parallel.
(machine_dependent_reorg): Remove sh_flag_remove_dead_before_cse set.
(fldi_ok): New function.
(get_fpscr_rtx): Add fpscr_rtx as GC root.
(emit_sf_insn): Only generate fpu switches when optimize < 1.
(emit_df_insn): Likewise.
(expand_fp_branch, emit_fpscr_use, remove_dead_before_cse): Delete.
(sh_flag_remove_dead_before_cse): Delete.
(get_free_reg, fpscr_set_from_mem): New functions.
* sh.md (movdf, movsf): Remove no_new_pseudos code.
(return): Remove emit_fpscr_use / remove_dead_before_cse calls.
Co-Authored-By: Andrew MacLeod <amacleod@cygnus.com>
From-SVN: r31990
2000-02-15 23:34:33 +01:00
|
|
|
@node Mode Switching
|
|
|
|
@section Mode Switching Instructions
|
|
|
|
@cindex mode switching
|
|
|
|
The following macros control mode switching optimizations:
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac OPTIMIZE_MODE_SWITCHING (@var{entity})
|
Makefile.in (lcm.o): Depend on insn-attr.h.
* Makefile.in (lcm.o): Depend on insn-attr.h.
* basic-block.h (optimize_mode_switching): Declare.
* lcm.c (tm_p.h, insn-attr.h): #include.
(seginfo, bb_info): New structs.
(antic, transp, comp, delete, insert) : New file-scope static variables.
(new_seginfo, add_seginfo, make_preds_opaque, reg_dies): New functions.
(reg_becomes_live, optimize_mode_switching): Likewise.
* tm.texi: Add description of mode switching macros.
* toplev.c (rest_of_compilation): Call optimize_mode_switching.
* sh-protos.h (remove_dead_before_cse): Remove prototype.
(fldi_ok, fpscr_set_from_mem): New prototypes.
* sh.h (OPTIMIZATION_OPTION): Remove sh_flag_remove_dead_before_cse set.
(CONST_DOUBLE_OK_FOR_LETTER_P, SECONDARY_INPUT_RELOAD_CLASS):
Disable fldi for (TARGET_SH4 && ! TARGET_FMOVD).
(sh_flag_remove_dead_before_cse): Remove declaration.
(NUM_MODES_FOR_MODE_SWITCHING, OPTIMIZE_MODE_SWITCHING): New macros.
(MODE_USES_IN_EXIT_BLOCK, MODE_NEEDED, MODE_AT_ENTRY): Likewise.
(MODE_PRIORITY_TO_MODE, EMIT_MODE_SET): Likewise.
* sh.c (broken_move): Disable fldi for (TARGET_SH4 && ! TARGET_FMOVD).
(barrier_align): Allow for JUMP_INSNS containing a parallel.
(machine_dependent_reorg): Remove sh_flag_remove_dead_before_cse set.
(fldi_ok): New function.
(get_fpscr_rtx): Add fpscr_rtx as GC root.
(emit_sf_insn): Only generate fpu switches when optimize < 1.
(emit_df_insn): Likewise.
(expand_fp_branch, emit_fpscr_use, remove_dead_before_cse): Delete.
(sh_flag_remove_dead_before_cse): Delete.
(get_free_reg, fpscr_set_from_mem): New functions.
* sh.md (movdf, movsf): Remove no_new_pseudos code.
(return): Remove emit_fpscr_use / remove_dead_before_cse calls.
Co-Authored-By: Andrew MacLeod <amacleod@cygnus.com>
From-SVN: r31990
2000-02-15 23:34:33 +01:00
|
|
|
Define this macro if the port needs extra instructions inserted for mode
|
|
|
|
switching in an optimizing compilation.
|
|
|
|
|
|
|
|
For an example, the SH4 can perform both single and double precision
|
|
|
|
floating point operations, but to perform a single precision operation,
|
|
|
|
the FPSCR PR bit has to be cleared, while for a double precision
|
|
|
|
operation, this bit has to be set. Changing the PR bit requires a general
|
|
|
|
purpose register as a scratch register, hence these FPSCR sets have to
|
2001-06-27 02:04:39 +02:00
|
|
|
be inserted before reload, i.e.@: you can't put this into instruction emitting
|
2003-05-14 09:29:54 +02:00
|
|
|
or @code{TARGET_MACHINE_DEPENDENT_REORG}.
|
Makefile.in (lcm.o): Depend on insn-attr.h.
* Makefile.in (lcm.o): Depend on insn-attr.h.
* basic-block.h (optimize_mode_switching): Declare.
* lcm.c (tm_p.h, insn-attr.h): #include.
(seginfo, bb_info): New structs.
(antic, transp, comp, delete, insert) : New file-scope static variables.
(new_seginfo, add_seginfo, make_preds_opaque, reg_dies): New functions.
(reg_becomes_live, optimize_mode_switching): Likewise.
* tm.texi: Add description of mode switching macros.
* toplev.c (rest_of_compilation): Call optimize_mode_switching.
* sh-protos.h (remove_dead_before_cse): Remove prototype.
(fldi_ok, fpscr_set_from_mem): New prototypes.
* sh.h (OPTIMIZATION_OPTION): Remove sh_flag_remove_dead_before_cse set.
(CONST_DOUBLE_OK_FOR_LETTER_P, SECONDARY_INPUT_RELOAD_CLASS):
Disable fldi for (TARGET_SH4 && ! TARGET_FMOVD).
(sh_flag_remove_dead_before_cse): Remove declaration.
(NUM_MODES_FOR_MODE_SWITCHING, OPTIMIZE_MODE_SWITCHING): New macros.
(MODE_USES_IN_EXIT_BLOCK, MODE_NEEDED, MODE_AT_ENTRY): Likewise.
(MODE_PRIORITY_TO_MODE, EMIT_MODE_SET): Likewise.
* sh.c (broken_move): Disable fldi for (TARGET_SH4 && ! TARGET_FMOVD).
(barrier_align): Allow for JUMP_INSNS containing a parallel.
(machine_dependent_reorg): Remove sh_flag_remove_dead_before_cse set.
(fldi_ok): New function.
(get_fpscr_rtx): Add fpscr_rtx as GC root.
(emit_sf_insn): Only generate fpu switches when optimize < 1.
(emit_df_insn): Likewise.
(expand_fp_branch, emit_fpscr_use, remove_dead_before_cse): Delete.
(sh_flag_remove_dead_before_cse): Delete.
(get_free_reg, fpscr_set_from_mem): New functions.
* sh.md (movdf, movsf): Remove no_new_pseudos code.
(return): Remove emit_fpscr_use / remove_dead_before_cse calls.
Co-Authored-By: Andrew MacLeod <amacleod@cygnus.com>
From-SVN: r31990
2000-02-15 23:34:33 +01:00
|
|
|
|
|
|
|
You can have multiple entities that are mode-switched, and select at run time
|
|
|
|
which entities actually need it. @code{OPTIMIZE_MODE_SWITCHING} should
|
2001-10-17 10:44:09 +02:00
|
|
|
return nonzero for any @var{entity} that needs mode-switching.
|
Makefile.in (lcm.o): Depend on insn-attr.h.
* Makefile.in (lcm.o): Depend on insn-attr.h.
* basic-block.h (optimize_mode_switching): Declare.
* lcm.c (tm_p.h, insn-attr.h): #include.
(seginfo, bb_info): New structs.
(antic, transp, comp, delete, insert) : New file-scope static variables.
(new_seginfo, add_seginfo, make_preds_opaque, reg_dies): New functions.
(reg_becomes_live, optimize_mode_switching): Likewise.
* tm.texi: Add description of mode switching macros.
* toplev.c (rest_of_compilation): Call optimize_mode_switching.
* sh-protos.h (remove_dead_before_cse): Remove prototype.
(fldi_ok, fpscr_set_from_mem): New prototypes.
* sh.h (OPTIMIZATION_OPTION): Remove sh_flag_remove_dead_before_cse set.
(CONST_DOUBLE_OK_FOR_LETTER_P, SECONDARY_INPUT_RELOAD_CLASS):
Disable fldi for (TARGET_SH4 && ! TARGET_FMOVD).
(sh_flag_remove_dead_before_cse): Remove declaration.
(NUM_MODES_FOR_MODE_SWITCHING, OPTIMIZE_MODE_SWITCHING): New macros.
(MODE_USES_IN_EXIT_BLOCK, MODE_NEEDED, MODE_AT_ENTRY): Likewise.
(MODE_PRIORITY_TO_MODE, EMIT_MODE_SET): Likewise.
* sh.c (broken_move): Disable fldi for (TARGET_SH4 && ! TARGET_FMOVD).
(barrier_align): Allow for JUMP_INSNS containing a parallel.
(machine_dependent_reorg): Remove sh_flag_remove_dead_before_cse set.
(fldi_ok): New function.
(get_fpscr_rtx): Add fpscr_rtx as GC root.
(emit_sf_insn): Only generate fpu switches when optimize < 1.
(emit_df_insn): Likewise.
(expand_fp_branch, emit_fpscr_use, remove_dead_before_cse): Delete.
(sh_flag_remove_dead_before_cse): Delete.
(get_free_reg, fpscr_set_from_mem): New functions.
* sh.md (movdf, movsf): Remove no_new_pseudos code.
(return): Remove emit_fpscr_use / remove_dead_before_cse calls.
Co-Authored-By: Andrew MacLeod <amacleod@cygnus.com>
From-SVN: r31990
2000-02-15 23:34:33 +01:00
|
|
|
If you define this macro, you also have to define
|
|
|
|
@code{NUM_MODES_FOR_MODE_SWITCHING}, @code{MODE_NEEDED},
|
|
|
|
@code{MODE_PRIORITY_TO_MODE} and @code{EMIT_MODE_SET}.
|
2003-10-10 23:28:56 +02:00
|
|
|
@code{MODE_AFTER}, @code{MODE_ENTRY}, and @code{MODE_EXIT}
|
|
|
|
are optional.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
Makefile.in (lcm.o): Depend on insn-attr.h.
* Makefile.in (lcm.o): Depend on insn-attr.h.
* basic-block.h (optimize_mode_switching): Declare.
* lcm.c (tm_p.h, insn-attr.h): #include.
(seginfo, bb_info): New structs.
(antic, transp, comp, delete, insert) : New file-scope static variables.
(new_seginfo, add_seginfo, make_preds_opaque, reg_dies): New functions.
(reg_becomes_live, optimize_mode_switching): Likewise.
* tm.texi: Add description of mode switching macros.
* toplev.c (rest_of_compilation): Call optimize_mode_switching.
* sh-protos.h (remove_dead_before_cse): Remove prototype.
(fldi_ok, fpscr_set_from_mem): New prototypes.
* sh.h (OPTIMIZATION_OPTION): Remove sh_flag_remove_dead_before_cse set.
(CONST_DOUBLE_OK_FOR_LETTER_P, SECONDARY_INPUT_RELOAD_CLASS):
Disable fldi for (TARGET_SH4 && ! TARGET_FMOVD).
(sh_flag_remove_dead_before_cse): Remove declaration.
(NUM_MODES_FOR_MODE_SWITCHING, OPTIMIZE_MODE_SWITCHING): New macros.
(MODE_USES_IN_EXIT_BLOCK, MODE_NEEDED, MODE_AT_ENTRY): Likewise.
(MODE_PRIORITY_TO_MODE, EMIT_MODE_SET): Likewise.
* sh.c (broken_move): Disable fldi for (TARGET_SH4 && ! TARGET_FMOVD).
(barrier_align): Allow for JUMP_INSNS containing a parallel.
(machine_dependent_reorg): Remove sh_flag_remove_dead_before_cse set.
(fldi_ok): New function.
(get_fpscr_rtx): Add fpscr_rtx as GC root.
(emit_sf_insn): Only generate fpu switches when optimize < 1.
(emit_df_insn): Likewise.
(expand_fp_branch, emit_fpscr_use, remove_dead_before_cse): Delete.
(sh_flag_remove_dead_before_cse): Delete.
(get_free_reg, fpscr_set_from_mem): New functions.
* sh.md (movdf, movsf): Remove no_new_pseudos code.
(return): Remove emit_fpscr_use / remove_dead_before_cse calls.
Co-Authored-By: Andrew MacLeod <amacleod@cygnus.com>
From-SVN: r31990
2000-02-15 23:34:33 +01:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac NUM_MODES_FOR_MODE_SWITCHING
|
Makefile.in (lcm.o): Depend on insn-attr.h.
* Makefile.in (lcm.o): Depend on insn-attr.h.
* basic-block.h (optimize_mode_switching): Declare.
* lcm.c (tm_p.h, insn-attr.h): #include.
(seginfo, bb_info): New structs.
(antic, transp, comp, delete, insert) : New file-scope static variables.
(new_seginfo, add_seginfo, make_preds_opaque, reg_dies): New functions.
(reg_becomes_live, optimize_mode_switching): Likewise.
* tm.texi: Add description of mode switching macros.
* toplev.c (rest_of_compilation): Call optimize_mode_switching.
* sh-protos.h (remove_dead_before_cse): Remove prototype.
(fldi_ok, fpscr_set_from_mem): New prototypes.
* sh.h (OPTIMIZATION_OPTION): Remove sh_flag_remove_dead_before_cse set.
(CONST_DOUBLE_OK_FOR_LETTER_P, SECONDARY_INPUT_RELOAD_CLASS):
Disable fldi for (TARGET_SH4 && ! TARGET_FMOVD).
(sh_flag_remove_dead_before_cse): Remove declaration.
(NUM_MODES_FOR_MODE_SWITCHING, OPTIMIZE_MODE_SWITCHING): New macros.
(MODE_USES_IN_EXIT_BLOCK, MODE_NEEDED, MODE_AT_ENTRY): Likewise.
(MODE_PRIORITY_TO_MODE, EMIT_MODE_SET): Likewise.
* sh.c (broken_move): Disable fldi for (TARGET_SH4 && ! TARGET_FMOVD).
(barrier_align): Allow for JUMP_INSNS containing a parallel.
(machine_dependent_reorg): Remove sh_flag_remove_dead_before_cse set.
(fldi_ok): New function.
(get_fpscr_rtx): Add fpscr_rtx as GC root.
(emit_sf_insn): Only generate fpu switches when optimize < 1.
(emit_df_insn): Likewise.
(expand_fp_branch, emit_fpscr_use, remove_dead_before_cse): Delete.
(sh_flag_remove_dead_before_cse): Delete.
(get_free_reg, fpscr_set_from_mem): New functions.
* sh.md (movdf, movsf): Remove no_new_pseudos code.
(return): Remove emit_fpscr_use / remove_dead_before_cse calls.
Co-Authored-By: Andrew MacLeod <amacleod@cygnus.com>
From-SVN: r31990
2000-02-15 23:34:33 +01:00
|
|
|
If you define @code{OPTIMIZE_MODE_SWITCHING}, you have to define this as
|
|
|
|
initializer for an array of integers. Each initializer element
|
|
|
|
N refers to an entity that needs mode switching, and specifies the number
|
|
|
|
of different modes that might need to be set for this entity.
|
contrib.texi, [...]: Improve Texinfo formatting.
* doc/contrib.texi, doc/cpp.texi, doc/cppopts.texi,
doc/extend.texi, doc/gcov.texi, doc/install.texi, doc/invoke.texi,
doc/libgcc.texi, doc/md.texi, doc/passes.texi,
doc/sourcebuild.texi, doc/tm.texi: Improve Texinfo formatting.
From-SVN: r89725
2004-10-28 03:00:31 +02:00
|
|
|
The position of the initializer in the initializer---starting counting at
|
|
|
|
zero---determines the integer that is used to refer to the mode-switched
|
Makefile.in (lcm.o): Depend on insn-attr.h.
* Makefile.in (lcm.o): Depend on insn-attr.h.
* basic-block.h (optimize_mode_switching): Declare.
* lcm.c (tm_p.h, insn-attr.h): #include.
(seginfo, bb_info): New structs.
(antic, transp, comp, delete, insert) : New file-scope static variables.
(new_seginfo, add_seginfo, make_preds_opaque, reg_dies): New functions.
(reg_becomes_live, optimize_mode_switching): Likewise.
* tm.texi: Add description of mode switching macros.
* toplev.c (rest_of_compilation): Call optimize_mode_switching.
* sh-protos.h (remove_dead_before_cse): Remove prototype.
(fldi_ok, fpscr_set_from_mem): New prototypes.
* sh.h (OPTIMIZATION_OPTION): Remove sh_flag_remove_dead_before_cse set.
(CONST_DOUBLE_OK_FOR_LETTER_P, SECONDARY_INPUT_RELOAD_CLASS):
Disable fldi for (TARGET_SH4 && ! TARGET_FMOVD).
(sh_flag_remove_dead_before_cse): Remove declaration.
(NUM_MODES_FOR_MODE_SWITCHING, OPTIMIZE_MODE_SWITCHING): New macros.
(MODE_USES_IN_EXIT_BLOCK, MODE_NEEDED, MODE_AT_ENTRY): Likewise.
(MODE_PRIORITY_TO_MODE, EMIT_MODE_SET): Likewise.
* sh.c (broken_move): Disable fldi for (TARGET_SH4 && ! TARGET_FMOVD).
(barrier_align): Allow for JUMP_INSNS containing a parallel.
(machine_dependent_reorg): Remove sh_flag_remove_dead_before_cse set.
(fldi_ok): New function.
(get_fpscr_rtx): Add fpscr_rtx as GC root.
(emit_sf_insn): Only generate fpu switches when optimize < 1.
(emit_df_insn): Likewise.
(expand_fp_branch, emit_fpscr_use, remove_dead_before_cse): Delete.
(sh_flag_remove_dead_before_cse): Delete.
(get_free_reg, fpscr_set_from_mem): New functions.
* sh.md (movdf, movsf): Remove no_new_pseudos code.
(return): Remove emit_fpscr_use / remove_dead_before_cse calls.
Co-Authored-By: Andrew MacLeod <amacleod@cygnus.com>
From-SVN: r31990
2000-02-15 23:34:33 +01:00
|
|
|
entity in question.
|
|
|
|
In macros that take mode arguments / yield a mode result, modes are
|
c-tree.texi, [...]: Use more logical markup.
* doc/c-tree.texi, doc/contrib.texi, doc/extend.texi,
doc/gcc.texi, doc/gcov.texi, doc/install-old.texi,
doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: Use more
logical markup. Use TeX quotes and dashes. Use @dots{} and
@minus{}. Avoid spaces inside @var. Update last modification
date in gcc.texi.
* doc/gcc.1, doc/gcov.1: Regenerate.
From-SVN: r43369
2001-06-14 13:08:04 +02:00
|
|
|
represented as numbers 0 @dots{} N @minus{} 1. N is used to specify that no mode
|
Makefile.in (lcm.o): Depend on insn-attr.h.
* Makefile.in (lcm.o): Depend on insn-attr.h.
* basic-block.h (optimize_mode_switching): Declare.
* lcm.c (tm_p.h, insn-attr.h): #include.
(seginfo, bb_info): New structs.
(antic, transp, comp, delete, insert) : New file-scope static variables.
(new_seginfo, add_seginfo, make_preds_opaque, reg_dies): New functions.
(reg_becomes_live, optimize_mode_switching): Likewise.
* tm.texi: Add description of mode switching macros.
* toplev.c (rest_of_compilation): Call optimize_mode_switching.
* sh-protos.h (remove_dead_before_cse): Remove prototype.
(fldi_ok, fpscr_set_from_mem): New prototypes.
* sh.h (OPTIMIZATION_OPTION): Remove sh_flag_remove_dead_before_cse set.
(CONST_DOUBLE_OK_FOR_LETTER_P, SECONDARY_INPUT_RELOAD_CLASS):
Disable fldi for (TARGET_SH4 && ! TARGET_FMOVD).
(sh_flag_remove_dead_before_cse): Remove declaration.
(NUM_MODES_FOR_MODE_SWITCHING, OPTIMIZE_MODE_SWITCHING): New macros.
(MODE_USES_IN_EXIT_BLOCK, MODE_NEEDED, MODE_AT_ENTRY): Likewise.
(MODE_PRIORITY_TO_MODE, EMIT_MODE_SET): Likewise.
* sh.c (broken_move): Disable fldi for (TARGET_SH4 && ! TARGET_FMOVD).
(barrier_align): Allow for JUMP_INSNS containing a parallel.
(machine_dependent_reorg): Remove sh_flag_remove_dead_before_cse set.
(fldi_ok): New function.
(get_fpscr_rtx): Add fpscr_rtx as GC root.
(emit_sf_insn): Only generate fpu switches when optimize < 1.
(emit_df_insn): Likewise.
(expand_fp_branch, emit_fpscr_use, remove_dead_before_cse): Delete.
(sh_flag_remove_dead_before_cse): Delete.
(get_free_reg, fpscr_set_from_mem): New functions.
* sh.md (movdf, movsf): Remove no_new_pseudos code.
(return): Remove emit_fpscr_use / remove_dead_before_cse calls.
Co-Authored-By: Andrew MacLeod <amacleod@cygnus.com>
From-SVN: r31990
2000-02-15 23:34:33 +01:00
|
|
|
switch is needed / supplied.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
Makefile.in (lcm.o): Depend on insn-attr.h.
* Makefile.in (lcm.o): Depend on insn-attr.h.
* basic-block.h (optimize_mode_switching): Declare.
* lcm.c (tm_p.h, insn-attr.h): #include.
(seginfo, bb_info): New structs.
(antic, transp, comp, delete, insert) : New file-scope static variables.
(new_seginfo, add_seginfo, make_preds_opaque, reg_dies): New functions.
(reg_becomes_live, optimize_mode_switching): Likewise.
* tm.texi: Add description of mode switching macros.
* toplev.c (rest_of_compilation): Call optimize_mode_switching.
* sh-protos.h (remove_dead_before_cse): Remove prototype.
(fldi_ok, fpscr_set_from_mem): New prototypes.
* sh.h (OPTIMIZATION_OPTION): Remove sh_flag_remove_dead_before_cse set.
(CONST_DOUBLE_OK_FOR_LETTER_P, SECONDARY_INPUT_RELOAD_CLASS):
Disable fldi for (TARGET_SH4 && ! TARGET_FMOVD).
(sh_flag_remove_dead_before_cse): Remove declaration.
(NUM_MODES_FOR_MODE_SWITCHING, OPTIMIZE_MODE_SWITCHING): New macros.
(MODE_USES_IN_EXIT_BLOCK, MODE_NEEDED, MODE_AT_ENTRY): Likewise.
(MODE_PRIORITY_TO_MODE, EMIT_MODE_SET): Likewise.
* sh.c (broken_move): Disable fldi for (TARGET_SH4 && ! TARGET_FMOVD).
(barrier_align): Allow for JUMP_INSNS containing a parallel.
(machine_dependent_reorg): Remove sh_flag_remove_dead_before_cse set.
(fldi_ok): New function.
(get_fpscr_rtx): Add fpscr_rtx as GC root.
(emit_sf_insn): Only generate fpu switches when optimize < 1.
(emit_df_insn): Likewise.
(expand_fp_branch, emit_fpscr_use, remove_dead_before_cse): Delete.
(sh_flag_remove_dead_before_cse): Delete.
(get_free_reg, fpscr_set_from_mem): New functions.
* sh.md (movdf, movsf): Remove no_new_pseudos code.
(return): Remove emit_fpscr_use / remove_dead_before_cse calls.
Co-Authored-By: Andrew MacLeod <amacleod@cygnus.com>
From-SVN: r31990
2000-02-15 23:34:33 +01:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac MODE_NEEDED (@var{entity}, @var{insn})
|
Makefile.in (lcm.o): Depend on insn-attr.h.
* Makefile.in (lcm.o): Depend on insn-attr.h.
* basic-block.h (optimize_mode_switching): Declare.
* lcm.c (tm_p.h, insn-attr.h): #include.
(seginfo, bb_info): New structs.
(antic, transp, comp, delete, insert) : New file-scope static variables.
(new_seginfo, add_seginfo, make_preds_opaque, reg_dies): New functions.
(reg_becomes_live, optimize_mode_switching): Likewise.
* tm.texi: Add description of mode switching macros.
* toplev.c (rest_of_compilation): Call optimize_mode_switching.
* sh-protos.h (remove_dead_before_cse): Remove prototype.
(fldi_ok, fpscr_set_from_mem): New prototypes.
* sh.h (OPTIMIZATION_OPTION): Remove sh_flag_remove_dead_before_cse set.
(CONST_DOUBLE_OK_FOR_LETTER_P, SECONDARY_INPUT_RELOAD_CLASS):
Disable fldi for (TARGET_SH4 && ! TARGET_FMOVD).
(sh_flag_remove_dead_before_cse): Remove declaration.
(NUM_MODES_FOR_MODE_SWITCHING, OPTIMIZE_MODE_SWITCHING): New macros.
(MODE_USES_IN_EXIT_BLOCK, MODE_NEEDED, MODE_AT_ENTRY): Likewise.
(MODE_PRIORITY_TO_MODE, EMIT_MODE_SET): Likewise.
* sh.c (broken_move): Disable fldi for (TARGET_SH4 && ! TARGET_FMOVD).
(barrier_align): Allow for JUMP_INSNS containing a parallel.
(machine_dependent_reorg): Remove sh_flag_remove_dead_before_cse set.
(fldi_ok): New function.
(get_fpscr_rtx): Add fpscr_rtx as GC root.
(emit_sf_insn): Only generate fpu switches when optimize < 1.
(emit_df_insn): Likewise.
(expand_fp_branch, emit_fpscr_use, remove_dead_before_cse): Delete.
(sh_flag_remove_dead_before_cse): Delete.
(get_free_reg, fpscr_set_from_mem): New functions.
* sh.md (movdf, movsf): Remove no_new_pseudos code.
(return): Remove emit_fpscr_use / remove_dead_before_cse calls.
Co-Authored-By: Andrew MacLeod <amacleod@cygnus.com>
From-SVN: r31990
2000-02-15 23:34:33 +01:00
|
|
|
@var{entity} is an integer specifying a mode-switched entity. If
|
|
|
|
@code{OPTIMIZE_MODE_SWITCHING} is defined, you must define this macro to
|
|
|
|
return an integer value not larger than the corresponding element in
|
2001-07-03 02:46:05 +02:00
|
|
|
@code{NUM_MODES_FOR_MODE_SWITCHING}, to denote the mode that @var{entity} must
|
|
|
|
be switched into prior to the execution of @var{insn}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
Makefile.in (lcm.o): Depend on insn-attr.h.
* Makefile.in (lcm.o): Depend on insn-attr.h.
* basic-block.h (optimize_mode_switching): Declare.
* lcm.c (tm_p.h, insn-attr.h): #include.
(seginfo, bb_info): New structs.
(antic, transp, comp, delete, insert) : New file-scope static variables.
(new_seginfo, add_seginfo, make_preds_opaque, reg_dies): New functions.
(reg_becomes_live, optimize_mode_switching): Likewise.
* tm.texi: Add description of mode switching macros.
* toplev.c (rest_of_compilation): Call optimize_mode_switching.
* sh-protos.h (remove_dead_before_cse): Remove prototype.
(fldi_ok, fpscr_set_from_mem): New prototypes.
* sh.h (OPTIMIZATION_OPTION): Remove sh_flag_remove_dead_before_cse set.
(CONST_DOUBLE_OK_FOR_LETTER_P, SECONDARY_INPUT_RELOAD_CLASS):
Disable fldi for (TARGET_SH4 && ! TARGET_FMOVD).
(sh_flag_remove_dead_before_cse): Remove declaration.
(NUM_MODES_FOR_MODE_SWITCHING, OPTIMIZE_MODE_SWITCHING): New macros.
(MODE_USES_IN_EXIT_BLOCK, MODE_NEEDED, MODE_AT_ENTRY): Likewise.
(MODE_PRIORITY_TO_MODE, EMIT_MODE_SET): Likewise.
* sh.c (broken_move): Disable fldi for (TARGET_SH4 && ! TARGET_FMOVD).
(barrier_align): Allow for JUMP_INSNS containing a parallel.
(machine_dependent_reorg): Remove sh_flag_remove_dead_before_cse set.
(fldi_ok): New function.
(get_fpscr_rtx): Add fpscr_rtx as GC root.
(emit_sf_insn): Only generate fpu switches when optimize < 1.
(emit_df_insn): Likewise.
(expand_fp_branch, emit_fpscr_use, remove_dead_before_cse): Delete.
(sh_flag_remove_dead_before_cse): Delete.
(get_free_reg, fpscr_set_from_mem): New functions.
* sh.md (movdf, movsf): Remove no_new_pseudos code.
(return): Remove emit_fpscr_use / remove_dead_before_cse calls.
Co-Authored-By: Andrew MacLeod <amacleod@cygnus.com>
From-SVN: r31990
2000-02-15 23:34:33 +01:00
|
|
|
|
2003-10-10 23:28:56 +02:00
|
|
|
@defmac MODE_AFTER (@var{mode}, @var{insn})
|
|
|
|
If this macro is defined, it is evaluated for every @var{insn} during
|
c-tree.texi, [...]: Correct end-of-sentence markup and markup of "etc.", "e.g." and "i.e.".
* doc/c-tree.texi, doc/cfg.texi, doc/contrib.texi, doc/cpp.texi,
doc/cppopts.texi, doc/extend.texi, doc/fragments.texi,
doc/frontends.texi, doc/gcov.texi, doc/hostconfig.texi,
doc/implement-c.texi, doc/install.texi, doc/invoke.texi,
doc/libgcc.texi, doc/md.texi, doc/passes.texi,
doc/portability.texi, doc/rtl.texi, doc/sourcebuild.texi,
doc/standards.texi, doc/tm.texi, doc/tree-ssa.texi,
doc/trouble.texi: Correct end-of-sentence markup and markup of
"etc.", "e.g." and "i.e.". Use @code in various places where
appropriate.
From-SVN: r90101
2004-11-05 02:36:57 +01:00
|
|
|
mode switching. It determines the mode that an insn results in (if
|
2003-10-10 23:28:56 +02:00
|
|
|
different from the incoming mode).
|
|
|
|
@end defmac
|
|
|
|
|
|
|
|
@defmac MODE_ENTRY (@var{entity})
|
|
|
|
If this macro is defined, it is evaluated for every @var{entity} that needs
|
c-tree.texi, [...]: Correct end-of-sentence markup and markup of "etc.", "e.g." and "i.e.".
* doc/c-tree.texi, doc/cfg.texi, doc/contrib.texi, doc/cpp.texi,
doc/cppopts.texi, doc/extend.texi, doc/fragments.texi,
doc/frontends.texi, doc/gcov.texi, doc/hostconfig.texi,
doc/implement-c.texi, doc/install.texi, doc/invoke.texi,
doc/libgcc.texi, doc/md.texi, doc/passes.texi,
doc/portability.texi, doc/rtl.texi, doc/sourcebuild.texi,
doc/standards.texi, doc/tm.texi, doc/tree-ssa.texi,
doc/trouble.texi: Correct end-of-sentence markup and markup of
"etc.", "e.g." and "i.e.". Use @code in various places where
appropriate.
From-SVN: r90101
2004-11-05 02:36:57 +01:00
|
|
|
mode switching. It should evaluate to an integer, which is a mode that
|
|
|
|
@var{entity} is assumed to be switched to at function entry. If @code{MODE_ENTRY}
|
2003-10-10 23:28:56 +02:00
|
|
|
is defined then @code{MODE_EXIT} must be defined.
|
|
|
|
@end defmac
|
|
|
|
|
|
|
|
@defmac MODE_EXIT (@var{entity})
|
Makefile.in (lcm.o): Depend on insn-attr.h.
* Makefile.in (lcm.o): Depend on insn-attr.h.
* basic-block.h (optimize_mode_switching): Declare.
* lcm.c (tm_p.h, insn-attr.h): #include.
(seginfo, bb_info): New structs.
(antic, transp, comp, delete, insert) : New file-scope static variables.
(new_seginfo, add_seginfo, make_preds_opaque, reg_dies): New functions.
(reg_becomes_live, optimize_mode_switching): Likewise.
* tm.texi: Add description of mode switching macros.
* toplev.c (rest_of_compilation): Call optimize_mode_switching.
* sh-protos.h (remove_dead_before_cse): Remove prototype.
(fldi_ok, fpscr_set_from_mem): New prototypes.
* sh.h (OPTIMIZATION_OPTION): Remove sh_flag_remove_dead_before_cse set.
(CONST_DOUBLE_OK_FOR_LETTER_P, SECONDARY_INPUT_RELOAD_CLASS):
Disable fldi for (TARGET_SH4 && ! TARGET_FMOVD).
(sh_flag_remove_dead_before_cse): Remove declaration.
(NUM_MODES_FOR_MODE_SWITCHING, OPTIMIZE_MODE_SWITCHING): New macros.
(MODE_USES_IN_EXIT_BLOCK, MODE_NEEDED, MODE_AT_ENTRY): Likewise.
(MODE_PRIORITY_TO_MODE, EMIT_MODE_SET): Likewise.
* sh.c (broken_move): Disable fldi for (TARGET_SH4 && ! TARGET_FMOVD).
(barrier_align): Allow for JUMP_INSNS containing a parallel.
(machine_dependent_reorg): Remove sh_flag_remove_dead_before_cse set.
(fldi_ok): New function.
(get_fpscr_rtx): Add fpscr_rtx as GC root.
(emit_sf_insn): Only generate fpu switches when optimize < 1.
(emit_df_insn): Likewise.
(expand_fp_branch, emit_fpscr_use, remove_dead_before_cse): Delete.
(sh_flag_remove_dead_before_cse): Delete.
(get_free_reg, fpscr_set_from_mem): New functions.
* sh.md (movdf, movsf): Remove no_new_pseudos code.
(return): Remove emit_fpscr_use / remove_dead_before_cse calls.
Co-Authored-By: Andrew MacLeod <amacleod@cygnus.com>
From-SVN: r31990
2000-02-15 23:34:33 +01:00
|
|
|
If this macro is defined, it is evaluated for every @var{entity} that needs
|
c-tree.texi, [...]: Correct end-of-sentence markup and markup of "etc.", "e.g." and "i.e.".
* doc/c-tree.texi, doc/cfg.texi, doc/contrib.texi, doc/cpp.texi,
doc/cppopts.texi, doc/extend.texi, doc/fragments.texi,
doc/frontends.texi, doc/gcov.texi, doc/hostconfig.texi,
doc/implement-c.texi, doc/install.texi, doc/invoke.texi,
doc/libgcc.texi, doc/md.texi, doc/passes.texi,
doc/portability.texi, doc/rtl.texi, doc/sourcebuild.texi,
doc/standards.texi, doc/tm.texi, doc/tree-ssa.texi,
doc/trouble.texi: Correct end-of-sentence markup and markup of
"etc.", "e.g." and "i.e.". Use @code in various places where
appropriate.
From-SVN: r90101
2004-11-05 02:36:57 +01:00
|
|
|
mode switching. It should evaluate to an integer, which is a mode that
|
|
|
|
@var{entity} is assumed to be switched to at function exit. If @code{MODE_EXIT}
|
2003-10-10 23:28:56 +02:00
|
|
|
is defined then @code{MODE_ENTRY} must be defined.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
Makefile.in (lcm.o): Depend on insn-attr.h.
* Makefile.in (lcm.o): Depend on insn-attr.h.
* basic-block.h (optimize_mode_switching): Declare.
* lcm.c (tm_p.h, insn-attr.h): #include.
(seginfo, bb_info): New structs.
(antic, transp, comp, delete, insert) : New file-scope static variables.
(new_seginfo, add_seginfo, make_preds_opaque, reg_dies): New functions.
(reg_becomes_live, optimize_mode_switching): Likewise.
* tm.texi: Add description of mode switching macros.
* toplev.c (rest_of_compilation): Call optimize_mode_switching.
* sh-protos.h (remove_dead_before_cse): Remove prototype.
(fldi_ok, fpscr_set_from_mem): New prototypes.
* sh.h (OPTIMIZATION_OPTION): Remove sh_flag_remove_dead_before_cse set.
(CONST_DOUBLE_OK_FOR_LETTER_P, SECONDARY_INPUT_RELOAD_CLASS):
Disable fldi for (TARGET_SH4 && ! TARGET_FMOVD).
(sh_flag_remove_dead_before_cse): Remove declaration.
(NUM_MODES_FOR_MODE_SWITCHING, OPTIMIZE_MODE_SWITCHING): New macros.
(MODE_USES_IN_EXIT_BLOCK, MODE_NEEDED, MODE_AT_ENTRY): Likewise.
(MODE_PRIORITY_TO_MODE, EMIT_MODE_SET): Likewise.
* sh.c (broken_move): Disable fldi for (TARGET_SH4 && ! TARGET_FMOVD).
(barrier_align): Allow for JUMP_INSNS containing a parallel.
(machine_dependent_reorg): Remove sh_flag_remove_dead_before_cse set.
(fldi_ok): New function.
(get_fpscr_rtx): Add fpscr_rtx as GC root.
(emit_sf_insn): Only generate fpu switches when optimize < 1.
(emit_df_insn): Likewise.
(expand_fp_branch, emit_fpscr_use, remove_dead_before_cse): Delete.
(sh_flag_remove_dead_before_cse): Delete.
(get_free_reg, fpscr_set_from_mem): New functions.
* sh.md (movdf, movsf): Remove no_new_pseudos code.
(return): Remove emit_fpscr_use / remove_dead_before_cse calls.
Co-Authored-By: Andrew MacLeod <amacleod@cygnus.com>
From-SVN: r31990
2000-02-15 23:34:33 +01:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac MODE_PRIORITY_TO_MODE (@var{entity}, @var{n})
|
2001-07-03 02:46:05 +02:00
|
|
|
This macro specifies the order in which modes for @var{entity} are processed.
|
|
|
|
0 is the highest priority, @code{NUM_MODES_FOR_MODE_SWITCHING[@var{entity}] - 1} the
|
Makefile.in (lcm.o): Depend on insn-attr.h.
* Makefile.in (lcm.o): Depend on insn-attr.h.
* basic-block.h (optimize_mode_switching): Declare.
* lcm.c (tm_p.h, insn-attr.h): #include.
(seginfo, bb_info): New structs.
(antic, transp, comp, delete, insert) : New file-scope static variables.
(new_seginfo, add_seginfo, make_preds_opaque, reg_dies): New functions.
(reg_becomes_live, optimize_mode_switching): Likewise.
* tm.texi: Add description of mode switching macros.
* toplev.c (rest_of_compilation): Call optimize_mode_switching.
* sh-protos.h (remove_dead_before_cse): Remove prototype.
(fldi_ok, fpscr_set_from_mem): New prototypes.
* sh.h (OPTIMIZATION_OPTION): Remove sh_flag_remove_dead_before_cse set.
(CONST_DOUBLE_OK_FOR_LETTER_P, SECONDARY_INPUT_RELOAD_CLASS):
Disable fldi for (TARGET_SH4 && ! TARGET_FMOVD).
(sh_flag_remove_dead_before_cse): Remove declaration.
(NUM_MODES_FOR_MODE_SWITCHING, OPTIMIZE_MODE_SWITCHING): New macros.
(MODE_USES_IN_EXIT_BLOCK, MODE_NEEDED, MODE_AT_ENTRY): Likewise.
(MODE_PRIORITY_TO_MODE, EMIT_MODE_SET): Likewise.
* sh.c (broken_move): Disable fldi for (TARGET_SH4 && ! TARGET_FMOVD).
(barrier_align): Allow for JUMP_INSNS containing a parallel.
(machine_dependent_reorg): Remove sh_flag_remove_dead_before_cse set.
(fldi_ok): New function.
(get_fpscr_rtx): Add fpscr_rtx as GC root.
(emit_sf_insn): Only generate fpu switches when optimize < 1.
(emit_df_insn): Likewise.
(expand_fp_branch, emit_fpscr_use, remove_dead_before_cse): Delete.
(sh_flag_remove_dead_before_cse): Delete.
(get_free_reg, fpscr_set_from_mem): New functions.
* sh.md (movdf, movsf): Remove no_new_pseudos code.
(return): Remove emit_fpscr_use / remove_dead_before_cse calls.
Co-Authored-By: Andrew MacLeod <amacleod@cygnus.com>
From-SVN: r31990
2000-02-15 23:34:33 +01:00
|
|
|
lowest. The value of the macro should be an integer designating a mode
|
2001-07-03 02:46:05 +02:00
|
|
|
for @var{entity}. For any fixed @var{entity}, @code{mode_priority_to_mode}
|
c-tree.texi, [...]: Use more logical markup.
* doc/c-tree.texi, doc/contrib.texi, doc/extend.texi,
doc/gcc.texi, doc/gcov.texi, doc/install-old.texi,
doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: Use more
logical markup. Use TeX quotes and dashes. Use @dots{} and
@minus{}. Avoid spaces inside @var. Update last modification
date in gcc.texi.
* doc/gcc.1, doc/gcov.1: Regenerate.
From-SVN: r43369
2001-06-14 13:08:04 +02:00
|
|
|
(@var{entity}, @var{n}) shall be a bijection in 0 @dots{}
|
2001-07-03 02:46:05 +02:00
|
|
|
@code{num_modes_for_mode_switching[@var{entity}] - 1}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
Makefile.in (lcm.o): Depend on insn-attr.h.
* Makefile.in (lcm.o): Depend on insn-attr.h.
* basic-block.h (optimize_mode_switching): Declare.
* lcm.c (tm_p.h, insn-attr.h): #include.
(seginfo, bb_info): New structs.
(antic, transp, comp, delete, insert) : New file-scope static variables.
(new_seginfo, add_seginfo, make_preds_opaque, reg_dies): New functions.
(reg_becomes_live, optimize_mode_switching): Likewise.
* tm.texi: Add description of mode switching macros.
* toplev.c (rest_of_compilation): Call optimize_mode_switching.
* sh-protos.h (remove_dead_before_cse): Remove prototype.
(fldi_ok, fpscr_set_from_mem): New prototypes.
* sh.h (OPTIMIZATION_OPTION): Remove sh_flag_remove_dead_before_cse set.
(CONST_DOUBLE_OK_FOR_LETTER_P, SECONDARY_INPUT_RELOAD_CLASS):
Disable fldi for (TARGET_SH4 && ! TARGET_FMOVD).
(sh_flag_remove_dead_before_cse): Remove declaration.
(NUM_MODES_FOR_MODE_SWITCHING, OPTIMIZE_MODE_SWITCHING): New macros.
(MODE_USES_IN_EXIT_BLOCK, MODE_NEEDED, MODE_AT_ENTRY): Likewise.
(MODE_PRIORITY_TO_MODE, EMIT_MODE_SET): Likewise.
* sh.c (broken_move): Disable fldi for (TARGET_SH4 && ! TARGET_FMOVD).
(barrier_align): Allow for JUMP_INSNS containing a parallel.
(machine_dependent_reorg): Remove sh_flag_remove_dead_before_cse set.
(fldi_ok): New function.
(get_fpscr_rtx): Add fpscr_rtx as GC root.
(emit_sf_insn): Only generate fpu switches when optimize < 1.
(emit_df_insn): Likewise.
(expand_fp_branch, emit_fpscr_use, remove_dead_before_cse): Delete.
(sh_flag_remove_dead_before_cse): Delete.
(get_free_reg, fpscr_set_from_mem): New functions.
* sh.md (movdf, movsf): Remove no_new_pseudos code.
(return): Remove emit_fpscr_use / remove_dead_before_cse calls.
Co-Authored-By: Andrew MacLeod <amacleod@cygnus.com>
From-SVN: r31990
2000-02-15 23:34:33 +01:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac EMIT_MODE_SET (@var{entity}, @var{mode}, @var{hard_regs_live})
|
Makefile.in (lcm.o): Depend on insn-attr.h.
* Makefile.in (lcm.o): Depend on insn-attr.h.
* basic-block.h (optimize_mode_switching): Declare.
* lcm.c (tm_p.h, insn-attr.h): #include.
(seginfo, bb_info): New structs.
(antic, transp, comp, delete, insert) : New file-scope static variables.
(new_seginfo, add_seginfo, make_preds_opaque, reg_dies): New functions.
(reg_becomes_live, optimize_mode_switching): Likewise.
* tm.texi: Add description of mode switching macros.
* toplev.c (rest_of_compilation): Call optimize_mode_switching.
* sh-protos.h (remove_dead_before_cse): Remove prototype.
(fldi_ok, fpscr_set_from_mem): New prototypes.
* sh.h (OPTIMIZATION_OPTION): Remove sh_flag_remove_dead_before_cse set.
(CONST_DOUBLE_OK_FOR_LETTER_P, SECONDARY_INPUT_RELOAD_CLASS):
Disable fldi for (TARGET_SH4 && ! TARGET_FMOVD).
(sh_flag_remove_dead_before_cse): Remove declaration.
(NUM_MODES_FOR_MODE_SWITCHING, OPTIMIZE_MODE_SWITCHING): New macros.
(MODE_USES_IN_EXIT_BLOCK, MODE_NEEDED, MODE_AT_ENTRY): Likewise.
(MODE_PRIORITY_TO_MODE, EMIT_MODE_SET): Likewise.
* sh.c (broken_move): Disable fldi for (TARGET_SH4 && ! TARGET_FMOVD).
(barrier_align): Allow for JUMP_INSNS containing a parallel.
(machine_dependent_reorg): Remove sh_flag_remove_dead_before_cse set.
(fldi_ok): New function.
(get_fpscr_rtx): Add fpscr_rtx as GC root.
(emit_sf_insn): Only generate fpu switches when optimize < 1.
(emit_df_insn): Likewise.
(expand_fp_branch, emit_fpscr_use, remove_dead_before_cse): Delete.
(sh_flag_remove_dead_before_cse): Delete.
(get_free_reg, fpscr_set_from_mem): New functions.
* sh.md (movdf, movsf): Remove no_new_pseudos code.
(return): Remove emit_fpscr_use / remove_dead_before_cse calls.
Co-Authored-By: Andrew MacLeod <amacleod@cygnus.com>
From-SVN: r31990
2000-02-15 23:34:33 +01:00
|
|
|
Generate one or more insns to set @var{entity} to @var{mode}.
|
|
|
|
@var{hard_reg_live} is the set of hard registers live at the point where
|
|
|
|
the insn(s) are to be inserted.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
Makefile.in (lcm.o): Depend on insn-attr.h.
* Makefile.in (lcm.o): Depend on insn-attr.h.
* basic-block.h (optimize_mode_switching): Declare.
* lcm.c (tm_p.h, insn-attr.h): #include.
(seginfo, bb_info): New structs.
(antic, transp, comp, delete, insert) : New file-scope static variables.
(new_seginfo, add_seginfo, make_preds_opaque, reg_dies): New functions.
(reg_becomes_live, optimize_mode_switching): Likewise.
* tm.texi: Add description of mode switching macros.
* toplev.c (rest_of_compilation): Call optimize_mode_switching.
* sh-protos.h (remove_dead_before_cse): Remove prototype.
(fldi_ok, fpscr_set_from_mem): New prototypes.
* sh.h (OPTIMIZATION_OPTION): Remove sh_flag_remove_dead_before_cse set.
(CONST_DOUBLE_OK_FOR_LETTER_P, SECONDARY_INPUT_RELOAD_CLASS):
Disable fldi for (TARGET_SH4 && ! TARGET_FMOVD).
(sh_flag_remove_dead_before_cse): Remove declaration.
(NUM_MODES_FOR_MODE_SWITCHING, OPTIMIZE_MODE_SWITCHING): New macros.
(MODE_USES_IN_EXIT_BLOCK, MODE_NEEDED, MODE_AT_ENTRY): Likewise.
(MODE_PRIORITY_TO_MODE, EMIT_MODE_SET): Likewise.
* sh.c (broken_move): Disable fldi for (TARGET_SH4 && ! TARGET_FMOVD).
(barrier_align): Allow for JUMP_INSNS containing a parallel.
(machine_dependent_reorg): Remove sh_flag_remove_dead_before_cse set.
(fldi_ok): New function.
(get_fpscr_rtx): Add fpscr_rtx as GC root.
(emit_sf_insn): Only generate fpu switches when optimize < 1.
(emit_df_insn): Likewise.
(expand_fp_branch, emit_fpscr_use, remove_dead_before_cse): Delete.
(sh_flag_remove_dead_before_cse): Delete.
(get_free_reg, fpscr_set_from_mem): New functions.
* sh.md (movdf, movsf): Remove no_new_pseudos code.
(return): Remove emit_fpscr_use / remove_dead_before_cse calls.
Co-Authored-By: Andrew MacLeod <amacleod@cygnus.com>
From-SVN: r31990
2000-02-15 23:34:33 +01:00
|
|
|
|
Table-driven attributes.
* c-decl.c, config/alpha/alpha.c, config/arc/arc.c,
config/arm/arm.c, config/arm/pe.c, config/avr/avr.c,
config/avr/avr.h, config/d30v/d30v.h, config/fr30/fr30.h,
config/h8300/h8300.c, config/i386/cygwin.h, config/i386/winnt.c,
config/m32r/m32r.c, config/mcore/mcore.c, config/sh/sh.c,
config/stormy16/stormy16.h, config/v850/v850.c, doc/c-tree.texi,
doc/tm.texi, ggc-common.c, integrate.c, print-tree.c, tree.c,
tree.h: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
* tree.h (struct tree_decl): Change machine_attributes to
attributes.
* doc/c-tree.texi: Document that all attributes are now attached
to decls and types.
* c-common.c (add_attribute, attrtab, attrtab_idx,
default_valid_lang_attribute, valid_lang_attribute): Remove.
(attribute_tables, attributes_initialized,
c_common_attribute_table, default_lang_attribute_table): New
variables.
(handle_packed_attribute, handle_nocommon_attribute,
handle_common_attribute, handle_noreturn_attribute,
handle_unused_attribute, handle_const_attribute,
handle_transparent_union_attribute, handle_constructor_attribute,
handle_destructor_attribute, handle_mode_attribute,
handle_section_attribute, handle_aligned_attribute,
handle_weak_attribute, handle_alias_attribute,
handle_no_instrument_function_attribute,
handle_no_check_memory_usage_attribute, handle_malloc_attribute,
handle_no_limit_stack_attribute, handle_pure_attribute): New
functions.
(init_attributes, decl_attributes): Rewrite to implement
table-driven attributes.
* c-common.h (enum attribute_flags): Move to tree.h.
* c-format.c (decl_handle_format_attribute,
decl_handle_format_arg_attribute): Rename to
handle_format_attribute and handle_format_arg_attribute. Update
for table-driven attributes.
* c-common.h (decl_handle_format_attribute,
decl_handle_format_arg_attribute): Remove prototypes.
(handle_format_attribute, handle_format_arg_attribute): Add
prototypes.
* c-decl.c (grokdeclarator): Handle attributes nested inside
declarators.
* c-parse.in (setattrs, maybe_setattrs): Remove.
(maybe_type_quals_setattrs): Rename to maybe_type_quals_attrs.
Update to handle nested attributes properly.
(maybe_resetattrs, after_type_declarator,
parm_declarator_nostarttypename, notype_declarator, absdcl1_noea,
absdcl1_ea, direct_absdcl1): Update to handle nested attributes
properly.
(make_pointer_declarator): Update to handle nested attributes
properly.
* doc/extend.texi: Update documentation of limits of attributes
syntax. Warn about problems with attribute semantics in C++.
* target.h (struct target): Remove valid_decl_attribute and
valid_type_attribute. Add attribute_table and
function_attribute_inlinable_p.
* target-def.h (TARGET_VALID_DECL_ATTRIBUTE,
TARGET_VALID_TYPE_ATTRIBUTE): Remove.
(TARGET_ATTRIBUTE_TABLE, TARGET_FUNCTION_ATTRIBUTE_INLINABLE_P):
Add.
(TARGET_INITIALIZER): Update.
* integrate.c (FUNCTION_ATTRIBUTE_INLINABLE_P): Remove default
definition.
(function_attribute_inlinable_p): New function. Check for the
presence of any machine attributes before using
targetm.function_attribute_inlinable_p.
(function_cannot_inline_p): Update.
* Makefile.in (integrate.o): Update dependencies.
* doc/tm.texi: Update documentation of target attributes and
example definition of TARGET_VALID_TYPE_ATTRIBUTE.
* tree.c (default_valid_attribute_p, valid_machine_attribute):
Remove.
(default_target_attribute_table,
default_function_attribute_inlinable_p): New.
(lookup_attribute): Update comment to clarify handling of multiple
attributes with the same name.
(merge_attributes, attribute_list_contained): Allow multiple
attributes with the same name but different arguments to appear in
the same attribute list.
* tree.h (default_valid_attribute_p): Remove prototype.
(struct attribute_spec): New.
(default_target_attribute_table): Declare.
(enum attribute_flags): Move from c-common.h. Add
ATTR_FLAG_TYPE_IN_PLACE.
(default_function_attribute_inlinable_p): Declare.
* config/alpha/alpha.c (vms_valid_decl_attribute_p): Remove.
(TARGET_VALID_DECL_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(vms_attribute_table): New.
* config/arc/arc.c (arc_valid_decl_attribute): Remove.
(TARGET_VALID_DECL_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(arc_attribute_table, arc_handle_interrupt_attribute): New.
* config/arm/arm.c (arm_valid_type_attribute_p,
arm_valid_decl_attribute_p, arm_pe_valid_decl_attribute_p):
Remove.
(TARGET_VALID_TYPE_ATTRIBUTE, TARGET_VALID_DECL_ATTRIBUTE): Don't
define.
(TARGET_ATTRIBUTE_TABLE): Define.
(arm_attribute_table, arm_handle_fndecl_attribute,
arm_handle_isr_attribute): New.
* config/avr/avr.c (avr_valid_type_attribute,
avr_valid_decl_attribute): Remove.
(TARGET_VALID_DECL_ATTRIBUTE, TARGET_VALID_TYPE_ATTRIBUTE): Don't
define.
(TARGET_ATTRIBUTE_TABLE): Define.
(avr_attribute_table, avr_handle_progmem_attribute,
avr_handle_fndecl_attribute): New.
* config/c4x/c4x.c (c4x_valid_type_attribute_p): Remove.
(TARGET_VALID_TYPE_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(c4x_attribute_table, c4x_handle_fntype_attribute): New.
* config/h8300/h8300.c (h8300_valid_decl_attribute): Remove.
(TARGET_VALID_DECL_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(h8300_attribute_table, h8300_handle_fndecl_attribute,
h8300_handle_eightbit_data_attribute,
h8300_handle_tiny_data_attribute): New.
* config/i386/i386-protos.h (ix86_valid_type_attribute_p,
i386_pe_valid_decl_attribute_p, i386_pe_valid_type_attribute_p):
Remove prototypes.
(ix86_handle_dll_attribute, ix86_handle_shared_attribute): New
declarations.
* config/i386/i386.c (ix86_valid_type_attribute_p: Remove.
(TARGET_VALID_TYPE_ATTRIBUTE, TARGET_VALID_DECL_ATTRIBUTE): Don't
define.
(TARGET_ATTRIBUTE_TABLE): Define.
(ix86_attribute_table, ix86_handle_cdecl_attribute,
ix86_handle_regparm_attribute): New.
* config/i386/winnt.c (i386_pe_valid_decl_attribute_p,
i386_pe_valid_type_attribute_p): Remove.
(ix86_handle_dll_attribute, ix86_handle_shared_attribute): New.
* config/ia64/ia64.c (ia64_valid_type_attribute): Remove.
(TARGET_VALID_TYPE_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(ia64_attribute_table): New.
* config/m32r/m32r.c (m32r_valid_decl_attribute, interrupt_ident1,
interrupt_ident2, model_ident1, model_ident2): Remove.
(TARGET_VALID_DECL_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(init_idents): Update.
(m32r_attribute_table, m32r_handle_model_attribute): New.
* config/m68hc11/m68hc11.c (m68hc11_valid_type_attribute_p):
Remove.
(TARGET_VALID_TYPE_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(m68hc11_attribute_table, m68hc11_handle_fntype_attribute): New.
* config/mcore/mcore.c (mcore_valid_decl_attribute): Remove.
(TARGET_VALID_DECL_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(mcore_attribute_table, mcore_handle_naked_attribute): New.
* config/ns32k/ns32k.c (ns32k_valid_type_attribute_p): Remove.
(TARGET_VALID_TYPE_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(ns32k_attribute_table, ns32k_handle_fntype_attribute): New.
* config/rs6000/rs6000.c (rs6000_valid_type_attribute_p): Remove.
(TARGET_VALID_TYPE_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(rs6000_attribute_table, rs6000_handle_longcall_attribute): New.
* config/sh/sh.c (sh_valid_decl_attribute): Remove.
(TARGET_VALID_DECL_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(sh_attribute_table, sh_handle_interrupt_handler_attribute,
sh_handle_sp_switch_attribute, sh_handle_trap_exit_attribute):
New.
* config/stormy16/stormy16.c (stormy16_valid_type_attribute):
Remove.
(TARGET_VALID_TYPE_ATTRIBUTE): Don't define
(TARGET_ATTRIBUTE_TABLE): Define.
(stormy16_attribute_table, stormy16_handle_interrupt_attribute):
New.
* config/v850/v850.c (v850_valid_decl_attribute): Remove.
(TARGET_VALID_DECL_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(v850_attribute_table, v850_handle_interrupt_attribute,
v850_handle_data_area_attribute): New.
* config/v850/v850-c.c (mark_current_function_as_interrupt):
Return void. Call decl_attributes instead of
valid_machine_attribute.
cp:
Table-driven attributes.
* decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
* decl2.c (cplus_decl_attributes): Only take one attributes
parameter.
* cp-tree.c (cplus_decl_attributes): Update prototype.
* class.c (finish_struct), decl.c (start_decl, start_function),
decl2.c (grokfield), friend.c (do_friend), parse.y
(parse_bitfield): Update calls to cplus_decl_attributes.
* decl.c (grokdeclarator): Take a pointer to a single ordinary
attribute list.
* decl.h (grokdeclarator): Update prototype.
* decl2.c (grokfield): Take a single ordinary attribute list.
* friend.c (do_friend): Likewise.
* decl.c (shadow_tag, groktypename, start_decl,
start_handler_parms, grokdeclarator, grokparms, start_function,
start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
(process_template_parm, do_decl_instantiation): Pass single
ordinary attribute lists around.
* decl.c (grokdeclarator): Correct handling of nested attributes.
Revert the patch
1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
* decl.c (grokdeclarator): Embedded attrs bind to the right,
not the left.
.
* cp-tree.h (cp_valid_lang_attribute): Remove declaration
(cp_attribute_table): Declare.
* decl.c (valid_lang_attribute): Don't define.
(lang_attribute_table): Define.
(init_decl_processing): Initialize lang_attribute_table instead of
valid_lang_attribute.
* tree.c (cp_valid_lang_attribute): Remove.
(handle_java_interface_attribute, handle_com_interface_attribute,
handle_init_priority_attribute): New functions.
(cp_attribute_table): New array.
* decl2.c (import_export_class): Don't use
targetm.valid_type_attribute.
testsuite:
Table-driven attributes.
* g++.dg/ext/attrib1.C: New test.
From-SVN: r45718
2001-09-21 03:27:06 +02:00
|
|
|
@node Target Attributes
|
|
|
|
@section Defining target-specific uses of @code{__attribute__}
|
|
|
|
@cindex target attributes
|
|
|
|
@cindex machine attributes
|
|
|
|
@cindex attributes, target-specific
|
|
|
|
|
|
|
|
Target-specific attributes may be defined for functions, data and types.
|
|
|
|
These are described using the following target hooks; they also need to
|
|
|
|
be documented in @file{extend.texi}.
|
|
|
|
|
|
|
|
@deftypevr {Target Hook} {const struct attribute_spec *} TARGET_ATTRIBUTE_TABLE
|
|
|
|
If defined, this target hook points to an array of @samp{struct
|
|
|
|
attribute_spec} (defined in @file{tree.h}) specifying the machine
|
|
|
|
specific attributes for this target and some of the restrictions on the
|
|
|
|
entities to which these attributes are applied and the arguments they
|
|
|
|
take.
|
|
|
|
@end deftypevr
|
|
|
|
|
|
|
|
@deftypefn {Target Hook} int TARGET_COMP_TYPE_ATTRIBUTES (tree @var{type1}, tree @var{type2})
|
|
|
|
If defined, this target hook is a function which returns zero if the attributes on
|
|
|
|
@var{type1} and @var{type2} are incompatible, one if they are compatible,
|
|
|
|
and two if they are nearly compatible (which causes a warning to be
|
|
|
|
generated). If this is not defined, machine-specific attributes are
|
|
|
|
supposed always to be compatible.
|
|
|
|
@end deftypefn
|
|
|
|
|
|
|
|
@deftypefn {Target Hook} void TARGET_SET_DEFAULT_TYPE_ATTRIBUTES (tree @var{type})
|
|
|
|
If defined, this target hook is a function which assigns default attributes to
|
|
|
|
newly defined @var{type}.
|
|
|
|
@end deftypefn
|
|
|
|
|
|
|
|
@deftypefn {Target Hook} tree TARGET_MERGE_TYPE_ATTRIBUTES (tree @var{type1}, tree @var{type2})
|
|
|
|
Define this target hook if the merging of type attributes needs special
|
|
|
|
handling. If defined, the result is a list of the combined
|
|
|
|
@code{TYPE_ATTRIBUTES} of @var{type1} and @var{type2}. It is assumed
|
|
|
|
that @code{comptypes} has already been called and returned 1. This
|
|
|
|
function may call @code{merge_attributes} to handle machine-independent
|
|
|
|
merging.
|
|
|
|
@end deftypefn
|
|
|
|
|
|
|
|
@deftypefn {Target Hook} tree TARGET_MERGE_DECL_ATTRIBUTES (tree @var{olddecl}, tree @var{newdecl})
|
|
|
|
Define this target hook if the merging of decl attributes needs special
|
|
|
|
handling. If defined, the result is a list of the combined
|
|
|
|
@code{DECL_ATTRIBUTES} of @var{olddecl} and @var{newdecl}.
|
|
|
|
@var{newdecl} is a duplicate declaration of @var{olddecl}. Examples of
|
|
|
|
when this is needed are when one attribute overrides another, or when an
|
|
|
|
attribute is nullified by a subsequent definition. This function may
|
|
|
|
call @code{merge_attributes} to handle machine-independent merging.
|
|
|
|
|
|
|
|
@findex TARGET_DLLIMPORT_DECL_ATTRIBUTES
|
2004-08-06 04:03:29 +02:00
|
|
|
If the only target-specific handling you require is @samp{dllimport}
|
|
|
|
for Microsoft Windows targets, you should define the macro
|
|
|
|
@code{TARGET_DLLIMPORT_DECL_ATTRIBUTES} to @code{1}. The compiler
|
|
|
|
will then define a function called
|
|
|
|
@code{merge_dllimport_decl_attributes} which can then be defined as
|
|
|
|
the expansion of @code{TARGET_MERGE_DECL_ATTRIBUTES}. You can also
|
|
|
|
add @code{handle_dll_attribute} in the attribute table for your port
|
|
|
|
to perform initial processing of the @samp{dllimport} and
|
|
|
|
@samp{dllexport} attributes. This is done in @file{i386/cygwin.h} and
|
|
|
|
@file{i386/i386.c}, for example.
|
Table-driven attributes.
* c-decl.c, config/alpha/alpha.c, config/arc/arc.c,
config/arm/arm.c, config/arm/pe.c, config/avr/avr.c,
config/avr/avr.h, config/d30v/d30v.h, config/fr30/fr30.h,
config/h8300/h8300.c, config/i386/cygwin.h, config/i386/winnt.c,
config/m32r/m32r.c, config/mcore/mcore.c, config/sh/sh.c,
config/stormy16/stormy16.h, config/v850/v850.c, doc/c-tree.texi,
doc/tm.texi, ggc-common.c, integrate.c, print-tree.c, tree.c,
tree.h: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
* tree.h (struct tree_decl): Change machine_attributes to
attributes.
* doc/c-tree.texi: Document that all attributes are now attached
to decls and types.
* c-common.c (add_attribute, attrtab, attrtab_idx,
default_valid_lang_attribute, valid_lang_attribute): Remove.
(attribute_tables, attributes_initialized,
c_common_attribute_table, default_lang_attribute_table): New
variables.
(handle_packed_attribute, handle_nocommon_attribute,
handle_common_attribute, handle_noreturn_attribute,
handle_unused_attribute, handle_const_attribute,
handle_transparent_union_attribute, handle_constructor_attribute,
handle_destructor_attribute, handle_mode_attribute,
handle_section_attribute, handle_aligned_attribute,
handle_weak_attribute, handle_alias_attribute,
handle_no_instrument_function_attribute,
handle_no_check_memory_usage_attribute, handle_malloc_attribute,
handle_no_limit_stack_attribute, handle_pure_attribute): New
functions.
(init_attributes, decl_attributes): Rewrite to implement
table-driven attributes.
* c-common.h (enum attribute_flags): Move to tree.h.
* c-format.c (decl_handle_format_attribute,
decl_handle_format_arg_attribute): Rename to
handle_format_attribute and handle_format_arg_attribute. Update
for table-driven attributes.
* c-common.h (decl_handle_format_attribute,
decl_handle_format_arg_attribute): Remove prototypes.
(handle_format_attribute, handle_format_arg_attribute): Add
prototypes.
* c-decl.c (grokdeclarator): Handle attributes nested inside
declarators.
* c-parse.in (setattrs, maybe_setattrs): Remove.
(maybe_type_quals_setattrs): Rename to maybe_type_quals_attrs.
Update to handle nested attributes properly.
(maybe_resetattrs, after_type_declarator,
parm_declarator_nostarttypename, notype_declarator, absdcl1_noea,
absdcl1_ea, direct_absdcl1): Update to handle nested attributes
properly.
(make_pointer_declarator): Update to handle nested attributes
properly.
* doc/extend.texi: Update documentation of limits of attributes
syntax. Warn about problems with attribute semantics in C++.
* target.h (struct target): Remove valid_decl_attribute and
valid_type_attribute. Add attribute_table and
function_attribute_inlinable_p.
* target-def.h (TARGET_VALID_DECL_ATTRIBUTE,
TARGET_VALID_TYPE_ATTRIBUTE): Remove.
(TARGET_ATTRIBUTE_TABLE, TARGET_FUNCTION_ATTRIBUTE_INLINABLE_P):
Add.
(TARGET_INITIALIZER): Update.
* integrate.c (FUNCTION_ATTRIBUTE_INLINABLE_P): Remove default
definition.
(function_attribute_inlinable_p): New function. Check for the
presence of any machine attributes before using
targetm.function_attribute_inlinable_p.
(function_cannot_inline_p): Update.
* Makefile.in (integrate.o): Update dependencies.
* doc/tm.texi: Update documentation of target attributes and
example definition of TARGET_VALID_TYPE_ATTRIBUTE.
* tree.c (default_valid_attribute_p, valid_machine_attribute):
Remove.
(default_target_attribute_table,
default_function_attribute_inlinable_p): New.
(lookup_attribute): Update comment to clarify handling of multiple
attributes with the same name.
(merge_attributes, attribute_list_contained): Allow multiple
attributes with the same name but different arguments to appear in
the same attribute list.
* tree.h (default_valid_attribute_p): Remove prototype.
(struct attribute_spec): New.
(default_target_attribute_table): Declare.
(enum attribute_flags): Move from c-common.h. Add
ATTR_FLAG_TYPE_IN_PLACE.
(default_function_attribute_inlinable_p): Declare.
* config/alpha/alpha.c (vms_valid_decl_attribute_p): Remove.
(TARGET_VALID_DECL_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(vms_attribute_table): New.
* config/arc/arc.c (arc_valid_decl_attribute): Remove.
(TARGET_VALID_DECL_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(arc_attribute_table, arc_handle_interrupt_attribute): New.
* config/arm/arm.c (arm_valid_type_attribute_p,
arm_valid_decl_attribute_p, arm_pe_valid_decl_attribute_p):
Remove.
(TARGET_VALID_TYPE_ATTRIBUTE, TARGET_VALID_DECL_ATTRIBUTE): Don't
define.
(TARGET_ATTRIBUTE_TABLE): Define.
(arm_attribute_table, arm_handle_fndecl_attribute,
arm_handle_isr_attribute): New.
* config/avr/avr.c (avr_valid_type_attribute,
avr_valid_decl_attribute): Remove.
(TARGET_VALID_DECL_ATTRIBUTE, TARGET_VALID_TYPE_ATTRIBUTE): Don't
define.
(TARGET_ATTRIBUTE_TABLE): Define.
(avr_attribute_table, avr_handle_progmem_attribute,
avr_handle_fndecl_attribute): New.
* config/c4x/c4x.c (c4x_valid_type_attribute_p): Remove.
(TARGET_VALID_TYPE_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(c4x_attribute_table, c4x_handle_fntype_attribute): New.
* config/h8300/h8300.c (h8300_valid_decl_attribute): Remove.
(TARGET_VALID_DECL_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(h8300_attribute_table, h8300_handle_fndecl_attribute,
h8300_handle_eightbit_data_attribute,
h8300_handle_tiny_data_attribute): New.
* config/i386/i386-protos.h (ix86_valid_type_attribute_p,
i386_pe_valid_decl_attribute_p, i386_pe_valid_type_attribute_p):
Remove prototypes.
(ix86_handle_dll_attribute, ix86_handle_shared_attribute): New
declarations.
* config/i386/i386.c (ix86_valid_type_attribute_p: Remove.
(TARGET_VALID_TYPE_ATTRIBUTE, TARGET_VALID_DECL_ATTRIBUTE): Don't
define.
(TARGET_ATTRIBUTE_TABLE): Define.
(ix86_attribute_table, ix86_handle_cdecl_attribute,
ix86_handle_regparm_attribute): New.
* config/i386/winnt.c (i386_pe_valid_decl_attribute_p,
i386_pe_valid_type_attribute_p): Remove.
(ix86_handle_dll_attribute, ix86_handle_shared_attribute): New.
* config/ia64/ia64.c (ia64_valid_type_attribute): Remove.
(TARGET_VALID_TYPE_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(ia64_attribute_table): New.
* config/m32r/m32r.c (m32r_valid_decl_attribute, interrupt_ident1,
interrupt_ident2, model_ident1, model_ident2): Remove.
(TARGET_VALID_DECL_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(init_idents): Update.
(m32r_attribute_table, m32r_handle_model_attribute): New.
* config/m68hc11/m68hc11.c (m68hc11_valid_type_attribute_p):
Remove.
(TARGET_VALID_TYPE_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(m68hc11_attribute_table, m68hc11_handle_fntype_attribute): New.
* config/mcore/mcore.c (mcore_valid_decl_attribute): Remove.
(TARGET_VALID_DECL_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(mcore_attribute_table, mcore_handle_naked_attribute): New.
* config/ns32k/ns32k.c (ns32k_valid_type_attribute_p): Remove.
(TARGET_VALID_TYPE_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(ns32k_attribute_table, ns32k_handle_fntype_attribute): New.
* config/rs6000/rs6000.c (rs6000_valid_type_attribute_p): Remove.
(TARGET_VALID_TYPE_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(rs6000_attribute_table, rs6000_handle_longcall_attribute): New.
* config/sh/sh.c (sh_valid_decl_attribute): Remove.
(TARGET_VALID_DECL_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(sh_attribute_table, sh_handle_interrupt_handler_attribute,
sh_handle_sp_switch_attribute, sh_handle_trap_exit_attribute):
New.
* config/stormy16/stormy16.c (stormy16_valid_type_attribute):
Remove.
(TARGET_VALID_TYPE_ATTRIBUTE): Don't define
(TARGET_ATTRIBUTE_TABLE): Define.
(stormy16_attribute_table, stormy16_handle_interrupt_attribute):
New.
* config/v850/v850.c (v850_valid_decl_attribute): Remove.
(TARGET_VALID_DECL_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(v850_attribute_table, v850_handle_interrupt_attribute,
v850_handle_data_area_attribute): New.
* config/v850/v850-c.c (mark_current_function_as_interrupt):
Return void. Call decl_attributes instead of
valid_machine_attribute.
cp:
Table-driven attributes.
* decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
* decl2.c (cplus_decl_attributes): Only take one attributes
parameter.
* cp-tree.c (cplus_decl_attributes): Update prototype.
* class.c (finish_struct), decl.c (start_decl, start_function),
decl2.c (grokfield), friend.c (do_friend), parse.y
(parse_bitfield): Update calls to cplus_decl_attributes.
* decl.c (grokdeclarator): Take a pointer to a single ordinary
attribute list.
* decl.h (grokdeclarator): Update prototype.
* decl2.c (grokfield): Take a single ordinary attribute list.
* friend.c (do_friend): Likewise.
* decl.c (shadow_tag, groktypename, start_decl,
start_handler_parms, grokdeclarator, grokparms, start_function,
start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
(process_template_parm, do_decl_instantiation): Pass single
ordinary attribute lists around.
* decl.c (grokdeclarator): Correct handling of nested attributes.
Revert the patch
1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
* decl.c (grokdeclarator): Embedded attrs bind to the right,
not the left.
.
* cp-tree.h (cp_valid_lang_attribute): Remove declaration
(cp_attribute_table): Declare.
* decl.c (valid_lang_attribute): Don't define.
(lang_attribute_table): Define.
(init_decl_processing): Initialize lang_attribute_table instead of
valid_lang_attribute.
* tree.c (cp_valid_lang_attribute): Remove.
(handle_java_interface_attribute, handle_com_interface_attribute,
handle_init_priority_attribute): New functions.
(cp_attribute_table): New array.
* decl2.c (import_export_class): Don't use
targetm.valid_type_attribute.
testsuite:
Table-driven attributes.
* g++.dg/ext/attrib1.C: New test.
From-SVN: r45718
2001-09-21 03:27:06 +02:00
|
|
|
@end deftypefn
|
|
|
|
|
2004-08-04 21:37:19 +02:00
|
|
|
@defmac TARGET_DECLSPEC
|
2004-09-15 15:12:33 +02:00
|
|
|
Define this macro to a nonzero value if you want to treat
|
2004-08-04 21:37:19 +02:00
|
|
|
@code{__declspec(X)} as equivalent to @code{__attribute((X))}. By
|
|
|
|
default, this behavior is enabled only for targets that define
|
|
|
|
@code{TARGET_DLLIMPORT_DECL_ATTRIBUTES}. The current implementation
|
|
|
|
of @code{__declspec} is via a built-in macro, but you should not rely
|
|
|
|
on this implementation detail.
|
|
|
|
@end defmac
|
|
|
|
|
Table-driven attributes.
* c-decl.c, config/alpha/alpha.c, config/arc/arc.c,
config/arm/arm.c, config/arm/pe.c, config/avr/avr.c,
config/avr/avr.h, config/d30v/d30v.h, config/fr30/fr30.h,
config/h8300/h8300.c, config/i386/cygwin.h, config/i386/winnt.c,
config/m32r/m32r.c, config/mcore/mcore.c, config/sh/sh.c,
config/stormy16/stormy16.h, config/v850/v850.c, doc/c-tree.texi,
doc/tm.texi, ggc-common.c, integrate.c, print-tree.c, tree.c,
tree.h: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
* tree.h (struct tree_decl): Change machine_attributes to
attributes.
* doc/c-tree.texi: Document that all attributes are now attached
to decls and types.
* c-common.c (add_attribute, attrtab, attrtab_idx,
default_valid_lang_attribute, valid_lang_attribute): Remove.
(attribute_tables, attributes_initialized,
c_common_attribute_table, default_lang_attribute_table): New
variables.
(handle_packed_attribute, handle_nocommon_attribute,
handle_common_attribute, handle_noreturn_attribute,
handle_unused_attribute, handle_const_attribute,
handle_transparent_union_attribute, handle_constructor_attribute,
handle_destructor_attribute, handle_mode_attribute,
handle_section_attribute, handle_aligned_attribute,
handle_weak_attribute, handle_alias_attribute,
handle_no_instrument_function_attribute,
handle_no_check_memory_usage_attribute, handle_malloc_attribute,
handle_no_limit_stack_attribute, handle_pure_attribute): New
functions.
(init_attributes, decl_attributes): Rewrite to implement
table-driven attributes.
* c-common.h (enum attribute_flags): Move to tree.h.
* c-format.c (decl_handle_format_attribute,
decl_handle_format_arg_attribute): Rename to
handle_format_attribute and handle_format_arg_attribute. Update
for table-driven attributes.
* c-common.h (decl_handle_format_attribute,
decl_handle_format_arg_attribute): Remove prototypes.
(handle_format_attribute, handle_format_arg_attribute): Add
prototypes.
* c-decl.c (grokdeclarator): Handle attributes nested inside
declarators.
* c-parse.in (setattrs, maybe_setattrs): Remove.
(maybe_type_quals_setattrs): Rename to maybe_type_quals_attrs.
Update to handle nested attributes properly.
(maybe_resetattrs, after_type_declarator,
parm_declarator_nostarttypename, notype_declarator, absdcl1_noea,
absdcl1_ea, direct_absdcl1): Update to handle nested attributes
properly.
(make_pointer_declarator): Update to handle nested attributes
properly.
* doc/extend.texi: Update documentation of limits of attributes
syntax. Warn about problems with attribute semantics in C++.
* target.h (struct target): Remove valid_decl_attribute and
valid_type_attribute. Add attribute_table and
function_attribute_inlinable_p.
* target-def.h (TARGET_VALID_DECL_ATTRIBUTE,
TARGET_VALID_TYPE_ATTRIBUTE): Remove.
(TARGET_ATTRIBUTE_TABLE, TARGET_FUNCTION_ATTRIBUTE_INLINABLE_P):
Add.
(TARGET_INITIALIZER): Update.
* integrate.c (FUNCTION_ATTRIBUTE_INLINABLE_P): Remove default
definition.
(function_attribute_inlinable_p): New function. Check for the
presence of any machine attributes before using
targetm.function_attribute_inlinable_p.
(function_cannot_inline_p): Update.
* Makefile.in (integrate.o): Update dependencies.
* doc/tm.texi: Update documentation of target attributes and
example definition of TARGET_VALID_TYPE_ATTRIBUTE.
* tree.c (default_valid_attribute_p, valid_machine_attribute):
Remove.
(default_target_attribute_table,
default_function_attribute_inlinable_p): New.
(lookup_attribute): Update comment to clarify handling of multiple
attributes with the same name.
(merge_attributes, attribute_list_contained): Allow multiple
attributes with the same name but different arguments to appear in
the same attribute list.
* tree.h (default_valid_attribute_p): Remove prototype.
(struct attribute_spec): New.
(default_target_attribute_table): Declare.
(enum attribute_flags): Move from c-common.h. Add
ATTR_FLAG_TYPE_IN_PLACE.
(default_function_attribute_inlinable_p): Declare.
* config/alpha/alpha.c (vms_valid_decl_attribute_p): Remove.
(TARGET_VALID_DECL_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(vms_attribute_table): New.
* config/arc/arc.c (arc_valid_decl_attribute): Remove.
(TARGET_VALID_DECL_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(arc_attribute_table, arc_handle_interrupt_attribute): New.
* config/arm/arm.c (arm_valid_type_attribute_p,
arm_valid_decl_attribute_p, arm_pe_valid_decl_attribute_p):
Remove.
(TARGET_VALID_TYPE_ATTRIBUTE, TARGET_VALID_DECL_ATTRIBUTE): Don't
define.
(TARGET_ATTRIBUTE_TABLE): Define.
(arm_attribute_table, arm_handle_fndecl_attribute,
arm_handle_isr_attribute): New.
* config/avr/avr.c (avr_valid_type_attribute,
avr_valid_decl_attribute): Remove.
(TARGET_VALID_DECL_ATTRIBUTE, TARGET_VALID_TYPE_ATTRIBUTE): Don't
define.
(TARGET_ATTRIBUTE_TABLE): Define.
(avr_attribute_table, avr_handle_progmem_attribute,
avr_handle_fndecl_attribute): New.
* config/c4x/c4x.c (c4x_valid_type_attribute_p): Remove.
(TARGET_VALID_TYPE_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(c4x_attribute_table, c4x_handle_fntype_attribute): New.
* config/h8300/h8300.c (h8300_valid_decl_attribute): Remove.
(TARGET_VALID_DECL_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(h8300_attribute_table, h8300_handle_fndecl_attribute,
h8300_handle_eightbit_data_attribute,
h8300_handle_tiny_data_attribute): New.
* config/i386/i386-protos.h (ix86_valid_type_attribute_p,
i386_pe_valid_decl_attribute_p, i386_pe_valid_type_attribute_p):
Remove prototypes.
(ix86_handle_dll_attribute, ix86_handle_shared_attribute): New
declarations.
* config/i386/i386.c (ix86_valid_type_attribute_p: Remove.
(TARGET_VALID_TYPE_ATTRIBUTE, TARGET_VALID_DECL_ATTRIBUTE): Don't
define.
(TARGET_ATTRIBUTE_TABLE): Define.
(ix86_attribute_table, ix86_handle_cdecl_attribute,
ix86_handle_regparm_attribute): New.
* config/i386/winnt.c (i386_pe_valid_decl_attribute_p,
i386_pe_valid_type_attribute_p): Remove.
(ix86_handle_dll_attribute, ix86_handle_shared_attribute): New.
* config/ia64/ia64.c (ia64_valid_type_attribute): Remove.
(TARGET_VALID_TYPE_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(ia64_attribute_table): New.
* config/m32r/m32r.c (m32r_valid_decl_attribute, interrupt_ident1,
interrupt_ident2, model_ident1, model_ident2): Remove.
(TARGET_VALID_DECL_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(init_idents): Update.
(m32r_attribute_table, m32r_handle_model_attribute): New.
* config/m68hc11/m68hc11.c (m68hc11_valid_type_attribute_p):
Remove.
(TARGET_VALID_TYPE_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(m68hc11_attribute_table, m68hc11_handle_fntype_attribute): New.
* config/mcore/mcore.c (mcore_valid_decl_attribute): Remove.
(TARGET_VALID_DECL_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(mcore_attribute_table, mcore_handle_naked_attribute): New.
* config/ns32k/ns32k.c (ns32k_valid_type_attribute_p): Remove.
(TARGET_VALID_TYPE_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(ns32k_attribute_table, ns32k_handle_fntype_attribute): New.
* config/rs6000/rs6000.c (rs6000_valid_type_attribute_p): Remove.
(TARGET_VALID_TYPE_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(rs6000_attribute_table, rs6000_handle_longcall_attribute): New.
* config/sh/sh.c (sh_valid_decl_attribute): Remove.
(TARGET_VALID_DECL_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(sh_attribute_table, sh_handle_interrupt_handler_attribute,
sh_handle_sp_switch_attribute, sh_handle_trap_exit_attribute):
New.
* config/stormy16/stormy16.c (stormy16_valid_type_attribute):
Remove.
(TARGET_VALID_TYPE_ATTRIBUTE): Don't define
(TARGET_ATTRIBUTE_TABLE): Define.
(stormy16_attribute_table, stormy16_handle_interrupt_attribute):
New.
* config/v850/v850.c (v850_valid_decl_attribute): Remove.
(TARGET_VALID_DECL_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(v850_attribute_table, v850_handle_interrupt_attribute,
v850_handle_data_area_attribute): New.
* config/v850/v850-c.c (mark_current_function_as_interrupt):
Return void. Call decl_attributes instead of
valid_machine_attribute.
cp:
Table-driven attributes.
* decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
* decl2.c (cplus_decl_attributes): Only take one attributes
parameter.
* cp-tree.c (cplus_decl_attributes): Update prototype.
* class.c (finish_struct), decl.c (start_decl, start_function),
decl2.c (grokfield), friend.c (do_friend), parse.y
(parse_bitfield): Update calls to cplus_decl_attributes.
* decl.c (grokdeclarator): Take a pointer to a single ordinary
attribute list.
* decl.h (grokdeclarator): Update prototype.
* decl2.c (grokfield): Take a single ordinary attribute list.
* friend.c (do_friend): Likewise.
* decl.c (shadow_tag, groktypename, start_decl,
start_handler_parms, grokdeclarator, grokparms, start_function,
start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
(process_template_parm, do_decl_instantiation): Pass single
ordinary attribute lists around.
* decl.c (grokdeclarator): Correct handling of nested attributes.
Revert the patch
1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
* decl.c (grokdeclarator): Embedded attrs bind to the right,
not the left.
.
* cp-tree.h (cp_valid_lang_attribute): Remove declaration
(cp_attribute_table): Declare.
* decl.c (valid_lang_attribute): Don't define.
(lang_attribute_table): Define.
(init_decl_processing): Initialize lang_attribute_table instead of
valid_lang_attribute.
* tree.c (cp_valid_lang_attribute): Remove.
(handle_java_interface_attribute, handle_com_interface_attribute,
handle_init_priority_attribute): New functions.
(cp_attribute_table): New array.
* decl2.c (import_export_class): Don't use
targetm.valid_type_attribute.
testsuite:
Table-driven attributes.
* g++.dg/ext/attrib1.C: New test.
From-SVN: r45718
2001-09-21 03:27:06 +02:00
|
|
|
@deftypefn {Target Hook} void TARGET_INSERT_ATTRIBUTES (tree @var{node}, tree *@var{attr_ptr})
|
|
|
|
Define this target hook if you want to be able to add attributes to a decl
|
|
|
|
when it is being created. This is normally useful for back ends which
|
|
|
|
wish to implement a pragma by using the attributes which correspond to
|
|
|
|
the pragma's effect. The @var{node} argument is the decl which is being
|
|
|
|
created. The @var{attr_ptr} argument is a pointer to the attribute list
|
|
|
|
for this decl. The list itself should not be modified, since it may be
|
|
|
|
shared with other decls, but attributes may be chained on the head of
|
|
|
|
the list and @code{*@var{attr_ptr}} modified to point to the new
|
|
|
|
attributes, or a copy of the list may be made if further changes are
|
|
|
|
needed.
|
|
|
|
@end deftypefn
|
|
|
|
|
|
|
|
@deftypefn {Target Hook} bool TARGET_FUNCTION_ATTRIBUTE_INLINABLE_P (tree @var{fndecl})
|
|
|
|
@cindex inlining
|
|
|
|
This target hook returns @code{true} if it is ok to inline @var{fndecl}
|
|
|
|
into the current function, despite its having target-specific
|
|
|
|
attributes, @code{false} otherwise. By default, if a function has a
|
|
|
|
target specific attribute attached to it, it will not be inlined.
|
|
|
|
@end deftypefn
|
|
|
|
|
mips.c (mips_class_max_nregs, [...]): New functions.
2002-04-24 Matt Hiller <hiller@redhat.com>
* mips.c (mips_class_max_nregs, mips_register_move_cost): New
functions.
* mips.h (CLASS_MAX_NREGS, REGISTER_MOVE_COST): Redefine as calls
of the corresponding functions.
* mips-protos.h (mips_class_max_nregs, mips_register_move_cost):
New prototypes.
2002-04-24 Matt Hiller <hiller@redhat.com>
* config/mips/mips.h (mips_sw_reg_names): Declare as extern.
(ALL_COP_ADDITIONAL_REGISTER_NAMES): New macro.
(FIRST_PSEUDO_REGISTER): Redefine considering coprocessor
registers, adjust comment accordingly.
(FIXED_REGISTERS, CALL_USED_REGISTERS, CALL_REALLY_USED_REGISTERS,
reg_class, REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGISTER_NAMES,
DEBUG_REGISTER_NAMES, REG_ALLOC_ORDER): Adjust to include entries
for coprocessor registers.
(ADDITIONAL_REGISTER_NAMES): Include
ALL_COP_ADDITIONAL_REGISTER_NAMES.
(COP0_REG_FIRST, COP0_REG_LAST, COP0_REG_NUM,
COP2_REG_FIRST, COP2_REG_LAST, COP2_REG_NUM,
COP3_REG_FIRST, COP3_REG_LAST, COP3_REG_NUM,
COP0_REG_P, COP2_REG_P, COP3_REG_P, ALL_COP_REG_P,
COPNUM_AS_CHAR_FROM_REGNUM, COP_REG_CLASS_P): New macros.
(mips_char_to_class): Adjust comment to include coprocessor
constraint letters.
* config/mips/mips.c (coprocessor_operand, coprocessor2_operand):
New functions.
(mips_reg_names, mips_regno_to_class): Include coprocessor
information.
(mips_sw_reg_names): Ditto, make non-static.
(mips_move_1word): Handle moves to and from coprocessor registers.
(mips_move_2words): Handle moves to and from coprocessor
registers.
(mips_class_max_nregs, mips_register_move_cost): Handle
coprocessor register classes.
(override_options): Initialize mips_char_to_class and
mips_hard_regno_mode_ok properly for coprocessor registers.
* config/mips/mips.md (movdi_internal, movdi_internal2,
movsi_internal1, movsi_internal2): Add constraint-sets for
coprocessor registers.
* testsuite/gcc.c-torture/mipscop-1.c: New testcase.
* testsuite/gcc.c-torture/mipscop-1.x: Disable above if target
isn't mips.
* testsuite/gcc.c-torture/mipscop-2.c: New testcase.
* testsuite/gcc.c-torture/mipscop-2.x: Disable above if target
isn't mips.
* testsuite/gcc.c-torture/mipscop-3.c: New testcase.
* testsuite/gcc.c-torture/mipscop-3.x: Disable above if target
isn't mips.
* testsuite/gcc.c-torture/mipscop-4.c: New testcase.
* testsuite/gcc.c-torture/mipscop-4.x: Disable above if target
isn't mips.
* doc/tm.texi: Document feature.
From-SVN: r52765
2002-04-25 21:31:45 +02:00
|
|
|
@node MIPS Coprocessors
|
|
|
|
@section Defining coprocessor specifics for MIPS targets.
|
|
|
|
@cindex MIPS coprocessor-definition macros
|
|
|
|
|
|
|
|
The MIPS specification allows MIPS implementations to have as many as 4
|
contrib.texi, [...]: Capitalize "gcc", "g++" and "g77" or mark up with appropriate markup.
* doc/contrib.texi, doc/extend.texi, doc/gcov.texi,
doc/install.texi, doc/invoke.texi, doc/makefile.texi,
doc/sourcebuild.texi, doc/tm.texi, doc/trouble.texi: Capitalize
"gcc", "g++" and "g77" or mark up with appropriate markup. Adjust
wording and grammar.
From-SVN: r79482
2004-03-14 23:29:38 +01:00
|
|
|
coprocessors, each with as many as 32 private registers. GCC supports
|
mips.c (mips_class_max_nregs, [...]): New functions.
2002-04-24 Matt Hiller <hiller@redhat.com>
* mips.c (mips_class_max_nregs, mips_register_move_cost): New
functions.
* mips.h (CLASS_MAX_NREGS, REGISTER_MOVE_COST): Redefine as calls
of the corresponding functions.
* mips-protos.h (mips_class_max_nregs, mips_register_move_cost):
New prototypes.
2002-04-24 Matt Hiller <hiller@redhat.com>
* config/mips/mips.h (mips_sw_reg_names): Declare as extern.
(ALL_COP_ADDITIONAL_REGISTER_NAMES): New macro.
(FIRST_PSEUDO_REGISTER): Redefine considering coprocessor
registers, adjust comment accordingly.
(FIXED_REGISTERS, CALL_USED_REGISTERS, CALL_REALLY_USED_REGISTERS,
reg_class, REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGISTER_NAMES,
DEBUG_REGISTER_NAMES, REG_ALLOC_ORDER): Adjust to include entries
for coprocessor registers.
(ADDITIONAL_REGISTER_NAMES): Include
ALL_COP_ADDITIONAL_REGISTER_NAMES.
(COP0_REG_FIRST, COP0_REG_LAST, COP0_REG_NUM,
COP2_REG_FIRST, COP2_REG_LAST, COP2_REG_NUM,
COP3_REG_FIRST, COP3_REG_LAST, COP3_REG_NUM,
COP0_REG_P, COP2_REG_P, COP3_REG_P, ALL_COP_REG_P,
COPNUM_AS_CHAR_FROM_REGNUM, COP_REG_CLASS_P): New macros.
(mips_char_to_class): Adjust comment to include coprocessor
constraint letters.
* config/mips/mips.c (coprocessor_operand, coprocessor2_operand):
New functions.
(mips_reg_names, mips_regno_to_class): Include coprocessor
information.
(mips_sw_reg_names): Ditto, make non-static.
(mips_move_1word): Handle moves to and from coprocessor registers.
(mips_move_2words): Handle moves to and from coprocessor
registers.
(mips_class_max_nregs, mips_register_move_cost): Handle
coprocessor register classes.
(override_options): Initialize mips_char_to_class and
mips_hard_regno_mode_ok properly for coprocessor registers.
* config/mips/mips.md (movdi_internal, movdi_internal2,
movsi_internal1, movsi_internal2): Add constraint-sets for
coprocessor registers.
* testsuite/gcc.c-torture/mipscop-1.c: New testcase.
* testsuite/gcc.c-torture/mipscop-1.x: Disable above if target
isn't mips.
* testsuite/gcc.c-torture/mipscop-2.c: New testcase.
* testsuite/gcc.c-torture/mipscop-2.x: Disable above if target
isn't mips.
* testsuite/gcc.c-torture/mipscop-3.c: New testcase.
* testsuite/gcc.c-torture/mipscop-3.x: Disable above if target
isn't mips.
* testsuite/gcc.c-torture/mipscop-4.c: New testcase.
* testsuite/gcc.c-torture/mipscop-4.x: Disable above if target
isn't mips.
* doc/tm.texi: Document feature.
From-SVN: r52765
2002-04-25 21:31:45 +02:00
|
|
|
accessing these registers and transferring values between the registers
|
|
|
|
and memory using asm-ized variables. For example:
|
|
|
|
|
|
|
|
@smallexample
|
|
|
|
register unsigned int cp0count asm ("c0r1");
|
|
|
|
unsigned int d;
|
|
|
|
|
|
|
|
d = cp0count + 3;
|
|
|
|
@end smallexample
|
|
|
|
|
|
|
|
(``c0r1'' is the default name of register 1 in coprocessor 0; alternate
|
|
|
|
names may be added as described below, or the default names may be
|
|
|
|
overridden entirely in @code{SUBTARGET_CONDITIONAL_REGISTER_USAGE}.)
|
|
|
|
|
|
|
|
Coprocessor registers are assumed to be epilogue-used; sets to them will
|
|
|
|
be preserved even if it does not appear that the register is used again
|
|
|
|
later in the function.
|
|
|
|
|
|
|
|
Another note: according to the MIPS spec, coprocessor 1 (if present) is
|
c-tree.texi, [...]: Correct end-of-sentence markup and markup of "etc.", "e.g." and "i.e.".
* doc/c-tree.texi, doc/cfg.texi, doc/contrib.texi, doc/cpp.texi,
doc/cppopts.texi, doc/extend.texi, doc/fragments.texi,
doc/frontends.texi, doc/gcov.texi, doc/hostconfig.texi,
doc/implement-c.texi, doc/install.texi, doc/invoke.texi,
doc/libgcc.texi, doc/md.texi, doc/passes.texi,
doc/portability.texi, doc/rtl.texi, doc/sourcebuild.texi,
doc/standards.texi, doc/tm.texi, doc/tree-ssa.texi,
doc/trouble.texi: Correct end-of-sentence markup and markup of
"etc.", "e.g." and "i.e.". Use @code in various places where
appropriate.
From-SVN: r90101
2004-11-05 02:36:57 +01:00
|
|
|
the FPU@. One accesses COP1 registers through standard mips
|
mips.c (mips_class_max_nregs, [...]): New functions.
2002-04-24 Matt Hiller <hiller@redhat.com>
* mips.c (mips_class_max_nregs, mips_register_move_cost): New
functions.
* mips.h (CLASS_MAX_NREGS, REGISTER_MOVE_COST): Redefine as calls
of the corresponding functions.
* mips-protos.h (mips_class_max_nregs, mips_register_move_cost):
New prototypes.
2002-04-24 Matt Hiller <hiller@redhat.com>
* config/mips/mips.h (mips_sw_reg_names): Declare as extern.
(ALL_COP_ADDITIONAL_REGISTER_NAMES): New macro.
(FIRST_PSEUDO_REGISTER): Redefine considering coprocessor
registers, adjust comment accordingly.
(FIXED_REGISTERS, CALL_USED_REGISTERS, CALL_REALLY_USED_REGISTERS,
reg_class, REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGISTER_NAMES,
DEBUG_REGISTER_NAMES, REG_ALLOC_ORDER): Adjust to include entries
for coprocessor registers.
(ADDITIONAL_REGISTER_NAMES): Include
ALL_COP_ADDITIONAL_REGISTER_NAMES.
(COP0_REG_FIRST, COP0_REG_LAST, COP0_REG_NUM,
COP2_REG_FIRST, COP2_REG_LAST, COP2_REG_NUM,
COP3_REG_FIRST, COP3_REG_LAST, COP3_REG_NUM,
COP0_REG_P, COP2_REG_P, COP3_REG_P, ALL_COP_REG_P,
COPNUM_AS_CHAR_FROM_REGNUM, COP_REG_CLASS_P): New macros.
(mips_char_to_class): Adjust comment to include coprocessor
constraint letters.
* config/mips/mips.c (coprocessor_operand, coprocessor2_operand):
New functions.
(mips_reg_names, mips_regno_to_class): Include coprocessor
information.
(mips_sw_reg_names): Ditto, make non-static.
(mips_move_1word): Handle moves to and from coprocessor registers.
(mips_move_2words): Handle moves to and from coprocessor
registers.
(mips_class_max_nregs, mips_register_move_cost): Handle
coprocessor register classes.
(override_options): Initialize mips_char_to_class and
mips_hard_regno_mode_ok properly for coprocessor registers.
* config/mips/mips.md (movdi_internal, movdi_internal2,
movsi_internal1, movsi_internal2): Add constraint-sets for
coprocessor registers.
* testsuite/gcc.c-torture/mipscop-1.c: New testcase.
* testsuite/gcc.c-torture/mipscop-1.x: Disable above if target
isn't mips.
* testsuite/gcc.c-torture/mipscop-2.c: New testcase.
* testsuite/gcc.c-torture/mipscop-2.x: Disable above if target
isn't mips.
* testsuite/gcc.c-torture/mipscop-3.c: New testcase.
* testsuite/gcc.c-torture/mipscop-3.x: Disable above if target
isn't mips.
* testsuite/gcc.c-torture/mipscop-4.c: New testcase.
* testsuite/gcc.c-torture/mipscop-4.x: Disable above if target
isn't mips.
* doc/tm.texi: Document feature.
From-SVN: r52765
2002-04-25 21:31:45 +02:00
|
|
|
floating-point support; they are not included in this mechanism.
|
|
|
|
|
|
|
|
There is one macro used in defining the MIPS coprocessor interface which
|
|
|
|
you may want to override in subtargets; it is described below.
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ALL_COP_ADDITIONAL_REGISTER_NAMES
|
mips.c (mips_class_max_nregs, [...]): New functions.
2002-04-24 Matt Hiller <hiller@redhat.com>
* mips.c (mips_class_max_nregs, mips_register_move_cost): New
functions.
* mips.h (CLASS_MAX_NREGS, REGISTER_MOVE_COST): Redefine as calls
of the corresponding functions.
* mips-protos.h (mips_class_max_nregs, mips_register_move_cost):
New prototypes.
2002-04-24 Matt Hiller <hiller@redhat.com>
* config/mips/mips.h (mips_sw_reg_names): Declare as extern.
(ALL_COP_ADDITIONAL_REGISTER_NAMES): New macro.
(FIRST_PSEUDO_REGISTER): Redefine considering coprocessor
registers, adjust comment accordingly.
(FIXED_REGISTERS, CALL_USED_REGISTERS, CALL_REALLY_USED_REGISTERS,
reg_class, REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGISTER_NAMES,
DEBUG_REGISTER_NAMES, REG_ALLOC_ORDER): Adjust to include entries
for coprocessor registers.
(ADDITIONAL_REGISTER_NAMES): Include
ALL_COP_ADDITIONAL_REGISTER_NAMES.
(COP0_REG_FIRST, COP0_REG_LAST, COP0_REG_NUM,
COP2_REG_FIRST, COP2_REG_LAST, COP2_REG_NUM,
COP3_REG_FIRST, COP3_REG_LAST, COP3_REG_NUM,
COP0_REG_P, COP2_REG_P, COP3_REG_P, ALL_COP_REG_P,
COPNUM_AS_CHAR_FROM_REGNUM, COP_REG_CLASS_P): New macros.
(mips_char_to_class): Adjust comment to include coprocessor
constraint letters.
* config/mips/mips.c (coprocessor_operand, coprocessor2_operand):
New functions.
(mips_reg_names, mips_regno_to_class): Include coprocessor
information.
(mips_sw_reg_names): Ditto, make non-static.
(mips_move_1word): Handle moves to and from coprocessor registers.
(mips_move_2words): Handle moves to and from coprocessor
registers.
(mips_class_max_nregs, mips_register_move_cost): Handle
coprocessor register classes.
(override_options): Initialize mips_char_to_class and
mips_hard_regno_mode_ok properly for coprocessor registers.
* config/mips/mips.md (movdi_internal, movdi_internal2,
movsi_internal1, movsi_internal2): Add constraint-sets for
coprocessor registers.
* testsuite/gcc.c-torture/mipscop-1.c: New testcase.
* testsuite/gcc.c-torture/mipscop-1.x: Disable above if target
isn't mips.
* testsuite/gcc.c-torture/mipscop-2.c: New testcase.
* testsuite/gcc.c-torture/mipscop-2.x: Disable above if target
isn't mips.
* testsuite/gcc.c-torture/mipscop-3.c: New testcase.
* testsuite/gcc.c-torture/mipscop-3.x: Disable above if target
isn't mips.
* testsuite/gcc.c-torture/mipscop-4.c: New testcase.
* testsuite/gcc.c-torture/mipscop-4.x: Disable above if target
isn't mips.
* doc/tm.texi: Document feature.
From-SVN: r52765
2002-04-25 21:31:45 +02:00
|
|
|
A comma-separated list (with leading comma) of pairs describing the
|
|
|
|
alternate names of coprocessor registers. The format of each entry should be
|
|
|
|
@smallexample
|
|
|
|
@{ @var{alternatename}, @var{register_number}@}
|
|
|
|
@end smallexample
|
|
|
|
Default: empty.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
mips.c (mips_class_max_nregs, [...]): New functions.
2002-04-24 Matt Hiller <hiller@redhat.com>
* mips.c (mips_class_max_nregs, mips_register_move_cost): New
functions.
* mips.h (CLASS_MAX_NREGS, REGISTER_MOVE_COST): Redefine as calls
of the corresponding functions.
* mips-protos.h (mips_class_max_nregs, mips_register_move_cost):
New prototypes.
2002-04-24 Matt Hiller <hiller@redhat.com>
* config/mips/mips.h (mips_sw_reg_names): Declare as extern.
(ALL_COP_ADDITIONAL_REGISTER_NAMES): New macro.
(FIRST_PSEUDO_REGISTER): Redefine considering coprocessor
registers, adjust comment accordingly.
(FIXED_REGISTERS, CALL_USED_REGISTERS, CALL_REALLY_USED_REGISTERS,
reg_class, REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGISTER_NAMES,
DEBUG_REGISTER_NAMES, REG_ALLOC_ORDER): Adjust to include entries
for coprocessor registers.
(ADDITIONAL_REGISTER_NAMES): Include
ALL_COP_ADDITIONAL_REGISTER_NAMES.
(COP0_REG_FIRST, COP0_REG_LAST, COP0_REG_NUM,
COP2_REG_FIRST, COP2_REG_LAST, COP2_REG_NUM,
COP3_REG_FIRST, COP3_REG_LAST, COP3_REG_NUM,
COP0_REG_P, COP2_REG_P, COP3_REG_P, ALL_COP_REG_P,
COPNUM_AS_CHAR_FROM_REGNUM, COP_REG_CLASS_P): New macros.
(mips_char_to_class): Adjust comment to include coprocessor
constraint letters.
* config/mips/mips.c (coprocessor_operand, coprocessor2_operand):
New functions.
(mips_reg_names, mips_regno_to_class): Include coprocessor
information.
(mips_sw_reg_names): Ditto, make non-static.
(mips_move_1word): Handle moves to and from coprocessor registers.
(mips_move_2words): Handle moves to and from coprocessor
registers.
(mips_class_max_nregs, mips_register_move_cost): Handle
coprocessor register classes.
(override_options): Initialize mips_char_to_class and
mips_hard_regno_mode_ok properly for coprocessor registers.
* config/mips/mips.md (movdi_internal, movdi_internal2,
movsi_internal1, movsi_internal2): Add constraint-sets for
coprocessor registers.
* testsuite/gcc.c-torture/mipscop-1.c: New testcase.
* testsuite/gcc.c-torture/mipscop-1.x: Disable above if target
isn't mips.
* testsuite/gcc.c-torture/mipscop-2.c: New testcase.
* testsuite/gcc.c-torture/mipscop-2.x: Disable above if target
isn't mips.
* testsuite/gcc.c-torture/mipscop-3.c: New testcase.
* testsuite/gcc.c-torture/mipscop-3.x: Disable above if target
isn't mips.
* testsuite/gcc.c-torture/mipscop-4.c: New testcase.
* testsuite/gcc.c-torture/mipscop-4.x: Disable above if target
isn't mips.
* doc/tm.texi: Document feature.
From-SVN: r52765
2002-04-25 21:31:45 +02:00
|
|
|
|
2003-10-24 23:28:13 +02:00
|
|
|
@node PCH Target
|
|
|
|
@section Parameters for Precompiled Header Validity Checking
|
|
|
|
@cindex parameters, precompiled headers
|
|
|
|
|
|
|
|
@deftypefn {Target Hook} void * TARGET_GET_PCH_VALIDITY (size_t * @var{sz})
|
|
|
|
Define this hook if your target needs to check a different collection
|
|
|
|
of flags than the default, which is every flag defined by
|
|
|
|
@code{TARGET_SWITCHES} and @code{TARGET_OPTIONS}. It should return
|
|
|
|
some data which will be saved in the PCH file and presented to
|
|
|
|
@code{TARGET_PCH_VALID_P} later; it should set @code{SZ} to the size
|
|
|
|
of the data.
|
|
|
|
@end deftypefn
|
|
|
|
|
|
|
|
@deftypefn {Target Hook} const char * TARGET_PCH_VALID_P (const void * @var{data}, size_t @var{sz})
|
|
|
|
Define this hook if your target needs to check a different collection of
|
|
|
|
flags than the default, which is every flag defined by @code{TARGET_SWITCHES}
|
|
|
|
and @code{TARGET_OPTIONS}. It is given data which came from
|
|
|
|
@code{TARGET_GET_PCH_VALIDITY} (in this version of this compiler, so there
|
|
|
|
is no need for extensive validity checking). It returns @code{NULL} if
|
|
|
|
it is safe to load a PCH file with this data, or a suitable error message
|
|
|
|
if not. The error message will be presented to the user, so it should
|
2004-01-31 18:31:40 +01:00
|
|
|
be localized.
|
2003-10-24 23:28:13 +02:00
|
|
|
@end deftypefn
|
|
|
|
|
2004-06-25 19:15:46 +02:00
|
|
|
@node C++ ABI
|
|
|
|
@section C++ ABI parameters
|
|
|
|
@cindex parameters, c++ abi
|
|
|
|
|
|
|
|
@deftypefn {Target Hook} tree TARGET_CXX_GUARD_TYPE (void)
|
|
|
|
Define this hook to override the integer type used for guard variables.
|
|
|
|
These are used to implement one-time construction of static objects. The
|
|
|
|
default is long_long_integer_type_node.
|
|
|
|
@end deftypefn
|
|
|
|
|
|
|
|
@deftypefn {Target Hook} bool TARGET_CXX_GUARD_MASK_BIT (void)
|
2004-08-24 02:30:52 +02:00
|
|
|
This hook determines how guard variables are used. It should return
|
2004-06-25 19:15:46 +02:00
|
|
|
@code{false} (the default) if first byte should be used. A return value of
|
|
|
|
@code{true} indicates the least significant bit should be used.
|
|
|
|
@end deftypefn
|
|
|
|
|
2004-06-29 16:50:35 +02:00
|
|
|
@deftypefn {Target Hook} tree TARGET_CXX_GET_COOKIE_SIZE (tree @var{type})
|
|
|
|
This hook returns the size of the cookie to use when allocating an array
|
|
|
|
whose elements have the indicated @var{type}. Assumes that it is already
|
|
|
|
known that a cookie is needed. The default is
|
|
|
|
@code{max(sizeof (size_t), alignof(type))}, as defined in section 2.7 of the
|
c-tree.texi, [...]: Correct end-of-sentence markup and markup of "etc.", "e.g." and "i.e.".
* doc/c-tree.texi, doc/cfg.texi, doc/contrib.texi, doc/cpp.texi,
doc/cppopts.texi, doc/extend.texi, doc/fragments.texi,
doc/frontends.texi, doc/gcov.texi, doc/hostconfig.texi,
doc/implement-c.texi, doc/install.texi, doc/invoke.texi,
doc/libgcc.texi, doc/md.texi, doc/passes.texi,
doc/portability.texi, doc/rtl.texi, doc/sourcebuild.texi,
doc/standards.texi, doc/tm.texi, doc/tree-ssa.texi,
doc/trouble.texi: Correct end-of-sentence markup and markup of
"etc.", "e.g." and "i.e.". Use @code in various places where
appropriate.
From-SVN: r90101
2004-11-05 02:36:57 +01:00
|
|
|
IA64/Generic C++ ABI@.
|
2004-06-29 16:50:35 +02:00
|
|
|
@end deftypefn
|
|
|
|
|
|
|
|
@deftypefn {Target Hook} bool TARGET_CXX_COOKIE_HAS_SIZE (void)
|
|
|
|
This hook should return @code{true} if the element size should be stored in
|
|
|
|
array cookies. The default is to return @code{false}.
|
|
|
|
@end deftypefn
|
|
|
|
|
2004-07-01 10:47:16 +02:00
|
|
|
@deftypefn {Target Hook} int TARGET_CXX_IMPORT_EXPORT_CLASS (tree @var{type}, int @var{import_export})
|
|
|
|
If defined by a backend this hook allows the decision made to export
|
|
|
|
class @var{type} to be overruled. Upon entry @var{import_export}
|
contrib.texi, [...]: Improve Texinfo formatting.
* doc/contrib.texi, doc/cpp.texi, doc/cppopts.texi,
doc/extend.texi, doc/gcov.texi, doc/install.texi, doc/invoke.texi,
doc/libgcc.texi, doc/md.texi, doc/passes.texi,
doc/sourcebuild.texi, doc/tm.texi: Improve Texinfo formatting.
From-SVN: r89725
2004-10-28 03:00:31 +02:00
|
|
|
will contain 1 if the class is going to be exported, @minus{}1 if it is going
|
2004-07-01 10:47:16 +02:00
|
|
|
to be imported and 0 otherwise. This function should return the
|
|
|
|
modified value and perform any other actions necessary to support the
|
|
|
|
backend's targeted operating system.
|
|
|
|
@end deftypefn
|
|
|
|
|
2004-08-04 17:33:51 +02:00
|
|
|
@deftypefn {Target Hook} bool TARGET_CXX_CDTOR_RETURNS_THIS (void)
|
|
|
|
This hook should return @code{true} if constructors and destructors return
|
|
|
|
the address of the object created/destroyed. The default is to return
|
|
|
|
@code{false}.
|
|
|
|
@end deftypefn
|
|
|
|
|
2004-08-31 22:29:28 +02:00
|
|
|
@deftypefn {Target Hook} bool TARGET_CXX_KEY_METHOD_MAY_BE_INLINE (void)
|
|
|
|
This hook returns true if the key method for a class (i.e., the method
|
|
|
|
which, if defined in the current translation unit, causes the virtual
|
|
|
|
table to be emitted) may be an inline function. Under the standard
|
|
|
|
Itanium C++ ABI the key method may be an inline function so long as
|
|
|
|
the function is not declared inline in the class definition. Under
|
|
|
|
some variants of the ABI, an inline function can never be the key
|
|
|
|
method. The default is to return @code{true}.
|
|
|
|
@end deftypefn
|
|
|
|
|
2004-09-01 05:45:30 +02:00
|
|
|
@deftypefn {Target Hook} bool TARGET_CXX_EXPORT_CLASS_DATA (void)
|
|
|
|
If this hook returns false (the default), then virtual tables and RTTI
|
|
|
|
data structures will have the ELF visibility of their containing
|
|
|
|
class. If this hook returns true, then these data structures will
|
|
|
|
have ELF ``default'' visibility, independently of the visibility of
|
|
|
|
the containing class.
|
|
|
|
@end deftypefn
|
|
|
|
|
1996-09-25 01:21:45 +02:00
|
|
|
@node Misc
|
|
|
|
@section Miscellaneous Parameters
|
|
|
|
@cindex parameters, miscellaneous
|
|
|
|
|
|
|
|
@c prevent bad page break with this line
|
|
|
|
Here are several miscellaneous parameters.
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac PREDICATE_CODES
|
1996-09-25 01:21:45 +02:00
|
|
|
Define this if you have defined special-purpose predicates in the file
|
|
|
|
@file{@var{machine}.c}. This macro is called within an initializer of an
|
|
|
|
array of structures. The first field in the structure is the name of a
|
|
|
|
predicate and the second field is an array of rtl codes. For each
|
|
|
|
predicate, list all rtl codes that can be in expressions matched by the
|
|
|
|
predicate. The list should have a trailing comma. Here is an example
|
|
|
|
of two entries in the list for a typical RISC machine:
|
|
|
|
|
|
|
|
@smallexample
|
|
|
|
#define PREDICATE_CODES \
|
|
|
|
@{"gen_reg_rtx_operand", @{SUBREG, REG@}@}, \
|
|
|
|
@{"reg_or_short_cint_operand", @{SUBREG, REG, CONST_INT@}@},
|
|
|
|
@end smallexample
|
|
|
|
|
|
|
|
Defining this macro does not affect the generated code (however,
|
|
|
|
incorrect definitions that omit an rtl code that may be matched by the
|
|
|
|
predicate can cause the compiler to malfunction). Instead, it allows
|
|
|
|
the table built by @file{genrecog} to be more compact and efficient,
|
|
|
|
thus speeding up the compiler. The most important predicates to include
|
1998-02-19 01:04:36 +01:00
|
|
|
in the list specified by this macro are those used in the most insn
|
1996-09-25 01:21:45 +02:00
|
|
|
patterns.
|
|
|
|
|
2001-07-03 02:46:05 +02:00
|
|
|
For each predicate function named in @code{PREDICATE_CODES}, a
|
2001-01-03 22:13:29 +01:00
|
|
|
declaration will be generated in @file{insn-codes.h}.
|
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
|
|
|
|
genpreds.c: Add capability to generate predicate bodies as well as function prototypes.
* genpreds.c: Add capability to generate predicate bodies as
well as function prototypes. Write function prototypes for
the generic predicates too.
(process_define_predicate, write_tm_preds_h, write_insn_preds_c)
(write_predicate_subfunction, mark_mode_tests, add_mode_tests)
(write_match_code, write_predicate_expr, write_one_predicate_function)
(parse_option): New functions.
(output_predicate_decls): Delete.
(main): Read the machine description, process DEFINE_PREDICATE or
DEFINE_SPECIAL_PREDICATE patterns, write tm-preds.h or insn-preds.c
as appropriate.
* genrecog.c (struct decision_test): Replace index with
struct pred_data pointer.
(next_index): Remove, unused.
(pred_table, preds, special_mode_pred_table): Delete.
(compute_predicate_codes, process_define_predicate): New functions.
(validate_pattern, add_to_sequence, write_switch): Update for
new data structures.
(main): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE.
Check both error_count and have_error.
* gensupport.c (in_fname, first_predicate): New globals.
(define_pred_queue, define_pred_tail): New RTL-pattern queue.
(predicate_table, last_predicate, old_pred_table)
(old_special_pred_table): New statics.
(hash_struct_pred_data, eq_struct_pred_data, lookup_predicate)
(add_predicate, init_predicate_table): New functions.
(process_rtx): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE.
(init_md_reader_args_cb): Use the global in_fname. No need to zero
it or max_include_len. Call init_predicate_table.
(read_rtx): Run the predicate queue after the attribute queue
but before all the others.
* gensupport.h (in_fname, struct pred_data, first_predicate)
(lookup_predicate, add_predicate, FOR_ALL_PREDICATES): Declare.
* rtl.def (MATCH_CODE, MATCH_TEST, DEFINE_PREDICATE)
(DEFINE_SPECIAL_PREDICATE): New RTL codes.
* dummy-conditions.c: Don't include bconfig.h, system.h,
coretypes.h, tm.h, or system.h. Do include stddef.h.
Duplicate declaration of struct c_test from gensupport.h.
* Makefile.in (OBJS-common): Add insn-preds.o.
(STAGESTUFF, .PRECIOUS): Add insn-preds.c.
(insn-preds.c, insn-preds.o): New rules.
(s-preds): Also generate insn-preds.c.
(dummy-conditions.o, genpreds$(build_exeext), genpreds.o):
Update dependencies.
(print-rtl.o, print-rtl1.o): Correct dependencies.
* recog.h: Delete prototypes of predicate functions.
* doc/md.texi (Predicates): New section with complete
documentation of operand/operator predicates. Remove some
incomplete documentation of predicates from other places.
* doc/tm.texi (Misc): Move SPECIAL_MODE_PREDICATES next to
PREDICATE_CODES; indicate that both are deprecated in favor
of define_predicate/define_special_predicate.
* config/ia64/ia64.c: All predicate function definitions moved
to ia64.md, except
(small_addr_symbolic_operand, tls_symbolic_operand): Delete.
(ia64_expand_load_address, ia64_expand_move):
Check SYMBOL_REF_TLS_MODEL directly, don't use tls_symbolic_operand.
* config/ia64/ia64.md: All predicates now defined here.
(symbolic_operand): Is now a special predicate.
* config/ia64/ia64.h: Declare ia64_section_threshold.
(PREDICATE_CODES): Delete.
From-SVN: r85855
2004-08-12 09:49:00 +02:00
|
|
|
Use of this macro is deprecated; use @code{define_predicate} instead.
|
|
|
|
@xref{Defining Predicates}.
|
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
|
|
|
@end defmac
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac SPECIAL_MODE_PREDICATES
|
1999-10-14 11:37:31 +02:00
|
|
|
Define this if you have special predicates that know special things
|
2001-04-28 13:35:04 +02:00
|
|
|
about modes. Genrecog will warn about certain forms of
|
1999-10-14 11:37:31 +02:00
|
|
|
@code{match_operand} without a mode; if the operand predicate is
|
2001-04-28 13:35:04 +02:00
|
|
|
listed in @code{SPECIAL_MODE_PREDICATES}, the warning will be
|
1999-10-14 11:37:31 +02:00
|
|
|
suppressed.
|
|
|
|
|
|
|
|
Here is an example from the IA-32 port (@code{ext_register_operand}
|
|
|
|
specially checks for @code{HImode} or @code{SImode} in preparation
|
|
|
|
for a byte extraction from @code{%ah} etc.).
|
|
|
|
|
|
|
|
@smallexample
|
|
|
|
#define SPECIAL_MODE_PREDICATES \
|
|
|
|
"ext_register_operand",
|
|
|
|
@end smallexample
|
genpreds.c: Add capability to generate predicate bodies as well as function prototypes.
* genpreds.c: Add capability to generate predicate bodies as
well as function prototypes. Write function prototypes for
the generic predicates too.
(process_define_predicate, write_tm_preds_h, write_insn_preds_c)
(write_predicate_subfunction, mark_mode_tests, add_mode_tests)
(write_match_code, write_predicate_expr, write_one_predicate_function)
(parse_option): New functions.
(output_predicate_decls): Delete.
(main): Read the machine description, process DEFINE_PREDICATE or
DEFINE_SPECIAL_PREDICATE patterns, write tm-preds.h or insn-preds.c
as appropriate.
* genrecog.c (struct decision_test): Replace index with
struct pred_data pointer.
(next_index): Remove, unused.
(pred_table, preds, special_mode_pred_table): Delete.
(compute_predicate_codes, process_define_predicate): New functions.
(validate_pattern, add_to_sequence, write_switch): Update for
new data structures.
(main): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE.
Check both error_count and have_error.
* gensupport.c (in_fname, first_predicate): New globals.
(define_pred_queue, define_pred_tail): New RTL-pattern queue.
(predicate_table, last_predicate, old_pred_table)
(old_special_pred_table): New statics.
(hash_struct_pred_data, eq_struct_pred_data, lookup_predicate)
(add_predicate, init_predicate_table): New functions.
(process_rtx): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE.
(init_md_reader_args_cb): Use the global in_fname. No need to zero
it or max_include_len. Call init_predicate_table.
(read_rtx): Run the predicate queue after the attribute queue
but before all the others.
* gensupport.h (in_fname, struct pred_data, first_predicate)
(lookup_predicate, add_predicate, FOR_ALL_PREDICATES): Declare.
* rtl.def (MATCH_CODE, MATCH_TEST, DEFINE_PREDICATE)
(DEFINE_SPECIAL_PREDICATE): New RTL codes.
* dummy-conditions.c: Don't include bconfig.h, system.h,
coretypes.h, tm.h, or system.h. Do include stddef.h.
Duplicate declaration of struct c_test from gensupport.h.
* Makefile.in (OBJS-common): Add insn-preds.o.
(STAGESTUFF, .PRECIOUS): Add insn-preds.c.
(insn-preds.c, insn-preds.o): New rules.
(s-preds): Also generate insn-preds.c.
(dummy-conditions.o, genpreds$(build_exeext), genpreds.o):
Update dependencies.
(print-rtl.o, print-rtl1.o): Correct dependencies.
* recog.h: Delete prototypes of predicate functions.
* doc/md.texi (Predicates): New section with complete
documentation of operand/operator predicates. Remove some
incomplete documentation of predicates from other places.
* doc/tm.texi (Misc): Move SPECIAL_MODE_PREDICATES next to
PREDICATE_CODES; indicate that both are deprecated in favor
of define_predicate/define_special_predicate.
* config/ia64/ia64.c: All predicate function definitions moved
to ia64.md, except
(small_addr_symbolic_operand, tls_symbolic_operand): Delete.
(ia64_expand_load_address, ia64_expand_move):
Check SYMBOL_REF_TLS_MODEL directly, don't use tls_symbolic_operand.
* config/ia64/ia64.md: All predicates now defined here.
(symbolic_operand): Is now a special predicate.
* config/ia64/ia64.h: Declare ia64_section_threshold.
(PREDICATE_CODES): Delete.
From-SVN: r85855
2004-08-12 09:49:00 +02:00
|
|
|
|
|
|
|
Use of this macro is deprecated; use @code{define_special_predicate}
|
|
|
|
instead. @xref{Defining Predicates}.
|
|
|
|
@end defmac
|
|
|
|
|
|
|
|
@defmac HAS_LONG_COND_BRANCH
|
|
|
|
Define this boolean macro to indicate whether or not your architecture
|
|
|
|
has conditional branches that can span all of memory. It is used in
|
|
|
|
conjunction with an optimization that partitions hot and cold basic
|
|
|
|
blocks into separate sections of the executable. If this macro is
|
|
|
|
set to false, gcc will convert any conditional branches that attempt
|
|
|
|
to cross between sections into unconditional branches or indirect jumps.
|
|
|
|
@end defmac
|
|
|
|
|
|
|
|
@defmac HAS_LONG_UNCOND_BRANCH
|
|
|
|
Define this boolean macro to indicate whether or not your architecture
|
|
|
|
has unconditional branches that can span all of memory. It is used in
|
|
|
|
conjunction with an optimization that partitions hot and cold basic
|
|
|
|
blocks into separate sections of the executable. If this macro is
|
|
|
|
set to false, gcc will convert any unconditional branches that attempt
|
|
|
|
to cross between sections into indirect jumps.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1999-10-14 11:37:31 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac CASE_VECTOR_MODE
|
1996-09-25 01:21:45 +02:00
|
|
|
An alias for a machine mode name. This is the machine mode that
|
|
|
|
elements of a jump-table should have.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac CASE_VECTOR_SHORTEN_MODE (@var{min_offset}, @var{max_offset}, @var{body})
|
rtl.h (addr_diff_vec_flags): New typedef.
* rtl.h (addr_diff_vec_flags): New typedef.
(union rtunion_def): New member rt_addr_diff_vec_flags.
(ADDR_DIFF_VEC_FLAGS): New macro.
* sh.c (output_branch): Fix offset overflow problems.
* final.c (shorten_branches): Implement CASE_VECTOR_SHORTEN_MODE.
(final_scan_insn): New argument BODY for ASM_OUTPUT_ADDR_DIFF_ELT.
* rtl.def (ADDR_DIFF_VEC): Three new fields (min, max and flags).
* stmt.c (expand_end_case): Supply new arguments to
gen_rtx_ADDR_DIFF_VEC.
* 1750a.h (ASM_OUTPUT_ADDR_DIFF_ELT): New argument BODY.
* alpha.h, arc.h, clipper.h, convex.h : Likewise.
* dsp16xx.h, elxsi.h, fx80.h, gmicro.h, h8300.h : Likewise.
* i370.h, i386.h, i860.h, i960.h, m32r.h, m68k.h, m88k.h : Likewise.
* mips.h, mn10200.h, mn10300.h, ns32k.h, pa.h, pyr.h : Likewise.
* rs6000.h, sh.h, sparc.h, spur.h, tahoe.h, v850.h : Likewise.
* vax.h, we32k.h, alpha/vms.h, arm/aof.h, arm/aout.h : Likewise.
* i386/386bsd.h, i386/freebsd-elf.h : Likewise.
* i386/freebsd.h, i386/linux.h : Likewise.
* i386/netbsd.h, i386/osfrose.h, i386/ptx4-i.h, i386/sco5.h : Likewise.
* i386/sysv4.h, m68k/3b1.h, m68k/dpx2.h, m68k/hp320.h : Likewise.
* m68k/mot3300.h, m68k/sgs.h : Likewise.
* m68k/tower-as.h, ns32k/encore.h, sparc/pbd.h : Likewise.
* sh.h (INSN_ALIGN, INSN_LENGTH_ALIGNMENT): Define.
(CASE_VECTOR_SHORTEN_MODE): Define.
(short_cbranch_p, align_length, addr_diff_vec_adjust): Don't declare.
(med_branch_p, braf_branch_p): Don't declare.
(mdep_reorg_phase, barrier_align): Declare.
(ADJUST_INSN_LENGTH): Remove alignment handling.
* sh.c (uid_align, uid_align_max): Deleted.
(max_uid_before_fixup_addr_diff_vecs, branch_offset): Deleted.
(short_cbranch_p, med_branch_p, braf_branch_p, align_length): Deleted.
(cache_align_p, fixup_aligns, addr_diff_vec_adjust): Deleted.
(output_far_jump): Don't use braf_branch_p.
(output_branchy_insn): Don't use branch_offset.
(find_barrier): Remove checks for max_uid_before_fixup_addr_diff_vecs.
Remove paired barrier stuff.
Don't use cache_align_p.
Take alignment insns into account.
(fixup_addr_diff_vecs): Reduce to only fixing up the base label of
the addr_diff_vec.
(barrier_align, branch_dest): New function.
(machine_dependent_reorg, split_branches): Remove infrastructure
for branch shortening that is now provided in the backend.
* sh.md (short_cbranch_p, med_branch_p, med_cbranch_p): New attributes.
(braf_branch_p, braf_cbranch_p): Likewise.
(attribute length): Use new attributes.
(casesi_worker): Get mode and unsignednedd from ADDR_DIFF_VEC.
(addr_diff_vec_adjust): Delete.
(align_2): Now a define_expand.
(align_log): Now length 0.
From-SVN: r18433
1998-03-06 15:54:07 +01:00
|
|
|
Optional: return the preferred mode for an @code{addr_diff_vec}
|
|
|
|
when the minimum and maximum offset are known. If you define this,
|
|
|
|
it enables extra code in branch shortening to deal with @code{addr_diff_vec}.
|
2002-08-30 21:18:51 +02:00
|
|
|
To make this work, you also have to define @code{INSN_ALIGN} and
|
rtl.h (addr_diff_vec_flags): New typedef.
* rtl.h (addr_diff_vec_flags): New typedef.
(union rtunion_def): New member rt_addr_diff_vec_flags.
(ADDR_DIFF_VEC_FLAGS): New macro.
* sh.c (output_branch): Fix offset overflow problems.
* final.c (shorten_branches): Implement CASE_VECTOR_SHORTEN_MODE.
(final_scan_insn): New argument BODY for ASM_OUTPUT_ADDR_DIFF_ELT.
* rtl.def (ADDR_DIFF_VEC): Three new fields (min, max and flags).
* stmt.c (expand_end_case): Supply new arguments to
gen_rtx_ADDR_DIFF_VEC.
* 1750a.h (ASM_OUTPUT_ADDR_DIFF_ELT): New argument BODY.
* alpha.h, arc.h, clipper.h, convex.h : Likewise.
* dsp16xx.h, elxsi.h, fx80.h, gmicro.h, h8300.h : Likewise.
* i370.h, i386.h, i860.h, i960.h, m32r.h, m68k.h, m88k.h : Likewise.
* mips.h, mn10200.h, mn10300.h, ns32k.h, pa.h, pyr.h : Likewise.
* rs6000.h, sh.h, sparc.h, spur.h, tahoe.h, v850.h : Likewise.
* vax.h, we32k.h, alpha/vms.h, arm/aof.h, arm/aout.h : Likewise.
* i386/386bsd.h, i386/freebsd-elf.h : Likewise.
* i386/freebsd.h, i386/linux.h : Likewise.
* i386/netbsd.h, i386/osfrose.h, i386/ptx4-i.h, i386/sco5.h : Likewise.
* i386/sysv4.h, m68k/3b1.h, m68k/dpx2.h, m68k/hp320.h : Likewise.
* m68k/mot3300.h, m68k/sgs.h : Likewise.
* m68k/tower-as.h, ns32k/encore.h, sparc/pbd.h : Likewise.
* sh.h (INSN_ALIGN, INSN_LENGTH_ALIGNMENT): Define.
(CASE_VECTOR_SHORTEN_MODE): Define.
(short_cbranch_p, align_length, addr_diff_vec_adjust): Don't declare.
(med_branch_p, braf_branch_p): Don't declare.
(mdep_reorg_phase, barrier_align): Declare.
(ADJUST_INSN_LENGTH): Remove alignment handling.
* sh.c (uid_align, uid_align_max): Deleted.
(max_uid_before_fixup_addr_diff_vecs, branch_offset): Deleted.
(short_cbranch_p, med_branch_p, braf_branch_p, align_length): Deleted.
(cache_align_p, fixup_aligns, addr_diff_vec_adjust): Deleted.
(output_far_jump): Don't use braf_branch_p.
(output_branchy_insn): Don't use branch_offset.
(find_barrier): Remove checks for max_uid_before_fixup_addr_diff_vecs.
Remove paired barrier stuff.
Don't use cache_align_p.
Take alignment insns into account.
(fixup_addr_diff_vecs): Reduce to only fixing up the base label of
the addr_diff_vec.
(barrier_align, branch_dest): New function.
(machine_dependent_reorg, split_branches): Remove infrastructure
for branch shortening that is now provided in the backend.
* sh.md (short_cbranch_p, med_branch_p, med_cbranch_p): New attributes.
(braf_branch_p, braf_cbranch_p): Likewise.
(attribute length): Use new attributes.
(casesi_worker): Get mode and unsignednedd from ADDR_DIFF_VEC.
(addr_diff_vec_adjust): Delete.
(align_2): Now a define_expand.
(align_log): Now length 0.
From-SVN: r18433
1998-03-06 15:54:07 +01:00
|
|
|
make the alignment for @code{addr_diff_vec} explicit.
|
1998-08-19 15:02:31 +02:00
|
|
|
The @var{body} argument is provided so that the offset_unsigned and scale
|
rtl.h (addr_diff_vec_flags): New typedef.
* rtl.h (addr_diff_vec_flags): New typedef.
(union rtunion_def): New member rt_addr_diff_vec_flags.
(ADDR_DIFF_VEC_FLAGS): New macro.
* sh.c (output_branch): Fix offset overflow problems.
* final.c (shorten_branches): Implement CASE_VECTOR_SHORTEN_MODE.
(final_scan_insn): New argument BODY for ASM_OUTPUT_ADDR_DIFF_ELT.
* rtl.def (ADDR_DIFF_VEC): Three new fields (min, max and flags).
* stmt.c (expand_end_case): Supply new arguments to
gen_rtx_ADDR_DIFF_VEC.
* 1750a.h (ASM_OUTPUT_ADDR_DIFF_ELT): New argument BODY.
* alpha.h, arc.h, clipper.h, convex.h : Likewise.
* dsp16xx.h, elxsi.h, fx80.h, gmicro.h, h8300.h : Likewise.
* i370.h, i386.h, i860.h, i960.h, m32r.h, m68k.h, m88k.h : Likewise.
* mips.h, mn10200.h, mn10300.h, ns32k.h, pa.h, pyr.h : Likewise.
* rs6000.h, sh.h, sparc.h, spur.h, tahoe.h, v850.h : Likewise.
* vax.h, we32k.h, alpha/vms.h, arm/aof.h, arm/aout.h : Likewise.
* i386/386bsd.h, i386/freebsd-elf.h : Likewise.
* i386/freebsd.h, i386/linux.h : Likewise.
* i386/netbsd.h, i386/osfrose.h, i386/ptx4-i.h, i386/sco5.h : Likewise.
* i386/sysv4.h, m68k/3b1.h, m68k/dpx2.h, m68k/hp320.h : Likewise.
* m68k/mot3300.h, m68k/sgs.h : Likewise.
* m68k/tower-as.h, ns32k/encore.h, sparc/pbd.h : Likewise.
* sh.h (INSN_ALIGN, INSN_LENGTH_ALIGNMENT): Define.
(CASE_VECTOR_SHORTEN_MODE): Define.
(short_cbranch_p, align_length, addr_diff_vec_adjust): Don't declare.
(med_branch_p, braf_branch_p): Don't declare.
(mdep_reorg_phase, barrier_align): Declare.
(ADJUST_INSN_LENGTH): Remove alignment handling.
* sh.c (uid_align, uid_align_max): Deleted.
(max_uid_before_fixup_addr_diff_vecs, branch_offset): Deleted.
(short_cbranch_p, med_branch_p, braf_branch_p, align_length): Deleted.
(cache_align_p, fixup_aligns, addr_diff_vec_adjust): Deleted.
(output_far_jump): Don't use braf_branch_p.
(output_branchy_insn): Don't use branch_offset.
(find_barrier): Remove checks for max_uid_before_fixup_addr_diff_vecs.
Remove paired barrier stuff.
Don't use cache_align_p.
Take alignment insns into account.
(fixup_addr_diff_vecs): Reduce to only fixing up the base label of
the addr_diff_vec.
(barrier_align, branch_dest): New function.
(machine_dependent_reorg, split_branches): Remove infrastructure
for branch shortening that is now provided in the backend.
* sh.md (short_cbranch_p, med_branch_p, med_cbranch_p): New attributes.
(braf_branch_p, braf_cbranch_p): Likewise.
(attribute length): Use new attributes.
(casesi_worker): Get mode and unsignednedd from ADDR_DIFF_VEC.
(addr_diff_vec_adjust): Delete.
(align_2): Now a define_expand.
(align_log): Now length 0.
From-SVN: r18433
1998-03-06 15:54:07 +01:00
|
|
|
flags can be updated.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
rtl.h (addr_diff_vec_flags): New typedef.
* rtl.h (addr_diff_vec_flags): New typedef.
(union rtunion_def): New member rt_addr_diff_vec_flags.
(ADDR_DIFF_VEC_FLAGS): New macro.
* sh.c (output_branch): Fix offset overflow problems.
* final.c (shorten_branches): Implement CASE_VECTOR_SHORTEN_MODE.
(final_scan_insn): New argument BODY for ASM_OUTPUT_ADDR_DIFF_ELT.
* rtl.def (ADDR_DIFF_VEC): Three new fields (min, max and flags).
* stmt.c (expand_end_case): Supply new arguments to
gen_rtx_ADDR_DIFF_VEC.
* 1750a.h (ASM_OUTPUT_ADDR_DIFF_ELT): New argument BODY.
* alpha.h, arc.h, clipper.h, convex.h : Likewise.
* dsp16xx.h, elxsi.h, fx80.h, gmicro.h, h8300.h : Likewise.
* i370.h, i386.h, i860.h, i960.h, m32r.h, m68k.h, m88k.h : Likewise.
* mips.h, mn10200.h, mn10300.h, ns32k.h, pa.h, pyr.h : Likewise.
* rs6000.h, sh.h, sparc.h, spur.h, tahoe.h, v850.h : Likewise.
* vax.h, we32k.h, alpha/vms.h, arm/aof.h, arm/aout.h : Likewise.
* i386/386bsd.h, i386/freebsd-elf.h : Likewise.
* i386/freebsd.h, i386/linux.h : Likewise.
* i386/netbsd.h, i386/osfrose.h, i386/ptx4-i.h, i386/sco5.h : Likewise.
* i386/sysv4.h, m68k/3b1.h, m68k/dpx2.h, m68k/hp320.h : Likewise.
* m68k/mot3300.h, m68k/sgs.h : Likewise.
* m68k/tower-as.h, ns32k/encore.h, sparc/pbd.h : Likewise.
* sh.h (INSN_ALIGN, INSN_LENGTH_ALIGNMENT): Define.
(CASE_VECTOR_SHORTEN_MODE): Define.
(short_cbranch_p, align_length, addr_diff_vec_adjust): Don't declare.
(med_branch_p, braf_branch_p): Don't declare.
(mdep_reorg_phase, barrier_align): Declare.
(ADJUST_INSN_LENGTH): Remove alignment handling.
* sh.c (uid_align, uid_align_max): Deleted.
(max_uid_before_fixup_addr_diff_vecs, branch_offset): Deleted.
(short_cbranch_p, med_branch_p, braf_branch_p, align_length): Deleted.
(cache_align_p, fixup_aligns, addr_diff_vec_adjust): Deleted.
(output_far_jump): Don't use braf_branch_p.
(output_branchy_insn): Don't use branch_offset.
(find_barrier): Remove checks for max_uid_before_fixup_addr_diff_vecs.
Remove paired barrier stuff.
Don't use cache_align_p.
Take alignment insns into account.
(fixup_addr_diff_vecs): Reduce to only fixing up the base label of
the addr_diff_vec.
(barrier_align, branch_dest): New function.
(machine_dependent_reorg, split_branches): Remove infrastructure
for branch shortening that is now provided in the backend.
* sh.md (short_cbranch_p, med_branch_p, med_cbranch_p): New attributes.
(braf_branch_p, braf_cbranch_p): Likewise.
(attribute length): Use new attributes.
(casesi_worker): Get mode and unsignednedd from ADDR_DIFF_VEC.
(addr_diff_vec_adjust): Delete.
(align_2): Now a define_expand.
(align_log): Now length 0.
From-SVN: r18433
1998-03-06 15:54:07 +01:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac CASE_VECTOR_PC_RELATIVE
|
1997-12-19 17:43:29 +01:00
|
|
|
Define this macro to be a C expression to indicate when jump-tables
|
2004-01-22 12:50:01 +01:00
|
|
|
should contain relative addresses. You need not define this macro if
|
|
|
|
jump-tables never contain relative addresses, or jump-tables should
|
|
|
|
contain relative addresses only when @option{-fPIC} or @option{-fPIC}
|
|
|
|
is in effect.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac CASE_VALUES_THRESHOLD
|
1996-09-25 01:21:45 +02:00
|
|
|
Define this to be the smallest number of different values for which it
|
|
|
|
is best to use a jump-table instead of a tree of conditional branches.
|
|
|
|
The default is four for machines with a @code{casesi} instruction and
|
|
|
|
five otherwise. This is best for most machines.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac CASE_USE_BIT_TESTS
|
2003-01-25 18:30:29 +01:00
|
|
|
Define this macro to be a C expression to indicate whether C switch
|
|
|
|
statements may be implemented by a sequence of bit tests. This is
|
|
|
|
advantageous on processors that can efficiently implement left shift
|
|
|
|
of 1 by the number of bits held in a register, but inappropriate on
|
|
|
|
targets that would require a loop. By default, this macro returns
|
|
|
|
@code{true} if the target defines an @code{ashlsi3} pattern, and
|
|
|
|
@code{false} otherwise.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2003-01-25 18:30:29 +01:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac WORD_REGISTER_OPERATIONS
|
1996-09-25 01:21:45 +02:00
|
|
|
Define this macro if operations between registers with integral mode
|
|
|
|
smaller than a word are always performed on the entire register.
|
|
|
|
Most RISC machines have this property and most CISC machines do not.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2004-01-23 14:01:42 +01:00
|
|
|
@defmac LOAD_EXTEND_OP (@var{mem_mode})
|
1996-09-25 01:21:45 +02:00
|
|
|
Define this macro to be a C expression indicating when insns that read
|
2004-01-23 14:01:42 +01:00
|
|
|
memory in @var{mem_mode}, an integral mode narrower than a word, set the
|
|
|
|
bits outside of @var{mem_mode} to be either the sign-extension or the
|
1996-09-25 01:21:45 +02:00
|
|
|
zero-extension of the data read. Return @code{SIGN_EXTEND} for values
|
2004-01-23 14:01:42 +01:00
|
|
|
of @var{mem_mode} for which the
|
1996-09-25 01:21:45 +02:00
|
|
|
insn sign-extends, @code{ZERO_EXTEND} for which it zero-extends, and
|
rtl.def (NIL): Delete.
* rtl.def (NIL): Delete.
* read-rtl.c (read_rtx): Handle (nil) like (define_constants).
Tighten the syntax a little.
* cfgloop.h, combine.c, cse.c, loop-iv.c, postreload.c, reload.c
* config/alpha/alpha.c, config/alpha/alpha.h, config/arc/arc.h
* config/arm/arm.h, config/frv/frv.h, config/i386/i386.c
* config/i386/predicates.md, config/m32r/m32r.h
* config/m68hc11/m68hc11.c, config/mcore/mcore.h, config/mips/mips.c
* config/mmix/mmix.c, config/pa/pa.h, config/sh/sh.h
* config/sparc/sparc.h, doc/tm.texi:
Replace all occurrences of NIL with UNKNOWN.
From-SVN: r86193
2004-08-18 19:05:14 +02:00
|
|
|
@code{UNKNOWN} for other modes.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2004-01-23 14:01:42 +01:00
|
|
|
This macro is not called with @var{mem_mode} non-integral or with a width
|
1996-09-25 01:21:45 +02:00
|
|
|
greater than or equal to @code{BITS_PER_WORD}, so you may return any
|
|
|
|
value in this case. Do not define this macro if it would always return
|
rtl.def (NIL): Delete.
* rtl.def (NIL): Delete.
* read-rtl.c (read_rtx): Handle (nil) like (define_constants).
Tighten the syntax a little.
* cfgloop.h, combine.c, cse.c, loop-iv.c, postreload.c, reload.c
* config/alpha/alpha.c, config/alpha/alpha.h, config/arc/arc.h
* config/arm/arm.h, config/frv/frv.h, config/i386/i386.c
* config/i386/predicates.md, config/m32r/m32r.h
* config/m68hc11/m68hc11.c, config/mcore/mcore.h, config/mips/mips.c
* config/mmix/mmix.c, config/pa/pa.h, config/sh/sh.h
* config/sparc/sparc.h, doc/tm.texi:
Replace all occurrences of NIL with UNKNOWN.
From-SVN: r86193
2004-08-18 19:05:14 +02:00
|
|
|
@code{UNKNOWN}. On machines where this macro is defined, you will normally
|
1996-09-25 01:21:45 +02:00
|
|
|
define it as the constant @code{SIGN_EXTEND} or @code{ZERO_EXTEND}.
|
2004-01-23 14:01:42 +01:00
|
|
|
|
rtl.def (NIL): Delete.
* rtl.def (NIL): Delete.
* read-rtl.c (read_rtx): Handle (nil) like (define_constants).
Tighten the syntax a little.
* cfgloop.h, combine.c, cse.c, loop-iv.c, postreload.c, reload.c
* config/alpha/alpha.c, config/alpha/alpha.h, config/arc/arc.h
* config/arm/arm.h, config/frv/frv.h, config/i386/i386.c
* config/i386/predicates.md, config/m32r/m32r.h
* config/m68hc11/m68hc11.c, config/mcore/mcore.h, config/mips/mips.c
* config/mmix/mmix.c, config/pa/pa.h, config/sh/sh.h
* config/sparc/sparc.h, doc/tm.texi:
Replace all occurrences of NIL with UNKNOWN.
From-SVN: r86193
2004-08-18 19:05:14 +02:00
|
|
|
You may return a non-@code{UNKNOWN} value even if for some hard registers
|
2004-01-23 14:01:42 +01:00
|
|
|
the sign extension is not performed, if for the @code{REGNO_REG_CLASS}
|
|
|
|
of these hard registers @code{CANNOT_CHANGE_MODE_CLASS} returns nonzero
|
|
|
|
when the @var{from} mode is @var{mem_mode} and the @var{to} mode is any
|
|
|
|
integral mode larger than this but not larger than @code{word_mode}.
|
|
|
|
|
rtl.def (NIL): Delete.
* rtl.def (NIL): Delete.
* read-rtl.c (read_rtx): Handle (nil) like (define_constants).
Tighten the syntax a little.
* cfgloop.h, combine.c, cse.c, loop-iv.c, postreload.c, reload.c
* config/alpha/alpha.c, config/alpha/alpha.h, config/arc/arc.h
* config/arm/arm.h, config/frv/frv.h, config/i386/i386.c
* config/i386/predicates.md, config/m32r/m32r.h
* config/m68hc11/m68hc11.c, config/mcore/mcore.h, config/mips/mips.c
* config/mmix/mmix.c, config/pa/pa.h, config/sh/sh.h
* config/sparc/sparc.h, doc/tm.texi:
Replace all occurrences of NIL with UNKNOWN.
From-SVN: r86193
2004-08-18 19:05:14 +02:00
|
|
|
You must return @code{UNKNOWN} if for some hard registers that allow this
|
2004-01-23 14:01:42 +01:00
|
|
|
mode, @code{CANNOT_CHANGE_MODE_CLASS} says that they cannot change to
|
|
|
|
@code{word_mode}, but that they can change to another integral mode that
|
|
|
|
is larger then @var{mem_mode} but still smaller than @code{word_mode}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac SHORT_IMMEDIATES_SIGN_EXTEND
|
1997-11-19 23:20:01 +01:00
|
|
|
Define this macro if loading short immediate values into registers sign
|
|
|
|
extends.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1997-11-19 23:20:01 +01:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac FIXUNS_TRUNC_LIKE_FIX_TRUNC
|
1996-09-25 01:21:45 +02:00
|
|
|
Define this macro if the same instructions that convert a floating
|
|
|
|
point number to a signed fixed point number also convert validly to an
|
|
|
|
unsigned one.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac MOVE_MAX
|
1996-09-25 01:21:45 +02:00
|
|
|
The maximum number of bytes that a single instruction can move quickly
|
|
|
|
between memory and registers or between two memory locations.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac MAX_MOVE_MAX
|
1996-09-25 01:21:45 +02:00
|
|
|
The maximum number of bytes that a single instruction can move quickly
|
|
|
|
between memory and registers or between two memory locations. If this
|
|
|
|
is undefined, the default is @code{MOVE_MAX}. Otherwise, it is the
|
|
|
|
constant value that is the largest value that @code{MOVE_MAX} can have
|
|
|
|
at run-time.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac SHIFT_COUNT_TRUNCATED
|
1996-09-25 01:21:45 +02:00
|
|
|
A C expression that is nonzero if on this machine the number of bits
|
|
|
|
actually used for the count of a shift operation is equal to the number
|
|
|
|
of bits needed to represent the size of the object being shifted. When
|
2001-10-10 01:11:55 +02:00
|
|
|
this macro is nonzero, the compiler will assume that it is safe to omit
|
1996-09-25 01:21:45 +02:00
|
|
|
a sign-extend, zero-extend, and certain bitwise `and' instructions that
|
|
|
|
truncates the count of a shift operation. On machines that have
|
c-tree.texi, [...]: Fix spelling and typos.
* doc/c-tree.texi, doc/contrib.texi, doc/extend.texi,
doc/gcc.texi, doc/install.texi, doc/invoke.texi, doc/md.texi,
doc/objc.texi, doc/rtl.texi, doc/tm.texi: Fix spelling and typos.
Consistently use "built-in" and "bit-field". Minor logical markup
improvements.
* doc/gcc.1: Regenerate.
From-SVN: r43383
2001-06-15 00:51:18 +02:00
|
|
|
instructions that act on bit-fields at variable positions, which may
|
1996-09-25 01:21:45 +02:00
|
|
|
include `bit test' instructions, a nonzero @code{SHIFT_COUNT_TRUNCATED}
|
|
|
|
also enables deletion of truncations of the values that serve as
|
c-tree.texi, [...]: Fix spelling and typos.
* doc/c-tree.texi, doc/contrib.texi, doc/extend.texi,
doc/gcc.texi, doc/install.texi, doc/invoke.texi, doc/md.texi,
doc/objc.texi, doc/rtl.texi, doc/tm.texi: Fix spelling and typos.
Consistently use "built-in" and "bit-field". Minor logical markup
improvements.
* doc/gcc.1: Regenerate.
From-SVN: r43383
2001-06-15 00:51:18 +02:00
|
|
|
arguments to bit-field instructions.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
If both types of instructions truncate the count (for shifts) and
|
c-tree.texi, [...]: Fix spelling and typos.
* doc/c-tree.texi, doc/contrib.texi, doc/extend.texi,
doc/gcc.texi, doc/install.texi, doc/invoke.texi, doc/md.texi,
doc/objc.texi, doc/rtl.texi, doc/tm.texi: Fix spelling and typos.
Consistently use "built-in" and "bit-field". Minor logical markup
improvements.
* doc/gcc.1: Regenerate.
From-SVN: r43383
2001-06-15 00:51:18 +02:00
|
|
|
position (for bit-field operations), or if no variable-position bit-field
|
1996-09-25 01:21:45 +02:00
|
|
|
instructions exist, you should define this macro.
|
|
|
|
|
|
|
|
However, on some machines, such as the 80386 and the 680x0, truncation
|
|
|
|
only applies to shift operations and not the (real or pretended)
|
c-tree.texi, [...]: Fix spelling and typos.
* doc/c-tree.texi, doc/contrib.texi, doc/extend.texi,
doc/gcc.texi, doc/install.texi, doc/invoke.texi, doc/md.texi,
doc/objc.texi, doc/rtl.texi, doc/tm.texi: Fix spelling and typos.
Consistently use "built-in" and "bit-field". Minor logical markup
improvements.
* doc/gcc.1: Regenerate.
From-SVN: r43383
2001-06-15 00:51:18 +02:00
|
|
|
bit-field operations. Define @code{SHIFT_COUNT_TRUNCATED} to be zero on
|
1996-09-25 01:21:45 +02:00
|
|
|
such machines. Instead, add patterns to the @file{md} file that include
|
|
|
|
the implied truncation of the shift instructions.
|
|
|
|
|
|
|
|
You need not define this macro if it would always have the value of zero.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2004-09-04 10:50:36 +02:00
|
|
|
@anchor{TARGET_SHIFT_TRUNCATION_MASK}
|
|
|
|
@deftypefn {Target Hook} int TARGET_SHIFT_TRUNCATION_MASK (enum machine_mode @var{mode})
|
|
|
|
This function describes how the standard shift patterns for @var{mode}
|
|
|
|
deal with shifts by negative amounts or by more than the width of the mode.
|
|
|
|
@xref{shift patterns}.
|
|
|
|
|
|
|
|
On many machines, the shift patterns will apply a mask @var{m} to the
|
|
|
|
shift count, meaning that a fixed-width shift of @var{x} by @var{y} is
|
|
|
|
equivalent to an arbitrary-width shift of @var{x} by @var{y & m}. If
|
|
|
|
this is true for mode @var{mode}, the function should return @var{m},
|
|
|
|
otherwise it should return 0. A return value of 0 indicates that no
|
|
|
|
particular behavior is guaranteed.
|
|
|
|
|
|
|
|
Note that, unlike @code{SHIFT_COUNT_TRUNCATED}, this function does
|
|
|
|
@emph{not} apply to general shift rtxes; it applies only to instructions
|
|
|
|
that are generated by the named shift patterns.
|
|
|
|
|
|
|
|
The default implementation of this function returns
|
|
|
|
@code{GET_MODE_BITSIZE (@var{mode}) - 1} if @code{SHIFT_COUNT_TRUNCATED}
|
|
|
|
and 0 otherwise. This definition is always safe, but if
|
|
|
|
@code{SHIFT_COUNT_TRUNCATED} is false, and some shift patterns
|
|
|
|
nevertheless truncate the shift count, you may get better code
|
|
|
|
by overriding it.
|
|
|
|
@end deftypefn
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac TRULY_NOOP_TRUNCATION (@var{outprec}, @var{inprec})
|
1996-09-25 01:21:45 +02:00
|
|
|
A C expression which is nonzero if on this machine it is safe to
|
|
|
|
``convert'' an integer of @var{inprec} bits to one of @var{outprec}
|
|
|
|
bits (where @var{outprec} is smaller than @var{inprec}) by merely
|
|
|
|
operating on it as if it had only @var{outprec} bits.
|
|
|
|
|
|
|
|
On many machines, this expression can be 1.
|
|
|
|
|
|
|
|
@c rearranged this, removed the phrase "it is reported that". this was
|
|
|
|
@c to fix an overfull hbox. --mew 10feb93
|
|
|
|
When @code{TRULY_NOOP_TRUNCATION} returns 1 for a pair of sizes for
|
|
|
|
modes for which @code{MODES_TIEABLE_P} is 0, suboptimal code can result.
|
|
|
|
If this is the case, making @code{TRULY_NOOP_TRUNCATION} return 0 in
|
|
|
|
such cases may improve things.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac STORE_FLAG_VALUE
|
1996-09-25 01:21:45 +02:00
|
|
|
A C expression describing the value returned by a comparison operator
|
|
|
|
with an integral mode and stored by a store-flag instruction
|
|
|
|
(@samp{s@var{cond}}) when the condition is true. This description must
|
|
|
|
apply to @emph{all} the @samp{s@var{cond}} patterns and all the
|
|
|
|
comparison operators whose results have a @code{MODE_INT} mode.
|
|
|
|
|
c-tree.texi, [...]: Use more logical markup.
* doc/c-tree.texi, doc/contrib.texi, doc/extend.texi,
doc/gcc.texi, doc/gcov.texi, doc/install-old.texi,
doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: Use more
logical markup. Use TeX quotes and dashes. Use @dots{} and
@minus{}. Avoid spaces inside @var. Update last modification
date in gcc.texi.
* doc/gcc.1, doc/gcov.1: Regenerate.
From-SVN: r43369
2001-06-14 13:08:04 +02:00
|
|
|
A value of 1 or @minus{}1 means that the instruction implementing the
|
|
|
|
comparison operator returns exactly 1 or @minus{}1 when the comparison is true
|
1996-09-25 01:21:45 +02:00
|
|
|
and 0 when the comparison is false. Otherwise, the value indicates
|
|
|
|
which bits of the result are guaranteed to be 1 when the comparison is
|
|
|
|
true. This value is interpreted in the mode of the comparison
|
|
|
|
operation, which is given by the mode of the first operand in the
|
|
|
|
@samp{s@var{cond}} pattern. Either the low bit or the sign bit of
|
|
|
|
@code{STORE_FLAG_VALUE} be on. Presently, only those bits are used by
|
|
|
|
the compiler.
|
|
|
|
|
c-tree.texi, [...]: Use more logical markup.
* doc/c-tree.texi, doc/contrib.texi, doc/extend.texi,
doc/gcc.texi, doc/gcov.texi, doc/install-old.texi,
doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: Use more
logical markup. Use TeX quotes and dashes. Use @dots{} and
@minus{}. Avoid spaces inside @var. Update last modification
date in gcc.texi.
* doc/gcc.1, doc/gcov.1: Regenerate.
From-SVN: r43369
2001-06-14 13:08:04 +02:00
|
|
|
If @code{STORE_FLAG_VALUE} is neither 1 or @minus{}1, the compiler will
|
1996-09-25 01:21:45 +02:00
|
|
|
generate code that depends only on the specified bits. It can also
|
|
|
|
replace comparison operators with equivalent operations if they cause
|
|
|
|
the required bits to be set, even if the remaining bits are undefined.
|
|
|
|
For example, on a machine whose comparison operators return an
|
|
|
|
@code{SImode} value and where @code{STORE_FLAG_VALUE} is defined as
|
|
|
|
@samp{0x80000000}, saying that just the sign bit is relevant, the
|
|
|
|
expression
|
|
|
|
|
|
|
|
@smallexample
|
|
|
|
(ne:SI (and:SI @var{x} (const_int @var{power-of-2})) (const_int 0))
|
|
|
|
@end smallexample
|
|
|
|
|
|
|
|
@noindent
|
|
|
|
can be converted to
|
|
|
|
|
|
|
|
@smallexample
|
|
|
|
(ashift:SI @var{x} (const_int @var{n}))
|
|
|
|
@end smallexample
|
|
|
|
|
|
|
|
@noindent
|
|
|
|
where @var{n} is the appropriate shift count to move the bit being
|
|
|
|
tested into the sign bit.
|
|
|
|
|
|
|
|
There is no way to describe a machine that always sets the low-order bit
|
|
|
|
for a true value, but does not guarantee the value of any other bits,
|
|
|
|
but we do not know of any machine that has such an instruction. If you
|
1999-08-25 09:27:13 +02:00
|
|
|
are trying to port GCC to such a machine, include an instruction to
|
1996-09-25 01:21:45 +02:00
|
|
|
perform a logical-and of the result with 1 in the pattern for the
|
Separate user and internals manuals.
* Makefile.in (info, $(docdir)/gcc.info, dvi, gcc.dvi): Update
dependencies.
($(docdir)/gccint.info, gccint.dvi): New targets.
(maintainer-clean, install-info, uninstall): Update.
* doc/.cvsignore: Add gccint.info*.
* doc/include/gcc-common.texi: New file.
* doc/gcc.texi: Use it. Adjust to be a user-only manual. Put
copyright notice in a macro. Don't include ISBN unless FSFPRINT
is defined.
* doc/gccint.texi: New file.
* doc/configfiles.texi, doc/extend.texi, doc/invoke.texi,
doc/md.texi, doc/passes.texi, doc/tm.texi, doc/trouble.texi:
Update for separate user and internals manuals.
f:
* g77.texi, invoke.texi: Update links to GCC manual.
java:
* gcj.texi: Update link to GCC manual.
From-SVN: r48119
2001-12-17 20:20:05 +01:00
|
|
|
comparison operators and let us know at @email{gcc@@gcc.gnu.org}.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
Often, a machine will have multiple instructions that obtain a value
|
|
|
|
from a comparison (or the condition codes). Here are rules to guide the
|
|
|
|
choice of value for @code{STORE_FLAG_VALUE}, and hence the instructions
|
|
|
|
to be used:
|
|
|
|
|
|
|
|
@itemize @bullet
|
|
|
|
@item
|
|
|
|
Use the shortest sequence that yields a valid definition for
|
|
|
|
@code{STORE_FLAG_VALUE}. It is more efficient for the compiler to
|
|
|
|
``normalize'' the value (convert it to, e.g., 1 or 0) than for the
|
|
|
|
comparison operators to do so because there may be opportunities to
|
|
|
|
combine the normalization with other operations.
|
|
|
|
|
|
|
|
@item
|
c-tree.texi, [...]: Use more logical markup.
* doc/c-tree.texi, doc/contrib.texi, doc/extend.texi,
doc/gcc.texi, doc/gcov.texi, doc/install-old.texi,
doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: Use more
logical markup. Use TeX quotes and dashes. Use @dots{} and
@minus{}. Avoid spaces inside @var. Update last modification
date in gcc.texi.
* doc/gcc.1, doc/gcov.1: Regenerate.
From-SVN: r43369
2001-06-14 13:08:04 +02:00
|
|
|
For equal-length sequences, use a value of 1 or @minus{}1, with @minus{}1 being
|
1996-09-25 01:21:45 +02:00
|
|
|
slightly preferred on machines with expensive jumps and 1 preferred on
|
|
|
|
other machines.
|
|
|
|
|
|
|
|
@item
|
|
|
|
As a second choice, choose a value of @samp{0x80000001} if instructions
|
|
|
|
exist that set both the sign and low-order bits but do not define the
|
|
|
|
others.
|
|
|
|
|
|
|
|
@item
|
|
|
|
Otherwise, use a value of @samp{0x80000000}.
|
|
|
|
@end itemize
|
|
|
|
|
|
|
|
Many machines can produce both the value chosen for
|
|
|
|
@code{STORE_FLAG_VALUE} and its negation in the same number of
|
|
|
|
instructions. On those machines, you should also define a pattern for
|
|
|
|
those cases, e.g., one matching
|
|
|
|
|
|
|
|
@smallexample
|
|
|
|
(set @var{A} (neg:@var{m} (ne:@var{m} @var{B} @var{C})))
|
|
|
|
@end smallexample
|
|
|
|
|
|
|
|
Some machines can also perform @code{and} or @code{plus} operations on
|
|
|
|
condition code values with less instructions than the corresponding
|
|
|
|
@samp{s@var{cond}} insn followed by @code{and} or @code{plus}. On those
|
|
|
|
machines, define the appropriate patterns. Use the names @code{incscc}
|
|
|
|
and @code{decscc}, respectively, for the patterns which perform
|
|
|
|
@code{plus} or @code{minus} operations on condition code values. See
|
|
|
|
@file{rs6000.md} for some examples. The GNU Superoptizer can be used to
|
|
|
|
find such instruction sequences on other machines.
|
|
|
|
|
2003-06-14 23:47:45 +02:00
|
|
|
If this macro is not defined, the default value, 1, is used. You need
|
|
|
|
not define @code{STORE_FLAG_VALUE} if the machine has no store-flag
|
|
|
|
instructions, or if the value generated by these instructions is 1.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac FLOAT_STORE_FLAG_VALUE (@var{mode})
|
2001-10-10 01:11:55 +02:00
|
|
|
A C expression that gives a nonzero @code{REAL_VALUE_TYPE} value that is
|
1996-09-25 01:21:45 +02:00
|
|
|
returned when comparison operators with floating-point results are true.
|
2004-10-09 21:27:55 +02:00
|
|
|
Define this macro on machines that have comparison operations that return
|
1996-09-25 01:21:45 +02:00
|
|
|
floating-point values. If there are no such operations, do not define
|
|
|
|
this macro.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2004-10-09 21:27:55 +02:00
|
|
|
@defmac VECTOR_STORE_FLAG_VALUE (@var{mode})
|
|
|
|
A C expression that gives a rtx representing the non-zero true element
|
|
|
|
for vector comparisons. The returned rtx should be valid for the inner
|
|
|
|
mode of @var{mode} which is guaranteed to be a vector mode. Define
|
|
|
|
this macro on machines that have vector comparison operations that
|
|
|
|
return a vector result. If there are no such operations, do not define
|
|
|
|
this macro. Typically, this macro is defined as @code{const1_rtx} or
|
|
|
|
@code{constm1_rtx}. This macro may return @code{NULL_RTX} to prevent
|
|
|
|
the compiler optimizing such vector comparison operations for the
|
|
|
|
given mode.
|
|
|
|
@end defmac
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac CLZ_DEFINED_VALUE_AT_ZERO (@var{mode}, @var{value})
|
|
|
|
@defmacx CTZ_DEFINED_VALUE_AT_ZERO (@var{mode}, @var{value})
|
2003-02-05 23:37:54 +01:00
|
|
|
A C expression that evaluates to true if the architecture defines a value
|
|
|
|
for @code{clz} or @code{ctz} with a zero operand. If so, @var{value}
|
|
|
|
should be set to this value. If this macro is not defined, the value of
|
|
|
|
@code{clz} or @code{ctz} is assumed to be undefined.
|
|
|
|
|
|
|
|
This macro must be defined if the target's expansion for @code{ffs}
|
|
|
|
relies on a particular value to get correct results. Otherwise it
|
|
|
|
is not necessary, though it may be used to optimize some corner cases.
|
|
|
|
|
|
|
|
Note that regardless of this macro the ``definedness'' of @code{clz}
|
|
|
|
and @code{ctz} at zero do @emph{not} extend to the builtin functions
|
|
|
|
visible to the user. Thus one may be free to adjust the value at will
|
|
|
|
to match the target expansion of these operations without fear of
|
c-tree.texi, [...]: Correct end-of-sentence markup and markup of "etc.", "e.g." and "i.e.".
* doc/c-tree.texi, doc/cfg.texi, doc/contrib.texi, doc/cpp.texi,
doc/cppopts.texi, doc/extend.texi, doc/fragments.texi,
doc/frontends.texi, doc/gcov.texi, doc/hostconfig.texi,
doc/implement-c.texi, doc/install.texi, doc/invoke.texi,
doc/libgcc.texi, doc/md.texi, doc/passes.texi,
doc/portability.texi, doc/rtl.texi, doc/sourcebuild.texi,
doc/standards.texi, doc/tm.texi, doc/tree-ssa.texi,
doc/trouble.texi: Correct end-of-sentence markup and markup of
"etc.", "e.g." and "i.e.". Use @code in various places where
appropriate.
From-SVN: r90101
2004-11-05 02:36:57 +01:00
|
|
|
breaking the API@.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2003-02-05 23:37:54 +01:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac Pmode
|
1996-09-25 01:21:45 +02:00
|
|
|
An alias for the machine mode for pointers. On most machines, define
|
|
|
|
this to be the integer mode corresponding to the width of a hardware
|
|
|
|
pointer; @code{SImode} on 32-bit machine or @code{DImode} on 64-bit machines.
|
|
|
|
On some machines you must define this to be one of the partial integer
|
|
|
|
modes, such as @code{PSImode}.
|
|
|
|
|
|
|
|
The width of @code{Pmode} must be at least as large as the value of
|
|
|
|
@code{POINTER_SIZE}. If it is not equal, you must define the macro
|
|
|
|
@code{POINTERS_EXTEND_UNSIGNED} to specify how pointers are extended
|
|
|
|
to @code{Pmode}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac FUNCTION_MODE
|
1996-09-25 01:21:45 +02:00
|
|
|
An alias for the machine mode used for memory references to functions
|
|
|
|
being called, in @code{call} RTL expressions. On most machines this
|
|
|
|
should be @code{QImode}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac STDC_0_IN_SYSTEM_HEADERS
|
2001-06-17 11:50:00 +02:00
|
|
|
In normal operation, the preprocessor expands @code{__STDC__} to the
|
|
|
|
constant 1, to signify that GCC conforms to ISO Standard C@. On some
|
|
|
|
hosts, like Solaris, the system compiler uses a different convention,
|
|
|
|
where @code{__STDC__} is normally 0, but is 1 if the user specifies
|
|
|
|
strict conformance to the C Standard.
|
|
|
|
|
|
|
|
Defining @code{STDC_0_IN_SYSTEM_HEADERS} makes GNU CPP follows the host
|
|
|
|
convention when processing system header files, but when processing user
|
|
|
|
files @code{__STDC__} will always expand to 1.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2001-06-17 11:50:00 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac NO_IMPLICIT_EXTERN_C
|
c-tree.texi, [...]: Replace . at end of sentences preceded by a capital letter with @..
* doc/c-tree.texi, doc/contrib.texi, doc/cpp.texi,
doc/cppinternals.texi, doc/extend.texi, doc/gcc.texi,
doc/gcov.texi, doc/install-old.texi, doc/install.texi,
doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: Replace
. at end of sentences preceded by a capital letter with @..
From-SVN: r43611
2001-06-27 17:04:16 +02:00
|
|
|
Define this macro if the system header files support C++ as well as C@.
|
1996-09-25 01:21:45 +02:00
|
|
|
This macro inhibits the usual method of using system header files in
|
|
|
|
C++, which is to pretend that the file's contents are enclosed in
|
|
|
|
@samp{extern "C" @{@dots{}@}}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
|
|
|
@findex #pragma
|
|
|
|
@findex pragma
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac REGISTER_TARGET_PRAGMAS ()
|
c-pragma.h: Define HANDLE_GENERIC_PRAGMAS if REGISTER_TARGET_PRAGMAS is defined.
* c-pragma.h: Define HANDLE_GENERIC_PRAGMAS if
REGISTER_TARGET_PRAGMAS is defined. Duplicate some
definitions from cpplib.h.
* cpplib.h: Don't typedef struct cpp_reader if c-pragma.h has
already done it.
* tm.texi: Document HANDLE_PRAGMA as no longer supported. Add
documentation for REGISTER_TARGET_PRAGMAS.
* c-lex.c: Include cpplib.h before c-pragma.h. Define a
default-pragma callback to implement -Wunknown-pragmas if
USE_CPPLIB.
* c-parse.in: Move all includes to top of file.
* c-pragma.c: Include cpplib.h before c-pragma.h. Include
tm_p.h.
(dispatch_pragma): Put the namespace in the -Wunknown-pragmas
warning.
(init_pragma): If REGISTER_TARGET_PRAGMAS is defined, call it.
* arm.h, arm-protos.h, arm.c,
c4x.h, c4x-protos.h, c4x.c,
h8300.h, h8300-protos.h, h8300.c,
i370.h, i370-protos.h, i370.c,
i960.h, i960-protos.h, i960.c,
sh.h, sh-protos.h, sh.c,
v850.h, v850-protos.h, v850.c: Convert HANDLE_PRAGMA-based
pragmata scheme to use REGISTER_TARGET_PRAGMAS instead.
* d30v.h: Don't mention HANDLE_PRAGMA in comment. Add
multiple include guard.
* i370.md (untyped_call): Use GEN_CALL.
(umodsi3): Remove unused variable.
* sh/elf.h: Don't undef HANDLE_SYSV_PRAGMA.
* v850.c (output_move_single, output_move_double): Constify
return value.
(print_operand): Constify a char *.
* v850.h (struct small_memory_info): Constify name member.
From-SVN: r36249
2000-09-08 00:24:34 +02:00
|
|
|
Define this macro if you want to implement any target-specific pragmas.
|
2001-10-14 19:44:00 +02:00
|
|
|
If defined, it is a C expression which makes a series of calls to
|
2004-11-24 00:25:40 +01:00
|
|
|
@code{c_register_pragma} or @code{c_register_pragma_with_expansion}
|
|
|
|
for each pragma. The macro may also do any
|
2001-10-14 19:44:00 +02:00
|
|
|
setup required for the pragmas.
|
c-pragma.h: Define HANDLE_GENERIC_PRAGMAS if REGISTER_TARGET_PRAGMAS is defined.
* c-pragma.h: Define HANDLE_GENERIC_PRAGMAS if
REGISTER_TARGET_PRAGMAS is defined. Duplicate some
definitions from cpplib.h.
* cpplib.h: Don't typedef struct cpp_reader if c-pragma.h has
already done it.
* tm.texi: Document HANDLE_PRAGMA as no longer supported. Add
documentation for REGISTER_TARGET_PRAGMAS.
* c-lex.c: Include cpplib.h before c-pragma.h. Define a
default-pragma callback to implement -Wunknown-pragmas if
USE_CPPLIB.
* c-parse.in: Move all includes to top of file.
* c-pragma.c: Include cpplib.h before c-pragma.h. Include
tm_p.h.
(dispatch_pragma): Put the namespace in the -Wunknown-pragmas
warning.
(init_pragma): If REGISTER_TARGET_PRAGMAS is defined, call it.
* arm.h, arm-protos.h, arm.c,
c4x.h, c4x-protos.h, c4x.c,
h8300.h, h8300-protos.h, h8300.c,
i370.h, i370-protos.h, i370.c,
i960.h, i960-protos.h, i960.c,
sh.h, sh-protos.h, sh.c,
v850.h, v850-protos.h, v850.c: Convert HANDLE_PRAGMA-based
pragmata scheme to use REGISTER_TARGET_PRAGMAS instead.
* d30v.h: Don't mention HANDLE_PRAGMA in comment. Add
multiple include guard.
* i370.md (untyped_call): Use GEN_CALL.
(umodsi3): Remove unused variable.
* sh/elf.h: Don't undef HANDLE_SYSV_PRAGMA.
* v850.c (output_move_single, output_move_double): Constify
return value.
(print_operand): Constify a char *.
* v850.h (struct small_memory_info): Constify name member.
From-SVN: r36249
2000-09-08 00:24:34 +02:00
|
|
|
|
|
|
|
The primary reason to define this macro is to provide compatibility with
|
|
|
|
other compilers for the same target. In general, we discourage
|
c-tree.texi, [...]: Replace . at end of sentences preceded by a capital letter with @..
* doc/c-tree.texi, doc/contrib.texi, doc/cpp.texi,
doc/cppinternals.texi, doc/extend.texi, doc/gcc.texi,
doc/gcov.texi, doc/install-old.texi, doc/install.texi,
doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: Replace
. at end of sentences preceded by a capital letter with @..
From-SVN: r43611
2001-06-27 17:04:16 +02:00
|
|
|
definition of target-specific pragmas for GCC@.
|
1996-09-25 01:21:45 +02:00
|
|
|
|
haifa-sched.c: Convert to target hooks.
* haifa-sched.c: Convert to target hooks. Macros replaced
are ISSUE_RATE, ADJUST_COST, ADJUST_PRIORITY, MD_SCHED_INIT,
MD_SCHED_REORDER, MD_SCHED_REORDER2, MD_SCHED_VARIABLE_ISSUE,
MD_SCHED_FINISH, and HAVE_cycle_display.
* target-def.h (TARGET_SCHED_ADJUST_COST,
TARGET_SCHED_ADJUST_PRIORITY, TARGET_SCHED_ISSUE_RATE,
TARGET_SCHED_VARIABLE_ISSUE, TARGET_SCHED_INIT,
TARGET_SCHED_FINISH, TARGET_SCHED_REORDER,
TARGET_SCHED_REORDER2, TARGET_SCHED_CYCLE_DISPLAY):
New hook #defines to be overridden.
(TARGET_SCHED): Bring them all together.
(TARGET_INITIALIZER): Update.
* target.h: Don't forward declare struct rtx_def. Use 'rtx'
instead of 'struct rtx_def *' throughout.
(struct sched): New set of hooks for the scheduler.
* Makefile.in (haifa-sched.o): Depend on target.h.
* doc/tm.texi: Document the new scheduler hooks, together in
their own section, instead of scattered around.
Fix a bunch of underfull/overfull hboxes.
* a29k.h, alpha.h, arm.h, c4x.h, convex.h, d30v.h, i386.h,
ia64.h, m32r.h, m88k.h, mips.h, pa.h, rs6000.h, s390.h, sh.h,
sparc.h: Don't define any of the old scheduler macros.
* a29k.c, alpha.c, arm.c, c4x.c, convex.c, d30v.c, i386.c,
ia64.c, m32r.c, m88k.c, mips.c, pa.c, rs6000.c, s390.c, sh.c,
sparc.c: Create hook functions from code extracted from
corresponding target header, or make existing hooks static, as
appropriate. Set the appropriate entries in targetm.
* alpha-protos.h, arm-protos.h, c4x-protos.h, d30v-protos.h,
i386-protos.h, ia64-protos.h, m32r-protos.h, pa-protos.h,
rs6000-protos.h, s390-protos.h, sparc-protos.h:
Remove prototypes for functions which are now static.
* d30v.h, d30v.c, m32r.h, m32r.c: Remove #ifdef HAIFA and
related gunk; the Haifa scheduler is now the only choice.
From-SVN: r45009
2001-08-18 22:25:54 +02:00
|
|
|
If the pragma can be implemented by attributes then you should consider
|
Table-driven attributes.
* c-decl.c, config/alpha/alpha.c, config/arc/arc.c,
config/arm/arm.c, config/arm/pe.c, config/avr/avr.c,
config/avr/avr.h, config/d30v/d30v.h, config/fr30/fr30.h,
config/h8300/h8300.c, config/i386/cygwin.h, config/i386/winnt.c,
config/m32r/m32r.c, config/mcore/mcore.c, config/sh/sh.c,
config/stormy16/stormy16.h, config/v850/v850.c, doc/c-tree.texi,
doc/tm.texi, ggc-common.c, integrate.c, print-tree.c, tree.c,
tree.h: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
* tree.h (struct tree_decl): Change machine_attributes to
attributes.
* doc/c-tree.texi: Document that all attributes are now attached
to decls and types.
* c-common.c (add_attribute, attrtab, attrtab_idx,
default_valid_lang_attribute, valid_lang_attribute): Remove.
(attribute_tables, attributes_initialized,
c_common_attribute_table, default_lang_attribute_table): New
variables.
(handle_packed_attribute, handle_nocommon_attribute,
handle_common_attribute, handle_noreturn_attribute,
handle_unused_attribute, handle_const_attribute,
handle_transparent_union_attribute, handle_constructor_attribute,
handle_destructor_attribute, handle_mode_attribute,
handle_section_attribute, handle_aligned_attribute,
handle_weak_attribute, handle_alias_attribute,
handle_no_instrument_function_attribute,
handle_no_check_memory_usage_attribute, handle_malloc_attribute,
handle_no_limit_stack_attribute, handle_pure_attribute): New
functions.
(init_attributes, decl_attributes): Rewrite to implement
table-driven attributes.
* c-common.h (enum attribute_flags): Move to tree.h.
* c-format.c (decl_handle_format_attribute,
decl_handle_format_arg_attribute): Rename to
handle_format_attribute and handle_format_arg_attribute. Update
for table-driven attributes.
* c-common.h (decl_handle_format_attribute,
decl_handle_format_arg_attribute): Remove prototypes.
(handle_format_attribute, handle_format_arg_attribute): Add
prototypes.
* c-decl.c (grokdeclarator): Handle attributes nested inside
declarators.
* c-parse.in (setattrs, maybe_setattrs): Remove.
(maybe_type_quals_setattrs): Rename to maybe_type_quals_attrs.
Update to handle nested attributes properly.
(maybe_resetattrs, after_type_declarator,
parm_declarator_nostarttypename, notype_declarator, absdcl1_noea,
absdcl1_ea, direct_absdcl1): Update to handle nested attributes
properly.
(make_pointer_declarator): Update to handle nested attributes
properly.
* doc/extend.texi: Update documentation of limits of attributes
syntax. Warn about problems with attribute semantics in C++.
* target.h (struct target): Remove valid_decl_attribute and
valid_type_attribute. Add attribute_table and
function_attribute_inlinable_p.
* target-def.h (TARGET_VALID_DECL_ATTRIBUTE,
TARGET_VALID_TYPE_ATTRIBUTE): Remove.
(TARGET_ATTRIBUTE_TABLE, TARGET_FUNCTION_ATTRIBUTE_INLINABLE_P):
Add.
(TARGET_INITIALIZER): Update.
* integrate.c (FUNCTION_ATTRIBUTE_INLINABLE_P): Remove default
definition.
(function_attribute_inlinable_p): New function. Check for the
presence of any machine attributes before using
targetm.function_attribute_inlinable_p.
(function_cannot_inline_p): Update.
* Makefile.in (integrate.o): Update dependencies.
* doc/tm.texi: Update documentation of target attributes and
example definition of TARGET_VALID_TYPE_ATTRIBUTE.
* tree.c (default_valid_attribute_p, valid_machine_attribute):
Remove.
(default_target_attribute_table,
default_function_attribute_inlinable_p): New.
(lookup_attribute): Update comment to clarify handling of multiple
attributes with the same name.
(merge_attributes, attribute_list_contained): Allow multiple
attributes with the same name but different arguments to appear in
the same attribute list.
* tree.h (default_valid_attribute_p): Remove prototype.
(struct attribute_spec): New.
(default_target_attribute_table): Declare.
(enum attribute_flags): Move from c-common.h. Add
ATTR_FLAG_TYPE_IN_PLACE.
(default_function_attribute_inlinable_p): Declare.
* config/alpha/alpha.c (vms_valid_decl_attribute_p): Remove.
(TARGET_VALID_DECL_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(vms_attribute_table): New.
* config/arc/arc.c (arc_valid_decl_attribute): Remove.
(TARGET_VALID_DECL_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(arc_attribute_table, arc_handle_interrupt_attribute): New.
* config/arm/arm.c (arm_valid_type_attribute_p,
arm_valid_decl_attribute_p, arm_pe_valid_decl_attribute_p):
Remove.
(TARGET_VALID_TYPE_ATTRIBUTE, TARGET_VALID_DECL_ATTRIBUTE): Don't
define.
(TARGET_ATTRIBUTE_TABLE): Define.
(arm_attribute_table, arm_handle_fndecl_attribute,
arm_handle_isr_attribute): New.
* config/avr/avr.c (avr_valid_type_attribute,
avr_valid_decl_attribute): Remove.
(TARGET_VALID_DECL_ATTRIBUTE, TARGET_VALID_TYPE_ATTRIBUTE): Don't
define.
(TARGET_ATTRIBUTE_TABLE): Define.
(avr_attribute_table, avr_handle_progmem_attribute,
avr_handle_fndecl_attribute): New.
* config/c4x/c4x.c (c4x_valid_type_attribute_p): Remove.
(TARGET_VALID_TYPE_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(c4x_attribute_table, c4x_handle_fntype_attribute): New.
* config/h8300/h8300.c (h8300_valid_decl_attribute): Remove.
(TARGET_VALID_DECL_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(h8300_attribute_table, h8300_handle_fndecl_attribute,
h8300_handle_eightbit_data_attribute,
h8300_handle_tiny_data_attribute): New.
* config/i386/i386-protos.h (ix86_valid_type_attribute_p,
i386_pe_valid_decl_attribute_p, i386_pe_valid_type_attribute_p):
Remove prototypes.
(ix86_handle_dll_attribute, ix86_handle_shared_attribute): New
declarations.
* config/i386/i386.c (ix86_valid_type_attribute_p: Remove.
(TARGET_VALID_TYPE_ATTRIBUTE, TARGET_VALID_DECL_ATTRIBUTE): Don't
define.
(TARGET_ATTRIBUTE_TABLE): Define.
(ix86_attribute_table, ix86_handle_cdecl_attribute,
ix86_handle_regparm_attribute): New.
* config/i386/winnt.c (i386_pe_valid_decl_attribute_p,
i386_pe_valid_type_attribute_p): Remove.
(ix86_handle_dll_attribute, ix86_handle_shared_attribute): New.
* config/ia64/ia64.c (ia64_valid_type_attribute): Remove.
(TARGET_VALID_TYPE_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(ia64_attribute_table): New.
* config/m32r/m32r.c (m32r_valid_decl_attribute, interrupt_ident1,
interrupt_ident2, model_ident1, model_ident2): Remove.
(TARGET_VALID_DECL_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(init_idents): Update.
(m32r_attribute_table, m32r_handle_model_attribute): New.
* config/m68hc11/m68hc11.c (m68hc11_valid_type_attribute_p):
Remove.
(TARGET_VALID_TYPE_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(m68hc11_attribute_table, m68hc11_handle_fntype_attribute): New.
* config/mcore/mcore.c (mcore_valid_decl_attribute): Remove.
(TARGET_VALID_DECL_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(mcore_attribute_table, mcore_handle_naked_attribute): New.
* config/ns32k/ns32k.c (ns32k_valid_type_attribute_p): Remove.
(TARGET_VALID_TYPE_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(ns32k_attribute_table, ns32k_handle_fntype_attribute): New.
* config/rs6000/rs6000.c (rs6000_valid_type_attribute_p): Remove.
(TARGET_VALID_TYPE_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(rs6000_attribute_table, rs6000_handle_longcall_attribute): New.
* config/sh/sh.c (sh_valid_decl_attribute): Remove.
(TARGET_VALID_DECL_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(sh_attribute_table, sh_handle_interrupt_handler_attribute,
sh_handle_sp_switch_attribute, sh_handle_trap_exit_attribute):
New.
* config/stormy16/stormy16.c (stormy16_valid_type_attribute):
Remove.
(TARGET_VALID_TYPE_ATTRIBUTE): Don't define
(TARGET_ATTRIBUTE_TABLE): Define.
(stormy16_attribute_table, stormy16_handle_interrupt_attribute):
New.
* config/v850/v850.c (v850_valid_decl_attribute): Remove.
(TARGET_VALID_DECL_ATTRIBUTE): Don't define.
(TARGET_ATTRIBUTE_TABLE): Define.
(v850_attribute_table, v850_handle_interrupt_attribute,
v850_handle_data_area_attribute): New.
* config/v850/v850-c.c (mark_current_function_as_interrupt):
Return void. Call decl_attributes instead of
valid_machine_attribute.
cp:
Table-driven attributes.
* decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
* decl2.c (cplus_decl_attributes): Only take one attributes
parameter.
* cp-tree.c (cplus_decl_attributes): Update prototype.
* class.c (finish_struct), decl.c (start_decl, start_function),
decl2.c (grokfield), friend.c (do_friend), parse.y
(parse_bitfield): Update calls to cplus_decl_attributes.
* decl.c (grokdeclarator): Take a pointer to a single ordinary
attribute list.
* decl.h (grokdeclarator): Update prototype.
* decl2.c (grokfield): Take a single ordinary attribute list.
* friend.c (do_friend): Likewise.
* decl.c (shadow_tag, groktypename, start_decl,
start_handler_parms, grokdeclarator, grokparms, start_function,
start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
(process_template_parm, do_decl_instantiation): Pass single
ordinary attribute lists around.
* decl.c (grokdeclarator): Correct handling of nested attributes.
Revert the patch
1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
* decl.c (grokdeclarator): Embedded attrs bind to the right,
not the left.
.
* cp-tree.h (cp_valid_lang_attribute): Remove declaration
(cp_attribute_table): Declare.
* decl.c (valid_lang_attribute): Don't define.
(lang_attribute_table): Define.
(init_decl_processing): Initialize lang_attribute_table instead of
valid_lang_attribute.
* tree.c (cp_valid_lang_attribute): Remove.
(handle_java_interface_attribute, handle_com_interface_attribute,
handle_init_priority_attribute): New functions.
(cp_attribute_table): New array.
* decl2.c (import_export_class): Don't use
targetm.valid_type_attribute.
testsuite:
Table-driven attributes.
* g++.dg/ext/attrib1.C: New test.
From-SVN: r45718
2001-09-21 03:27:06 +02:00
|
|
|
defining the target hook @samp{TARGET_INSERT_ATTRIBUTES} as well.
|
1998-09-02 11:59:57 +02:00
|
|
|
|
c-pragma.h: Define HANDLE_GENERIC_PRAGMAS if REGISTER_TARGET_PRAGMAS is defined.
* c-pragma.h: Define HANDLE_GENERIC_PRAGMAS if
REGISTER_TARGET_PRAGMAS is defined. Duplicate some
definitions from cpplib.h.
* cpplib.h: Don't typedef struct cpp_reader if c-pragma.h has
already done it.
* tm.texi: Document HANDLE_PRAGMA as no longer supported. Add
documentation for REGISTER_TARGET_PRAGMAS.
* c-lex.c: Include cpplib.h before c-pragma.h. Define a
default-pragma callback to implement -Wunknown-pragmas if
USE_CPPLIB.
* c-parse.in: Move all includes to top of file.
* c-pragma.c: Include cpplib.h before c-pragma.h. Include
tm_p.h.
(dispatch_pragma): Put the namespace in the -Wunknown-pragmas
warning.
(init_pragma): If REGISTER_TARGET_PRAGMAS is defined, call it.
* arm.h, arm-protos.h, arm.c,
c4x.h, c4x-protos.h, c4x.c,
h8300.h, h8300-protos.h, h8300.c,
i370.h, i370-protos.h, i370.c,
i960.h, i960-protos.h, i960.c,
sh.h, sh-protos.h, sh.c,
v850.h, v850-protos.h, v850.c: Convert HANDLE_PRAGMA-based
pragmata scheme to use REGISTER_TARGET_PRAGMAS instead.
* d30v.h: Don't mention HANDLE_PRAGMA in comment. Add
multiple include guard.
* i370.md (untyped_call): Use GEN_CALL.
(umodsi3): Remove unused variable.
* sh/elf.h: Don't undef HANDLE_SYSV_PRAGMA.
* v850.c (output_move_single, output_move_double): Constify
return value.
(print_operand): Constify a char *.
* v850.h (struct small_memory_info): Constify name member.
From-SVN: r36249
2000-09-08 00:24:34 +02:00
|
|
|
Preprocessor macros that appear on pragma lines are not expanded. All
|
|
|
|
@samp{#pragma} directives that do not match any registered pragma are
|
c-tree.texi, [...]: Use more logical markup.
* doc/c-tree.texi, doc/contrib.texi, doc/extend.texi,
doc/gcc.texi, doc/gcov.texi, doc/install-old.texi,
doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: Use more
logical markup. Use TeX quotes and dashes. Use @dots{} and
@minus{}. Avoid spaces inside @var. Update last modification
date in gcc.texi.
* doc/gcc.1, doc/gcov.1: Regenerate.
From-SVN: r43369
2001-06-14 13:08:04 +02:00
|
|
|
silently ignored, unless the user specifies @option{-Wunknown-pragmas}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
c-pragma.h: Define HANDLE_GENERIC_PRAGMAS if REGISTER_TARGET_PRAGMAS is defined.
* c-pragma.h: Define HANDLE_GENERIC_PRAGMAS if
REGISTER_TARGET_PRAGMAS is defined. Duplicate some
definitions from cpplib.h.
* cpplib.h: Don't typedef struct cpp_reader if c-pragma.h has
already done it.
* tm.texi: Document HANDLE_PRAGMA as no longer supported. Add
documentation for REGISTER_TARGET_PRAGMAS.
* c-lex.c: Include cpplib.h before c-pragma.h. Define a
default-pragma callback to implement -Wunknown-pragmas if
USE_CPPLIB.
* c-parse.in: Move all includes to top of file.
* c-pragma.c: Include cpplib.h before c-pragma.h. Include
tm_p.h.
(dispatch_pragma): Put the namespace in the -Wunknown-pragmas
warning.
(init_pragma): If REGISTER_TARGET_PRAGMAS is defined, call it.
* arm.h, arm-protos.h, arm.c,
c4x.h, c4x-protos.h, c4x.c,
h8300.h, h8300-protos.h, h8300.c,
i370.h, i370-protos.h, i370.c,
i960.h, i960-protos.h, i960.c,
sh.h, sh-protos.h, sh.c,
v850.h, v850-protos.h, v850.c: Convert HANDLE_PRAGMA-based
pragmata scheme to use REGISTER_TARGET_PRAGMAS instead.
* d30v.h: Don't mention HANDLE_PRAGMA in comment. Add
multiple include guard.
* i370.md (untyped_call): Use GEN_CALL.
(umodsi3): Remove unused variable.
* sh/elf.h: Don't undef HANDLE_SYSV_PRAGMA.
* v850.c (output_move_single, output_move_double): Constify
return value.
(print_operand): Constify a char *.
* v850.h (struct small_memory_info): Constify name member.
From-SVN: r36249
2000-09-08 00:24:34 +02:00
|
|
|
|
2003-01-01 13:27:02 +01:00
|
|
|
@deftypefun void c_register_pragma (const char *@var{space}, const char *@var{name}, void (*@var{callback}) (struct cpp_reader *))
|
2004-11-24 00:25:40 +01:00
|
|
|
@deftypefunx void c_register_pragma_with_expansion (const char *@var{space}, const char *@var{name}, void (*@var{callback}) (struct cpp_reader *))
|
c-pragma.h: Define HANDLE_GENERIC_PRAGMAS if REGISTER_TARGET_PRAGMAS is defined.
* c-pragma.h: Define HANDLE_GENERIC_PRAGMAS if
REGISTER_TARGET_PRAGMAS is defined. Duplicate some
definitions from cpplib.h.
* cpplib.h: Don't typedef struct cpp_reader if c-pragma.h has
already done it.
* tm.texi: Document HANDLE_PRAGMA as no longer supported. Add
documentation for REGISTER_TARGET_PRAGMAS.
* c-lex.c: Include cpplib.h before c-pragma.h. Define a
default-pragma callback to implement -Wunknown-pragmas if
USE_CPPLIB.
* c-parse.in: Move all includes to top of file.
* c-pragma.c: Include cpplib.h before c-pragma.h. Include
tm_p.h.
(dispatch_pragma): Put the namespace in the -Wunknown-pragmas
warning.
(init_pragma): If REGISTER_TARGET_PRAGMAS is defined, call it.
* arm.h, arm-protos.h, arm.c,
c4x.h, c4x-protos.h, c4x.c,
h8300.h, h8300-protos.h, h8300.c,
i370.h, i370-protos.h, i370.c,
i960.h, i960-protos.h, i960.c,
sh.h, sh-protos.h, sh.c,
v850.h, v850-protos.h, v850.c: Convert HANDLE_PRAGMA-based
pragmata scheme to use REGISTER_TARGET_PRAGMAS instead.
* d30v.h: Don't mention HANDLE_PRAGMA in comment. Add
multiple include guard.
* i370.md (untyped_call): Use GEN_CALL.
(umodsi3): Remove unused variable.
* sh/elf.h: Don't undef HANDLE_SYSV_PRAGMA.
* v850.c (output_move_single, output_move_double): Constify
return value.
(print_operand): Constify a char *.
* v850.h (struct small_memory_info): Constify name member.
From-SVN: r36249
2000-09-08 00:24:34 +02:00
|
|
|
|
2004-11-24 00:25:40 +01:00
|
|
|
Each call to @code{c_register_pragma} or
|
|
|
|
@code{c_register_pragma_with_expansion} establishes one pragma. The
|
c-pragma.h: Define HANDLE_GENERIC_PRAGMAS if REGISTER_TARGET_PRAGMAS is defined.
* c-pragma.h: Define HANDLE_GENERIC_PRAGMAS if
REGISTER_TARGET_PRAGMAS is defined. Duplicate some
definitions from cpplib.h.
* cpplib.h: Don't typedef struct cpp_reader if c-pragma.h has
already done it.
* tm.texi: Document HANDLE_PRAGMA as no longer supported. Add
documentation for REGISTER_TARGET_PRAGMAS.
* c-lex.c: Include cpplib.h before c-pragma.h. Define a
default-pragma callback to implement -Wunknown-pragmas if
USE_CPPLIB.
* c-parse.in: Move all includes to top of file.
* c-pragma.c: Include cpplib.h before c-pragma.h. Include
tm_p.h.
(dispatch_pragma): Put the namespace in the -Wunknown-pragmas
warning.
(init_pragma): If REGISTER_TARGET_PRAGMAS is defined, call it.
* arm.h, arm-protos.h, arm.c,
c4x.h, c4x-protos.h, c4x.c,
h8300.h, h8300-protos.h, h8300.c,
i370.h, i370-protos.h, i370.c,
i960.h, i960-protos.h, i960.c,
sh.h, sh-protos.h, sh.c,
v850.h, v850-protos.h, v850.c: Convert HANDLE_PRAGMA-based
pragmata scheme to use REGISTER_TARGET_PRAGMAS instead.
* d30v.h: Don't mention HANDLE_PRAGMA in comment. Add
multiple include guard.
* i370.md (untyped_call): Use GEN_CALL.
(umodsi3): Remove unused variable.
* sh/elf.h: Don't undef HANDLE_SYSV_PRAGMA.
* v850.c (output_move_single, output_move_double): Constify
return value.
(print_operand): Constify a char *.
* v850.h (struct small_memory_info): Constify name member.
From-SVN: r36249
2000-09-08 00:24:34 +02:00
|
|
|
@var{callback} routine will be called when the preprocessor encounters a
|
|
|
|
pragma of the form
|
|
|
|
|
|
|
|
@smallexample
|
|
|
|
#pragma [@var{space}] @var{name} @dots{}
|
|
|
|
@end smallexample
|
|
|
|
|
2001-10-14 19:44:00 +02:00
|
|
|
@var{space} is the case-sensitive namespace of the pragma, or
|
|
|
|
@code{NULL} to put the pragma in the global namespace. The callback
|
|
|
|
routine receives @var{pfile} as its first argument, which can be passed
|
config.gcc: Update c4x and i370 for C front end-specific dependencies.
* config.gcc: Update c4x and i370 for C front end-specific
dependencies.
* config/c4x/c4x-c.c: New.
* config/c4x/c4x-protos.h (c4x_handle_pragma): Remove.
(code_tree, data_tree, pure_tree, noreturn_tree, interrupt_tree):
New declarations.
* config/c4x/c4x.c: Don't include c-lex.h or c-pragma.h.
(code_tree, data_tree, pure_tree, noreturn_tree, interrupt_tree):
Make extern.
(c4x_init_pragma): Remove.
(c4x_parse_pragma, c4x_pr_CODE_SECTION, c4x_pr_DATA_SECTION,
c4x_pr_FUNC_IS_PURE, c4x_pr_FUNC_NEVER_RETURNS, c4x_pr_INTERRUPT,
c4x_pr_ignored): Move to c4x-c.c.
* config/c4x/c4x.h (REGISTER_TARGET_PRAGMAS): Update.
* config/c4x/t-c4x: Update.
* config/i370/i370-c.c: New.
* config/i370/i370.c: Don't include c-lex.h or c-pragma.h.
(i370_pr_map): Move to i370-c.c.
* config/i370/t-i370: New.
* doc/tm.texi: Update.
From-SVN: r46322
2001-10-17 22:39:13 +02:00
|
|
|
on to cpplib's functions if necessary. You can lex tokens after the
|
|
|
|
@var{name} by calling @code{c_lex}. Tokens that are not read by the
|
|
|
|
callback will be silently ignored. The end of the line is indicated by
|
2004-11-24 00:25:40 +01:00
|
|
|
a token of type @code{CPP_EOF}. Macro expansion occurs on the
|
|
|
|
arguments of pragmas registered with
|
|
|
|
@code{c_register_pragma_with_expansion} but not on the arguments of
|
|
|
|
pragmas registered with @code{c_register_pragma}.
|
c-pragma.h: Define HANDLE_GENERIC_PRAGMAS if REGISTER_TARGET_PRAGMAS is defined.
* c-pragma.h: Define HANDLE_GENERIC_PRAGMAS if
REGISTER_TARGET_PRAGMAS is defined. Duplicate some
definitions from cpplib.h.
* cpplib.h: Don't typedef struct cpp_reader if c-pragma.h has
already done it.
* tm.texi: Document HANDLE_PRAGMA as no longer supported. Add
documentation for REGISTER_TARGET_PRAGMAS.
* c-lex.c: Include cpplib.h before c-pragma.h. Define a
default-pragma callback to implement -Wunknown-pragmas if
USE_CPPLIB.
* c-parse.in: Move all includes to top of file.
* c-pragma.c: Include cpplib.h before c-pragma.h. Include
tm_p.h.
(dispatch_pragma): Put the namespace in the -Wunknown-pragmas
warning.
(init_pragma): If REGISTER_TARGET_PRAGMAS is defined, call it.
* arm.h, arm-protos.h, arm.c,
c4x.h, c4x-protos.h, c4x.c,
h8300.h, h8300-protos.h, h8300.c,
i370.h, i370-protos.h, i370.c,
i960.h, i960-protos.h, i960.c,
sh.h, sh-protos.h, sh.c,
v850.h, v850-protos.h, v850.c: Convert HANDLE_PRAGMA-based
pragmata scheme to use REGISTER_TARGET_PRAGMAS instead.
* d30v.h: Don't mention HANDLE_PRAGMA in comment. Add
multiple include guard.
* i370.md (untyped_call): Use GEN_CALL.
(umodsi3): Remove unused variable.
* sh/elf.h: Don't undef HANDLE_SYSV_PRAGMA.
* v850.c (output_move_single, output_move_double): Constify
return value.
(print_operand): Constify a char *.
* v850.h (struct small_memory_info): Constify name member.
From-SVN: r36249
2000-09-08 00:24:34 +02:00
|
|
|
|
|
|
|
For an example use of this routine, see @file{c4x.h} and the callback
|
config.gcc: Update c4x and i370 for C front end-specific dependencies.
* config.gcc: Update c4x and i370 for C front end-specific
dependencies.
* config/c4x/c4x-c.c: New.
* config/c4x/c4x-protos.h (c4x_handle_pragma): Remove.
(code_tree, data_tree, pure_tree, noreturn_tree, interrupt_tree):
New declarations.
* config/c4x/c4x.c: Don't include c-lex.h or c-pragma.h.
(code_tree, data_tree, pure_tree, noreturn_tree, interrupt_tree):
Make extern.
(c4x_init_pragma): Remove.
(c4x_parse_pragma, c4x_pr_CODE_SECTION, c4x_pr_DATA_SECTION,
c4x_pr_FUNC_IS_PURE, c4x_pr_FUNC_NEVER_RETURNS, c4x_pr_INTERRUPT,
c4x_pr_ignored): Move to c4x-c.c.
* config/c4x/c4x.h (REGISTER_TARGET_PRAGMAS): Update.
* config/c4x/t-c4x: Update.
* config/i370/i370-c.c: New.
* config/i370/i370.c: Don't include c-lex.h or c-pragma.h.
(i370_pr_map): Move to i370-c.c.
* config/i370/t-i370: New.
* doc/tm.texi: Update.
From-SVN: r46322
2001-10-17 22:39:13 +02:00
|
|
|
routines defined in @file{c4x-c.c}.
|
2000-11-25 01:33:04 +01:00
|
|
|
|
|
|
|
Note that the use of @code{c_lex} is specific to the C and C++
|
|
|
|
compilers. It will not work in the Java or Fortran compilers, or any
|
|
|
|
other language compilers for that matter. Thus if @code{c_lex} is going
|
|
|
|
to be called from target-specific code, it must only be done so when
|
c-tree.texi, [...]: Fix spelling and typos.
* doc/c-tree.texi, doc/contrib.texi, doc/extend.texi,
doc/gcc.texi, doc/install.texi, doc/invoke.texi, doc/md.texi,
doc/objc.texi, doc/rtl.texi, doc/tm.texi: Fix spelling and typos.
Consistently use "built-in" and "bit-field". Minor logical markup
improvements.
* doc/gcc.1: Regenerate.
From-SVN: r43383
2001-06-15 00:51:18 +02:00
|
|
|
building the C and C++ compilers. This can be done by defining the
|
2000-11-25 01:33:04 +01:00
|
|
|
variables @code{c_target_objs} and @code{cxx_target_objs} in the
|
2001-07-03 02:46:05 +02:00
|
|
|
target entry in the @file{config.gcc} file. These variables should name
|
2000-11-25 01:33:04 +01:00
|
|
|
the target-specific, language-specific object file which contains the
|
|
|
|
code that uses @code{c_lex}. Note it will also be necessary to add a
|
|
|
|
rule to the makefile fragment pointed to by @code{tmake_file} that shows
|
|
|
|
how to build this object file.
|
c-pragma.h: Define HANDLE_GENERIC_PRAGMAS if REGISTER_TARGET_PRAGMAS is defined.
* c-pragma.h: Define HANDLE_GENERIC_PRAGMAS if
REGISTER_TARGET_PRAGMAS is defined. Duplicate some
definitions from cpplib.h.
* cpplib.h: Don't typedef struct cpp_reader if c-pragma.h has
already done it.
* tm.texi: Document HANDLE_PRAGMA as no longer supported. Add
documentation for REGISTER_TARGET_PRAGMAS.
* c-lex.c: Include cpplib.h before c-pragma.h. Define a
default-pragma callback to implement -Wunknown-pragmas if
USE_CPPLIB.
* c-parse.in: Move all includes to top of file.
* c-pragma.c: Include cpplib.h before c-pragma.h. Include
tm_p.h.
(dispatch_pragma): Put the namespace in the -Wunknown-pragmas
warning.
(init_pragma): If REGISTER_TARGET_PRAGMAS is defined, call it.
* arm.h, arm-protos.h, arm.c,
c4x.h, c4x-protos.h, c4x.c,
h8300.h, h8300-protos.h, h8300.c,
i370.h, i370-protos.h, i370.c,
i960.h, i960-protos.h, i960.c,
sh.h, sh-protos.h, sh.c,
v850.h, v850-protos.h, v850.c: Convert HANDLE_PRAGMA-based
pragmata scheme to use REGISTER_TARGET_PRAGMAS instead.
* d30v.h: Don't mention HANDLE_PRAGMA in comment. Add
multiple include guard.
* i370.md (untyped_call): Use GEN_CALL.
(umodsi3): Remove unused variable.
* sh/elf.h: Don't undef HANDLE_SYSV_PRAGMA.
* v850.c (output_move_single, output_move_double): Constify
return value.
(print_operand): Constify a char *.
* v850.h (struct small_memory_info): Constify name member.
From-SVN: r36249
2000-09-08 00:24:34 +02:00
|
|
|
@end deftypefun
|
|
|
|
|
1998-10-01 12:50:15 +02:00
|
|
|
@findex #pragma
|
|
|
|
@findex pragma
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac HANDLE_SYSV_PRAGMA
|
1998-10-01 12:50:15 +02:00
|
|
|
Define this macro (to a value of 1) if you want the System V style
|
|
|
|
pragmas @samp{#pragma pack(<n>)} and @samp{#pragma weak <name>
|
|
|
|
[=<value>]} to be supported by gcc.
|
|
|
|
|
|
|
|
The pack pragma specifies the maximum alignment (in bytes) of fields
|
|
|
|
within a structure, in much the same way as the @samp{__aligned__} and
|
|
|
|
@samp{__packed__} @code{__attribute__}s do. A pack value of zero resets
|
2001-12-09 21:21:57 +01:00
|
|
|
the behavior to the default.
|
1998-10-01 12:50:15 +02:00
|
|
|
|
2002-09-18 20:51:14 +02:00
|
|
|
A subtlety for Microsoft Visual C/C++ style bit-field packing
|
2004-09-11 10:34:26 +02:00
|
|
|
(e.g.@: -mms-bitfields) for targets that support it:
|
2002-09-18 20:51:14 +02:00
|
|
|
When a bit-field is inserted into a packed record, the whole size
|
|
|
|
of the underlying type is used by one or more same-size adjacent
|
|
|
|
bit-fields (that is, if its long:3, 32 bits is used in the record,
|
|
|
|
and any additional adjacent long bit-fields are packed into the same
|
c-tree.texi, [...]: Correct end-of-sentence markup and markup of "etc.", "e.g." and "i.e.".
* doc/c-tree.texi, doc/cfg.texi, doc/contrib.texi, doc/cpp.texi,
doc/cppopts.texi, doc/extend.texi, doc/fragments.texi,
doc/frontends.texi, doc/gcov.texi, doc/hostconfig.texi,
doc/implement-c.texi, doc/install.texi, doc/invoke.texi,
doc/libgcc.texi, doc/md.texi, doc/passes.texi,
doc/portability.texi, doc/rtl.texi, doc/sourcebuild.texi,
doc/standards.texi, doc/tm.texi, doc/tree-ssa.texi,
doc/trouble.texi: Correct end-of-sentence markup and markup of
"etc.", "e.g." and "i.e.". Use @code in various places where
appropriate.
From-SVN: r90101
2004-11-05 02:36:57 +01:00
|
|
|
chunk of 32 bits. However, if the size changes, a new field of that
|
2002-09-18 20:51:14 +02:00
|
|
|
size is allocated).
|
|
|
|
|
|
|
|
If both MS bit-fields and @samp{__attribute__((packed))} are used,
|
c-tree.texi, [...]: Correct end-of-sentence markup and markup of "etc.", "e.g." and "i.e.".
* doc/c-tree.texi, doc/cfg.texi, doc/contrib.texi, doc/cpp.texi,
doc/cppopts.texi, doc/extend.texi, doc/fragments.texi,
doc/frontends.texi, doc/gcov.texi, doc/hostconfig.texi,
doc/implement-c.texi, doc/install.texi, doc/invoke.texi,
doc/libgcc.texi, doc/md.texi, doc/passes.texi,
doc/portability.texi, doc/rtl.texi, doc/sourcebuild.texi,
doc/standards.texi, doc/tm.texi, doc/tree-ssa.texi,
doc/trouble.texi: Correct end-of-sentence markup and markup of
"etc.", "e.g." and "i.e.". Use @code in various places where
appropriate.
From-SVN: r90101
2004-11-05 02:36:57 +01:00
|
|
|
the latter will take precedence. If @samp{__attribute__((packed))} is
|
2002-09-18 20:51:14 +02:00
|
|
|
used on a single field when MS bit-fields are in use, it will take
|
|
|
|
precedence for that field, but the alignment of the rest of the structure
|
|
|
|
may affect its placement.
|
|
|
|
|
1998-10-01 12:50:15 +02:00
|
|
|
The weak pragma only works if @code{SUPPORTS_WEAK} and
|
|
|
|
@code{ASM_WEAKEN_LABEL} are defined. If enabled it allows the creation
|
|
|
|
of specifically named weak labels, optionally with a value.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1998-10-01 12:50:15 +02:00
|
|
|
|
|
|
|
@findex #pragma
|
|
|
|
@findex pragma
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac HANDLE_PRAGMA_PACK_PUSH_POP
|
1998-10-01 12:50:15 +02:00
|
|
|
Define this macro (to a value of 1) if you want to support the Win32
|
2004-09-03 19:22:40 +02:00
|
|
|
style pragmas @samp{#pragma pack(push[,@var{n}])} and @samp{#pragma
|
|
|
|
pack(pop)}. The @samp{pack(push,[@var{n}])} pragma specifies the maximum
|
|
|
|
alignment (in bytes) of fields within a structure, in much the same way as
|
|
|
|
the @samp{__aligned__} and @samp{__packed__} @code{__attribute__}s do. A
|
2001-12-09 21:21:57 +01:00
|
|
|
pack value of zero resets the behavior to the default. Successive
|
1998-10-01 12:50:15 +02:00
|
|
|
invocations of this pragma cause the previous values to be stacked, so
|
|
|
|
that invocations of @samp{#pragma pack(pop)} will return to the previous
|
|
|
|
value.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2004-11-24 00:25:40 +01:00
|
|
|
@defmac HANDLE_PRAGMA_PACK_WITH_EXPANSION
|
|
|
|
Define this macro, as well as
|
|
|
|
@code{HANDLE_SYSV_PRAGMA}, if macros should be expanded in the
|
|
|
|
arguments of @samp{#pragma pack}.
|
|
|
|
@end defmac
|
|
|
|
|
2004-09-03 19:22:40 +02:00
|
|
|
@defmac TARGET_DEFAULT_PACK_STRUCT
|
|
|
|
If your target requires a structure packing default other than 0 (meaning
|
|
|
|
the machine default), define this macro the the necessary value (in bytes).
|
|
|
|
This must be a value that would also valid to be used with
|
|
|
|
@samp{#pragma pack()} (that is, a small power of two).
|
|
|
|
@end defmac
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac DOLLARS_IN_IDENTIFIERS
|
c-common.c, c-common.h (dollars_in_ident): Remove.
* c-common.c, c-common.h (dollars_in_ident): Remove.
* c-opts.c (DOLLARS_IN_IDENTIFIERS): Default to true.
(c_common_init_options, c_common_decode_option): Set dollars_in_ident.
* cpphash.h (warned_dollar): Rename warn_dollars.
* cppinit.c (struct lang_flags, lang_defaults, cpp_set_lang)
Permit dollars regardless of -std=.
(post_options): Set warn_dollars.
* cpplex.c (forms_identifier_p): Use warn_dollars.
* config/darwin.h, config/alpha/vms.h, config/m68hc11/m68hc11.h:
Remove redundant definitions of DOLLARS_IN_IDENTIFIERS.
* doc/cpp.texi, doc/cppopts.texi, doc/invoke.texi, doc/tm.texi:
Update documentation.
testsuite:
* gcc.dg/dollar.c: New test.
From-SVN: r66911
2003-05-17 22:29:34 +02:00
|
|
|
Define this macro to control use of the character @samp{$} in
|
|
|
|
identifier names for the C family of languages. 0 means @samp{$} is
|
|
|
|
not allowed by default; 1 means it is allowed. 1 is the default;
|
|
|
|
there is no need to define this macro in that case.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac NO_DOLLAR_IN_LABEL
|
1996-09-25 01:21:45 +02:00
|
|
|
Define this macro if the assembler does not accept the character
|
|
|
|
@samp{$} in label names. By default constructors and destructors in
|
|
|
|
G++ have @samp{$} in the identifiers. If this macro is defined,
|
|
|
|
@samp{.} is used instead.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac NO_DOT_IN_LABEL
|
1996-09-25 01:21:45 +02:00
|
|
|
Define this macro if the assembler does not accept the character
|
|
|
|
@samp{.} in label names. By default constructors and destructors in G++
|
|
|
|
have names that use @samp{.}. If this macro is defined, these names
|
|
|
|
are rewritten to avoid @samp{.}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac INSN_SETS_ARE_DELAYED (@var{insn})
|
1996-09-25 01:21:45 +02:00
|
|
|
Define this macro as a C expression that is nonzero if it is safe for the
|
|
|
|
delay slot scheduler to place instructions in the delay slot of @var{insn},
|
|
|
|
even if they appear to use a resource set or clobbered in @var{insn}.
|
1999-08-25 09:27:13 +02:00
|
|
|
@var{insn} is always a @code{jump_insn} or an @code{insn}; GCC knows that
|
1996-09-25 01:21:45 +02:00
|
|
|
every @code{call_insn} has this behavior. On machines where some @code{insn}
|
|
|
|
or @code{jump_insn} is really a function call and hence has this behavior,
|
|
|
|
you should define this macro.
|
|
|
|
|
|
|
|
You need not define this macro if it would always return zero.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac INSN_REFERENCES_ARE_DELAYED (@var{insn})
|
1996-09-25 01:21:45 +02:00
|
|
|
Define this macro as a C expression that is nonzero if it is safe for the
|
|
|
|
delay slot scheduler to place instructions in the delay slot of @var{insn},
|
|
|
|
even if they appear to set or clobber a resource referenced in @var{insn}.
|
|
|
|
@var{insn} is always a @code{jump_insn} or an @code{insn}. On machines where
|
|
|
|
some @code{insn} or @code{jump_insn} is really a function call and its operands
|
|
|
|
are registers whose use is actually in the subroutine it calls, you should
|
|
|
|
define this macro. Doing so allows the delay slot scheduler to move
|
|
|
|
instructions which copy arguments into the argument registers into the delay
|
|
|
|
slot of @var{insn}.
|
|
|
|
|
|
|
|
You need not define this macro if it would always return zero.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1996-09-25 01:21:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac MULTIPLE_SYMBOL_SPACES
|
2004-09-09 19:11:18 +02:00
|
|
|
Define this macro as a C expression that is nonzero if, in some cases,
|
|
|
|
global symbols from one translation unit may not be bound to undefined
|
|
|
|
symbols in another translation unit without user intervention. For
|
|
|
|
instance, under Microsoft Windows symbols must be explicitly imported
|
|
|
|
from shared libraries (DLLs).
|
|
|
|
|
|
|
|
You need not define this macro if it would always evaluate to zero.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
1997-08-11 17:56:58 +02:00
|
|
|
|
2004-03-04 00:55:52 +01:00
|
|
|
@deftypefn {Target Hook} tree TARGET_MD_ASM_CLOBBERS (tree @var{clobbers})
|
|
|
|
This target hook should add to @var{clobbers} @code{STRING_CST} trees for
|
1999-09-02 22:01:46 +02:00
|
|
|
any hard regs the port wishes to automatically clobber for all asms.
|
2004-03-04 00:55:52 +01:00
|
|
|
It should return the result of the last @code{tree_cons} used to add a
|
|
|
|
clobber.
|
|
|
|
@end deftypefn
|
1999-09-02 22:01:46 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac MATH_LIBRARY
|
1998-10-03 16:47:54 +02:00
|
|
|
Define this macro as a C string constant for the linker argument to link
|
|
|
|
in the system math library, or @samp{""} if the target does not have a
|
|
|
|
separate math library.
|
|
|
|
|
|
|
|
You need only define this macro if the default of @samp{"-lm"} is wrong.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
configure.in (i?86-*-beos{pe,elf,}*): Recognize.
* configure.in (i?86-*-beos{pe,elf,}*): Recognize.
* i386/t-beos, i386/x-beos, i386/xm-beos.h: New files.
* i386/beos-elf.h, i386/beos-pe.h: New files.
* Makefile.in (CROSS_SYSTEM_HEADER_DIR): New.
* cross-make (SYSTEM_HEADER_DIR): Define using
CROSS_SYSTEM_HEADER_DIR.
* gcc.c (LIBRARY_PATH_ENV): Provide default.
(process_command): Use it.
(main): Likewise. Kill trailing = from env vars.
(build_search_list): Put it back.
* collect2.c (main): Use LIBRARY_PATH_ENV.
* configure.in (GCC_NEED_DECLARATIONS): Add environ.
* toplev.c: Use NEED_DECLARATION_ENVIRON.
* tm.texi (Frame Layout): Document SMALL_STACK.
* c-common.c (c_common_nodes_and_builtins): Check it.
* system.h: Undef alloca after including glibc's <stdlib.h>,
if USE_C_ALLOCA is defined.
* gcc.c (set_input): New fn.
(main): After all input files are compiled, reset the input file
info to the first.
* aclocal.m4 (rindex, index): If already defined, don't attempt
to redefine.
* ginclude/varargs.h: (__va_list__): Define ifndef.
* ginclude/stdarg.h: Likewise.
* ginclude/stddef.h (__WCHAR_TYPE__) [BEOS]: Use int
instead of unsigned char.
* hash.h (true, false, boolean): Undef before enum.
From-SVN: r31366
2000-01-13 01:37:06 +01:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac LIBRARY_PATH_ENV
|
configure.in (i?86-*-beos{pe,elf,}*): Recognize.
* configure.in (i?86-*-beos{pe,elf,}*): Recognize.
* i386/t-beos, i386/x-beos, i386/xm-beos.h: New files.
* i386/beos-elf.h, i386/beos-pe.h: New files.
* Makefile.in (CROSS_SYSTEM_HEADER_DIR): New.
* cross-make (SYSTEM_HEADER_DIR): Define using
CROSS_SYSTEM_HEADER_DIR.
* gcc.c (LIBRARY_PATH_ENV): Provide default.
(process_command): Use it.
(main): Likewise. Kill trailing = from env vars.
(build_search_list): Put it back.
* collect2.c (main): Use LIBRARY_PATH_ENV.
* configure.in (GCC_NEED_DECLARATIONS): Add environ.
* toplev.c: Use NEED_DECLARATION_ENVIRON.
* tm.texi (Frame Layout): Document SMALL_STACK.
* c-common.c (c_common_nodes_and_builtins): Check it.
* system.h: Undef alloca after including glibc's <stdlib.h>,
if USE_C_ALLOCA is defined.
* gcc.c (set_input): New fn.
(main): After all input files are compiled, reset the input file
info to the first.
* aclocal.m4 (rindex, index): If already defined, don't attempt
to redefine.
* ginclude/varargs.h: (__va_list__): Define ifndef.
* ginclude/stdarg.h: Likewise.
* ginclude/stddef.h (__WCHAR_TYPE__) [BEOS]: Use int
instead of unsigned char.
* hash.h (true, false, boolean): Undef before enum.
From-SVN: r31366
2000-01-13 01:37:06 +01:00
|
|
|
Define this macro as a C string constant for the environment variable that
|
|
|
|
specifies where the linker should look for libraries.
|
|
|
|
|
|
|
|
You need only define this macro if the default of @samp{"LIBRARY_PATH"}
|
|
|
|
is wrong.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2000-01-26 23:27:31 +01:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac TARGET_HAS_F_SETLKW
|
c-tree.texi, [...]: Replace . at end of sentences preceded by a capital letter with @..
* doc/c-tree.texi, doc/contrib.texi, doc/cpp.texi,
doc/cppinternals.texi, doc/extend.texi, doc/gcc.texi,
doc/gcov.texi, doc/install-old.texi, doc/install.texi,
doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: Replace
. at end of sentences preceded by a capital letter with @..
From-SVN: r43611
2001-06-27 17:04:16 +02:00
|
|
|
Define this macro if the target supports file locking with fcntl / F_SETLKW@.
|
|
|
|
Note that this functionality is part of POSIX@.
|
2000-01-26 23:27:31 +01:00
|
|
|
Defining @code{TARGET_HAS_F_SETLKW} will enable the test coverage code
|
|
|
|
to use file locking when exiting a program, which avoids race conditions
|
|
|
|
if the program has forked.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2000-04-07 11:24:45 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac MAX_CONDITIONAL_EXECUTE
|
2000-04-07 11:24:45 +02:00
|
|
|
|
|
|
|
A C expression for the maximum number of instructions to execute via
|
|
|
|
conditional execution instructions instead of a branch. A value of
|
|
|
|
@code{BRANCH_COST}+1 is the default if the machine does not use cc0, and
|
|
|
|
1 if it does use cc0.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2000-06-04 04:03:03 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac IFCVT_MODIFY_TESTS (@var{ce_info}, @var{true_expr}, @var{false_expr})
|
2002-07-21 16:32:25 +02:00
|
|
|
Used if the target needs to perform machine-dependent modifications on the
|
|
|
|
conditionals used for turning basic blocks into conditionally executed code.
|
|
|
|
@var{ce_info} points to a data structure, @code{struct ce_if_block}, which
|
|
|
|
contains information about the currently processed blocks. @var{true_expr}
|
|
|
|
and @var{false_expr} are the tests that are used for converting the
|
|
|
|
then-block and the else-block, respectively. Set either @var{true_expr} or
|
|
|
|
@var{false_expr} to a null pointer if the tests cannot be converted.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2002-07-21 16:32:25 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac IFCVT_MODIFY_MULTIPLE_TESTS (@var{ce_info}, @var{bb}, @var{true_expr}, @var{false_expr})
|
2002-07-21 16:32:25 +02:00
|
|
|
Like @code{IFCVT_MODIFY_TESTS}, but used when converting more complicated
|
|
|
|
if-statements into conditions combined by @code{and} and @code{or} operations.
|
|
|
|
@var{bb} contains the basic block that contains the test that is currently
|
|
|
|
being processed and about to be turned into a condition.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2000-06-04 04:03:03 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac IFCVT_MODIFY_INSN (@var{ce_info}, @var{pattern}, @var{insn})
|
2002-07-21 16:32:25 +02:00
|
|
|
A C expression to modify the @var{PATTERN} of an @var{INSN} that is to
|
|
|
|
be converted to conditional execution format. @var{ce_info} points to
|
|
|
|
a data structure, @code{struct ce_if_block}, which contains information
|
|
|
|
about the currently processed blocks.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2000-06-04 04:03:03 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac IFCVT_MODIFY_FINAL (@var{ce_info})
|
2000-06-04 04:03:03 +02:00
|
|
|
A C expression to perform any final machine dependent modifications in
|
2002-07-21 16:32:25 +02:00
|
|
|
converting code to conditional execution. The involved basic blocks
|
|
|
|
can be found in the @code{struct ce_if_block} structure that is pointed
|
|
|
|
to by @var{ce_info}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2000-06-04 04:03:03 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac IFCVT_MODIFY_CANCEL (@var{ce_info})
|
2000-06-04 04:03:03 +02:00
|
|
|
A C expression to cancel any machine dependent modifications in
|
2002-07-21 16:32:25 +02:00
|
|
|
converting code to conditional execution. The involved basic blocks
|
|
|
|
can be found in the @code{struct ce_if_block} structure that is pointed
|
|
|
|
to by @var{ce_info}.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2002-07-21 16:32:25 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac IFCVT_INIT_EXTRA_FIELDS (@var{ce_info})
|
2002-07-21 16:32:25 +02:00
|
|
|
A C expression to initialize any extra fields in a @code{struct ce_if_block}
|
|
|
|
structure, which are defined by the @code{IFCVT_EXTRA_FIELDS} macro.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2002-07-21 16:32:25 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac IFCVT_EXTRA_FIELDS
|
2002-07-21 16:32:25 +02:00
|
|
|
If defined, it should expand to a set of field declarations that will be
|
2002-12-17 17:47:45 +01:00
|
|
|
added to the @code{struct ce_if_block} structure. These should be initialized
|
2002-07-21 16:32:25 +02:00
|
|
|
by the @code{IFCVT_INIT_EXTRA_FIELDS} macro.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2002-07-21 16:32:25 +02:00
|
|
|
|
2003-05-14 09:29:54 +02:00
|
|
|
@deftypefn {Target Hook} void TARGET_MACHINE_DEPENDENT_REORG ()
|
|
|
|
If non-null, this hook performs a target-specific pass over the
|
|
|
|
instruction stream. The compiler will run it at all optimization levels,
|
|
|
|
just before the point at which it normally does delayed-branch scheduling.
|
|
|
|
|
|
|
|
The exact purpose of the hook varies from target to target. Some use
|
|
|
|
it to do transformations that are necessary for correctness, such as
|
|
|
|
laying out in-function constant pools or avoiding hardware hazards.
|
|
|
|
Others use it as an opportunity to do some machine-dependent optimizations.
|
|
|
|
|
|
|
|
You need not implement the hook if it has nothing to do. The default
|
|
|
|
definition is null.
|
|
|
|
@end deftypefn
|
|
|
|
|
2001-07-10 08:18:36 +02:00
|
|
|
@deftypefn {Target Hook} void TARGET_INIT_BUILTINS ()
|
|
|
|
Define this hook if you have any machine-specific built-in functions
|
|
|
|
that need to be defined. It should be a function that performs the
|
2001-02-07 11:42:15 +01:00
|
|
|
necessary setup.
|
|
|
|
|
c-tree.texi, [...]: Fix spelling and typos.
* doc/c-tree.texi, doc/contrib.texi, doc/extend.texi,
doc/gcc.texi, doc/install.texi, doc/invoke.texi, doc/md.texi,
doc/objc.texi, doc/rtl.texi, doc/tm.texi: Fix spelling and typos.
Consistently use "built-in" and "bit-field". Minor logical markup
improvements.
* doc/gcc.1: Regenerate.
From-SVN: r43383
2001-06-15 00:51:18 +02:00
|
|
|
Machine specific built-in functions can be useful to expand special machine
|
2001-02-07 11:42:15 +01:00
|
|
|
instructions that would otherwise not normally be generated because
|
|
|
|
they have no equivalent in the source language (for example, SIMD vector
|
|
|
|
instructions or prefetch instructions).
|
|
|
|
|
langhooks.h (builtin_function): New langhook.
* langhooks.h (builtin_function): New langhook.
* langhooks-def.h (LANG_HOOKS_BUILTIN_FUNCTION): New.
(LANG_HOOKS_INITIALIZER): Update.
* tree.h (builtin_function): Remove.
* doc/tm.texi: Update.
* c-tree.h (builtin_function): Declare.
* c-common.c, config/alpha/alpha.c, config/arm/arm.c,
config/c4x/c4x.c, config/frv/frv.c, config/i386/i386.c,
config/ia64/ia64.c, config/iq2000/iq2000.c,
config/rs6000/rs6000.c, config/s390/s390.c, config/sh/sh.c,
config/stormy16/stormy16.c: All callers of builtin_function
changed.
ada:
* gigi.h (builtin_function): Declare.
cp:
* cp-tree.h (builtin_function): Declare.
fortran:
* trans.h (builtin_function): Declare.
java:
* java-tree.h (builtin_function): Declare.
From-SVN: r84878
2004-07-17 21:35:04 +02:00
|
|
|
To create a built-in function, call the function
|
|
|
|
@code{lang_hooks.builtin_function}
|
c-tree.texi, [...]: Fix spelling and typos.
* doc/c-tree.texi, doc/contrib.texi, doc/extend.texi,
doc/gcc.texi, doc/install.texi, doc/invoke.texi, doc/md.texi,
doc/objc.texi, doc/rtl.texi, doc/tm.texi: Fix spelling and typos.
Consistently use "built-in" and "bit-field". Minor logical markup
improvements.
* doc/gcc.1: Regenerate.
From-SVN: r43383
2001-06-15 00:51:18 +02:00
|
|
|
which is defined by the language front end. You can use any type nodes set
|
2001-02-07 11:42:15 +01:00
|
|
|
up by @code{build_common_tree_nodes} and @code{build_common_tree_nodes_2};
|
haifa-sched.c: Convert to target hooks.
* haifa-sched.c: Convert to target hooks. Macros replaced
are ISSUE_RATE, ADJUST_COST, ADJUST_PRIORITY, MD_SCHED_INIT,
MD_SCHED_REORDER, MD_SCHED_REORDER2, MD_SCHED_VARIABLE_ISSUE,
MD_SCHED_FINISH, and HAVE_cycle_display.
* target-def.h (TARGET_SCHED_ADJUST_COST,
TARGET_SCHED_ADJUST_PRIORITY, TARGET_SCHED_ISSUE_RATE,
TARGET_SCHED_VARIABLE_ISSUE, TARGET_SCHED_INIT,
TARGET_SCHED_FINISH, TARGET_SCHED_REORDER,
TARGET_SCHED_REORDER2, TARGET_SCHED_CYCLE_DISPLAY):
New hook #defines to be overridden.
(TARGET_SCHED): Bring them all together.
(TARGET_INITIALIZER): Update.
* target.h: Don't forward declare struct rtx_def. Use 'rtx'
instead of 'struct rtx_def *' throughout.
(struct sched): New set of hooks for the scheduler.
* Makefile.in (haifa-sched.o): Depend on target.h.
* doc/tm.texi: Document the new scheduler hooks, together in
their own section, instead of scattered around.
Fix a bunch of underfull/overfull hboxes.
* a29k.h, alpha.h, arm.h, c4x.h, convex.h, d30v.h, i386.h,
ia64.h, m32r.h, m88k.h, mips.h, pa.h, rs6000.h, s390.h, sh.h,
sparc.h: Don't define any of the old scheduler macros.
* a29k.c, alpha.c, arm.c, c4x.c, convex.c, d30v.c, i386.c,
ia64.c, m32r.c, m88k.c, mips.c, pa.c, rs6000.c, s390.c, sh.c,
sparc.c: Create hook functions from code extracted from
corresponding target header, or make existing hooks static, as
appropriate. Set the appropriate entries in targetm.
* alpha-protos.h, arm-protos.h, c4x-protos.h, d30v-protos.h,
i386-protos.h, ia64-protos.h, m32r-protos.h, pa-protos.h,
rs6000-protos.h, s390-protos.h, sparc-protos.h:
Remove prototypes for functions which are now static.
* d30v.h, d30v.c, m32r.h, m32r.c: Remove #ifdef HAIFA and
related gunk; the Haifa scheduler is now the only choice.
From-SVN: r45009
2001-08-18 22:25:54 +02:00
|
|
|
only language front ends that use those two functions will call
|
2001-07-10 08:18:36 +02:00
|
|
|
@samp{TARGET_INIT_BUILTINS}.
|
2001-07-10 12:52:01 +02:00
|
|
|
@end deftypefn
|
2001-02-07 11:42:15 +01:00
|
|
|
|
2001-07-10 08:18:36 +02:00
|
|
|
@deftypefn {Target Hook} rtx TARGET_EXPAND_BUILTIN (tree @var{exp}, rtx @var{target}, rtx @var{subtarget}, enum machine_mode @var{mode}, int @var{ignore})
|
2001-02-07 11:42:15 +01:00
|
|
|
|
c-tree.texi, [...]: Fix spelling and typos.
* doc/c-tree.texi, doc/contrib.texi, doc/extend.texi,
doc/gcc.texi, doc/install.texi, doc/invoke.texi, doc/md.texi,
doc/objc.texi, doc/rtl.texi, doc/tm.texi: Fix spelling and typos.
Consistently use "built-in" and "bit-field". Minor logical markup
improvements.
* doc/gcc.1: Regenerate.
From-SVN: r43383
2001-06-15 00:51:18 +02:00
|
|
|
Expand a call to a machine specific built-in function that was set up by
|
2001-07-10 08:18:36 +02:00
|
|
|
@samp{TARGET_INIT_BUILTINS}. @var{exp} is the expression for the
|
|
|
|
function call; the result should go to @var{target} if that is
|
|
|
|
convenient, and have mode @var{mode} if that is convenient.
|
|
|
|
@var{subtarget} may be used as the target for computing one of
|
|
|
|
@var{exp}'s operands. @var{ignore} is nonzero if the value is to be
|
|
|
|
ignored. This function should return the result of the call to the
|
|
|
|
built-in function.
|
2001-07-10 12:52:01 +02:00
|
|
|
@end deftypefn
|
2001-02-07 11:42:15 +01:00
|
|
|
|
2004-12-03 16:37:16 +01:00
|
|
|
@deftypefn {Target Hook} tree TARGET_FOLD_BUILTIN (tree @var{exp}, bool @var{ignore})
|
|
|
|
|
|
|
|
Expand a call to a machine specific built-in function that was set up by
|
|
|
|
@samp{TARGET_INIT_BUILTINS}. @var{exp} is the expression for the
|
|
|
|
function call; the result is another tree containing a simplified
|
|
|
|
expression for the call's result. If @var{ignore} is true the
|
|
|
|
value will be ignored.
|
|
|
|
@end deftypefn
|
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac MD_CAN_REDIRECT_BRANCH (@var{branch1}, @var{branch2})
|
2001-07-23 18:00:06 +02:00
|
|
|
|
2001-10-09 08:03:16 +02:00
|
|
|
Take a branch insn in @var{branch1} and another in @var{branch2}.
|
2001-07-23 18:00:06 +02:00
|
|
|
Return true if redirecting @var{branch1} to the destination of
|
|
|
|
@var{branch2} is possible.
|
|
|
|
|
|
|
|
On some targets, branches may have a limited range. Optimizing the
|
|
|
|
filling of delay slots can result in branches being redirected, and this
|
|
|
|
may in turn cause a branch offset to overflow.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2001-07-23 18:00:06 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac ALLOCATE_INITIAL_VALUE (@var{hard_reg})
|
2001-09-21 02:45:30 +02:00
|
|
|
|
|
|
|
When the initial value of a hard register has been copied in a pseudo
|
2001-10-09 08:03:16 +02:00
|
|
|
register, it is often not necessary to actually allocate another register
|
2001-09-21 02:45:30 +02:00
|
|
|
to this pseudo register, because the original hard register or a stack slot
|
|
|
|
it has been saved into can be used. @code{ALLOCATE_INITIAL_VALUE}, if
|
|
|
|
defined, is called at the start of register allocation once for each
|
|
|
|
hard register that had its initial value copied by using
|
|
|
|
@code{get_func_hard_reg_initial_val} or @code{get_hard_reg_initial_val}.
|
|
|
|
Possible values are @code{NULL_RTX}, if you don't want
|
|
|
|
to do any special allocation, a @code{REG} rtx---that would typically be
|
|
|
|
the hard register itself, if it is known not to be clobbered---or a
|
|
|
|
@code{MEM}.
|
|
|
|
If you are returning a @code{MEM}, this is only a hint for the allocator;
|
|
|
|
it might decide to use another register anyways.
|
|
|
|
You may use @code{current_function_leaf_function} in the definition of the
|
|
|
|
macro, functions that use @code{REG_N_SETS}, to determine if the hard
|
|
|
|
register in question will not be clobbered.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2001-09-21 02:45:30 +02:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac TARGET_OBJECT_SUFFIX
|
2002-01-23 18:30:28 +01:00
|
|
|
Define this macro to be a C string representing the suffix for object
|
|
|
|
files on your target machine. If you do not define this macro, GCC will
|
|
|
|
use @samp{.o} as the suffix for object files.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2002-01-23 18:30:28 +01:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac TARGET_EXECUTABLE_SUFFIX
|
2002-01-23 18:30:28 +01:00
|
|
|
Define this macro to be a C string representing the suffix to be
|
|
|
|
automatically added to executable files on your target machine. If you
|
|
|
|
do not define this macro, GCC will use the null string as the suffix for
|
|
|
|
executable files.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2002-01-23 18:30:28 +01:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac COLLECT_EXPORT_LIST
|
2002-01-23 18:30:28 +01:00
|
|
|
If defined, @code{collect2} will scan the individual object files
|
|
|
|
specified on its command line and create an export list for the linker.
|
|
|
|
Define this macro for systems like AIX, where the linker discards
|
|
|
|
object files that are not referenced from @code{main} and uses export
|
|
|
|
lists.
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2002-01-23 18:30:28 +01:00
|
|
|
|
2003-06-20 08:41:12 +02:00
|
|
|
@defmac MODIFY_JNI_METHOD_CALL (@var{mdecl})
|
2003-02-12 19:39:35 +01:00
|
|
|
Define this macro to a C expression representing a variant of the
|
|
|
|
method call @var{mdecl}, if Java Native Interface (JNI) methods
|
|
|
|
must be invoked differently from other methods on your target.
|
2004-01-18 03:10:34 +01:00
|
|
|
For example, on 32-bit Microsoft Windows, JNI methods must be invoked using
|
2003-02-12 19:39:35 +01:00
|
|
|
the @code{stdcall} calling convention and this macro is then
|
|
|
|
defined as this expression:
|
|
|
|
|
|
|
|
@smallexample
|
|
|
|
build_type_attribute_variant (@var{mdecl},
|
|
|
|
build_tree_list
|
|
|
|
(get_identifier ("stdcall"),
|
|
|
|
NULL))
|
|
|
|
@end smallexample
|
2003-06-20 08:41:12 +02:00
|
|
|
@end defmac
|
2002-02-09 03:18:12 +01:00
|
|
|
|
|
|
|
@deftypefn {Target Hook} bool TARGET_CANNOT_MODIFY_JUMPS_P (void)
|
|
|
|
This target hook returns @code{true} past the point in which new jump
|
|
|
|
instructions could be created. On machines that require a register for
|
|
|
|
every jump such as the SHmedia ISA of SH5, this point would typically be
|
|
|
|
reload, so this target hook should be defined to a function such as:
|
|
|
|
|
|
|
|
@smallexample
|
|
|
|
static bool
|
|
|
|
cannot_modify_jumps_past_reload_p ()
|
|
|
|
@{
|
|
|
|
return (reload_completed || reload_in_progress);
|
|
|
|
@}
|
|
|
|
@end smallexample
|
|
|
|
@end deftypefn
|
2003-06-18 21:43:55 +02:00
|
|
|
|
2003-06-20 19:30:05 +02:00
|
|
|
@deftypefn {Target Hook} int TARGET_BRANCH_TARGET_REGISTER_CLASS (void)
|
2003-06-18 21:43:55 +02:00
|
|
|
This target hook returns a register class for which branch target register
|
|
|
|
optimizations should be applied. All registers in this class should be
|
2003-07-01 16:39:20 +02:00
|
|
|
usable interchangeably. After reload, registers in this class will be
|
2003-06-18 21:43:55 +02:00
|
|
|
re-allocated and loads will be hoisted out of loops and be subjected
|
|
|
|
to inter-block scheduling.
|
|
|
|
@end deftypefn
|
|
|
|
|
|
|
|
@deftypefn {Target Hook} bool TARGET_BRANCH_TARGET_REGISTER_CALLEE_SAVED (bool @var{after_prologue_epilogue_gen})
|
|
|
|
Branch target register optimization will by default exclude callee-saved
|
|
|
|
registers
|
|
|
|
that are not already live during the current function; if this target hook
|
|
|
|
returns true, they will be included. The target code must than make sure
|
|
|
|
that all target registers in the class returned by
|
|
|
|
@samp{TARGET_BRANCH_TARGET_REGISTER_CLASS} that might need saving are
|
|
|
|
saved. @var{after_prologue_epilogue_gen} indicates if prologues and
|
|
|
|
epilogues have already been generated. Note, even if you only return
|
|
|
|
true when @var{after_prologue_epilogue_gen} is false, you still are likely
|
|
|
|
to have to make special provisions in @code{INITIAL_ELIMINATION_OFFSET}
|
|
|
|
to reserve space for caller-saved target registers.
|
|
|
|
@end deftypefn
|
2003-06-24 04:20:12 +02:00
|
|
|
|
|
|
|
@defmac POWI_MAX_MULTS
|
2003-10-10 23:28:56 +02:00
|
|
|
If defined, this macro is interpreted as a signed integer C expression
|
2003-06-24 04:20:12 +02:00
|
|
|
that specifies the maximum number of floating point multiplications
|
|
|
|
that should be emitted when expanding exponentiation by an integer
|
|
|
|
constant inline. When this value is defined, exponentiation requiring
|
|
|
|
more than this number of multiplications is implemented by calling the
|
|
|
|
system library's @code{pow}, @code{powf} or @code{powl} routines.
|
|
|
|
The default value places no upper bound on the multiplication count.
|
|
|
|
@end defmac
|
Add framework support for darwin.
* c-incpath.c: Include target.h and machmode.h.
(add_path): Use a consistent style for cpp_dir. Initialize
p->construct to 0.
(add_cpp_dir_path): New.
(register_include_chains): Add use of extra_includes callback.
(hook_void_int): Add.
(target_c_incpath): Add.
* c-incpath.h (add_cpp_dir_path): New.
(target_c_incpath_s): Add.
(target_c_incpath): Add.
(C_INCPATH_INIT): Add.
* c-opts.c (c_common_missing_argument,
c_common_handle_option): Add -F argument processing.
* c.opt: Add -F argument processing.
* gcc.c (trad_capable_cpp): Add -F argument processing.
* cppfiles.c (find_file_in_dir): Update to use construct
callback.
(search_path_exhausted, cpp_get_path, cpp_get_buffer,
cpp_get_prev): New.
(_cpp_find_file): Use search_path_exhausted.
(make_cpp_dir): Initialize construct to 0.
* cpplib.h (missing_header_cb
cpp_get_path, cpp_get_buffer, cpp_get_file, cpp_get_prev): New.
(cpp_callbacks): Add missing_header
(cpp_dir): Add construct.
* target-def.h: (TARGET_OPTF): New.
* hooks.c (hook_void_int, hook_void_charptr): Add.
* hooks.h (hook_void_int, hook_void_charptr): Add.
* Makefile.in (c-incpath.o) : Add $(TARGET_H) and
$(MACHMODE_H) dependencies.
* doc/invoke.texi (Darwin Options): Document -F.
* doc/tm.texi (TARGET_EXTRA_INCLUDES): Add.
(TARGET_OPTF): Add.
* fix-header.c (target_c_incpath): Add.
* config/darwin-c.c: Add c-incpath.h include.
(using_frameworks, find_subframework_file,
find_subframework_header, add_system_framework_path,
frameworks_in_use, num_frameworks, max_frameworks,
add_framework, find_framework, struct framework_header,
framework_header_dirs, framework_construct_pathname,
find_subframework_file, add_system_framework_path,
add_framework_path, framework_defaults,
darwin_register_frameworks, find_subframework_header): Add.
* config/darwin.h (TARGET_EXTRA_INCLUDES, TARGET_OPTF): New.
(TARGET_OPTION_TRANSLATE_TABLE): Add -framework support.
(CPP_SPEC): Add __APPLE_CC__ support.
* t-darwin (darwin-c.o): Add c-incpath.h dependency.
From-SVN: r78875
2004-03-04 01:18:54 +01:00
|
|
|
|
2004-09-16 08:49:59 +02:00
|
|
|
@deftypefn Macro void TARGET_EXTRA_INCLUDES (const char *@var{sysroot}, const char *@var{iprefix}, int @var{stdinc})
|
Add framework support for darwin.
* c-incpath.c: Include target.h and machmode.h.
(add_path): Use a consistent style for cpp_dir. Initialize
p->construct to 0.
(add_cpp_dir_path): New.
(register_include_chains): Add use of extra_includes callback.
(hook_void_int): Add.
(target_c_incpath): Add.
* c-incpath.h (add_cpp_dir_path): New.
(target_c_incpath_s): Add.
(target_c_incpath): Add.
(C_INCPATH_INIT): Add.
* c-opts.c (c_common_missing_argument,
c_common_handle_option): Add -F argument processing.
* c.opt: Add -F argument processing.
* gcc.c (trad_capable_cpp): Add -F argument processing.
* cppfiles.c (find_file_in_dir): Update to use construct
callback.
(search_path_exhausted, cpp_get_path, cpp_get_buffer,
cpp_get_prev): New.
(_cpp_find_file): Use search_path_exhausted.
(make_cpp_dir): Initialize construct to 0.
* cpplib.h (missing_header_cb
cpp_get_path, cpp_get_buffer, cpp_get_file, cpp_get_prev): New.
(cpp_callbacks): Add missing_header
(cpp_dir): Add construct.
* target-def.h: (TARGET_OPTF): New.
* hooks.c (hook_void_int, hook_void_charptr): Add.
* hooks.h (hook_void_int, hook_void_charptr): Add.
* Makefile.in (c-incpath.o) : Add $(TARGET_H) and
$(MACHMODE_H) dependencies.
* doc/invoke.texi (Darwin Options): Document -F.
* doc/tm.texi (TARGET_EXTRA_INCLUDES): Add.
(TARGET_OPTF): Add.
* fix-header.c (target_c_incpath): Add.
* config/darwin-c.c: Add c-incpath.h include.
(using_frameworks, find_subframework_file,
find_subframework_header, add_system_framework_path,
frameworks_in_use, num_frameworks, max_frameworks,
add_framework, find_framework, struct framework_header,
framework_header_dirs, framework_construct_pathname,
find_subframework_file, add_system_framework_path,
add_framework_path, framework_defaults,
darwin_register_frameworks, find_subframework_header): Add.
* config/darwin.h (TARGET_EXTRA_INCLUDES, TARGET_OPTF): New.
(TARGET_OPTION_TRANSLATE_TABLE): Add -framework support.
(CPP_SPEC): Add __APPLE_CC__ support.
* t-darwin (darwin-c.o): Add c-incpath.h dependency.
From-SVN: r78875
2004-03-04 01:18:54 +01:00
|
|
|
This target hook should register any extra include files for the
|
|
|
|
target. The parameter @var{stdinc} indicates if normal include files
|
2004-09-16 08:49:59 +02:00
|
|
|
are present. The parameter @var{sysroot} is the system root directory.
|
|
|
|
The parameter @var{iprefix} is the prefix for the gcc directory.
|
|
|
|
@end deftypefn
|
|
|
|
|
|
|
|
@deftypefn Macro void TARGET_EXTRA_PRE_INCLUDES (const char *@var{sysroot}, const char *@var{iprefix}, int @var{stdinc})
|
|
|
|
This target hook should register any extra include files for the
|
|
|
|
target before any standard headers. The parameter @var{stdinc}
|
|
|
|
indicates if normal include files are present. The parameter
|
|
|
|
@var{sysroot} is the system root directory. The parameter
|
|
|
|
@var{iprefix} is the prefix for the gcc directory.
|
Add framework support for darwin.
* c-incpath.c: Include target.h and machmode.h.
(add_path): Use a consistent style for cpp_dir. Initialize
p->construct to 0.
(add_cpp_dir_path): New.
(register_include_chains): Add use of extra_includes callback.
(hook_void_int): Add.
(target_c_incpath): Add.
* c-incpath.h (add_cpp_dir_path): New.
(target_c_incpath_s): Add.
(target_c_incpath): Add.
(C_INCPATH_INIT): Add.
* c-opts.c (c_common_missing_argument,
c_common_handle_option): Add -F argument processing.
* c.opt: Add -F argument processing.
* gcc.c (trad_capable_cpp): Add -F argument processing.
* cppfiles.c (find_file_in_dir): Update to use construct
callback.
(search_path_exhausted, cpp_get_path, cpp_get_buffer,
cpp_get_prev): New.
(_cpp_find_file): Use search_path_exhausted.
(make_cpp_dir): Initialize construct to 0.
* cpplib.h (missing_header_cb
cpp_get_path, cpp_get_buffer, cpp_get_file, cpp_get_prev): New.
(cpp_callbacks): Add missing_header
(cpp_dir): Add construct.
* target-def.h: (TARGET_OPTF): New.
* hooks.c (hook_void_int, hook_void_charptr): Add.
* hooks.h (hook_void_int, hook_void_charptr): Add.
* Makefile.in (c-incpath.o) : Add $(TARGET_H) and
$(MACHMODE_H) dependencies.
* doc/invoke.texi (Darwin Options): Document -F.
* doc/tm.texi (TARGET_EXTRA_INCLUDES): Add.
(TARGET_OPTF): Add.
* fix-header.c (target_c_incpath): Add.
* config/darwin-c.c: Add c-incpath.h include.
(using_frameworks, find_subframework_file,
find_subframework_header, add_system_framework_path,
frameworks_in_use, num_frameworks, max_frameworks,
add_framework, find_framework, struct framework_header,
framework_header_dirs, framework_construct_pathname,
find_subframework_file, add_system_framework_path,
add_framework_path, framework_defaults,
darwin_register_frameworks, find_subframework_header): Add.
* config/darwin.h (TARGET_EXTRA_INCLUDES, TARGET_OPTF): New.
(TARGET_OPTION_TRANSLATE_TABLE): Add -framework support.
(CPP_SPEC): Add __APPLE_CC__ support.
* t-darwin (darwin-c.o): Add c-incpath.h dependency.
From-SVN: r78875
2004-03-04 01:18:54 +01:00
|
|
|
@end deftypefn
|
|
|
|
|
|
|
|
@deftypefn Macro void TARGET_OPTF (char *@var{path})
|
|
|
|
This target hook should register special include paths for the target.
|
|
|
|
The parameter @var{path} is the include to register. On Darwin
|
|
|
|
systems, this is used for Framework includes, which have semantics
|
|
|
|
that are different from @option{-I}.
|
|
|
|
@end deftypefn
|
2004-04-09 00:31:23 +02:00
|
|
|
|
|
|
|
@deftypefn {Target Hook} bool TARGET_USE_LOCAL_THUNK_ALIAS_P (tree @var{fndecl})
|
|
|
|
This target hook returns @code{true} if it is safe to use a local alias
|
|
|
|
for a virtual function @var{fndecl} when constructing thunks,
|
c-tree.texi, [...]: Correct end-of-sentence markup and markup of "etc.", "e.g." and "i.e.".
* doc/c-tree.texi, doc/cfg.texi, doc/contrib.texi, doc/cpp.texi,
doc/cppopts.texi, doc/extend.texi, doc/fragments.texi,
doc/frontends.texi, doc/gcov.texi, doc/hostconfig.texi,
doc/implement-c.texi, doc/install.texi, doc/invoke.texi,
doc/libgcc.texi, doc/md.texi, doc/passes.texi,
doc/portability.texi, doc/rtl.texi, doc/sourcebuild.texi,
doc/standards.texi, doc/tm.texi, doc/tree-ssa.texi,
doc/trouble.texi: Correct end-of-sentence markup and markup of
"etc.", "e.g." and "i.e.". Use @code in various places where
appropriate.
From-SVN: r90101
2004-11-05 02:36:57 +01:00
|
|
|
@code{false} otherwise. By default, the hook returns @code{true} for all
|
2004-09-11 10:34:26 +02:00
|
|
|
functions, if a target supports aliases (i.e.@: defines
|
2004-04-09 00:31:23 +02:00
|
|
|
@code{ASM_OUTPUT_DEF}), @code{false} otherwise,
|
|
|
|
@end deftypefn
|
2004-07-19 16:48:09 +02:00
|
|
|
|
|
|
|
@defmac TARGET_FORMAT_TYPES
|
|
|
|
If defined, this macro is the name of a global variable containing
|
|
|
|
target-specific format checking information for the @option{-Wformat}
|
|
|
|
option. The default is to have no target-specific format checks.
|
|
|
|
@end defmac
|
|
|
|
|
|
|
|
@defmac TARGET_N_FORMAT_TYPES
|
|
|
|
If defined, this macro is the number of entries in
|
|
|
|
@code{TARGET_FORMAT_TYPES}.
|
|
|
|
@end defmac
|
2004-12-13 07:57:13 +01:00
|
|
|
|
2004-12-28 05:36:54 +01:00
|
|
|
@deftypefn {Target Hook} bool TARGET_RELAXED_ORDERING
|
|
|
|
If set to @code{true}, means that the target's memory model does not
|
|
|
|
guarantee that loads which do not depend on one another will access
|
|
|
|
main memory in the order of the instruction stream; if ordering is
|
|
|
|
important, an explicit memory barrier must be used. This is true of
|
|
|
|
many recent processors which implement a policy of ``relaxed,''
|
|
|
|
``weak,'' or ``release'' memory consistency, such as Alpha, PowerPC,
|
|
|
|
and ia64. The default is @code{false}.
|
|
|
|
@end deftypefn
|
|
|
|
|
2004-12-13 07:57:13 +01:00
|
|
|
@defmac TARGET_USE_JCR_SECTION
|
|
|
|
This macro determines whether to use the JCR section to register Java
|
|
|
|
classes. By default, TARGET_USE_JCR_SECTION is defined to 1 if both
|
|
|
|
SUPPORTS_WEAK and TARGET_HAVE_NAMED_SECTIONS are true, else 0.
|
|
|
|
@end defmac
|