public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Reload problem, advice required
@ 2004-09-11  3:49 Jon Beniston
  0 siblings, 0 replies; 2+ messages in thread
From: Jon Beniston @ 2004-09-11  3:49 UTC (permalink / raw)
  To: gcc

Hi,

I'm am seeing the following compiler abort on a new port I'm working on:

libstdc++-v3/include/bits/istream.tcc:124: internal compiler error: in relo
ad_combine_note_use, at postreload.c:1082

Which I believe is occuring because a pseduo register is detected in an
instruction after global register allocation.

The offending instruction in the .lreg dump is:

(insn 4 875 932 0
/home/Jon/build-gcc2/excess-elf/mall-enabled/libstdc++-v3/include/bits/istre
am.tcc:865 (parallel [
            (set (mem/s:HI (reg/f:HI 229) [52 __pos+0 S2 A16])
                (reg:HI 5 r5))
            (set (mem/s:HI (plus:HI (reg/f:HI 229)
                        (const_int 2 [0x2])) [52 __pos+2 S2 A16])
                (reg:HI 6 r6))
            (set (mem/s:HI (plus:HI (reg/f:HI 229)
                        (const_int 4 [0x4])) [52 __pos+4 S2 A16])
                (reg:HI 7 r7))
        ]) 26 {*sm} (insn_list 875 (nil))
    (expr_list:REG_DEAD (reg:HI 7 r7)
        (expr_list:REG_DEAD (reg:HI 6 r6)
            (expr_list:REG_DEAD (reg:HI 5 r5)
                (nil)))))

And in the .greg dump:

(insn 4 936 932 0
/home/Jon/build-gcc2/excess-elf/mall-enabled/libstdc++-v3/include/bits/istre
am.tcc:865 (parallel [
            (set (mem/s:HI (reg:HI 1 ra) [52 __pos+0 S2 A16])
                (reg:HI 5 r5))
            (set (mem/s:HI (plus:HI (reg/f:HI 229)
                        (const_int 2 [0x2])) [52 __pos+2 S2 A16])
                (reg:HI 6 r6))
            (set (mem/s:HI (plus:HI (reg/f:HI 229)
                        (const_int 4 [0x4])) [52 __pos+4 S2 A16])
                (reg:HI 7 r7))
        ]) 26 {*sm} (insn_list 875 (nil))
    (nil))

I am assuming that the pseudo register references (reg/f:HI 229) shouldn't
appear in the .greg dump. Is that correct? If so, what is likely to be the
cause of this problem? Is it likely to be something I have done wrong in my
machine specific code, or is it a more general problem? Any pointers on
where I should be looking would be greatly appreciated.

I working off the 3.4.2 sources.

Cheers,
JonB

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Reload problem, advice required
@ 2004-09-11 10:48 Ulrich Weigand
  0 siblings, 0 replies; 2+ messages in thread
From: Ulrich Weigand @ 2004-09-11 10:48 UTC (permalink / raw)
  To: jon; +Cc: gcc

Jon Beniston wrote:

>(insn 4 936 932 0
>/home/Jon/build-gcc2/excess-elf/mall-enabled/libstdc++-v3/include/bits/istre
>am.tcc:865 (parallel [
>            (set (mem/s:HI (reg:HI 1 ra) [52 __pos+0 S2 A16])
>                (reg:HI 5 r5))
>            (set (mem/s:HI (plus:HI (reg/f:HI 229)
>                        (const_int 2 [0x2])) [52 __pos+2 S2 A16])
>                (reg:HI 6 r6))
>            (set (mem/s:HI (plus:HI (reg/f:HI 229)
>                        (const_int 4 [0x4])) [52 __pos+4 S2 A16])
>                (reg:HI 7 r7))
>        ]) 26 {*sm} (insn_list 875 (nil))
>    (nil))

I assume this is a store-multiple pattern that uses a 
match_parallel with only the first operand explicitly
matched by a match_operand?  It is a known problem that
reload doesn't handle such patterns correctly; in some
cases, register replacements are performed only in the
operand explicitly matches, not in the implicit operands
allowed by the match_parallel.

This is apparently difficult to fix; all back-ends using
load/store multiple patterns currently work around the
problem by either disabling them until after reload (so
that the prolog/epilog expanders can still use them),
like s390, or by having not one single match_parallel
pattern but multiple separate patterns, one for each
number of registers, like rs6000.

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  weigand@informatik.uni-erlangen.de

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-09-11 10:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-11  3:49 Reload problem, advice required Jon Beniston
2004-09-11 10:48 Ulrich Weigand

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).