Messages in this thread | | | Subject | Re: RFC: changing precision control setting in initial FPU context | From | (Kevin Buhr) | Date | 03 Mar 2001 18:27:50 -0600 |
| |
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> - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |