Commit f2dd0c42 by Richard Henderson Committed by Richard Henderson

xtensa.c (xtensa_encode_section_info): Remove.

        * config/xtensa/xtensa.c (xtensa_encode_section_info): Remove.
        (call_insn_operand): Use SYMBOL_REF_LOCAL_P.
        * config/xtensa/xtensa.md (call, call_value): Likewise.

From-SVN: r65739
parent 50d1ff6a
2003-04-17 Richard Henderson <rth@redhat.com> 2003-04-17 Richard Henderson <rth@redhat.com>
* config/xtensa/xtensa.c (xtensa_encode_section_info): Remove.
(call_insn_operand): Use SYMBOL_REF_LOCAL_P.
* config/xtensa/xtensa.md (call, call_value): Likewise.
2003-04-17 Richard Henderson <rth@redhat.com>
* config/v850/v850.c (print_operand): Use SYMBOL_REF_[ZST]DA. * config/v850/v850.c (print_operand): Use SYMBOL_REF_[ZST]DA.
(print_operand_address): Likewise. (print_operand_address): Likewise.
(ep_memory_operand): Likewise. (ep_memory_operand): Likewise.
......
...@@ -203,7 +203,6 @@ static unsigned int xtensa_multibss_section_type_flags ...@@ -203,7 +203,6 @@ static unsigned int xtensa_multibss_section_type_flags
PARAMS ((tree, const char *, int)); PARAMS ((tree, const char *, int));
static void xtensa_select_rtx_section static void xtensa_select_rtx_section
PARAMS ((enum machine_mode, rtx, unsigned HOST_WIDE_INT)); PARAMS ((enum machine_mode, rtx, unsigned HOST_WIDE_INT));
static void xtensa_encode_section_info PARAMS ((tree, int));
static bool xtensa_rtx_costs PARAMS ((rtx, int, int, int *)); static bool xtensa_rtx_costs PARAMS ((rtx, int, int, int *));
static rtx frame_size_const; static rtx frame_size_const;
...@@ -238,8 +237,6 @@ static const int reg_nonleaf_alloc_order[FIRST_PSEUDO_REGISTER] = ...@@ -238,8 +237,6 @@ static const int reg_nonleaf_alloc_order[FIRST_PSEUDO_REGISTER] =
#undef TARGET_ASM_SELECT_RTX_SECTION #undef TARGET_ASM_SELECT_RTX_SECTION
#define TARGET_ASM_SELECT_RTX_SECTION xtensa_select_rtx_section #define TARGET_ASM_SELECT_RTX_SECTION xtensa_select_rtx_section
#undef TARGET_ENCODE_SECTION_INFO
#define TARGET_ENCODE_SECTION_INFO xtensa_encode_section_info
#undef TARGET_RTX_COSTS #undef TARGET_RTX_COSTS
#define TARGET_RTX_COSTS xtensa_rtx_costs #define TARGET_RTX_COSTS xtensa_rtx_costs
...@@ -596,8 +593,8 @@ call_insn_operand (op, mode) ...@@ -596,8 +593,8 @@ call_insn_operand (op, mode)
if (CONSTANT_ADDRESS_P (op)) if (CONSTANT_ADDRESS_P (op))
{ {
/* Direct calls only allowed to static functions with PIC. */ /* Direct calls only allowed to static functions with PIC. */
return (!flag_pic || (GET_CODE (op) == SYMBOL_REF return (!flag_pic
&& SYMBOL_REF_FLAG (op))); || (GET_CODE (op) == SYMBOL_REF && SYMBOL_REF_LOCAL_P (op)));
} }
return FALSE; return FALSE;
...@@ -2833,18 +2830,6 @@ xtensa_select_rtx_section (mode, x, align) ...@@ -2833,18 +2830,6 @@ xtensa_select_rtx_section (mode, x, align)
function_section (current_function_decl); function_section (current_function_decl);
} }
/* If we are referencing a function that is static, make the SYMBOL_REF
special so that we can generate direct calls to it even with -fpic. */
static void
xtensa_encode_section_info (decl, first)
tree decl;
int first ATTRIBUTE_UNUSED;
{
if (TREE_CODE (decl) == FUNCTION_DECL && ! TREE_PUBLIC (decl))
SYMBOL_REF_FLAG (XEXP (DECL_RTL (decl), 0)) = 1;
}
/* Compute a (partial) cost for rtx X. Return true if the complete /* Compute a (partial) cost for rtx X. Return true if the complete
cost has been computed, and false if subexpressions should be cost has been computed, and false if subexpressions should be
scanned. In either case, *TOTAL contains the cost result. */ scanned. In either case, *TOTAL contains the cost result. */
......
...@@ -2291,7 +2291,7 @@ ...@@ -2291,7 +2291,7 @@
" "
{ {
rtx addr = XEXP (operands[0], 0); rtx addr = XEXP (operands[0], 0);
if (flag_pic && GET_CODE (addr) == SYMBOL_REF && !SYMBOL_REF_FLAG (addr)) if (flag_pic && GET_CODE (addr) == SYMBOL_REF && !SYMBOL_REF_LOCAL_P (addr))
addr = gen_sym_PLT (addr); addr = gen_sym_PLT (addr);
if (!call_insn_operand (addr, VOIDmode)) if (!call_insn_operand (addr, VOIDmode))
XEXP (operands[0], 0) = copy_to_mode_reg (Pmode, addr); XEXP (operands[0], 0) = copy_to_mode_reg (Pmode, addr);
...@@ -2316,7 +2316,7 @@ ...@@ -2316,7 +2316,7 @@
" "
{ {
rtx addr = XEXP (operands[1], 0); rtx addr = XEXP (operands[1], 0);
if (flag_pic && GET_CODE (addr) == SYMBOL_REF && !SYMBOL_REF_FLAG (addr)) if (flag_pic && GET_CODE (addr) == SYMBOL_REF && !SYMBOL_REF_LOCAL_P (addr))
addr = gen_sym_PLT (addr); addr = gen_sym_PLT (addr);
if (!call_insn_operand (addr, VOIDmode)) if (!call_insn_operand (addr, VOIDmode))
XEXP (operands[1], 0) = copy_to_mode_reg (Pmode, addr); XEXP (operands[1], 0) = copy_to_mode_reg (Pmode, addr);
......
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