Commit 1b8135a4 by Richard Henderson Committed by Richard Henderson

varasm.c (default_encode_section_info): Don't set SYMBOL_FLAG_EXTERNAL if not TREE_PUBLIC.

        * 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.

From-SVN: r65728
parent 6d7fe8b3
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> 2003-04-17 Eric Botcazou <ebotcazou@libertysurf.fr>
* doc/invoke.texi (inline-limit): Fix pasto. * doc/invoke.texi (inline-limit): Fix pasto.
......
...@@ -110,7 +110,6 @@ static void i370_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT)); ...@@ -110,7 +110,6 @@ static void i370_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
#ifdef LONGEXTERNAL #ifdef LONGEXTERNAL
static int mvs_hash_alias PARAMS ((const char *)); static int mvs_hash_alias PARAMS ((const char *));
#endif #endif
static void i370_encode_section_info PARAMS ((tree, int));
static void i370_internal_label PARAMS ((FILE *, const char *, unsigned long)); static void i370_internal_label PARAMS ((FILE *, const char *, unsigned long));
static bool i370_rtx_costs PARAMS ((rtx, int, int, int *)); static bool i370_rtx_costs PARAMS ((rtx, int, int, int *));
...@@ -314,8 +313,6 @@ static const unsigned char ebcasc[256] = ...@@ -314,8 +313,6 @@ static const unsigned char ebcasc[256] =
#define TARGET_ASM_FUNCTION_PROLOGUE i370_output_function_prologue #define TARGET_ASM_FUNCTION_PROLOGUE i370_output_function_prologue
#undef TARGET_ASM_FUNCTION_EPILOGUE #undef TARGET_ASM_FUNCTION_EPILOGUE
#define TARGET_ASM_FUNCTION_EPILOGUE i370_output_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 #undef TARGET_ASM_INTERNAL_LABEL
#define TARGET_ASM_INTERNAL_LABEL i370_internal_label #define TARGET_ASM_INTERNAL_LABEL i370_internal_label
#undef TARGET_RTX_COSTS #undef TARGET_RTX_COSTS
...@@ -1594,17 +1591,6 @@ i370_output_function_epilogue (file, l) ...@@ -1594,17 +1591,6 @@ i370_output_function_epilogue (file, l)
fprintf (file, "\tDC\tA(PG%d)\n", i); 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 static void
i370_internal_label (stream, prefix, labelno) i370_internal_label (stream, prefix, labelno)
FILE *stream; FILE *stream;
......
...@@ -700,7 +700,7 @@ enum reg_class ...@@ -700,7 +700,7 @@ enum reg_class
&& GET_CODE (XEXP (XEXP (X, 0), 0)) == LABEL_REF) \ && GET_CODE (XEXP (XEXP (X, 0), 0)) == LABEL_REF) \
|| (GET_CODE (X) == CONST \ || (GET_CODE (X) == CONST \
&& GET_CODE (XEXP (XEXP (X, 0), 0)) == SYMBOL_REF \ && 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. /* Nonzero if the constant value X is a legitimate general operand.
It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE. */ It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE. */
...@@ -1266,7 +1266,7 @@ enum reg_class ...@@ -1266,7 +1266,7 @@ enum reg_class
case SYMBOL_REF: \ case SYMBOL_REF: \
case LABEL_REF: \ case LABEL_REF: \
mvs_page_lit += 4; \ 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("); \ else fprintf (FILE, "=A("); \
output_addr_const (FILE, XV); \ output_addr_const (FILE, XV); \
fprintf (FILE, ")"); \ fprintf (FILE, ")"); \
...@@ -1356,7 +1356,7 @@ enum reg_class ...@@ -1356,7 +1356,7 @@ enum reg_class
&& GET_CODE (XEXP (XEXP (XV, 0), 0)) == SYMBOL_REF) \ && GET_CODE (XEXP (XEXP (XV, 0), 0)) == SYMBOL_REF) \
{ \ { \
mvs_page_lit += 4; \ 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("); \ fprintf (FILE, "=V("); \
ASM_OUTPUT_LABELREF (FILE, \ ASM_OUTPUT_LABELREF (FILE, \
...@@ -1467,7 +1467,7 @@ enum reg_class ...@@ -1467,7 +1467,7 @@ enum reg_class
break; \ break; \
default: \ default: \
mvs_page_lit += 4; \ 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("); \ else fprintf (FILE, "=A("); \
output_addr_const (FILE, ADDR); \ output_addr_const (FILE, ADDR); \
fprintf (FILE, ")"); \ fprintf (FILE, ")"); \
...@@ -1560,7 +1560,7 @@ enum reg_class ...@@ -1560,7 +1560,7 @@ enum reg_class
case SYMBOL_REF: \ case SYMBOL_REF: \
case LABEL_REF: \ case LABEL_REF: \
mvs_page_lit += 4; \ 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("); \ else fprintf (FILE, "=A("); \
output_addr_const (FILE, XV); \ output_addr_const (FILE, XV); \
fprintf (FILE, ")"); \ fprintf (FILE, ")"); \
...@@ -1650,7 +1650,7 @@ enum reg_class ...@@ -1650,7 +1650,7 @@ enum reg_class
&& GET_CODE (XEXP (XEXP (XV, 0), 0)) == SYMBOL_REF) \ && GET_CODE (XEXP (XEXP (XV, 0), 0)) == SYMBOL_REF) \
{ \ { \
mvs_page_lit += 4; \ 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("); \ fprintf (FILE, "=V("); \
ASM_OUTPUT_LABELREF (FILE, \ ASM_OUTPUT_LABELREF (FILE, \
...@@ -1765,7 +1765,7 @@ abort(); \ ...@@ -1765,7 +1765,7 @@ abort(); \
break; \ break; \
default: \ default: \
mvs_page_lit += 4; \ 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("); \ else fprintf (FILE, "=A("); \
output_addr_const (FILE, ADDR); \ output_addr_const (FILE, ADDR); \
fprintf (FILE, ")"); \ fprintf (FILE, ")"); \
......
...@@ -855,7 +855,7 @@ check_label_emit (); ...@@ -855,7 +855,7 @@ check_label_emit ();
; op0 = operands[0]; ; op0 = operands[0];
; if (GET_CODE (op0) == CONST ; if (GET_CODE (op0) == CONST
; && GET_CODE (XEXP (XEXP (op0, 0), 0)) == SYMBOL_REF ; && 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))); ; op0 = gen_rtx_MEM (SImode, copy_to_mode_reg (SImode, XEXP (op0, 0)));
; } ; }
...@@ -863,7 +863,7 @@ check_label_emit (); ...@@ -863,7 +863,7 @@ check_label_emit ();
; op1 = operands[1]; ; op1 = operands[1];
; if (GET_CODE (op1) == CONST ; if (GET_CODE (op1) == CONST
; && GET_CODE (XEXP (XEXP (op1, 0), 0)) == SYMBOL_REF ; && 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))); ; 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) $(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 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/config/i370/i370-c.c
...@@ -5371,7 +5371,10 @@ default_encode_section_info (decl, first) ...@@ -5371,7 +5371,10 @@ default_encode_section_info (decl, first)
flags |= SYMBOL_FLAG_SMALL; flags |= SYMBOL_FLAG_SMALL;
if (TREE_CODE (decl) == VAR_DECL && DECL_THREAD_LOCAL (decl)) if (TREE_CODE (decl) == VAR_DECL && DECL_THREAD_LOCAL (decl))
flags |= decl_tls_model (decl) << SYMBOL_FLAG_TLS_SHIFT; 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; flags |= SYMBOL_FLAG_EXTERNAL;
SYMBOL_REF_FLAGS (symbol) = flags; SYMBOL_REF_FLAGS (symbol) = flags;
......
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