+2003-05-07 Zack Weinberg <zack@codesourcery.com>
+
+ * stmt.c (force_label_rtx): New function, based on logic
+ formerly found in expand_expr.
+ * expr.h: Prototype it.
+ * expr.c (expand_expr <LABEL_DECL>): Use force_label_rtx if
+ appropriate.
+ * varasm.c (decode_addr_const <LABEL_DECL>): Use force_label_rtx.
+
+ * print-tree.c (debug_tree): Free the table after we're done
+ with it. Use putc.
+
2003-05-07 Aldy Hernandez <aldyh@redhat.com>
- * config/rs6000/spe.h: Reverse arguments for __ev_subfw.
- Unreverse arguments for __ev_subw.
+ * config/rs6000/spe.h: Reverse arguments for __ev_subfw.
+ Unreverse arguments for __ev_subw.
- * config/rs6000/spe.md (evsubfw): Reverse arguments of assembly.
+ * config/rs6000/spe.md (evsubfw): Reverse arguments of assembly.
2003-05-07 Nick Clifton <nickc@redhat.com>
2003-05-06 Aldy Hernandez <aldyh@redhat.com>
- * config/rs6000/linuxspe.h: New file.
+ * config/rs6000/linuxspe.h: New file.
- * config.gcc: Add powerpc-*-linux-gnuspe* target.
+ * config.gcc: Add powerpc-*-linux-gnuspe* target.
2003-05-06 Richard Henderson <rth@redhat.com>
- * unwind-dw2.c (uw_update_context_1): Only set cfa as sp if
+ * unwind-dw2.c (uw_update_context_1): Only set cfa as sp if
previous frame didn't save sp. Clear sp for next frame.
(uw_install_context_1): Honor saved sp from frame.
case LABEL_DECL:
{
tree function = decl_function_context (exp);
- /* Handle using a label in a containing function. */
- if (function != current_function_decl
- && function != inline_function_decl && function != 0)
- {
- struct function *p = find_function_data (function);
- p->expr->x_forced_labels
- = gen_rtx_EXPR_LIST (VOIDmode, label_rtx (exp),
- p->expr->x_forced_labels);
- }
+ /* Labels in containing functions, or labels used from initializers,
+ must be forced. */
+ if (modifier == EXPAND_INITIALIZER
+ || (function != current_function_decl
+ && function != inline_function_decl
+ && function != 0))
+ temp = force_label_rtx (exp);
else
- {
- if (modifier == EXPAND_INITIALIZER)
- forced_labels = gen_rtx_EXPR_LIST (VOIDmode,
- label_rtx (exp),
- forced_labels);
- }
+ temp = label_rtx (exp);
- temp = gen_rtx_MEM (FUNCTION_MODE,
- gen_rtx_LABEL_REF (Pmode, label_rtx (exp)));
+ temp = gen_rtx_MEM (FUNCTION_MODE, gen_rtx_LABEL_REF (Pmode, temp));
if (function != current_function_decl
&& function != inline_function_decl && function != 0)
LABEL_REF_NONLOCAL_P (XEXP (temp, 0)) = 1;
/* Return the CODE_LABEL rtx for a LABEL_DECL, creating it if necessary. */
extern rtx label_rtx PARAMS ((tree));
+
+/* As label_rtx, but additionally the label is placed on the forced label
+ list of its containing function (i.e. it is treated as reachable even
+ if how is not obvious). */
+extern rtx force_label_rtx PARAMS ((tree));
#endif
/* Indicate how an input argument register was promoted. */
{
table = (struct bucket **) xcalloc (HASH_SIZE, sizeof (struct bucket *));
print_node (stderr, "", node, 0);
+ free (table);
table = 0;
- fprintf (stderr, "\n");
+ putc ('\n', stderr);
}
/* Print a node in brief fashion, with just the code, address and name. */
return DECL_RTL (label);
}
+/* As above, but also put it on the forced-reference list of the
+ function that contains it. */
+rtx
+force_label_rtx (label)
+ tree label;
+{
+ rtx ref = label_rtx (label);
+ tree function = decl_function_context (label);
+ struct function *p;
+
+ if (!function)
+ abort ();
+
+ if (function != current_function_decl
+ && function != inline_function_decl)
+ p = find_function_data (function);
+ else
+ p = cfun;
+
+ p->expr->x_forced_labels = gen_rtx_EXPR_LIST (VOIDmode, ref,
+ p->expr->x_forced_labels);
+ return ref;
+}
/* Add an unconditional jump to LABEL as the next sequential instruction. */
+2003-05-07 Zack Weinberg <zack@codesourcery.com>
+
+ * Make-lang.in: Set -Wno-error for treelang/lex.o.
+
2003-05-06 Nathan Sidwell <nathan@codesourcery.com>
* Make-lang.in (treelang/tree1.o): Depends on input.h
2003-03-01 Tim Josling <tej@melbpc.org.au>
- Name clashes with rtl.h fixed.
+ Name clashes with rtl.h fixed.
* lex.l: Tokens PLUS, MINUS, RETURN changed to tl_PLUS tl_MINUS
tl_RETURN.
2003-02-23 Tim Josling <tej@melbpc.org.au>
- Fix garbage collection, add more error checking, force GC always.
+ Fix garbage collection, add more error checking, force GC always.
* Make-lang.in (treelang/tree1.o): Depend on treelang/treetree.h
(treelang/treetree.o): Depend on treelang/parse.h
treelang-warn = $(LOOSE_WARN) -pedantic -Wno-long-long -Wmissing-prototypes -Wmissing-declarations $(WERROR)
# bison emits some unused static arrays (yytoknum)
treelang/parse.o-warn = -Wno-error
+# flex produces 'no previous prototype' warnings
+treelang/lex.o-warn = -Wno-error
#\f
# Define the names for selecting treelang in LANGUAGES.
case LABEL_DECL:
x = gen_rtx_MEM (FUNCTION_MODE,
- gen_rtx_LABEL_REF (VOIDmode,
- label_rtx (TREE_OPERAND (exp, 0))));
+ gen_rtx_LABEL_REF (VOIDmode, force_label_rtx (target)));
break;
case REAL_CST: