[lkml]   [2001]   [Mar]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: RFC: changing precision control setting in initial FPU context
Alan Cox <> 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

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

Kevin <>
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:29    [W:0.039 / U:5.620 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site