+2003-04-17 Richard Henderson <rth@redhat.com>
+
+ * varasm.c (default_encode_section_info): Don't set
+ SYMBOL_FLAG_EXTERNAL if not TREE_PUBLIC.
+ * config/i370/i370.c (i370_encode_section_info): Remove.
+ * config/i370/i370.h (CONSTANT_ADDRESS_P): Use SYMBOL_REF_EXTERNAL_P.
+ (PRINT_OPERAND, PRINT_OPERAND_ADDRESS): Likewise.
+ * config/i370/i370.md (movsi): Likewise.
+
+ * config/i370/t-i370: Add missing backslash.
+
2003-04-17 Eric Botcazou <ebotcazou@libertysurf.fr>
* doc/invoke.texi (inline-limit): Fix pasto.
#ifdef LONGEXTERNAL
static int mvs_hash_alias PARAMS ((const char *));
#endif
-static void i370_encode_section_info PARAMS ((tree, int));
static void i370_internal_label PARAMS ((FILE *, const char *, unsigned long));
static bool i370_rtx_costs PARAMS ((rtx, int, int, int *));
#define TARGET_ASM_FUNCTION_PROLOGUE i370_output_function_prologue
#undef TARGET_ASM_FUNCTION_EPILOGUE
#define TARGET_ASM_FUNCTION_EPILOGUE i370_output_function_epilogue
-#undef TARGET_ENCODE_SECTION_INFO
-#define TARGET_ENCODE_SECTION_INFO i370_encode_section_info
#undef TARGET_ASM_INTERNAL_LABEL
#define TARGET_ASM_INTERNAL_LABEL i370_internal_label
#undef TARGET_RTX_COSTS
fprintf (file, "\tDC\tA(PG%d)\n", i);
}
-/* Mark external references. */
-
-static void
-i370_encode_section_info (decl, first)
- tree decl;
- int first ATTRIBUTE_UNUSED;
-{
- if (DECL_EXTERNAL (decl) && TREE_PUBLIC (decl))
- SYMBOL_REF_FLAG (XEXP (DECL_RTL (decl), 0)) = 1;
-}
-
static void
i370_internal_label (stream, prefix, labelno)
FILE *stream;
&& GET_CODE (XEXP (XEXP (X, 0), 0)) == LABEL_REF) \
|| (GET_CODE (X) == CONST \
&& GET_CODE (XEXP (XEXP (X, 0), 0)) == SYMBOL_REF \
- && !SYMBOL_REF_FLAG (XEXP (XEXP (X, 0), 0))))
+ && !SYMBOL_REF_EXTERNAL_P (XEXP (XEXP (X, 0), 0))))
/* Nonzero if the constant value X is a legitimate general operand.
It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE. */
case SYMBOL_REF: \
case LABEL_REF: \
mvs_page_lit += 4; \
- if (SYMBOL_REF_FLAG (XV)) fprintf (FILE, "=V("); \
+ if (SYMBOL_REF_EXTERNAL_P (XV)) fprintf (FILE, "=V("); \
else fprintf (FILE, "=A("); \
output_addr_const (FILE, XV); \
fprintf (FILE, ")"); \
&& GET_CODE (XEXP (XEXP (XV, 0), 0)) == SYMBOL_REF) \
{ \
mvs_page_lit += 4; \
- if (SYMBOL_REF_FLAG (XEXP (XEXP (XV, 0), 0))) \
+ if (SYMBOL_REF_EXTERNAL_P (XEXP (XEXP (XV, 0), 0))) \
{ \
fprintf (FILE, "=V("); \
ASM_OUTPUT_LABELREF (FILE, \
break; \
default: \
mvs_page_lit += 4; \
- if (SYMBOL_REF_FLAG (ADDR)) fprintf (FILE, "=V("); \
+ if (SYMBOL_REF_EXTERNAL_P (ADDR)) fprintf (FILE, "=V("); \
else fprintf (FILE, "=A("); \
output_addr_const (FILE, ADDR); \
fprintf (FILE, ")"); \
case SYMBOL_REF: \
case LABEL_REF: \
mvs_page_lit += 4; \
- if (SYMBOL_REF_FLAG (XV)) fprintf (FILE, "=V("); \
+ if (SYMBOL_REF_EXTERNAL_P (XV)) fprintf (FILE, "=V("); \
else fprintf (FILE, "=A("); \
output_addr_const (FILE, XV); \
fprintf (FILE, ")"); \
&& GET_CODE (XEXP (XEXP (XV, 0), 0)) == SYMBOL_REF) \
{ \
mvs_page_lit += 4; \
- if (SYMBOL_REF_FLAG (XEXP (XEXP (XV, 0), 0))) \
+ if (SYMBOL_REF_EXTERNAL_P (XEXP (XEXP (XV, 0), 0))) \
{ \
fprintf (FILE, "=V("); \
ASM_OUTPUT_LABELREF (FILE, \
break; \
default: \
mvs_page_lit += 4; \
- if (SYMBOL_REF_FLAG (ADDR)) fprintf (FILE, "=V("); \
+ if (SYMBOL_REF_EXTERNAL_P (ADDR)) fprintf (FILE, "=V("); \
else fprintf (FILE, "=A("); \
output_addr_const (FILE, ADDR); \
fprintf (FILE, ")"); \
; op0 = operands[0];
; if (GET_CODE (op0) == CONST
; && GET_CODE (XEXP (XEXP (op0, 0), 0)) == SYMBOL_REF
-; && SYMBOL_REF_FLAG (XEXP (XEXP (op0, 0), 0)))
+; && SYMBOL_REF_EXTERNAL_P (XEXP (XEXP (op0, 0), 0)))
; {
; op0 = gen_rtx_MEM (SImode, copy_to_mode_reg (SImode, XEXP (op0, 0)));
; }
; op1 = operands[1];
; if (GET_CODE (op1) == CONST
; && GET_CODE (XEXP (XEXP (op1, 0), 0)) == SYMBOL_REF
-; && SYMBOL_REF_FLAG (XEXP (XEXP (op1, 0), 0)))
+; && SYMBOL_REF_EXTERNAL_P (XEXP (XEXP (op1, 0), 0)))
; {
; op1 = gen_rtx_MEM (SImode, copy_to_mode_reg (SImode, XEXP (op1, 0)));
; }
-i370-c.o: $(srcdir)/config/i370/i370-c.c $(CONFIG_H) $(SYSTEM_H) coretypes.h
+i370-c.o: $(srcdir)/config/i370/i370-c.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(TREE_H) toplev.h $(CPPLIB_H) c-pragma.h $(TM_P_H)
$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/config/i370/i370-c.c
flags |= SYMBOL_FLAG_SMALL;
if (TREE_CODE (decl) == VAR_DECL && DECL_THREAD_LOCAL (decl))
flags |= decl_tls_model (decl) << SYMBOL_FLAG_TLS_SHIFT;
- if (DECL_P (decl) && DECL_EXTERNAL (decl))
+ /* ??? Why is DECL_EXTERNAL ever set for non-PUBLIC names? Without
+ being PUBLIC, the thing *must* be defined in this translation unit.
+ Prevent this buglet from being propagated into rtl code as well. */
+ if (DECL_P (decl) && DECL_EXTERNAL (decl) && TREE_PUBLIC (decl))
flags |= SYMBOL_FLAG_EXTERNAL;
SYMBOL_REF_FLAGS (symbol) = flags;