This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/13704] Regression: Spurious register saves with setjmp on MIPS (and others?) (crosscompiling)
- From: "rsandifo at redhat dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Jan 2004 08:40:34 -0000
- Subject: [Bug c/13704] Regression: Spurious register saves with setjmp on MIPS (and others?) (crosscompiling)
- References: <20040115223101.13704.oneill+gccbugs@cs.hmc.edu>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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