From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12587 invoked by alias); 16 Jan 2004 08:40:36 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 12575 invoked by alias); 16 Jan 2004 08:40:34 -0000 Date: Fri, 16 Jan 2004 08:40:00 -0000 Message-ID: <20040116084034.12574.qmail@sources.redhat.com> From: "rsandifo at redhat dot com" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20040115223101.13704.oneill+gccbugs@cs.hmc.edu> References: <20040115223101.13704.oneill+gccbugs@cs.hmc.edu> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c/13704] Regression: Spurious register saves with setjmp on MIPS (and others?) (crosscompiling) X-Bugzilla-Reason: CC X-SW-Source: 2004-01/txt/msg01850.txt.bz2 List-Id: ------- 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" 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