SH function epilogue scheduling problems (fwd)

tm_gccmail@mail.kloo.net tm_gccmail@mail.kloo.net
Tue Feb 25 02:44:00 GMT 2003


Doh, forgot to CC: the list.

---------- Forwarded message ----------
Date: Mon, 24 Feb 2003 19:30:25 -0800 (PST)
From: tm_gccmail@mail.kloo.net
To: joern.rennecke@superh.com, vmakarov@redhat.com
Cc: aoliva@redhat.com
Subject: SH function epilogue scheduling problems


I'm looking at code generated with CVS mainline using -O2 -m4, and it
doesn't seem to be scheduling the function epilogue properly.

Here's a sample from advmilitary.i:

.L106:
        mov.l   .L121,r1
        mov     r8,r0
        dmuls.l r1,r8
        shll    r8
        mov     #-4,r1
        subc    r8,r8
        sts     mach,r9
        add     r9,r0		<- here
        shad    r1,r0		<- here
        sub     r8,r0		<- here
        mov     r14,r15
        lds.l   @r15+,pr
        mov.l   @r15+,r14
        mov.l   @r15+,r13
        mov.l   @r15+,r12
        mov.l   @r15+,r11
        mov.l   @r15+,r10
        mov.l   @r15+,r9
        rts
        mov.l   @r15+,r8

The instructions marked "here" can and should be moved down several
instructions because they will pair with the stack stores, but the
scheduler doesn't seem to do anything.

This is the worst case, but it seems to be happening everywhere - none of
the function epilogues are properly scheduled.

Is this a known problem?

Toshi





More information about the Gcc-bugs mailing list