public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rsandifo at redhat dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/13704] Regression: Spurious register saves with setjmp on MIPS (and others?) (crosscompiling)
Date: Fri, 16 Jan 2004 08:40:00 -0000	[thread overview]
Message-ID: <20040116084034.12574.qmail@sources.redhat.com> (raw)
In-Reply-To: <20040115223101.13704.oneill+gccbugs@cs.hmc.edu>


------- Additional Comments From rsandifo at redhat dot com  2004-01-16 08:40 -------
Subject: Re:  New: Regression: Spurious register saves with
 setjmp on MIPS (and others?) (crosscompiling)

Thanks for the detailed bug report btw.  As Andrew says, the problem
of saving more registers than necessary won't be solved for 3.3.
However...

"oneill+gccbugs at cs dot hmc dot edu" <gcc-bugzilla@gcc.gnu.org> writes:
> Since the cross compiler was configured with --nfp, this is especially
> bad, it's emiting floating point instructions for a program that
> doesn't use fp, on a platform that doesn't support it.

Note that --nfp doesn't do anything for MIPS.  As the documentation says:

    @item --nfp
    Specify that the machine does not have a floating point unit.  This
    option only applies to @samp{m68k-sun-sunos@var{n}}.  On any other
    system, @option{--nfp} has no effect.

With 3.3 and earlier, there is no standard way of creating a "soft float
by default" configuration.  You either need to add a new configuration
triplet to config.gcc or pass -msoft-float each time you run the compiler.

With 3.4, you can configure using --with-float=soft, which is supported
for MIPS and for several other targets.

So you should be able to create correct, but still suboptimal,
code by passing -msoft-float to a stock version of 3.2 or 3.3.
If you don't do this, there's a danger the compiler could use
fprs in other contexts besides setjmp() calls.

Richard


-- 


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


      parent reply	other threads:[~2004-01-16  8:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-15 22:31 [Bug c/13704] New: " oneill+gccbugs at cs dot hmc dot edu
2004-01-15 22:40 ` [Bug c/13704] " pinskia at gcc dot gnu dot org
2004-01-15 23:18 ` oneill+gccbugs at cs dot hmc dot edu
2004-01-16  8:40 ` rsandifo at redhat dot com [this message]

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=20040116084034.12574.qmail@sources.redhat.com \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).