score.c: Remove TARGET_LEGITIMIZE_ADDRESS define and score_legitimize_address function...
authorChen Liqin <liqin.gcc@gmail.com>
Thu, 6 Sep 2012 03:07:53 +0000 (03:07 +0000)
committerChen Liqin <liqin@gcc.gnu.org>
Thu, 6 Sep 2012 03:07:53 +0000 (03:07 +0000)
2012-09-06  Chen Liqin  <liqin.gcc@gmail.com>

* config/score/score.c: Remove TARGET_LEGITIMIZE_ADDRESS define
and score_legitimize_address function, use compiler default code instead.

From-SVN: r191004

gcc/ChangeLog
gcc/config/score/score.c

index 270af179cd0b122645e48cdb8c1665a11b37cccb..be5aeebdfd534140fbc963c9cacc4689e9756e2f 100644 (file)
@@ -1,3 +1,8 @@
+2012-09-06  Chen Liqin  <liqin.gcc@gmail.com>
+
+       * config/score/score.c: Remove TARGET_LEGITIMIZE_ADDRESS define
+       and score_legitimize_address function, use compiler default code instead.
+
 2012-09-05  Jan Hubicka  <jh@suse.cz>
 
        * ipa-inline.c (want_inline_small_function_p): Use INLINE_HINT_loop_iterations
index 2eeeab9f872c7091d97338a30bf4cc70f15b0001..3b550861515f0692c8581506a2b8ec7e7de2b23d 100644 (file)
@@ -120,9 +120,6 @@ struct extern_list *extern_head = 0;
 #undef TARGET_OPTION_OVERRIDE
 #define TARGET_OPTION_OVERRIDE          score_option_override
 
-#undef TARGET_LEGITIMIZE_ADDRESS
-#define TARGET_LEGITIMIZE_ADDRESS      score_legitimize_address
-
 #undef  TARGET_SCHED_ISSUE_RATE
 #define TARGET_SCHED_ISSUE_RATE         score_issue_rate
 
@@ -541,30 +538,6 @@ score_split_symbol (rtx temp, rtx addr)
   return gen_rtx_LO_SUM (Pmode, high, addr);
 }
 
-/* This function is used to implement LEGITIMIZE_ADDRESS.  If X can
-   be legitimized in a way that the generic machinery might not expect,
-   return the new address.  */
-static rtx
-score_legitimize_address (rtx x)
-{
-  enum score_symbol_type symbol_type;
-
-  if (score_symbolic_constant_p (x, &symbol_type)
-      && symbol_type == SYMBOL_GENERAL)
-    return score_split_symbol (0, x);
-
-  if (GET_CODE (x) == PLUS
-      && GET_CODE (XEXP (x, 1)) == CONST_INT)
-    {
-      rtx reg = XEXP (x, 0);
-      if (!score_valid_base_register_p (reg, 0))
-        reg = copy_to_mode_reg (Pmode, reg);
-      return score_add_offset (reg, INTVAL (XEXP (x, 1)));
-    }
-
-  return x;
-}
-
 /* Fill INFO with information about a single argument.  CUM is the
    cumulative state for earlier arguments.  MODE is the mode of this
    argument and TYPE is its type (if known).  NAMED is true if this