Commit 3fa9c136 by Richard Sandiford Committed by Richard Sandiford

tm.texi: Refer to SYMBOL_REF_HAS_BLOCK_INFO_P instead of SYMBOL_REF_IN_BLOCK_P.

	* doc/tm.texi: Refer to SYMBOL_REF_HAS_BLOCK_INFO_P instead of
	SYMBOL_REF_IN_BLOCK_P.
	* doc/rtl.texi: Likewise.  Refer to SYMBOL_FLAG_HAS_BLOCK_INFO instead
	of SYMBOL_FLAG_IN_BLOCK.
	* gengtype.c (adjust_field_rtx_def): Use SYMBOL_REF_HAS_BLOCK_INFO_P
	instead of SYMBOL_REF_IN_BLOCK_P.
	* explow.c (use_anchored_address): Likewise.
	* rtl.c (rtx_size): Likewise.
	* varasm.c (create_block_symbol): Set SYMBOL_FLAG_HAS_BLOCK_INFO
	instead of SYMBOL_FLAG_IN_BLOCK.
	(make_decl_rtl): Use SYMBOL_REF_HAS_BLOCK_INFO_P instead of
	SYMBOL_REF_IN_BLOCK_P.
	(assemble_variable): Likewise.
	(output_constant_def_contents): Likewise.
	(output_constant_pool): Likewise.
	(default_encode_section_info): Preserve SYMBOL_FLAG_HAS_BLOCK_INFO
	instead of SYMBOL_FLAG_IN_BLOCK.
	* rtl.h (block_symbol): Refer to SYMBOL_REF_HAS_BLOCK_INFO_P instead of
	SYMBOL_REF_IN_BLOCK_P.
	(SYMBOL_REF_BLOCK): Likewise.
	(SYMBOL_REF_OFFSET): Likewise.
	(BLOCK_SYMBOL_CHECK): Use SYMBOL_REF_HAS_BLOCK_INFO_P instead of
	SYMBOL_REF_IN_BLOCK_P.
	(SYMBOL_FLAG_IN_BLOCK): Replace with...
	(SYMBOL_FLAG_HAS_BLOCK_INFO): ...this.
	(SYMBOL_REF_IN_BLOCK_P): Replace with...
	(SYMBOL_REF_HAS_BLOCK_INFO_P): ...this.

From-SVN: r111675
parent f677599e
2006-03-03 Richard Sandiford <richard@codesourcery.com>
* doc/tm.texi: Refer to SYMBOL_REF_HAS_BLOCK_INFO_P instead of
SYMBOL_REF_IN_BLOCK_P.
* doc/rtl.texi: Likewise. Refer to SYMBOL_FLAG_HAS_BLOCK_INFO instead
of SYMBOL_FLAG_IN_BLOCK.
* gengtype.c (adjust_field_rtx_def): Use SYMBOL_REF_HAS_BLOCK_INFO_P
instead of SYMBOL_REF_IN_BLOCK_P.
* explow.c (use_anchored_address): Likewise.
* rtl.c (rtx_size): Likewise.
* varasm.c (create_block_symbol): Set SYMBOL_FLAG_HAS_BLOCK_INFO
instead of SYMBOL_FLAG_IN_BLOCK.
(make_decl_rtl): Use SYMBOL_REF_HAS_BLOCK_INFO_P instead of
SYMBOL_REF_IN_BLOCK_P.
(assemble_variable): Likewise.
(output_constant_def_contents): Likewise.
(output_constant_pool): Likewise.
(default_encode_section_info): Preserve SYMBOL_FLAG_HAS_BLOCK_INFO
instead of SYMBOL_FLAG_IN_BLOCK.
* rtl.h (block_symbol): Refer to SYMBOL_REF_HAS_BLOCK_INFO_P instead of
SYMBOL_REF_IN_BLOCK_P.
(SYMBOL_REF_BLOCK): Likewise.
(SYMBOL_REF_OFFSET): Likewise.
(BLOCK_SYMBOL_CHECK): Use SYMBOL_REF_HAS_BLOCK_INFO_P instead of
SYMBOL_REF_IN_BLOCK_P.
(SYMBOL_FLAG_IN_BLOCK): Replace with...
(SYMBOL_FLAG_HAS_BLOCK_INFO): ...this.
(SYMBOL_REF_IN_BLOCK_P): Replace with...
(SYMBOL_REF_HAS_BLOCK_INFO_P): ...this.
2006-03-03 Jakub Jelinek <jakub@redhat.com> 2006-03-03 Jakub Jelinek <jakub@redhat.com>
* config/arm/unwind-arm.h (_Unwind_GetIPInfo): Fix pasto. * config/arm/unwind-arm.h (_Unwind_GetIPInfo): Fix pasto.
......
...@@ -502,12 +502,11 @@ This is a multi-bit field accessor that returns the @code{tls_model} ...@@ -502,12 +502,11 @@ This is a multi-bit field accessor that returns the @code{tls_model}
to be used for a thread-local storage symbol. It returns zero for to be used for a thread-local storage symbol. It returns zero for
non-thread-local symbols. non-thread-local symbols.
@findex SYMBOL_REF_IN_BLOCK_P @findex SYMBOL_REF_HAS_BLOCK_INFO_P
@findex SYMBOL_FLAG_IN_BLOCK @findex SYMBOL_FLAG_HAS_BLOCK_INFO
@item SYMBOL_FLAG_IN_BLOCK @item SYMBOL_FLAG_HAS_BLOCK_INFO
Set if the symbol has been assigned to an @code{object_block} structure. Set if the symbol has @code{SYMBOL_REF_BLOCK} and
@code{SYMBOL_REF_BLOCK} and @code{SYMBOL_REF_BLOCK_OFFSET} provide more @code{SYMBOL_REF_BLOCK_OFFSET} fields.
information about such symbols.
@findex SYMBOL_REF_ANCHOR_P @findex SYMBOL_REF_ANCHOR_P
@findex SYMBOL_FLAG_ANCHOR @findex SYMBOL_FLAG_ANCHOR
...@@ -518,7 +517,7 @@ are symbols that have a known position within an @code{object_block} ...@@ -518,7 +517,7 @@ are symbols that have a known position within an @code{object_block}
and that can be used to access nearby members of that block. and that can be used to access nearby members of that block.
They are used to implement @option{-fsection-anchors}. They are used to implement @option{-fsection-anchors}.
If this flag is set, then @code{SYMBOL_FLAG_IN_BLOCK} will be too. If this flag is set, then @code{SYMBOL_FLAG_HAS_BLOCK_INFO} will be too.
@end table @end table
Bits beginning with @code{SYMBOL_FLAG_MACH_DEP} are available for Bits beginning with @code{SYMBOL_FLAG_MACH_DEP} are available for
...@@ -527,14 +526,16 @@ the target's use. ...@@ -527,14 +526,16 @@ the target's use.
@findex SYMBOL_REF_BLOCK @findex SYMBOL_REF_BLOCK
@item SYMBOL_REF_BLOCK (@var{x}) @item SYMBOL_REF_BLOCK (@var{x})
If @samp{SYMBOL_REF_IN_BLOCK_P (@var{x})}, this is the @samp{object_block} If @samp{SYMBOL_REF_HAS_BLOCK_INFO_P (@var{x})}, this is the
structure to which the symbol belongs, or @code{NULL} if none. @samp{object_block} structure to which the symbol belongs,
or @code{NULL} if it has not been assigned a block.
@findex SYMBOL_REF_BLOCK_OFFSET @findex SYMBOL_REF_BLOCK_OFFSET
@item SYMBOL_REF_BLOCK_OFFSET (@var{x}) @item SYMBOL_REF_BLOCK_OFFSET (@var{x})
If @samp{SYMBOL_REF_IN_BLOCK_P (@var{x})}, this is the offset of @var{x} If @samp{SYMBOL_REF_HAS_BLOCK_INFO_P (@var{x})}, this is the offset of @var{x}
from the first object in @samp{SYMBOL_REF_BLOCK (@var{x})}. The value is from the first object in @samp{SYMBOL_REF_BLOCK (@var{x})}. The value is
negative if @var{x} has not yet been assigned an offset. negative if @var{x} has not yet been assigned to a block, or it has not
been given an offset within that block.
@end table @end table
@node Flags @node Flags
......
...@@ -5329,7 +5329,7 @@ is @code{NULL}, which disables the use of section anchors altogether. ...@@ -5329,7 +5329,7 @@ is @code{NULL}, which disables the use of section anchors altogether.
@deftypefn {Target Hook} bool TARGET_USE_ANCHORS_FOR_SYMBOL_P (rtx @var{x}) @deftypefn {Target Hook} bool TARGET_USE_ANCHORS_FOR_SYMBOL_P (rtx @var{x})
Return true if GCC should attempt to use anchors to access @code{SYMBOL_REF} Return true if GCC should attempt to use anchors to access @code{SYMBOL_REF}
@var{x}. You can assume @samp{SYMBOL_REF_IN_BLOCK_P (@var{x})} and @var{x}. You can assume @samp{SYMBOL_REF_HAS_BLOCK_INFO_P (@var{x})} and
@samp{!SYMBOL_REF_ANCHOR_P (@var{x})}. @samp{!SYMBOL_REF_ANCHOR_P (@var{x})}.
The default version is correct for most targets, but you might need to The default version is correct for most targets, but you might need to
......
...@@ -566,7 +566,7 @@ use_anchored_address (rtx x) ...@@ -566,7 +566,7 @@ use_anchored_address (rtx x)
/* Check whether BASE is suitable for anchors. */ /* Check whether BASE is suitable for anchors. */
if (GET_CODE (base) != SYMBOL_REF if (GET_CODE (base) != SYMBOL_REF
|| !SYMBOL_REF_IN_BLOCK_P (base) || !SYMBOL_REF_HAS_BLOCK_INFO_P (base)
|| SYMBOL_REF_ANCHOR_P (base) || SYMBOL_REF_ANCHOR_P (base)
|| SYMBOL_REF_BLOCK (base) == NULL || SYMBOL_REF_BLOCK (base) == NULL
|| !targetm.use_anchors_for_symbol_p (base)) || !targetm.use_anchors_for_symbol_p (base))
......
...@@ -675,10 +675,11 @@ adjust_field_rtx_def (type_p t, options_p ARG_UNUSED (opt)) ...@@ -675,10 +675,11 @@ adjust_field_rtx_def (type_p t, options_p ARG_UNUSED (opt))
if (i == SYMBOL_REF) if (i == SYMBOL_REF)
{ {
/* Add the "block_sym" field if SYMBOL_REF_IN_BLOCK_P holds. */ /* Add the "block_sym" field if SYMBOL_REF_HAS_BLOCK_INFO_P holds. */
type_p field_tp = find_structure ("block_symbol", 0); type_p field_tp = find_structure ("block_symbol", 0);
subfields = create_optional_field (subfields, field_tp, "block_sym", subfields
"SYMBOL_REF_IN_BLOCK_P (&%0)"); = create_optional_field (subfields, field_tp, "block_sym",
"SYMBOL_REF_HAS_BLOCK_INFO_P (&%0)");
} }
sname = xasprintf ("rtx_def_%s", rtx_name[i]); sname = xasprintf ("rtx_def_%s", rtx_name[i]);
......
...@@ -175,7 +175,7 @@ rtvec_alloc (int n) ...@@ -175,7 +175,7 @@ rtvec_alloc (int n)
unsigned int unsigned int
rtx_size (rtx x) rtx_size (rtx x)
{ {
if (GET_CODE (x) == SYMBOL_REF && SYMBOL_REF_IN_BLOCK_P (x)) if (GET_CODE (x) == SYMBOL_REF && SYMBOL_REF_HAS_BLOCK_INFO_P (x))
return RTX_HDR_SIZE + sizeof (struct block_symbol); return RTX_HDR_SIZE + sizeof (struct block_symbol);
return RTX_CODE_SIZE (GET_CODE (x)); return RTX_CODE_SIZE (GET_CODE (x));
} }
......
...@@ -178,7 +178,7 @@ typedef union rtunion_def rtunion; ...@@ -178,7 +178,7 @@ typedef union rtunion_def rtunion;
/* This structure remembers the position of a SYMBOL_REF within an /* This structure remembers the position of a SYMBOL_REF within an
object_block structure. A SYMBOL_REF only provides this information object_block structure. A SYMBOL_REF only provides this information
if SYMBOL_REF_IN_BLOCK_P is true. */ if SYMBOL_REF_HAS_BLOCK_INFO_P is true. */
struct block_symbol GTY(()) { struct block_symbol GTY(()) {
/* The usual SYMBOL_REF fields. */ /* The usual SYMBOL_REF fields. */
rtunion GTY ((skip)) fld[3]; rtunion GTY ((skip)) fld[3];
...@@ -212,7 +212,7 @@ struct object_block GTY(()) ...@@ -212,7 +212,7 @@ struct object_block GTY(())
order of increasing offset and the following conditions will order of increasing offset and the following conditions will
hold for each element X: hold for each element X:
SYMBOL_REF_IN_BLOCK_P (X) SYMBOL_REF_HAS_BLOCK_INFO_P (X)
!SYMBOL_REF_ANCHOR_P (X) !SYMBOL_REF_ANCHOR_P (X)
SYMBOL_REF_BLOCK (X) == [address of this structure] SYMBOL_REF_BLOCK (X) == [address of this structure]
SYMBOL_REF_BLOCK_OFFSET (X) >= 0. */ SYMBOL_REF_BLOCK_OFFSET (X) >= 0. */
...@@ -222,7 +222,7 @@ struct object_block GTY(()) ...@@ -222,7 +222,7 @@ struct object_block GTY(())
in order of increasing offset, and then increasing TLS model. in order of increasing offset, and then increasing TLS model.
The following conditions will hold for each element X in this vector: The following conditions will hold for each element X in this vector:
SYMBOL_REF_IN_BLOCK_P (X) SYMBOL_REF_HAS_BLOCK_INFO_P (X)
SYMBOL_REF_ANCHOR_P (X) SYMBOL_REF_ANCHOR_P (X)
SYMBOL_REF_BLOCK (X) == [address of this structure] SYMBOL_REF_BLOCK (X) == [address of this structure]
SYMBOL_REF_BLOCK_OFFSET (X) >= 0. */ SYMBOL_REF_BLOCK_OFFSET (X) >= 0. */
...@@ -529,7 +529,7 @@ struct rtvec_def GTY(()) { ...@@ -529,7 +529,7 @@ struct rtvec_def GTY(()) {
#define BLOCK_SYMBOL_CHECK(RTX) __extension__ \ #define BLOCK_SYMBOL_CHECK(RTX) __extension__ \
({ rtx const _symbol = (RTX); \ ({ rtx const _symbol = (RTX); \
unsigned int flags = RTL_CHECKC1 (_symbol, 1, SYMBOL_REF).rt_int; \ unsigned int flags = RTL_CHECKC1 (_symbol, 1, SYMBOL_REF).rt_int; \
if ((flags & SYMBOL_FLAG_IN_BLOCK) == 0) \ if ((flags & SYMBOL_FLAG_HAS_BLOCK_INFO) == 0) \
rtl_check_failed_block_symbol (__FILE__, __LINE__, \ rtl_check_failed_block_symbol (__FILE__, __LINE__, \
__FUNCTION__); \ __FUNCTION__); \
&_symbol->u.block_sym; }) &_symbol->u.block_sym; })
...@@ -1318,11 +1318,11 @@ do { \ ...@@ -1318,11 +1318,11 @@ do { \
#define SYMBOL_REF_EXTERNAL_P(RTX) \ #define SYMBOL_REF_EXTERNAL_P(RTX) \
((SYMBOL_REF_FLAGS (RTX) & SYMBOL_FLAG_EXTERNAL) != 0) ((SYMBOL_REF_FLAGS (RTX) & SYMBOL_FLAG_EXTERNAL) != 0)
/* Set if this symbol has a block_symbol structure associated with it. */ /* Set if this symbol has a block_symbol structure associated with it. */
#define SYMBOL_FLAG_IN_BLOCK (1 << 7) #define SYMBOL_FLAG_HAS_BLOCK_INFO (1 << 7)
#define SYMBOL_REF_IN_BLOCK_P(RTX) \ #define SYMBOL_REF_HAS_BLOCK_INFO_P(RTX) \
((SYMBOL_REF_FLAGS (RTX) & SYMBOL_FLAG_IN_BLOCK) != 0) ((SYMBOL_REF_FLAGS (RTX) & SYMBOL_FLAG_HAS_BLOCK_INFO) != 0)
/* Set if this symbol is a section anchor. SYMBOL_REF_ANCHOR_P implies /* Set if this symbol is a section anchor. SYMBOL_REF_ANCHOR_P implies
SYMBOL_REF_IN_BLOCK_P. */ SYMBOL_REF_HAS_BLOCK_INFO_P. */
#define SYMBOL_FLAG_ANCHOR (1 << 8) #define SYMBOL_FLAG_ANCHOR (1 << 8)
#define SYMBOL_REF_ANCHOR_P(RTX) \ #define SYMBOL_REF_ANCHOR_P(RTX) \
((SYMBOL_REF_FLAGS (RTX) & SYMBOL_FLAG_ANCHOR) != 0) ((SYMBOL_REF_FLAGS (RTX) & SYMBOL_FLAG_ANCHOR) != 0)
...@@ -1331,13 +1331,15 @@ do { \ ...@@ -1331,13 +1331,15 @@ do { \
#define SYMBOL_FLAG_MACH_DEP_SHIFT 9 #define SYMBOL_FLAG_MACH_DEP_SHIFT 9
#define SYMBOL_FLAG_MACH_DEP (1 << SYMBOL_FLAG_MACH_DEP_SHIFT) #define SYMBOL_FLAG_MACH_DEP (1 << SYMBOL_FLAG_MACH_DEP_SHIFT)
/* The block to which the given SYMBOL_REF belongs, or NULL if none. /* If SYMBOL_REF_HAS_BLOCK_INFO_P (RTX), this is the object_block
Only valid if SYMBOL_REF_IN_BLOCK_P (RTX). */ structure to which the symbol belongs, or NULL if it has not been
assigned a block. */
#define SYMBOL_REF_BLOCK(RTX) (BLOCK_SYMBOL_CHECK (RTX)->block) #define SYMBOL_REF_BLOCK(RTX) (BLOCK_SYMBOL_CHECK (RTX)->block)
/* The byte offset of the given SYMBOL_REF from the start of its block, /* If SYMBOL_REF_HAS_BLOCK_INFO_P (RTX), this is the offset of RTX from
or a negative value if the symbol has not yet been assigned a position. the first object in SYMBOL_REF_BLOCK (RTX). The value is negative if
Only valid if SYMBOL_REF_IN_BLOCK_P (RTX). */ RTX has not yet been assigned to a block, or it has not been given an
offset within that block. */
#define SYMBOL_REF_BLOCK_OFFSET(RTX) (BLOCK_SYMBOL_CHECK (RTX)->offset) #define SYMBOL_REF_BLOCK_OFFSET(RTX) (BLOCK_SYMBOL_CHECK (RTX)->offset)
/* Define a macro to look for REG_INC notes, /* Define a macro to look for REG_INC notes,
......
...@@ -365,7 +365,7 @@ create_block_symbol (const char *label, struct object_block *block, ...@@ -365,7 +365,7 @@ create_block_symbol (const char *label, struct object_block *block,
PUT_CODE (symbol, SYMBOL_REF); PUT_CODE (symbol, SYMBOL_REF);
PUT_MODE (symbol, Pmode); PUT_MODE (symbol, Pmode);
XSTR (symbol, 0) = label; XSTR (symbol, 0) = label;
SYMBOL_REF_FLAGS (symbol) = SYMBOL_FLAG_IN_BLOCK; SYMBOL_REF_FLAGS (symbol) = SYMBOL_FLAG_HAS_BLOCK_INFO;
/* Initialize the block_symbol stuff. */ /* Initialize the block_symbol stuff. */
SYMBOL_REF_BLOCK (symbol) = block; SYMBOL_REF_BLOCK (symbol) = block;
...@@ -986,11 +986,11 @@ make_decl_rtl (tree decl) ...@@ -986,11 +986,11 @@ make_decl_rtl (tree decl)
decl attribute overrides another. */ decl attribute overrides another. */
targetm.encode_section_info (decl, DECL_RTL (decl), false); targetm.encode_section_info (decl, DECL_RTL (decl), false);
/* If the old address was assigned to an object block, see whether /* If the symbol has a SYMBOL_REF_BLOCK field, update it based
that block is still in the right section. */ on the new decl information. */
if (MEM_P (x) if (MEM_P (x)
&& GET_CODE (XEXP (x, 0)) == SYMBOL_REF && GET_CODE (XEXP (x, 0)) == SYMBOL_REF
&& SYMBOL_REF_IN_BLOCK_P (XEXP (x, 0))) && SYMBOL_REF_HAS_BLOCK_INFO_P (XEXP (x, 0)))
change_symbol_block (XEXP (x, 0), get_block_for_decl (decl)); change_symbol_block (XEXP (x, 0), get_block_for_decl (decl));
/* Make this function static known to the mudflap runtime. */ /* Make this function static known to the mudflap runtime. */
...@@ -1819,7 +1819,7 @@ assemble_variable (tree decl, int top_level ATTRIBUTE_UNUSED, ...@@ -1819,7 +1819,7 @@ assemble_variable (tree decl, int top_level ATTRIBUTE_UNUSED,
/* If the decl is part of an object_block, make sure that the decl /* If the decl is part of an object_block, make sure that the decl
has been positioned within its block, but do not write out its has been positioned within its block, but do not write out its
definition yet. output_object_blocks will do that later. */ definition yet. output_object_blocks will do that later. */
if (SYMBOL_REF_IN_BLOCK_P (symbol) && SYMBOL_REF_BLOCK (symbol)) if (SYMBOL_REF_HAS_BLOCK_INFO_P (symbol) && SYMBOL_REF_BLOCK (symbol))
{ {
gcc_assert (!dont_output_data); gcc_assert (!dont_output_data);
place_block_symbol (symbol); place_block_symbol (symbol);
...@@ -2947,7 +2947,7 @@ output_constant_def_contents (rtx symbol) ...@@ -2947,7 +2947,7 @@ output_constant_def_contents (rtx symbol)
/* If the constant is part of an object block, make sure that the /* If the constant is part of an object block, make sure that the
decl has been positioned within its block, but do not write out decl has been positioned within its block, but do not write out
its definition yet. output_object_blocks will do that later. */ its definition yet. output_object_blocks will do that later. */
if (SYMBOL_REF_IN_BLOCK_P (symbol) && SYMBOL_REF_BLOCK (symbol)) if (SYMBOL_REF_HAS_BLOCK_INFO_P (symbol) && SYMBOL_REF_BLOCK (symbol))
place_block_symbol (symbol); place_block_symbol (symbol);
else else
{ {
...@@ -3508,7 +3508,8 @@ output_constant_pool (const char *fnname ATTRIBUTE_UNUSED, ...@@ -3508,7 +3508,8 @@ output_constant_pool (const char *fnname ATTRIBUTE_UNUSED,
the constant has been positioned within its block, but do not the constant has been positioned within its block, but do not
write out its definition yet. output_object_blocks will do write out its definition yet. output_object_blocks will do
that later. */ that later. */
if (SYMBOL_REF_IN_BLOCK_P (desc->sym) && SYMBOL_REF_BLOCK (desc->sym)) if (SYMBOL_REF_HAS_BLOCK_INFO_P (desc->sym)
&& SYMBOL_REF_BLOCK (desc->sym))
place_block_symbol (desc->sym); place_block_symbol (desc->sym);
else else
{ {
...@@ -5683,7 +5684,7 @@ default_encode_section_info (tree decl, rtx rtl, int first ATTRIBUTE_UNUSED) ...@@ -5683,7 +5684,7 @@ default_encode_section_info (tree decl, rtx rtl, int first ATTRIBUTE_UNUSED)
if (GET_CODE (symbol) != SYMBOL_REF) if (GET_CODE (symbol) != SYMBOL_REF)
return; return;
flags = SYMBOL_REF_FLAGS (symbol) & SYMBOL_FLAG_IN_BLOCK; flags = SYMBOL_REF_FLAGS (symbol) & SYMBOL_FLAG_HAS_BLOCK_INFO;
if (TREE_CODE (decl) == FUNCTION_DECL) if (TREE_CODE (decl) == FUNCTION_DECL)
flags |= SYMBOL_FLAG_FUNCTION; flags |= SYMBOL_FLAG_FUNCTION;
if (targetm.binds_local_p (decl)) if (targetm.binds_local_p (decl))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment