* reload produces invalid address
@ 2001-06-08 2:10 Lars Brinkhoff
2001-06-08 19:59 ` Michael Matz
0 siblings, 1 reply; 2+ messages in thread
From: Lars Brinkhoff @ 2001-06-08 2:10 UTC (permalink / raw)
To: gcc
Hello,
I'm working on a new backend, and I have noticed that in some
circumstances, the reload pass can produce invalid addresses. Here's
an example:
Before reload:
(insn 12 11 92 (set (reg/v:SI 24)
(mem/s:SI (plus:SI (reg/v/f:SI 23)
(const_int 4 [0x4])) 1)) 43 {movsi} (nil)
(nil))
After reload:
(insn 12 11 92 (set (reg/v:SI 9 11 [25])
(mem/s:SI (plus:SI (mem:SI (reg/f:SI 15 17) 0)
(const_int 4 [0x4])) 1)) 43 {movsi} (nil)
(nil))
The old address (plus:SI (reg:SI 23) (const_int 4)) was a valid address,
but the new address (plus:SI (mem:SI (reg:SI 15)) (const_int 4)) is not
a valid address according to GO_LEGITIMATE_ADDRESS_P in my backend.
How do I avoid this?
--
http://lars.nocrew.org/
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: reload produces invalid address
2001-06-08 2:10 reload produces invalid address Lars Brinkhoff
@ 2001-06-08 19:59 ` Michael Matz
0 siblings, 0 replies; 2+ messages in thread
From: Michael Matz @ 2001-06-08 19:59 UTC (permalink / raw)
To: Lars Brinkhoff; +Cc: gcc
Hi,
On 8 Jun 2001, Lars Brinkhoff wrote:
> The old address (plus:SI (reg:SI 23) (const_int 4)) was a valid address,
> but the new address (plus:SI (mem:SI (reg:SI 15)) (const_int 4)) is not
> a valid address according to GO_LEGITIMATE_ADDRESS_P in my backend.
>
> How do I avoid this?
Could it be, that reload is doing this initially because of a wrong
setting of supported number of indirection on your platform? (This
basically tells reload how many nested (mem)'s are possible) (See
spill_indirect_level in reload.c and it's computation in init_reload()).
OTOH I may be way off.
Ciao,
Michael.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-06-08 19:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-08 2:10 reload produces invalid address Lars Brinkhoff
2001-06-08 19:59 ` Michael Matz
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).