OSDN Git Service

PR target/21571
authoramodra <amodra@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 23 Aug 2005 02:39:56 +0000 (02:39 +0000)
committeramodra <amodra@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 23 Aug 2005 02:39:56 +0000 (02:39 +0000)
* config/rs6000/rs6000.c (rs6000_legitimate_small_data_p): Rename
from legitimate_small_data_p, and make global.  Update use.
Remove forward declaration.
* config/rs6000/rs6000-protos.h (rs6000_legitimate_small_data_p):
Declare.
* config/rs6000/rs6000.md (movdf_hardfloat32): Allow small data mems.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@103382 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/config/rs6000/rs6000-protos.h
gcc/config/rs6000/rs6000.c
gcc/config/rs6000/rs6000.md

index 2b117b4..9aa60f0 100644 (file)
@@ -45,6 +45,7 @@ extern void validate_condition_mode (enum rtx_code, enum machine_mode);
 extern bool legitimate_constant_pool_address_p (rtx);
 extern bool legitimate_indirect_address_p (rtx, int);
 extern bool rs6000_legitimate_offset_address_p (enum machine_mode, rtx, int);
+extern bool rs6000_legitimate_small_data_p (enum machine_mode, rtx);
 
 extern rtx rs6000_got_register (rtx);
 extern rtx find_addr_reg (rtx);
index 2797d5f..edb3d84 100644 (file)
@@ -584,7 +584,6 @@ static unsigned toc_hash_function (const void *);
 static int toc_hash_eq (const void *, const void *);
 static int constant_pool_expr_1 (rtx, int *, int *);
 static bool constant_pool_expr_p (rtx);
-static bool legitimate_small_data_p (enum machine_mode, rtx);
 static bool legitimate_indexed_address_p (rtx, int);
 static bool legitimate_lo_sum_address_p (enum machine_mode, rtx, int);
 static struct machine_function * rs6000_init_machine_status (void);
@@ -2631,8 +2630,8 @@ legitimate_constant_pool_address_p (rtx x)
          && constant_pool_expr_p (XEXP (x, 1)));
 }
 
-static bool
-legitimate_small_data_p (enum machine_mode mode, rtx x)
+bool
+rs6000_legitimate_small_data_p (enum machine_mode mode, rtx x)
 {
   return (DEFAULT_ABI == ABI_V4
          && !flag_pic && !TARGET_TOC
@@ -3401,7 +3400,7 @@ rs6000_legitimate_address (enum machine_mode mode, rtx x, int reg_ok_strict)
       && TARGET_UPDATE
       && legitimate_indirect_address_p (XEXP (x, 0), reg_ok_strict))
     return 1;
-  if (legitimate_small_data_p (mode, x))
+  if (rs6000_legitimate_small_data_p (mode, x))
     return 1;
   if (legitimate_constant_pool_address_p (x))
     return 1;
index d18b124..84db59f 100644 (file)
       if (GET_CODE (operands[1]) == MEM
          && (rs6000_legitimate_offset_address_p (DFmode, XEXP (operands[1], 0),
                        reload_completed || reload_in_progress)
+             || rs6000_legitimate_small_data_p (DFmode, XEXP (operands[1], 0))
              || GET_CODE (XEXP (operands[1], 0)) == REG
              || GET_CODE (XEXP (operands[1], 0)) == LO_SUM
-                 || GET_CODE (XEXP (operands[1], 0)) == PRE_INC
+             || GET_CODE (XEXP (operands[1], 0)) == PRE_INC
              || GET_CODE (XEXP (operands[1], 0)) == PRE_DEC))
        {
          /* If the low-address word is used in the address, we must load
       if (GET_CODE (operands[0]) == MEM
           && (rs6000_legitimate_offset_address_p (DFmode, XEXP (operands[0], 0),
                    reload_completed || reload_in_progress)
+             || rs6000_legitimate_small_data_p (DFmode, XEXP (operands[0], 0))
              || GET_CODE (XEXP (operands[0], 0)) == REG
              || GET_CODE (XEXP (operands[0], 0)) == LO_SUM
-                 || GET_CODE (XEXP (operands[0], 0)) == PRE_INC
+             || GET_CODE (XEXP (operands[0], 0)) == PRE_INC
              || GET_CODE (XEXP (operands[0], 0)) == PRE_DEC))
        return \"{st%U0|stw%U0} %1,%0\;{st|stw} %L1,%L0\";
       else