So what? Of course there's no "correct" x86 setting for all
situations. In this particular situation, you will need to change the
PC on a function-by-function basis. I'm just suggesting there might
be a better *default* PC than the current one.
> That would be an awful idea. There are two main useful behaviors:
>
> 1. Pure IEEE for 32-bit, 64-bit, and 80-bit floating-point values.
> The compiler rounds intermediate values by writing to memory
> or by adjusting the precision control before each operation.
>
> 2. Extra precision when it comes free. The precision control is set
> to 80-bit and the compiler tries to keep values in registers.
> This is usually the more useful behavior, and it performs better.
I find it difficult to believe that anyone would find the second
alternative even remotely comparable in "usefulness" to the first.
The extra precision isn't free; it comes at the expense of predictable
program behavior and compatibility with other i386 and non-i386
architectures.
> What you are suggesting is a gross hybrid. You claim it has something
> to do with IEEE, but it doesn't handle 32-bit math correctly. Your
> proposal is NOT true IEEE math.
What I am suggesting would permit IEEE 64-bit math to be done, in the
default configuration, in any GCC-compiled C program (with or without
optimization) that used only doubles for floating point arithmetic.
The current default PC allows no IEEE compliant GCC-compiled math in
any mode under any circumstances. It also gives unexpected anamolous
results, *and* these results differ from the behavior under FreeBSD,
NetBSD, and most non-Intel platforms.
> Woah, what kind of crap is that???? You can not get true IEEE math
> by setting the precision control word at startup.
You don't; it turns out linking with "ieee" doesn't change the control
word; at one time it did, but the point was never to change the
precision control, it was to switch from POSIX to IEEE exception
handling. And it wasn't my idea.
> Check the archives: the x86 Linux ABI specifies 80-bit precision.
> This will never change. The library is supposed to assume this,
> rather than try to allow for a change that will never happen.
> Linus dished out some nice toasty flames for the libc developers
> over this.
Okay, fine. The Linux ABI can specify whatever the hell it wants.
Then, we should have a way for the library to communicate a preferred
default value to the kernel *WITHOUT* turning on the lazy FPU context
switching for every program.
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/