From: Mark Hatle <fray@mvista.com>
To: "Albert D. Cahalan" <acahalan@cs.uml.edu>,
linuxppc-dev@lists.linuxppc.org
Subject: Re: giving up the FPU, MSR[FE0], MSR[FE1], and the FPSCR
Date: Fri, 29 Jun 2001 10:16:22 -0500 [thread overview]
Message-ID: <3B3C9BC6.9AD7C208@mvista.com> (raw)
>> While I was puzzling over that (stepping through a SIGFPE handler in
>> gdb), I noticed something disturbing: some newly created processes
>> (grep and more and other random programs) started dying with unhandled
>> "Floating point exception" messages. I'm at a loss to explain this,
>> but I saw it happen often enough to be convinced that I'm not imagining
>> the behavior. I do wonder whether "lazily" enabling the FPU (and
> enabling FPU exceptions) when FPSCR[FEX] may be set is really a good
>> idea.
>...
>> I guess that I'm reporting a bug (or a few bugs) here; I certainly
>> understand the motivation behind doing lazy FPU switching, but question
>> whether it's done with adequate care when FP exceptions are enabled.
>
>It is a bad idea, because gcc now uses FP registers to copy structs.
>Every program can be an FP program now, so why add complexity and
>keep taking traps?
One thing to keep in mind, GCC is perfectly capable of compiling without
using floating point. I routinely use code that has no floating point
compiled in (including glibc). If you build a system with -msoft-float
(libraries through the apps) then the FPU never gets enabled and your
context switching is faster. (Is this measurable? I'm not sure.
But..) The system "seems" to preform better.
Lazy FPU initialization IMHO is a good thing for single purpose
(embedded?) systems that are on a high end CPU, but do not need floating
point. One example could be a signal processing system that uses
altivec and integer math heavily, but no floating point.
--Mark Hatle
MontaVista Software, Inc.
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
next reply other threads:[~2001-06-29 15:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-06-29 15:16 Mark Hatle [this message]
2001-06-29 18:29 ` giving up the FPU, MSR[FE0], MSR[FE1], and the FPSCR Albert D. Cahalan
2001-06-29 21:03 ` Mark Hatle
-- strict thread matches above, loose matches on Subject: below --
2001-06-28 22:32 Albert D. Cahalan
2001-06-26 14:10 Gary Byers
2001-07-07 1:07 ` Paul Mackerras
2001-07-09 17:41 ` Dan Malek
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=3B3C9BC6.9AD7C208@mvista.com \
--to=fray@mvista.com \
--cc=acahalan@cs.uml.edu \
--cc=linuxppc-dev@lists.linuxppc.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 NNTP newsgroup(s).