gcc/ChangeLog:

        * config/rx/rx.cc (rx_legitimize_address): Add PIC support.
        (gen_pcrel_label): New.
        (legitimize_pic_address): New.
        (rx_is_legitimate_address): Add PIC case.
        (nonpic_symbol_mentioned_p): New.
        (rx_print_operand_address): Add PIC symbol attribute.
        (rx_expand_prologue): Add PIC prologue.
        (rx_elf_asm_cdtor): Add FDPIC output.
        (rx_assemble_integer): Add PIC case output.
        (rx_option_override): fdpic support.
        (rx_function_ok_for_sibcall): Use relative call in fdpic mode.
        (rx_is_legitimate_constant): Add PIC support.
        (rx_legitimate_pic_operand_p): New.
        (rx_get_fdpic_reg_initial_val) New.
        (rx_mov_pic_operands): New.
        (rx_asm_output_addr_const_extra) New.
        (rx_const_not_ok_for_debug_p): New.
        (rx_cannot_force_const_mem_p): New.
        (rx_is_unspec_offset): New.
        (rx_delegitimize_address): New.
        (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): New.
        (TARGET_CONST_NOT_OK_FOR_DEBUG_P): New.
        (TARGET_CANNOT_FORCE_CONST_MEM): New.
        (TARGET_DELEGITIMIZE_ADDRESS): New.

Signed-off-by: Yoshinori Sato <[email protected]>
---
 gcc/config/rx/rx.cc | 467 ++++++++++++++++++++++++++++++++++++++++++--
 1 file changed, 456 insertions(+), 11 deletions(-)

diff --git a/gcc/config/rx/rx.cc b/gcc/config/rx/rx.cc
index 46d933ec157..1a16f4892c4 100644
--- a/gcc/config/rx/rx.cc
+++ b/gcc/config/rx/rx.cc
@@ -148,6 +148,13 @@ rx_legitimize_address (rtx x,
                       rtx oldx ATTRIBUTE_UNUSED,
                       machine_mode mode ATTRIBUTE_UNUSED)
 {
+  if (flag_pic)
+    {
+      rtx newx = legitimize_pic_address (x, oldx);
+      if (newx != oldx)
+       return newx;
+    }
+
   if (rx_pid_data_operand (x) == PID_UNENCODED)
     {
       rtx rv = gen_pid_addr (gen_rtx_REG (SImode, rx_pid_base_regnum ()), x);
@@ -163,6 +170,79 @@ rx_legitimize_address (rtx x,
   return x;
 }
 
+
+static rtx
+gen_pcrel_label (rtx sym)
+{
+  rtx unspec = gen_rtx_UNSPEC (SImode, gen_rtvec (1, sym), UNSPEC_PCREL);
+
+  return gen_rtx_CONST (SImode, unspec);
+}
+
+/* Convert a non-PIC address in `orig' to a PIC address using @GOT or
+   @GOTOFF in `reg'.  */
+rtx
+legitimize_pic_address (rtx x, rtx orig)
+{
+  rtx reg;
+  rtx inner = x;
+
+  if (GET_CODE (x) == CONST)
+    inner = XEXP (x, 0);
+
+  if ((GET_CODE (inner) == UNSPEC && XINT (inner, 1) == UNSPEC_PCREL) &&
+      (!SYMBOL_REF_P (x) && !LABEL_REF_P (x) && GET_CODE (x) != CONST))
+    return x;
+
+  reg = gen_reg_rtx (Pmode);
+
+  if (flag_plt && (GET_CODE (orig) == LABEL_REF ||
+                  (GET_CODE (orig) == SYMBOL_REF &&
+                   !SYMBOL_REF_LOCAL_P (orig))))
+    {
+      if (TARGET_FDPIC)
+       {
+         if (GET_CODE (orig) == SYMBOL_REF && SYMBOL_REF_FUNCTION_P (orig))
+           {
+             if (SYMBOL_REF_LOCAL_P (orig))
+               emit_insn (gen_symGOTOFFFUNCDESC2reg (reg, orig));
+             else
+               emit_insn (gen_symGOTFUNCDESC2reg (reg, orig));
+           }
+         else
+           emit_insn (gen_symGOT2reg (reg, orig));
+       }
+      crtl->uses_pic_offset_table = 1;
+      return reg;
+    }
+  else if (GET_CODE (orig) == SYMBOL_REF)
+    {
+      if (TARGET_FDPIC && SYMBOL_REF_FUNCTION_P (orig))
+       {
+         if (SYMBOL_REF_LOCAL_P (orig))
+           emit_insn (gen_symGOTOFFFUNCDESC2reg (reg, orig));
+         else
+           emit_insn (gen_symGOTFUNCDESC2reg (reg, orig));
+       }
+      else
+       {
+         if (SYMBOL_REF_LOCAL_P (orig))
+           emit_insn (gen_symGOTOFF2reg (reg, orig));
+         else
+           emit_insn (gen_symGOT2reg (reg, orig));
+       }
+      crtl->uses_pic_offset_table = 1;
+      return reg;
+    }
+  else if ((MEM_P(orig) && GET_CODE (XEXP (orig, 1)) == LABEL_REF) &&
+          (GET_CODE (orig) == SYMBOL_REF && SYMBOL_REF_DECL (orig)
+           && (TREE_READONLY (SYMBOL_REF_DECL (orig)))))
+    {
+      return orig;
+    }
+  return x;
+}
+
 /* Return true if OP is a reference to an object in a small data area.  */
 
 static bool
@@ -262,16 +342,73 @@ rx_is_legitimate_address (machine_mode mode, rtx x,
              && CONST_INT_P (factor)
              && GET_MODE_SIZE (mode) == INTVAL (factor);
          }
-
+       case CONST:
+         if (!flag_pic)
+           return false;
+         else
+           {
+             rtx inner = XEXP (index, 0);
+             if (GET_CODE (inner) == PLUS)
+               {
+                 rtx op0 = XEXP (inner, 0);
+                 rtx op1 = XEXP (inner, 1);
+                 if (GET_CODE (op0) == UNSPEC || GET_CODE (op1) == UNSPEC)
+                   return false;
+               }
+             return !rx_is_unspec_offset(index);
+           }
        default:
          return false;
        }
     }
+  if (flag_pic && GET_CODE (x) == CONST
+      && GET_CODE (XEXP (x, 0)) == UNSPEC
+      && XINT (XEXP (x, 0), 1) == UNSPEC_PCREL)
+    return true;
 
   /* Small data area accesses turn into register relative offsets.  */
   return rx_small_data_operand (x);
 }
 
+/* Return TRUE if X references a SYMBOL_REF or LABEL_REF whose symbol
+   isn't protected by a PIC unspec.  */
+bool
+nonpic_symbol_mentioned_p (rtx x)
+{
+  if (GET_CODE (x) == PC)
+    return true;
+
+  /* We don't want to look into the possible MEM location of a
+     CONST_DOUBLE, since we're not going to use it, in general.  */
+  if (GET_CODE (x) == CONST_DOUBLE)
+    return false;
+
+  if (GET_CODE (x) == UNSPEC
+      && (XINT (x, 1) == UNSPEC_PIC
+         || XINT (x, 1) == UNSPEC_GOT
+         || XINT (x, 1) == UNSPEC_GOTOFF
+         || XINT (x, 1) == UNSPEC_PLT
+         || XINT (x, 1) == UNSPEC_GOTFUNCDESC
+         || XINT (x, 1) == UNSPEC_GOTOFFFUNCDESC
+         || XINT (x, 1) == UNSPEC_PCREL))
+    return false;
+
+  const char* fmt = GET_RTX_FORMAT (GET_CODE (x));
+  for (int i = GET_RTX_LENGTH (GET_CODE (x)) - 1; i >= 0; i--)
+    {
+      if (fmt[i] == 'E')
+       {
+         for (int j = XVECLEN (x, i) - 1; j >= 0; j--)
+           if (nonpic_symbol_mentioned_p (XVECEXP (x, i, j)))
+             return true;
+       }
+      else if (fmt[i] == 'e' && nonpic_symbol_mentioned_p (XEXP (x, i)))
+       return true;
+    }
+
+  return false;
+}
+
 /* Returns TRUE for simple memory addresses, ie ones
    that do not involve register indirect addressing
    or pre/post increment/decrement.  */
@@ -421,7 +558,7 @@ rx_print_operand_address (FILE * file, machine_mode 
/*mode*/, rtx addr)
        else if (REG_P (arg2) && RTX_OK_FOR_BASE (arg2, true))
          base = arg2, index = arg1;
        else
-         {
+         { /* symbol + offset[Rn] */
            rx_print_operand (file, arg1, 0);
            fprintf (file, " + ");
            rx_print_operand (file, arg2, 0);
@@ -429,13 +566,17 @@ rx_print_operand_address (FILE * file, machine_mode 
/*mode*/, rtx addr)
          }
 
        if (REG_P (index) || GET_CODE (index) == MULT)
-         {
+         { /* [Ri, Rb] */
            fprintf (file, "[");
            rx_print_operand (file, index, 'A');
            fprintf (file, ",");
          }
-       else /* GET_CODE (index) == CONST_INT  */
-         {
+       else
+         { /* dsp[Rn] */
+           gcc_assert (!(GET_CODE (index) == CONST &&
+                         GET_CODE (XEXP (index, 0)) == UNSPEC &&
+                         (XINT (XEXP (index, 0), 1) == UNSPEC_GOTOFF ||
+                          XINT (XEXP (index, 0), 1) == 
UNSPEC_GOTOFFFUNCDESC)));
            rx_print_operand (file, index, 'A');
            fprintf (file, "[");
          }
@@ -461,7 +602,46 @@ rx_print_operand_address (FILE * file, machine_mode 
/*mode*/, rtx addr)
       break;
 
     case UNSPEC:
-      addr = XVECEXP (addr, 0, 0);
+      {
+       int post = XINT (addr, 1);
+       const char *attr = NULL;
+       bool immideate = false;
+#define ATTR_STR(_name) \
+  case UNSPEC_##_name: \
+    addr = XVECEXP (addr, 0, 0); \
+    attr = #_name; \
+    break
+#define ATTR_STR_IMM(_name) \
+  case UNSPEC_##_name: \
+    addr = XVECEXP (addr, 0, 0); \
+    attr = #_name; \
+    immideate = true; \
+    break
+       switch (post)
+         {
+           ATTR_STR(GOT);
+           ATTR_STR(GOTFUNCDESC);
+           ATTR_STR(PLT);
+           ATTR_STR_IMM(GOTOFF);
+           ATTR_STR_IMM(GOTOFFFUNCDESC);
+         case UNSPEC_PCREL:
+           output_addr_const (file, XVECEXP (addr, 0, 0));
+           return;
+         }
+       if (attr)
+         {
+           if (SYMBOL_REF_P(addr))
+             {
+               if (immideate)
+                 fprintf (file, "#");
+               output_addr_const (file, addr);
+               fprintf (file, "@%s", attr);
+             }
+           else
+             rx_print_operand (file, addr, 0);
+           return;
+         }
+      }
       /* Fall through.  */
     case LABEL_REF:
     case SYMBOL_REF:
@@ -490,6 +670,15 @@ rx_assemble_integer (rtx x, unsigned int size, int 
is_aligned)
 {
   const char *  op = integer_asm_op (size, is_aligned);
 
+    if (TARGET_FDPIC && size == UNITS_PER_WORD
+      && GET_CODE (x) == SYMBOL_REF && SYMBOL_REF_FUNCTION_P (x))
+    {
+      fputs (op, asm_out_file);
+      output_addr_const (asm_out_file, x);
+      fputs ("@FUNCDESC\n", asm_out_file);
+      return true;
+    }
+
   if (! CONST_INT_P (x))
     return default_assemble_integer (x, size, is_aligned);
 
@@ -917,6 +1106,11 @@ rx_print_operand (FILE * file, rtx op, int letter)
                fprintf (file, ")");
                return;
              }
+           case UNSPEC_PCREL:
+             if (print_hash)
+               fprintf (file, "#");
+             output_addr_const(file, XVECEXP (op, 0, 0));
+             return;
            }
          /* Fall through */
 
@@ -1486,7 +1680,8 @@ rx_get_stack_layout (unsigned int * lowest,
                 to call-used by rx_conditional_register_usage.  If so then
                 they can be used in the fast interrupt handler without
                 saving them on the stack.  */
-             || (is_fast_interrupt_func (NULL_TREE)
+             || is_fast_interrupt_func (NULL_TREE)
+             || ((flag_pic && reg == PIC_REG)
                  && ! IN_RANGE (reg, 10, 13))))
        {
          if (low == 0)
@@ -1822,6 +2017,12 @@ rx_expand_prologue (void)
                    GEN_INT ((HOST_WIDE_INT) stack_size),
                    true);
     }
+  if (crtl->uses_pic_offset_table && !TARGET_FDPIC)
+    {
+      rtx picreg = gen_rtx_REG (Pmode, PIC_REG);
+      rtx got = gen_rtx_SYMBOL_REF (Pmode, "_GLOBAL_OFFSET_TABLE_");
+      emit_insn (gen_movsi_pcrel (picreg, got));
+    }
 }
 
 static void
@@ -2671,7 +2872,14 @@ rx_elf_asm_cdtor (rtx symbol, int priority, bool is_ctor)
 
   switch_to_section (s);
   assemble_align (POINTER_SIZE);
-  assemble_integer (symbol, POINTER_SIZE / BITS_PER_UNIT, POINTER_SIZE, 1);
+  if (!TARGET_FDPIC)
+    assemble_integer (symbol, POINTER_SIZE / BITS_PER_UNIT, POINTER_SIZE, 1);
+  else
+    {
+      fputs ("\t.long\t", asm_out_file);
+      output_addr_const (asm_out_file, symbol);
+      fputs ("\n", asm_out_file);
+    }
 }
 
 static void
@@ -2822,6 +3030,13 @@ rx_option_override (void)
   if (flag_strict_volatile_bitfields < 0 && abi_version_at_least(2))
     flag_strict_volatile_bitfields = 1;
 
+  /* FDPIC code is a special form of PIC, and the vast majority of code
+     generation constraints that apply to PIC also apply to FDPIC, so we
+     set flag_pic to avoid the need to check TARGET_FDPIC everywhere
+     flag_pic is checked. */
+  if (TARGET_FDPIC && !flag_pic)
+    flag_pic = 2;
+
   rx_override_options_after_change ();
 
   /* These values are bytes, not log.  */
@@ -2869,7 +3084,7 @@ rx_warn_func_return (tree decl)
 static bool
 rx_function_ok_for_sibcall (tree decl, tree exp ATTRIBUTE_UNUSED)
 {
-  if (TARGET_JSR)
+  if (TARGET_JSR || TARGET_FDPIC)
     return false;
 
   /* Do not allow indirect tailcalls.  The
@@ -2906,6 +3121,25 @@ rx_is_ms_bitfield_layout (const_tree record_type 
ATTRIBUTE_UNUSED)
 bool
 rx_is_legitimate_constant (machine_mode mode ATTRIBUTE_UNUSED, rtx x)
 {
+  if (flag_pic)
+    {
+      if (SYMBOL_REF_P (x) || LABEL_REF_P (x))
+       return false;
+      if (GET_CODE (x) == CONST
+         && GET_CODE (XEXP (x, 0)) == PLUS
+         && GET_CODE (XEXP (XEXP (x, 0), 0)) == UNSPEC)
+       {
+         rtx x0 = XVECEXP (XEXP (XEXP (x, 0), 0), 0, 0);
+         if (SYMBOL_REF_P (x0) || LABEL_REF_P (x0))
+           return false;
+       }
+
+      if (GET_CODE (x) == CONST
+         && GET_CODE (XEXP (x, 0)) == UNSPEC
+         && XINT (XEXP (x, 0), 1) == UNSPEC_PCREL)
+       return false;
+    }
+
   switch (GET_CODE (x))
     {
     case CONST:
@@ -2926,10 +3160,22 @@ rx_is_legitimate_constant (machine_mode mode 
ATTRIBUTE_UNUSED, rtx x)
        {
        case LABEL_REF:
        case SYMBOL_REF:
-         return true;
+         return !flag_pic;
 
        case UNSPEC:
-         return XINT (x, 1) == UNSPEC_CONST || XINT (x, 1) == UNSPEC_PID_ADDR;
+         if (XINT (x, 1) == UNSPEC_PCREL)
+           {
+             rtx xx = XVECEXP (x, 0, 0);
+             return !(GET_CODE (xx) == CONST || GET_CODE (xx) == UNSPEC);
+           }
+
+         return XINT (x, 1) == UNSPEC_CONST ||
+                XINT (x, 1) == UNSPEC_PID_ADDR ||
+                XINT (x, 1) == UNSPEC_GOT ||
+                XINT (x, 1) == UNSPEC_GOTOFF ||
+                XINT (x, 1) == UNSPEC_GOTFUNCDESC ||
+                XINT (x, 1) == UNSPEC_GOTOFFFUNCDESC ||
+                XINT (x, 1) == UNSPEC_PLT;
 
        default:
          /* FIXME: Can this ever happen ?  */
@@ -3692,7 +3938,194 @@ rx_relax_double_operands(rtx * operands, machine_mode 
mode)
     }
 }
 
+int rx_legitimate_pic_operand_p(rtx x)
+{
+  return (! nonpic_symbol_mentioned_p (x)
+         && GET_CODE (x) != SYMBOL_REF);
+}
+
+
+
+/* Return an rtx holding the initial value of the FDPIC register (the
+   FDPIC pointer passed in from the caller).  */
+
+rtx
+rx_get_fdpic_reg_initial_val (void)
+{
+  return get_hard_reg_initial_val (Pmode, PIC_REG);
+}
+
+rtx
+rx_mov_pic_operands (rtx x)
+{
+  rtx gotsym = NULL;
+  rtx gotoffsym = NULL;
+  rtx funcsym = NULL;
+  rtx picreg = gen_rtx_REG (Pmode, PIC_REG);
+  rtx t;
+
+  if (!can_create_pseudo_p ())
+    {
+      if (MEM_P(x) && GET_CODE(XEXP(x, 0)) == PLUS &&
+         GET_CODE(XEXP(XEXP(x, 0), 1)) == CONST &&
+         GET_CODE(XEXP(XEXP(XEXP(x, 0), 1), 0)) == UNSPEC)
+       switch(XINT(XEXP(XEXP(XEXP(x, 0), 1), 0), 1))
+         {
+         case UNSPEC_GOTOFFFUNCDESC:
+           XINT(XEXP(XEXP(XEXP(x, 0), 1), 0), 1) = UNSPEC_GOTFUNCDESC;
+           break;
+         case UNSPEC_GOTOFF:
+           XINT(XEXP(XEXP(XEXP(x, 0), 1), 0), 1) = UNSPEC_GOT;
+           break;
+         }
+      return x;
+    }
+
+  if (GET_CODE(x) == CONST &&
+      (GET_CODE(XEXP(x, 0)) == PLUS || GET_CODE(XEXP(x, 0)) == MINUS) &&
+      (GET_CODE(XEXP(XEXP(x, 0), 0)) == SYMBOL_REF ||
+       (GET_CODE(XEXP(XEXP(x, 0), 0)) == LABEL_REF)))
+    {
+      tree decl = NULL;
+      if (GET_CODE(XEXP(XEXP(x, 0), 0)) == SYMBOL_REF)
+       decl = SYMBOL_REF_DECL (XEXP(XEXP(x, 0), 0));
+      if ((decl && (TREE_CODE (decl) == VAR_DECL) && !TREE_PUBLIC (decl)) ||
+         GET_CODE(XEXP(XEXP(x, 0), 0)) == LABEL_REF)
+       {
+         // PC relative with offset
+         rtx label;
+         label = gen_pcrel_label(XEXP(XEXP(x, 0), 0));
+         t = gen_reg_rtx (GET_MODE(x));
+         emit_insn(gen_movsi_pcrel(t, label));
+       }
+      else
+       {
+         if (SYMBOL_REF_LOCAL_P (XEXP(XEXP(x, 0), 0)))
+           {
+             // GOTOFF
+             rtx gotoffsym = gen_sym2GOTOFF(XEXP(XEXP(x, 0), 0));
+             t = gen_reg_rtx (GET_MODE(x));
+             emit_move_insn (t, gen_rtx_PLUS(Pmode, picreg, gotoffsym));
+           }
+         else
+           {
+             // GOT
+             rtx gotsym = gen_sym2GOT (XEXP(XEXP(x, 0), 0));
+             t = gen_reg_rtx (GET_MODE(x));
+             emit_move_insn(t, gen_rtx_MEM(GET_MODE(x),
+                                           gen_rtx_PLUS(Pmode, picreg, 
gotsym)));
+           }
+         crtl->uses_pic_offset_table = true;
+       }
+      if (GET_CODE(XEXP(x, 0)) == PLUS)
+       emit_insn(gen_addsi3(t, t, XEXP(XEXP(x, 0), 1)));
+      else
+       emit_insn(gen_subsi3(t, t, XEXP(XEXP(x, 0), 1)));
+      return t;
+    }
+  if (GET_CODE(x) == SYMBOL_REF || GET_CODE(x) == LABEL_REF)
+    {
+      if ((GET_CODE(x) == SYMBOL_REF && TREE_READONLY (SYMBOL_REF_DECL (x)))
+         || GET_CODE(x) == LABEL_REF)
+       {
+         // PC relative address
+         rtx label;
+         if (GET_CODE (x) != CONST
+             || GET_CODE (XEXP (x, 0)) != UNSPEC
+             || XINT (XEXP (x, 0), 1) != UNSPEC_PCREL)
+           label = gen_pcrel_label(x);
+         else
+           label = x;
+         return label;
+       }
+      else if (!RTX_FLAG (x, frame_related))
+       {
+         if (TARGET_FDPIC && SYMBOL_REF_FUNCTION_P(x))
+           funcsym = SYMBOL_REF_LOCAL_P(x) ?
+             gen_sym2GOTOFFFUNCDESC (x) : gen_sym2GOTFUNCDESC (x);
+         else
+           if (SYMBOL_REF_LOCAL_P(x))
+             gotoffsym = gen_sym2GOTOFF (x);
+         else
+             gotsym = gen_sym2GOT(x);
+       }
+      else
+       {
+           if (SYMBOL_REF_LOCAL_P(x))
+             gotoffsym = gen_sym2GOTOFF (x);
+         else
+             gotsym = gen_sym2GOT(x);
+       }
+    }
+  if (gotsym)
+    {
+      t = gen_rtx_MEM(GET_MODE(x), gen_rtx_PLUS(Pmode, picreg, gotsym));
+      crtl->uses_pic_offset_table = true;
+      return t;
+    }
+  else if (gotoffsym)
+    {
+      t = gen_rtx_PLUS(Pmode, picreg, gotoffsym);
+      return t;
+    }
+  else if (funcsym)
+    {
+      t = gen_reg_rtx (GET_MODE(x));
+      if (SYMBOL_REF_LOCAL_P(x))
+       emit_insn(gen_addsi3(t, picreg, funcsym));
+      else
+       emit_move_insn(t, gen_rtx_MEM(Pmode,
+                                     gen_rtx_PLUS(Pmode, picreg, funcsym)));
+      return t;
+    }
+  else
+    return x;
+}
+
+/* Implement TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA.  */
+static bool
+rx_asm_output_addr_const_extra (FILE *file, rtx x)
+{
+  return false;
+}
+
+static bool
+rx_const_not_ok_for_debug_p (rtx p)
+{
+  return (GET_CODE (p) == SYMBOL_REF);
+}
+
+bool
+rx_cannot_force_const_mem_p (machine_mode mode ATTRIBUTE_UNUSED,
+                            rtx x ATTRIBUTE_UNUSED)
+{
+  return flag_pic;
+}
+
+bool rx_is_unspec_offset(rtx x)
+{
+  return flag_pic && GET_CODE (x) == CONST
+    && GET_CODE (XEXP (x, 0)) == UNSPEC
+    && (XINT (XEXP (x, 0), 1) == UNSPEC_PID_ADDR
+       || XINT (XEXP (x, 0), 1) == UNSPEC_GOTOFF
+       || XINT (XEXP (x, 0), 1) == UNSPEC_GOTOFFFUNCDESC
+       || XINT (XEXP (x, 0), 1) == UNSPEC_PCREL);
+}
+
+static rtx
+rx_delegitimize_address (rtx x)
+{
+  x = delegitimize_mem_from_attrs (x);
+  if (GET_CODE (x) == CONST
+      && GET_CODE (XEXP (x, 0)) == UNSPEC
+      && XINT (XEXP (x, 0), 1) == UNSPEC_PCREL)
+    return XVECEXP (XEXP (x, 0), 0, 0);
+
+  return x;
+}
+
 
+
 #undef  TARGET_NARROW_VOLATILE_BITFIELD
 #define TARGET_NARROW_VOLATILE_BITFIELD                
rx_narrow_volatile_bitfield
 
@@ -3851,6 +4284,18 @@ rx_relax_double_operands(rtx * operands, machine_mode 
mode)
 #undef TARGET_DOCUMENTATION_NAME
 #define TARGET_DOCUMENTATION_NAME "RX"
 
+#undef TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA
+#define TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA rx_asm_output_addr_const_extra
+
+#undef TARGET_CONST_NOT_OK_FOR_DEBUG_P
+#define TARGET_CONST_NOT_OK_FOR_DEBUG_P rx_const_not_ok_for_debug_p
+
+#undef TARGET_CANNOT_FORCE_CONST_MEM
+#define TARGET_CANNOT_FORCE_CONST_MEM rx_cannot_force_const_mem_p
+
+#undef  TARGET_DELEGITIMIZE_ADDRESS
+#define TARGET_DELEGITIMIZE_ADDRESS            rx_delegitimize_address
+
 struct gcc_target targetm = TARGET_INITIALIZER;
 
 #include "gt-rx.h"
-- 
2.47.3

Reply via email to