* simplify-rtx.c (avoid_constant_pool_reference): Export.
* rtl.h (avoid_constant_pool_reference): Declare it.
* dwarf2out.c (add_location_or_const_value_attribute): Use it.
(add_const_value_attribute): Use add_AT_unsigned for unsigned values.
From-SVN: r44411
+2001-07-26 Richard Henderson <rth@redhat.com>
+
+ * simplify-rtx.c (avoid_constant_pool_reference): Export.
+ * rtl.h (avoid_constant_pool_reference): Declare it.
+ * dwarf2out.c (add_location_or_const_value_attribute): Use it.
+ (add_const_value_attribute): Use add_AT_unsigned for unsigned values.
+
Thu Jul 26 22:30:22 CEST 2001 Jan Hubicka <jh@suse.cz>
* rtl.h (cleanup_barriers): Declare.
{
if ((unsigned long) val != (unsigned HOST_WIDE_INT) val)
abort ();
- add_AT_int (die, DW_AT_const_value, (unsigned long) val);
+ add_AT_unsigned (die, DW_AT_const_value, (unsigned long) val);
}
}
break;
if (rtl == NULL_RTX)
return;
+ /* If we don't look past the constant pool, we risk emitting a
+ reference to a constant pool entry that isn't referenced from
+ code, and thus is not emitted. */
+ rtl = avoid_constant_pool_reference (rtl);
+
switch (GET_CODE (rtl))
{
case ADDRESSOF:
unsigned int));
extern rtx simplify_replace_rtx PARAMS ((rtx, rtx, rtx));
extern rtx simplify_rtx PARAMS ((rtx));
+extern rtx avoid_constant_pool_reference PARAMS ((rtx));
/* In function.c */
extern rtx gen_mem_addressof PARAMS ((rtx, union tree_node *));
static rtx simplify_plus_minus PARAMS ((enum rtx_code,
enum machine_mode, rtx, rtx));
static void check_fold_consts PARAMS ((PTR));
-static rtx avoid_constant_pool_reference PARAMS ((rtx));
\f
/* Make a binary operation by properly ordering the operands and
seeing if the expression folds. */
\f
/* If X is a MEM referencing the constant pool, return the real value.
Otherwise return X. */
-static rtx
+rtx
avoid_constant_pool_reference (x)
rtx x;
{