static hashval_t const_hash_1 (const tree);
static int compare_constant (const tree, const tree);
static void output_constant_def_contents (rtx);
-static void output_addressed_constants (tree);
+static void output_addressed_constants (tree, int);
static unsigned HOST_WIDE_INT output_constant (tree, unsigned HOST_WIDE_INT,
unsigned int, bool, bool);
static void globalize_decl (tree);
/* Output any data that we will need to use the address of. */
if (DECL_INITIAL (decl) && DECL_INITIAL (decl) != error_mark_node)
- output_addressed_constants (DECL_INITIAL (decl));
+ output_addressed_constants (DECL_INITIAL (decl), 0);
/* dbxout.c needs to know this. */
if (sect && (sect->common.flags & SECTION_CODE) != 0)
already have labels. */
static constant_descriptor_tree *
-add_constant_to_table (tree exp)
+add_constant_to_table (tree exp, int defer)
{
/* The hash table methods may call output_constant_def for addressed
constants, so handle them first. */
- output_addressed_constants (exp);
+ output_addressed_constants (exp, defer);
/* Sanity check to catch recursive insertion. */
static bool inserting;
rtx
output_constant_def (tree exp, int defer)
{
- struct constant_descriptor_tree *desc = add_constant_to_table (exp);
+ struct constant_descriptor_tree *desc = add_constant_to_table (exp, defer);
maybe_output_constant_def_contents (desc, defer);
return desc->rtl;
}
/* Make sure any other constants whose addresses appear in EXP
are assigned label numbers. */
- output_addressed_constants (exp);
+ output_addressed_constants (exp, 0);
/* We are no longer deferring this constant. */
TREE_ASM_WRITTEN (decl) = TREE_ASM_WRITTEN (exp) = 1;
tree
tree_output_constant_def (tree exp)
{
- struct constant_descriptor_tree *desc = add_constant_to_table (exp);
+ struct constant_descriptor_tree *desc = add_constant_to_table (exp, 1);
tree decl = SYMBOL_REF_DECL (XEXP (desc->rtl, 0));
varpool_node::finalize_decl (decl);
return decl;
Indicate whether an ADDR_EXPR has been encountered. */
static void
-output_addressed_constants (tree exp)
+output_addressed_constants (tree exp, int defer)
{
tree tem;
tem = DECL_INITIAL (tem);
if (CONSTANT_CLASS_P (tem) || TREE_CODE (tem) == CONSTRUCTOR)
- output_constant_def (tem, 0);
+ output_constant_def (tem, defer);
if (TREE_CODE (tem) == MEM_REF)
- output_addressed_constants (TREE_OPERAND (tem, 0));
+ output_addressed_constants (TREE_OPERAND (tem, 0), defer);
break;
case PLUS_EXPR:
case POINTER_PLUS_EXPR:
case MINUS_EXPR:
- output_addressed_constants (TREE_OPERAND (exp, 1));
+ output_addressed_constants (TREE_OPERAND (exp, 1), defer);
gcc_fallthrough ();
CASE_CONVERT:
case VIEW_CONVERT_EXPR:
- output_addressed_constants (TREE_OPERAND (exp, 0));
+ output_addressed_constants (TREE_OPERAND (exp, 0), defer);
break;
case CONSTRUCTOR:
unsigned HOST_WIDE_INT idx;
FOR_EACH_CONSTRUCTOR_VALUE (CONSTRUCTOR_ELTS (exp), idx, tem)
if (tem != 0)
- output_addressed_constants (tem);
+ output_addressed_constants (tem, defer);
}
break;