public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: Andrew Pinski <pinskia@physics.uc.edu>
To: nobody@gcc.gnu.org
Cc: gcc-prs@gcc.gnu.org,
Subject: Re: optimization/7005: Sibling and tail recursive calls optimisation with -fomit-frame-pointer: strange code generated.
Date: Wed, 12 Jun 2002 06:46:00 -0000	[thread overview]
Message-ID: <20020612134604.2645.qmail@sources.redhat.com> (raw)

The following reply was made to PR optimization/7005; it has been noted by GNATS.

From: Andrew Pinski <pinskia@physics.uc.edu>
To: fshvaige@cisco.com
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: optimization/7005: Sibling and tail recursive calls optimisation with -fomit-frame-pointer: strange code generated.
Date: Wed, 12 Jun 2002 09:36:09 -0400 (EDT)

 This has been fixed in gcc version 3.2 20020607 (experimental) at least for the i686 version.
 I did not check the ppc-eabi version but I do not think that the PowerPC version can be changed because the abi specifies this.
 
 Thanks,
 Andrew Pinski
 
 
 > >Description:
 > File test2.c:
 > 
 > int f1 (void);
 > int f2 (void) {
 >   return f1 ();
 > }
 > 
 > i686 -Os (best code):
 > 
 > f2:
 >   jmp     f1
 > 
 > i686 -O2/-O3 (Ooops):
 > 
 > f2:
 >   subl  $12, %esp
 >   addl  $12, %esp
 >   jmp f1
 > 
 > PowerPC -Os/-O2/-O3 (Ooops):
 > 
 > f2:
 >   stwu 1,-8(1)
 >   mflr 0
 >   stw 0,12(1)
 >   bl f1 
 >   lwz 0,12(1)
 >   addi 1,1,8 
 >   mtlr 0
 >   blr   
 > >How-To-Repeat:
 > gcc -S -Os test2.c -Wall -fomit-frame-pointer
 > gcc -S -O2 test2.c -Wall -fomit-frame-pointer
 > gcc -S -O3 test2.c -Wall -fomit-frame-pointer
 > ppc-eabi-gcc -S -Os test2.c -Wall -fomit-frame-pointer
 > ppc-eabi-gcc -S -O2 test2.c -Wall -fomit-frame-pointer
 > ppc-eabi-gcc -S -O3 test2.c -Wall -fomit-frame-pointer
 


             reply	other threads:[~2002-06-12 13:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-12  6:46 Andrew Pinski [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-06-14 16:35 rth
2002-06-12  6:16 fshvaige

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020612134604.2645.qmail@sources.redhat.com \
    --to=pinskia@physics.uc.edu \
    --cc=gcc-prs@gcc.gnu.org \
    --cc=nobody@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).