public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/54602] New: [SH] Register pop insn not put in rts delay slot
@ 2012-09-16 15:26 olegendo at gcc dot gnu.org
  2012-10-09 22:52 ` [Bug target/54602] " olegendo at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: olegendo at gcc dot gnu.org @ 2012-09-16 15:26 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54602

             Bug #: 54602
           Summary: [SH] Register pop insn not put in rts delay slot
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: target
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: olegendo@gcc.gnu.org
            Target: sh*-*-*


The following case:

int test01 (int a, int b);

int test00 (int a, int b, int c, int d)
{
  return test01 (a, b) + c;
}

Compiled with -O2 -m2:
        mov.l    .L3,r0          ! 9    movsi_i/1    [length = 2]
        mov.l   r8,@-r15        ! 26    movsi_i/7    [length = 2]
        sts.l   pr,@-r15        ! 27    movsi_i/9    [length = 2]
        jsr     @r0             ! 12    call_valuei    [length = 2]
        mov     r6,r8           ! 4    movsi_i/2    [length = 2]
        add     r8,r0           ! 14    *addsi3_compact    [length = 2]
        lds.l   @r15+,pr        ! 33    *movsi_pop/3    [length = 2]
        mov.l   @r15+,r8        ! 34    *movsi_pop/1    [length = 2]
        rts
        nop                     ! 36    *return_i    [length = 4]

Compiled with -O2 -m2a:
        mov.l   .L3,r0          ! 9    movsi_ie/1    [length = 2]
        mov.l   r8,@-r15        ! 30    movsi_ie/9    [length = 4]
        sts.l   pr,@-r15        ! 31    movsi_ie/11    [length = 2]
        jsr     @r0             ! 12    call_valuei    [length = 2]
        mov     r6,r8           ! 4    movsi_ie/2    [length = 2]
        add     r8,r0           ! 14    *addsi3_compact    [length = 2]
        lds.l   @r15+,pr        ! 37    *movsi_pop/3    [length = 2]
        mov.l   @r15+,r8        ! 38    *movsi_pop/1    [length = 2]
        rts/n                   ! 40    *return_i    [length = 4]

The pop insn of r8 is not placed in the delay slot of rts without any obvious
reason.  This happens only for -m1 and -m2*.


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

end of thread, other threads:[~2012-10-30  1:26 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-16 15:26 [Bug target/54602] New: [SH] Register pop insn not put in rts delay slot olegendo at gcc dot gnu.org
2012-10-09 22:52 ` [Bug target/54602] " olegendo at gcc dot gnu.org
2012-10-09 22:58 ` olegendo at gcc dot gnu.org
2012-10-10  0:44 ` olegendo at gcc dot gnu.org
2012-10-10 22:44 ` kkojima at gcc dot gnu.org
2012-10-10 23:24 ` olegendo at gcc dot gnu.org
2012-10-11 13:48 ` olegendo at gcc dot gnu.org
2012-10-12 23:23 ` olegendo at gcc dot gnu.org
2012-10-30  1:26 ` olegendo at gcc dot gnu.org

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