* [committed] hppa: Fix bootstrap on hppa-hpux
@ 2017-12-03 23:22 John David Anglin
2017-12-03 23:28 ` John David Anglin
0 siblings, 1 reply; 2+ messages in thread
From: John David Anglin @ 2017-12-03 23:22 UTC (permalink / raw)
To: GCC Patches
--
John David Anglin dave.anglin@bell.net
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [committed] hppa: Fix bootstrap on hppa-hpux
2017-12-03 23:22 [committed] hppa: Fix bootstrap on hppa-hpux John David Anglin
@ 2017-12-03 23:28 ` John David Anglin
0 siblings, 0 replies; 2+ messages in thread
From: John David Anglin @ 2017-12-03 23:28 UTC (permalink / raw)
To: John David Anglin; +Cc: GCC Patches
[-- Attachment #1: Type: text/plain, Size: 404 bytes --]
Sorry, hit wrong button.
The attached patch fixes gcc bootstrap on hppa-hpux. Revision r254585 changed the handling of
scaled-index addresses. We weren't checking the base operand to ensure that the REG_POINTER
flag was set prior to load. As a result, we accepted invalid base register operands.
The attached change fixes this problem.
Dave
--
John David Anglin dave.anglin@bell.net
[-- Attachment #2: scaled-index.d.txt --]
[-- Type: text/plain, Size: 1113 bytes --]
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.
Index: config/pa/pa.c
===================================================================
--- config/pa/pa.c (revision 254585)
+++ config/pa/pa.c (working copy)
@@ -10544,9 +10544,16 @@
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-12-03 23:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-03 23:22 [committed] hppa: Fix bootstrap on hppa-hpux John David Anglin
2017-12-03 23:28 ` John David Anglin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).