Re: Why all glibc2 programs are FPU programs

kwrohrer@ce.mediaone.net
Tue, 26 May 1998 10:19:44 -0500 (CDT)


And lo, Ulrich Drepper saith unto me:
> The problem is that we decide, e.g., about the rounding mode by adding
> -lieee to the link line. This makes the startup code use a different
> value for the control word. But how would you do this if you don't
> have the possibility to set the CW? Since nobody knows when the first
> floating-point instruction is executed we cannot simply say "we make
> it when necessary". Also, there is no way to find out whether a
> certain program will use floating-point instructions at all.
>
> The solution to this which I described several times before is to have
> a system call which allows to tell the kernel which control word to
> use once the process uses floating-point instructions. Then we can
> delay constructing the FPU data structures.
Why a system call? Why not make the trap-FPU code check to see if it's
a set-the-CW instruction (or even only do this check for the very first
FPU instruction a program uses) and set the CW in the context (then
keep FPU off) rather than just blindly starting up the FPU and FPU
registers?

Keith

-- 
"The avalanche has already started; |Linux: http://www.linuxhq.com     |"Zooty,
it is too late for the pebbles to   |KDE:   http://www.kde.org         | zoot
vote." Kosh, "Believers", Babylon 5 |Keith: kwrohrer@enteract.com      | zoot!"
 www.midwinter.com/lurk/lurker.html |http://www.enteract.com/~kwrohrer | --Rebo

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu