]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
pa.c (pa_legitimate_address_p): For scaled indexing...
authorJohn David Anglin <danglin@gcc.gnu.org>
Sun, 3 Dec 2017 23:18:10 +0000 (23:18 +0000)
committerJohn David Anglin <danglin@gcc.gnu.org>
Sun, 3 Dec 2017 23:18:10 +0000 (23:18 +0000)
* config/pa/pa.c (pa_legitimate_address_p): For scaled indexing,
require base operand is a REG_POINTER prior to reload on targets
with non-equivalent space registers.

From-SVN: r255369

gcc/ChangeLog
gcc/config/pa/pa.c

index 367dcb14828a977cbfc5d3566597c927328cc0af..0940c186448ec5d9d7975fbd8897a8277367599f 100644 (file)
@@ -1,3 +1,9 @@
+2017-12-03  John David Anglin  <danglin@gcc.gnu.org>
+
+       * config/pa/pa.c (pa_legitimate_address_p): For scaled indexing,
+       require base operand is a REG_POINTER prior to reload on targets
+       with non-equivalent space registers.
+
 2017-12-01  Jan Hubicka  <hubicka@ucw.cz>
 
        * ipa-cp.c (ipcp_lattice<valtype>::print): Update dumping.
index 3e2ef9d865c2ec0c1aff89d4f8d07b1eff4603dd..5d28ecda2edffac2ff2cbd9d017ac9e2d499f66d 100644 (file)
@@ -10544,9 +10544,16 @@ pa_legitimate_address_p (machine_mode mode, rtx x, bool strict)
 
       if (!TARGET_DISABLE_INDEXING
          && GET_CODE (index) == MULT
-         && MODE_OK_FOR_SCALED_INDEXING_P (mode)
+         /* Only accept base operands with the REG_POINTER flag prior to
+            reload on targets with non-equivalent space registers.  */
+         && (TARGET_NO_SPACE_REGS
+             || (base == XEXP (x, 1)
+                 && (reload_completed
+                     || (reload_in_progress && HARD_REGISTER_P (base))
+                     || REG_POINTER (base))))
          && REG_P (XEXP (index, 0))
          && GET_MODE (XEXP (index, 0)) == Pmode
+         && MODE_OK_FOR_SCALED_INDEXING_P (mode)
          && (strict ? STRICT_REG_OK_FOR_INDEX_P (XEXP (index, 0))
                     : REG_OK_FOR_INDEX_P (XEXP (index, 0)))
          && GET_CODE (XEXP (index, 1)) == CONST_INT