Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: "Kevin D. Kissell" <kevink@mips.com>
To: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>
Cc: "Jun Sun" <jsun@mvista.com>, <linux-mips@oss.sgi.com>
Subject: Re: config option vs. run-time detection (the debate continues ...)
Date: Fri, 9 Feb 2001 13:56:44 +0100	[thread overview]
Message-ID: <009c01c09297$c78b8360$0deca8c0@Ulysses> (raw)
In-Reply-To: Pine.GSO.3.96.1010209123643.4645B-100000@delta.ds2.pg.gda.pl

> Let me remind the actual problem the discussion started from was whether
> we want to hardcode FP hw presence based on a CPU identification or to
> check for it explicitly.  I hope we agree the latter is saner.

Absolutely.

>  But the code that needs to know whether there is a real FPU present is
> indeed minimal (as it should be) thus the gain from removing the detection
> altogether in favour to a config option is at least questionable if not
> insane.

Well, I might not have put it that strongly, but I quite agree.

> > My own recommendation would be to either have
> > full FP support for binaries or none at all.  If someone
> > really wants to put the FPU-specific assembler
> > routines under a different conditional, that's cool, but
> > the configuration options should be such that the
> > (c) cannot be generated by the config scripts.
>
>  I think I may research what the gain from leaving parts of the FPU
> emulator apart would be for systems that have FP hw.

Surprisingly little.  Basically, you could remove emulation
for moves, loads, and stores.  Any instruction that actually
computes a value can potentially turn out to be unimplemented,
depending on the inputs.  If you *knew* you had an FPU, you
could also make the emulation fractionallly more efficient by
having it operate directly on the FP registers.  When the current
kernels emulate an instruction that failed on a HW FPU,
they copy the HW FPU state into the software FPU
registers, invoke the emulator, and when the emulation
has completed, restore the HW FPU state.  It made for
a clean interface to do things that way, and my
judgement was that the operation was too infrequent
to justify complicating things further.

> It's not a priority
> task for me at the moment -- the current configuration works and having
> unused code in a running kernel is ugly but non-fatal.

"If it ain't broke..."

            Kevin K.

WARNING: multiple messages have this Message-ID (diff)
From: "Kevin D. Kissell" <kevink@mips.com>
To: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>
Cc: Jun Sun <jsun@mvista.com>, linux-mips@oss.sgi.com
Subject: Re: config option vs. run-time detection (the debate continues ...)
Date: Fri, 9 Feb 2001 13:56:44 +0100	[thread overview]
Message-ID: <009c01c09297$c78b8360$0deca8c0@Ulysses> (raw)
Message-ID: <20010209125644.4y5SVetKHv-yJw8NI9a_dQalR4IzrYnGXvrLLitbdrY@z> (raw)
In-Reply-To: Pine.GSO.3.96.1010209123643.4645B-100000@delta.ds2.pg.gda.pl

> Let me remind the actual problem the discussion started from was whether
> we want to hardcode FP hw presence based on a CPU identification or to
> check for it explicitly.  I hope we agree the latter is saner.

Absolutely.

>  But the code that needs to know whether there is a real FPU present is
> indeed minimal (as it should be) thus the gain from removing the detection
> altogether in favour to a config option is at least questionable if not
> insane.

Well, I might not have put it that strongly, but I quite agree.

> > My own recommendation would be to either have
> > full FP support for binaries or none at all.  If someone
> > really wants to put the FPU-specific assembler
> > routines under a different conditional, that's cool, but
> > the configuration options should be such that the
> > (c) cannot be generated by the config scripts.
>
>  I think I may research what the gain from leaving parts of the FPU
> emulator apart would be for systems that have FP hw.

Surprisingly little.  Basically, you could remove emulation
for moves, loads, and stores.  Any instruction that actually
computes a value can potentially turn out to be unimplemented,
depending on the inputs.  If you *knew* you had an FPU, you
could also make the emulation fractionallly more efficient by
having it operate directly on the FP registers.  When the current
kernels emulate an instruction that failed on a HW FPU,
they copy the HW FPU state into the software FPU
registers, invoke the emulator, and when the emulation
has completed, restore the HW FPU state.  It made for
a clean interface to do things that way, and my
judgement was that the operation was too infrequent
to justify complicating things further.

> It's not a priority
> task for me at the moment -- the current configuration works and having
> unused code in a running kernel is ugly but non-fatal.

"If it ain't broke..."

            Kevin K.

  reply	other threads:[~2001-02-09 12:53 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-08 20:27 config option vs. run-time detection (the debate continues ...) Jun Sun
2001-02-08 22:06 ` Kevin D. Kissell
2001-02-08 22:06   ` Kevin D. Kissell
2001-02-08 22:58   ` Jun Sun
2001-02-09  0:25     ` Kevin D. Kissell
2001-02-09  0:25       ` Kevin D. Kissell
2001-02-09 11:48       ` Maciej W. Rozycki
2001-02-09 12:56         ` Kevin D. Kissell [this message]
2001-02-09 12:56           ` Kevin D. Kissell
2001-02-09 13:06           ` Maciej W. Rozycki
2001-02-09 19:59         ` Jun Sun
2001-02-09 20:39           ` Maciej W. Rozycki
2001-02-09 21:31             ` Jun Sun
2001-02-10  9:01               ` Maciej W. Rozycki
2001-02-12 18:21                 ` Jun Sun
2001-02-13 18:31                   ` Maciej W. Rozycki
2001-02-09 22:12             ` Kevin D. Kissell
2001-02-09 22:12               ` Kevin D. Kissell
2001-02-10  9:05               ` Maciej W. Rozycki
2001-02-09 19:58     ` Florian Lohoff

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='009c01c09297$c78b8360$0deca8c0@Ulysses' \
    --to=kevink@mips.com \
    --cc=jsun@mvista.com \
    --cc=linux-mips@oss.sgi.com \
    --cc=macro@ds2.pg.gda.pl \
    /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