From b1947510afc28c115dc2bccda2a7a7d475f627ee Mon Sep 17 00:00:00 2001 From: John David Anglin Date: Sun, 3 Dec 2017 23:18:10 +0000 Subject: [PATCH] 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 --- gcc/ChangeLog | 6 ++++++ gcc/config/pa/pa.c | 9 ++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) 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 -- 2.30.2