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 | 20990ef6c12271a221f0285a35b5480af664b11f (patch) | |
tree | 574680cb6c2c7592e84a5e7acb9b32b1959b4a3d /gcc/config/pa | |
parent | 1cfc8a1bcf6d2ffb45069316a97ae86f66571680 (diff) |
* 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.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@255369 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/pa')
-rw-r--r-- | gcc/config/pa/pa.c | 9 |
1 files changed, 8 insertions, 1 deletions
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 |