public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: target/5352: Combonation of SPARC options -mflat -mno-epilogue results in bad code
@ 2002-03-30 19:17 rth
  0 siblings, 0 replies; 2+ messages in thread
From: rth @ 2002-03-30 19:17 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, leob, nobody, rth

Synopsis: Combonation of SPARC options -mflat -mno-epilogue results in bad code

Responsible-Changed-From-To: unassigned->rth
Responsible-Changed-By: rth
Responsible-Changed-When: Sat Mar 30 19:17:12 2002
Responsible-Changed-Why:
    .
State-Changed-From-To: open->closed
State-Changed-By: rth
State-Changed-When: Sat Mar 30 19:17:12 2002
State-Changed-Why:
    http://gcc.gnu.org/ml/gcc-patches/2002-03/msg02077.html
    
    Perhaps not the resolution you wanted, but...

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5352


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

* target/5352: Combonation of SPARC options -mflat -mno-epilogue results in bad code
@ 2002-01-10 13:36 leob
  0 siblings, 0 replies; 2+ messages in thread
From: leob @ 2002-01-10 13:36 UTC (permalink / raw)
  To: gcc-gnats


>Number:         5352
>Category:       target
>Synopsis:       Combonation of SPARC options -mflat -mno-epilogue results in bad code
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          wrong-code
>Submitter-Id:   net
>Arrival-Date:   Thu Jan 10 13:36:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     leob@mailcom.com
>Release:        gcc 3.0.2
>Organization:
>Environment:
SunOS 5.7 Generic_106541-02 sun4u sparc SUNW,Ultra-60
>Description:
Compiling any code with -mflat -mno-epilogue results in bad code:

main() { } 

becomes

main:
        !#PROLOGUE# 0
        !# vars= 0, regs= 1/0, args= 0, extra= 84
        add     %sp, -88, %sp
        st      %i7, [%sp+68]
        sub     %sp, -88, %i7   !# set up frame pointer
        !#PROLOGUE# 1
        mov     0, %o0
        return  %i7+8		<--- jumps to stack
         nop
        !#EPILOGUE#
        sub     %i7, 88, %sp            !# sp not trusted here
        ld      [%sp+68], %i7
        retl
        add     %sp, 88, %sp

or, with -fomit-frame-pointer, simply

main:
        !#PROLOGUE# 0
        !# vars= 0, regs= 0/0, args= 0, extra= 0
        !#PROLOGUE# 1
        mov     0, %o0
        return  %i7+8		<-- returns 2 levels up, or to stack
         nop
        !#EPILOGUE#
>How-To-Repeat:
Compile with -mflat -mno-epilogue.
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


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

end of thread, other threads:[~2002-03-31  3:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-30 19:17 target/5352: Combonation of SPARC options -mflat -mno-epilogue results in bad code rth
  -- strict thread matches above, loose matches on Subject: below --
2002-01-10 13:36 leob

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