diff options
author | John David Anglin <danglin@gcc.gnu.org> | 2017-12-03 23:18:10 +0000 |
---|---|---|
committer | John David Anglin <danglin@gcc.gnu.org> | 2017-12-03 23:18:10 +0000 |
commit | b1947510afc28c115dc2bccda2a7a7d475f627ee (patch) | |
tree | 574680cb6c2c7592e84a5e7acb9b32b1959b4a3d /gcc | |
parent | 0ac7425470a37554aa4dd017afb5f90b7328c9b0 (diff) | |
download | gcc-b1947510afc28c115dc2bccda2a7a7d475f627ee.zip gcc-b1947510afc28c115dc2bccda2a7a7d475f627ee.tar.gz gcc-b1947510afc28c115dc2bccda2a7a7d475f627ee.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/pa/pa.c | 9 |
2 files changed, 14 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 367dcb1..0940c18 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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. diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c index 3e2ef9d..5d28ecd 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 |