From: John David Anglin Date: Sun, 3 Dec 2017 23:18:10 +0000 (+0000) Subject: pa.c (pa_legitimate_address_p): For scaled indexing... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b1947510afc28c115dc2bccda2a7a7d475f627ee;p=gcc.git pa.c (pa_legitimate_address_p): For scaled indexing... * 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 367dcb14828..0940c186448 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2017-12-03 John David Anglin + + * 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 * ipa-cp.c (ipcp_lattice::print): Update dumping. diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c index 3e2ef9d865c..5d28ecda2ed 100644 --- a/gcc/config/pa/pa.c +++ b/gcc/config/pa/pa.c @@ -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