linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: buhr@stat.wisc.edu (Kevin Buhr)
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: linux-kernel@vger.kernel.org
Subject: Re: RFC: changing precision control setting in initial FPU context
Date: 03 Mar 2001 18:27:50 -0600	[thread overview]
Message-ID: <vban1b2ped5.fsf@mozart.stat.wisc.edu> (raw)
In-Reply-To: <E14ZLat-0004Js-00@the-village.bc.nu>
In-Reply-To: Alan Cox's message of "Sat, 3 Mar 2001 23:37:45 +0000 (GMT)"

Alan Cox <alan@lxorguk.ukuu.org.uk> writes:
> 
> You want peoples existing applications to suddenely and magically change
> their results. Umm problem.

So, how would you feel about a mechanism whereby the kernel could be
passed a default FPU control word by the binary (with old binaries, by
default, using the old default control word)?  There's already an ELF
AT_FPUCW auxv entry type.  What if this was used by the kernel, rather
than the C library (as it is now), to set a default to be used in
"init_fpu()" when and if the program executed a floating point
instruction?

Then, a compiler startup-code writer would be able to specify a
default control word for binaries that was appropriate for (new)
programs generated by that compiler *WITHOUT* worrying about whether
he was accidentally turning a non-FP program into an FP program by
introducing "fnstcw" as its only FPU instruction.

The C library is already trying to do this (setting the CW based on
the AT_FPUCW vector).  It just can't do it *right* because it doesn't
know if the program is really FP.  It just guesses that if the
AT_FPUCW vector contains something other than the hard-coded
_FPU_DEFAULT (which is supposed to be equal to the kernel default: it
isn't, but it's close enough), it must be set; otherwise, it's left
alone.

Kevin <buhr@stat.wisc.edu>

  reply	other threads:[~2001-03-04  0:28 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-03 10:47 RFC: changing precision control setting in initial FPU context Adam J. Richter
2001-03-03 23:29 ` Kevin Buhr
2001-03-03 23:37   ` Alan Cox
2001-03-04  0:27     ` Kevin Buhr [this message]
2001-03-04  0:45       ` Ulrich Drepper
  -- strict thread matches above, loose matches on Subject: below --
2001-03-03  7:12 Kevin Buhr
2001-03-03  9:31 ` Albert D. Cahalan
2001-03-03 10:26   ` Kevin Buhr
2001-03-03 20:04     ` Albert D. Cahalan
2001-03-03 21:00       ` Jason Riedy
2001-03-03 23:17         ` Kevin Buhr
2001-03-04  4:21           ` Jason Riedy
2001-03-03 22:34       ` Kevin Buhr

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=vban1b2ped5.fsf@mozart.stat.wisc.edu \
    --to=buhr@stat.wisc.edu \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.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).