Bug 33190 - tm.texi describes some non-existing hooks
Summary: tm.texi describes some non-existing hooks
Status: ASSIGNED
Alias: None
Product: gcc
Classification: Unclassified
Component: other (show other bugs)
Version: 4.3.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: documentation
Depends on:
Blocks:
 
Reported: 2007-08-25 17:38 UTC by Kai Henningsen
Modified: 2012-06-27 13:30 UTC (History)
3 users (show)

See Also:
Host: n/a
Target: n/a
Build: n/a
Known to work:
Known to fail:
Last reconfirmed: 2012-02-06 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kai Henningsen 2007-08-25 17:38:24 UTC
These hooks aren't touched outside of tm.texi and /config/:

ALL_COP_ADDITIONAL_REGISTER_NAMES
DBX_OUTPUT_LBRAC
DBX_OUTPUT_NFUN
DBX_OUTPUT_RBRAC
MD_HANDLE_UNWABI
RANGE_TEST_NON_SHORT_CIRCUIT
REAL_VALUE_TRUNCATE
REVERSE_CONDEXEC_PREDICATES_P
TARGET_ALIGN_ANON_BITFIELDS
TARGET_NARROW_VOLATILE_BITFIELDS

They're in config in these places:

vg3-src/gcc/config/frv/frv.h:#define REVERSE_CONDEXEC_PREDICATES_P(x,y)      0
vg3-src/gcc/config/ia64/linux-unwind.h:#define MD_HANDLE_UNWABI ia64_handle_unwabi
vg3-src/gcc/config/ia64/unwind-ia64.c:#ifdef MD_HANDLE_UNWABI
vg3-src/gcc/config/ia64/unwind-ia64.c:  MD_HANDLE_UNWABI (context, fs);
vg3-src/gcc/config/mips/mips.h:  ALL_COP_ADDITIONAL_REGISTER_NAMES                                      \
vg3-src/gcc/config/mips/mips.h:#define ALL_COP_ADDITIONAL_REGISTER_NAMES
Comment 1 Andrew Pinski 2007-08-25 19:14:18 UTC
RANGE_TEST_NON_SHORT_CIRCUIT was renamed to LOGICAL_OP_NON_SHORT_CIRCUIT but the doc was not updated.
2004-11-18  Nathan Sidwell  <nathan@codesourcery.com>

Nathan, can you please update the docs for this target macro?
Comment 2 Kai Henningsen 2007-09-25 18:38:21 UTC
Learned some more. (For reference, this is all from Fr 17 Aug 21:29:16 UTC 2007 (revision 127595).)

In the docs, but not anywhere in the source:
TARGET_ALIGN_ANON_BITFIELDS
TARGET_NARROW_VOLATILE_BITFIELDS
RANGE_TEST_NON_SHORT_CIRCUIT
DBX_OUTPUT_LBRAC
DBX_OUTPUT_RBRAC
DBX_OUTPUT_NFUN
REAL_VALUE_TRUNCATE

Not defined by any target, but used in the main sources:
MODE_HAS_SIGNED_ZEROS (gcc/defaults.h gcc/flags.h)
TARGET_DECIMAL_FLOAT_SUPPORTED_P (gcc/target-def.h)
TARGET_BUILTIN_SETJMP_FRAME_VALUE (gcc/target-def.h)
TARGET_STACK_PROTECT_GUARD (gcc/target-def.h)
USE_LOAD_POST_DECREMENT (gcc/rtl.h)
USE_LOAD_PRE_INCREMENT (gcc/rtl.h)
USE_STORE_POST_DECREMENT (gcc/rtl.h)
USE_STORE_PRE_INCREMENT (gcc/rtl.h)
TARGET_SCHED_DFA_POST_CYCLE_INSN (gcc/target-def.h)
TARGET_SCHED_INIT_DFA_POST_CYCLE_INSN (gcc/target-def.h)
TARGET_HAVE_SRODATA_SECTION (gcc/target-def.h)
TARGET_ASM_RECORD_GCC_SWITCHES (gcc/config/elfos.h gcc/target-def.h)
TARGET_ASM_RECORD_GCC_SWITCHES_SECTION (gcc/target-def.h)
TARGET_ASM_ALIGNED_TI_OP (gcc/target-def.h)
TARGET_ASM_UNALIGNED_TI_OP (gcc/target-def.h)
ASM_OUTPUT_MEASURED_SIZE (gcc/config/elfos.h gcc/defaults.h) NOTE: the default is USED but not defined in some targets.
TARGET_MERGE_TYPE_ATTRIBUTES (gcc/target-def.h)
TARGET_FUNCTION_ATTRIBUTE_INLINABLE_P (gcc/target-def.h)
TARGET_GET_PCH_VALIDITY (gcc/target-def.h)
TARGET_PCH_VALID_P (gcc/target-def.h)
TARGET_MIN_DIVISIONS_FOR_RECIP_MUL (gcc/target-def.h)
IFCVT_EXTRA_FIELDS (gcc/basic-block.h)
TARGET_RESOLVE_OVERLOADED_BUILTIN (gcc/target-def.h)
SWITCH_CURTAILS_COMPILATION (gcc/gcc.c)
SYSROOT_HEADERS_SUFFIX_SPEC (gcc/cppdefault.c gcc/gcc.c)
LARGEST_EXPONENT_IS_NORMAL (gcc/config/fp-bit.c gcc/defaults.h) NOTE: USED in gcc/config/spu/spu.h
SHORT_FRACT_TYPE_SIZE (gcc/defaults.h gcc/tree.c)
FRACT_TYPE_SIZE (gcc/defaults.h gcc/tree.c)
LONG_FRACT_TYPE_SIZE (gcc/defaults.h gcc/tree.c)
LONG_LONG_FRACT_TYPE_SIZE (gcc/defaults.h gcc/tree.c)
SHORT_ACCUM_TYPE_SIZE (gcc/defaults.h gcc/tree.c)
ACCUM_TYPE_SIZE (gcc/defaults.h gcc/tree.c)
LONG_ACCUM_TYPE_SIZE (gcc/defaults.h gcc/tree.c)
LONG_LONG_ACCUM_TYPE_SIZE (gcc/defaults.h gcc/tree.c)
LIBGCC2_HAS_DF_MODE (gcc/libgcc2.c gcc/libgcc2.h)
SF_SIZE (gcc/libgcc2.c gcc/libgcc2.h)
DF_SIZE (gcc/libgcc2.c gcc/libgcc2.h)
INTMAX_TYPE (gcc/c-common.c)
UINTMAX_TYPE (gcc/c-common.c)
STACK_CHECK_PROBE_INTERVAL (gcc/explow.c gcc/expr.h)
STACK_CHECK_PROBE_LOAD (gcc/explow.c gcc/expr.h)
STACK_CHECK_PROTECT (gcc/explow.c gcc/expr.h gcc/function.c)
STACK_CHECK_MAX_FRAME_SIZE (gcc/explow.c gcc/expr.h gcc/function.c gcc/reload1.c)
STACK_CHECK_FIXED_FRAME_SIZE (gcc/expr.h gcc/reload1.c)
STACK_CHECK_MAX_VAR_SIZE (gcc/ada/decl.c gcc/calls.c gcc/expr.h gcc/stmt.c)
US_SOFTWARE_GOFAST (gcc/config.gcc gcc/config/fp-bit.c gcc/config/fp-bit.h gcc/config/gofast.h)
GEN_ERRNO_RTX (gcc/builtins.c)
ASM_OUTPUT_POOL_EPILOGUE (gcc/varasm.c)
ASM_OUTPUT_SIZE_DIRECTIVE (gcc/config/elfos.h gcc/defaults.h) NOTE: *used* by many targets
JUMP_ALIGN (gcc/final.c)
LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP (gcc/final.c)
LOOP_ALIGN_MAX_SKIP (gcc/final.c)
LABEL_ALIGN_MAX_SKIP (gcc/final.c)
DEBUG_SYMS_TEXT (gcc/dbxout.c gcc/xcoffout.h)
DBX_TYPE_DECL_STABS_CODE (gcc/dbxout.c gcc/xcoffout.h)
DBX_STATIC_CONST_VAR_CODE (gcc/dbxout.c gcc/xcoffout.h)
DBX_REGPARM_STABS_CODE (gcc/dbxout.c gcc/xcoffout.h)
DBX_REGPARM_STABS_LETTER (gcc/dbxout.c gcc/xcoffout.h)
DBX_BLOCKS_FUNCTION_RELATIVE (gcc/config/dbxcoff.h gcc/config/dbxelf.h gcc/dbxout.c)
DBX_OUTPUT_MAIN_SOURCE_FILENAME (gcc/dbxout.c gcc/xcoffout.h)
NO_DBX_MAIN_SOURCE_DIRECTORY (gcc/dbxout.c gcc/xcoffout.h)
NO_DBX_GCC_MARKER (gcc/dbxout.c gcc/xcoffout.h)
DBX_OUTPUT_MAIN_SOURCE_FILE_END (gcc/dbxout.c gcc/xcoffout.h)
CASE_USE_BIT_TESTS (gcc/stmt.c)
VECTOR_STORE_FLAG_VALUE (gcc/simplify-rtx.c)
POWI_MAX_MULTS (gcc/builtins.c)

These are used *only* in gcc/config (not mentioned in the main sources):
REVERSE_CONDEXEC_PREDICATES_P (gcc/config/frv/frv.h)
ALL_COP_ADDITIONAL_REGISTER_NAMES (gcc/config/mips/mips.h)
FIXUNS_TRUNC_LIKE_FIX_TRUNC (many targets)
MD_HANDLE_UNWABI (gcc/config/ia64/linux-unwind.h gcc/config/ia64/unwind-ia64.c)
Comment 3 Andrew Pinski 2012-02-06 23:57:39 UTC
Confirmed, I just ran into LOGICAL_OP_NON_SHORT_CIRCUIT today.
Comment 4 Steven Bosscher 2012-06-26 10:47:05 UTC
Author: steven
Date: Tue Jun 26 10:47:01 2012
New Revision: 188983

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188983
Log:
	PR other/33190
	* config/mips/mips.h: Do not define ALL_COP_ADDITIONAL_REGISTER_NAMES.
	* config/frv/frv.h: Do not define REVERSE_CONDEXEC_PREDICATES_P.
	* doc/tm.texi.in: Remove documentation for unused target macros
	ALL_COP_ADDITIONAL_REGISTER_NAMES, DBX_OUTPUT_LBRAC, DBX_OUTPUT_NFUN,
	DBX_OUTPUT_RBRAC, RANGE_TEST_NON_SHORT_CIRCUIT, REAL_VALUE_TRUNCATE,
	REVERSE_CONDEXEC_PREDICATES_P, TARGET_ALIGN_ANON_BITFIELDS, and
	TARGET_NARROW_VOLATILE_BITFIELDS.
	Document that MD_HANDLE_UNWABI is a macro in libgcc.
	* doc/tm.texi: Regenerate.
	* system.h: Poison target macros
	ALL_COP_ADDITIONAL_REGISTER_NAMES, DBX_OUTPUT_LBRAC, DBX_OUTPUT_NFUN,
	DBX_OUTPUT_RBRAC, RANGE_TEST_NON_SHORT_CIRCUIT, REAL_VALUE_TRUNCATE,
	REVERSE_CONDEXEC_PREDICATES_P, TARGET_ALIGN_ANON_BITFIELDS, and
	TARGET_NARROW_VOLATILE_BITFIELDS


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/frv/frv.h
    trunk/gcc/config/mips/mips.h
    trunk/gcc/doc/tm.texi
    trunk/gcc/doc/tm.texi.in
    trunk/gcc/system.h
Comment 5 Steven Bosscher 2012-06-26 11:27:47 UTC
Author: steven
Date: Tue Jun 26 11:27:41 2012
New Revision: 188984

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188984
Log:
        PR other/33190
	* doc/tm.texi.in: Document LOGICAL_OP_NON_SHORT_CIRCUIT.
	* doc/tm.texi: Regenerate.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/doc/tm.texi
    trunk/gcc/doc/tm.texi.in
Comment 6 Steven Bosscher 2012-06-26 22:21:17 UTC
(In reply to comment #2)
> Learned some more. (For reference, this is all from Fr 17 Aug 21:29:16 UTC 2007 (revision 127595).)
> 
> Not defined by any target, but used in the main sources:

I have gone over these again. Some of the macros listed were actually used in libgcc or they are target hooks. A couple have also already been removed in the mean time. The updated list looks like this:

IFCVT_EXTRA_FIELDS (doc/tm.texi.in config/frv/frv.c config/frv/frv.h)

SYSROOT_HEADERS_SUFFIX_SPEC (cppdefault.c gcc.c doc/tm.texi.in)

LARGEST_EXPONENT_IS_NORMAL (defaults.h doc/tm.texi.in config/arm/arm.h ../libgcc/fp-bit.c)

SHORT_FRACT_TYPE_SIZE (tree.c defaults.h doc/tm.texi.in config/arm/arm.h config/mips/mips.h)

FRACT_TYPE_SIZE (tree.c defaults.h doc/tm.texi.in config/arm/arm.h config/mips/mips.h)

LONG_FRACT_TYPE_SIZE (tree.c defaults.h doc/tm.texi.in config/arm/arm.h config/mips/mips.h)

LONG_LONG_FRACT_TYPE_SIZE (tree.c defaults.h doc/tm.texi.in config/arm/arm.h config/mips/mips.h)

SHORT_ACCUM_TYPE_SIZE (tree.c defaults.h doc/tm.texi.in config/arm/arm.h config/mips/mips.h)

ACCUM_TYPE_SIZE (tree.c defaults.h doc/tm.texi.in config/arm/arm.h config/mips/mips.h)

LONG_ACCUM_TYPE_SIZE (tree.c defaults.h doc/tm.texi.in config/arm/arm.h config/mips/mips.h)

LONG_LONG_ACCUM_TYPE_SIZE (tree.c defaults.h doc/tm.texi.in config/arm/arm.h config/mips/mips.h)

LIBGCC2_HAS_DF_MODE (doc/tm.texi.in config/rl78/rl78.h config/rx/rx.h ../libgcc/fixed-bit.h ../libgcc/libgcc2.c ../libgcc/libgcc2.h)

SF_SIZE (doc/tm.texi.in ../libgcc/libgcc2.c ../libgcc/libgcc2.h)

DF_SIZE (doc/tm.texi.in ../libgcc/libgcc2.c ../libgcc/libgcc2.h)

INTMAX_TYPE (defaults.h doc/tm.texi.in c-family/c-common.c fortran/trans-
types.c fortran/iso-c-binding.def)

UINTMAX_TYPE (defaults.h doc/tm.texi.in c-family/c-common.c)

STACK_CHECK_PROTECT (explow.c defaults.h doc/tm.texi.in config/alpha/alpha.c config/i386/i386.c config/ia64/ia64.c config/rs6000/rs6000.c config/sparc/sparc.c config/ia64/hpux.h config/ia64/vms.h config/rs6000/freebsd64.h config/rs6000/linux64.h)

STACK_CHECK_MAX_FRAME_SIZE (explow.c function.c reload1.c defaults.h doc/tm.texi.in)

STACK_CHECK_FIXED_FRAME_SIZE (reload1.c defaults.h doc/tm.texi.in)

STACK_CHECK_MAX_VAR_SIZE (calls.c function.c gimplify.c defaults.h doc/tm.texi.in ada/gcc-interface/decl.c)

GEN_ERRNO_RTX (builtins.c doc/tm.texi.in)

ASM_OUTPUT_POOL_EPILOGUE (varasm.c doc/tm.texi.in)

ASM_OUTPUT_SIZE_DIRECTIVE (defaults.h doc/tm.texi.in config/elfos.h 
config/openbsd.h config/mips/mips.c config/pa/pa.c config/alpha/elf.h config/bfin/bfin.h config/c6x/c6x.h config/i386/sol2.h config/lm32/lm32.h config/mcore/mcore-elf.h config/rs6000/sysv4.h config/rx/rx.h config/sparc/sol2.h)

DEBUG_SYMS_TEXT (dbxout.c xcoffout.h doc/tm.texi.in)

DBX_TYPE_DECL_STABS_CODE (dbxout.c xcoffout.h doc/tm.texi.in)

DBX_STATIC_CONST_VAR_CODE (dbxout.c xcoffout.h doc/tm.texi.in)

DBX_REGPARM_STABS_CODE (dbxout.c xcoffout.h doc/tm.texi.in)

DBX_REGPARM_STABS_LETTER (dbxout.c xcoffout.h doc/tm.texi.in)

DBX_BLOCKS_FUNCTION_RELATIVE (dbxout.c doc/tm.texi.in config/dbxcoff.h config/dbxelf.h)

DBX_OUTPUT_MAIN_SOURCE_FILENAME (dbxout.c xcoffout.h doc/tm.texi.in)

NO_DBX_MAIN_SOURCE_DIRECTORY (dbxout.c xcoffout.h doc/tm.texi.in)

NO_DBX_GCC_MARKER (dbxout.c xcoffout.h doc/tm.texi.in)

DBX_OUTPUT_MAIN_SOURCE_FILE_END (dbxout.c xcoffout.h doc/tm.texi.in)

CASE_USE_BIT_TESTS (stmt.c doc/tm.texi.in)

VECTOR_STORE_FLAG_VALUE (simplify-rtx.c doc/rtl.texi doc/tm.texi.in)

POWI_MAX_MULTS (tree-ssa-math-opts.c doc/tm.texi.in)
Comment 7 joseph@codesourcery.com 2012-06-27 13:30:31 UTC
On Tue, 26 Jun 2012, steven at gcc dot gnu.org wrote:

> SYSROOT_HEADERS_SUFFIX_SPEC (cppdefault.c gcc.c doc/tm.texi.in)

This is of use with configurations with both glibc and uClibc multilibs 
selected via -muclibc, for example (i.e. for someone building GCC to use 
in setting up the multilibs they want, rather than something where having 
such multilibs is suitable for a default checked-in configuration of GCC).

> SHORT_FRACT_TYPE_SIZE (tree.c defaults.h doc/tm.texi.in config/arm/arm.h
> config/mips/mips.h)
> 
> FRACT_TYPE_SIZE (tree.c defaults.h doc/tm.texi.in config/arm/arm.h
> config/mips/mips.h)
> 
> LONG_FRACT_TYPE_SIZE (tree.c defaults.h doc/tm.texi.in config/arm/arm.h
> config/mips/mips.h)
> 
> LONG_LONG_FRACT_TYPE_SIZE (tree.c defaults.h doc/tm.texi.in config/arm/arm.h
> config/mips/mips.h)
> 
> SHORT_ACCUM_TYPE_SIZE (tree.c defaults.h doc/tm.texi.in config/arm/arm.h
> config/mips/mips.h)
> 
> ACCUM_TYPE_SIZE (tree.c defaults.h doc/tm.texi.in config/arm/arm.h
> config/mips/mips.h)
> 
> LONG_ACCUM_TYPE_SIZE (tree.c defaults.h doc/tm.texi.in config/arm/arm.h
> config/mips/mips.h)
> 
> LONG_LONG_ACCUM_TYPE_SIZE (tree.c defaults.h doc/tm.texi.in config/arm/arm.h
> config/mips/mips.h)
> 
> LIBGCC2_HAS_DF_MODE (doc/tm.texi.in config/rl78/rl78.h config/rx/rx.h
> ../libgcc/fixed-bit.h ../libgcc/libgcc2.c ../libgcc/libgcc2.h)
> 
> SF_SIZE (doc/tm.texi.in ../libgcc/libgcc2.c ../libgcc/libgcc2.h)
> 
> DF_SIZE (doc/tm.texi.in ../libgcc/libgcc2.c ../libgcc/libgcc2.h)
> 
> INTMAX_TYPE (defaults.h doc/tm.texi.in c-family/c-common.c fortran/trans-
> types.c fortran/iso-c-binding.def)
> 
> UINTMAX_TYPE (defaults.h doc/tm.texi.in c-family/c-common.c)

These are all things that logically should be configured in the same way 
as the same properties for other types or modes, even if it so happens 
that no target actually uses a nondefault definition of them at present.  
(For *_SIZE that would ideally be hooks.  See bug 46677 and some patches 
from Joern Rennecke around Nov / Dec 2010; I don't know what the latest 
patch version is.  For *_TYPE typedef names that would ideally be hooks 
returning enums rather than strings.  I'm not sure if Joern had a patch 
there but interfaces were discussed in threads around that time.  For 
those relating to floating-point modes, they should either move the libgcc 
config headers or, better, be predefined by the compiler (they're on the 
list at <http://gcc.gnu.org/wiki/Top-Level_Libgcc_Migration> of those 
definable by the compiler).)