public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Joel Sherrill <joel.sherrill@OARcorp.com>
To: Mark Mitchell <mark@codesourcery.com>
Cc: Richard Henderson <rth@redhat.com>, Mike Stump <mrs@apple.com>,
	Geoff Keating <geoffk@geoffk.org>,
	"steby@enea.se" <steby@enea.se>,
	"gcc@gcc.gnu.org" <gcc@gcc.gnu.org>
Subject: Re: GCC floating point usage
Date: Wed, 16 Oct 2002 14:56:00 -0000	[thread overview]
Message-ID: <3DADCF57.10BFB2B8@OARcorp.com> (raw)
In-Reply-To: <360570000.1034800416@warlock.codesourcery.com>



Mark Mitchell wrote:
> 
> > I think that the proper solution to this to have a mode in which
> > the compiler does not *prefer* to use FP registers for integral
> > data.  But the assembler would set a bit if any FP registers are
> > used, which would then be collected by the linker to indicate
> > whether or not the process as a whole uses FP registers.
> 
> This is a dynamic property; not a static one.  Linking in printf is
> fine, if you never call it with "%g", and you know that it doesn't
> use floating-point registers otherwise.  You don't want two printfs;
> memory is tight, and you want to be able to share your one printf
> between tasks.

As an aside which will have to be rechecked when this all settles,
at one point, the code generated for the newlib printf actually 
touched the FPU even if you did not use a FP format specifier.  I
believe
this was triggered by having local float/double variables even
though they were not used.  I recall that the code was modified to
add local scope blocks and declare them closer to the point of
use.
 
> You just don't want the compiler to generate FP register moves for
> integer programs.

Right.  Also at least the HPPA port used to do integer multiplies
in the FPU so move may not be the only case.

> > Anything less is asking for trouble.
> 
> Yes, programmers have to be very careful not to accidentally let FP
> slip into no-FP tasks.  But, hey, we're in C on embedded systems; we
> have to be careful about lots of things.  This is just one more...

Yes.  And given a tiny bit of hardware help, the run-time can enforce
that no-FP tasks do not utilize the FPU. 

> --
> Mark Mitchell                mark@codesourcery.com
> CodeSourcery, LLC            http://www.codesourcery.com

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel@OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
Support Available                (256) 722-9985

  reply	other threads:[~2002-10-16 20:43 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-14  9:59 Stefan Bylund
2002-10-14 10:16 ` David Edelsohn
2002-10-14 10:25   ` Zack Weinberg
2002-10-14 10:55     ` Dale Johannesen
2002-10-14 22:22     ` Mark Mitchell
2002-10-15 15:35       ` Geoff Keating
2002-10-15 16:10         ` Mark Mitchell
2002-10-15 17:20           ` Geoff Keating
2002-10-15 18:09             ` Mark Mitchell
2002-10-16  7:40               ` Joel Sherrill
2002-10-15 19:04             ` Mike Stump
2002-10-16 12:06               ` Mark Mitchell
2002-10-16 13:35                 ` Geoff Keating
2002-10-16 14:29                   ` Mark Mitchell
2002-10-16 14:56                     ` Michael Matz
2002-10-16 15:03                       ` Mark Mitchell
2002-10-16 15:27                         ` David Edelsohn
2002-10-16 15:36                           ` Mark Mitchell
2002-10-16 16:35                             ` Zack Weinberg
2002-10-16 16:36                               ` Mark Mitchell
2002-10-16 16:46                             ` David Edelsohn
2002-10-17  8:37                             ` Paul Koning
2002-10-16 17:57                           ` Mike Stump
2002-10-17  4:12                   ` Mike Stump
2002-10-16 13:43               ` Richard Henderson
2002-10-16 14:35                 ` Mark Mitchell
2002-10-16 14:56                   ` Joel Sherrill [this message]
2002-10-16 16:38                   ` Richard Henderson
2002-10-16 16:53                     ` Zack Weinberg
2002-10-16 17:52                       ` Michael Matz
2002-10-16 22:50                       ` Richard Henderson
2002-10-21 12:21                         ` Jeff Law
2002-10-16 17:29                 ` Mike Stump
2002-10-17  2:19                   ` Richard Henderson
2002-10-15 17:19         ` Mike Stump
2002-10-15 18:41         ` Zack Weinberg
2002-10-16  1:48           ` Fergus Henderson
2002-10-14 10:37   ` Stefan Bylund
2002-10-14 11:28     ` Mike Stump
2002-10-14 12:39       ` Joel Sherrill

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=3DADCF57.10BFB2B8@OARcorp.com \
    --to=joel.sherrill@oarcorp.com \
    --cc=gcc@gcc.gnu.org \
    --cc=geoffk@geoffk.org \
    --cc=mark@codesourcery.com \
    --cc=mrs@apple.com \
    --cc=rth@redhat.com \
    --cc=steby@enea.se \
    /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).