Messages in this thread |  | | From | (Ulrich Drepper) | Subject | Re: MMX for kernel | Date | 08 Feb 1997 01:26:43 GMT |
| |
In article <m0vsxdq-000QdzC@nevets.oau.org> ssd@nevets.oau.org (Steven S. Dick) writes:
> >Actually, what we could do is put in better logic to > >determine whether or not the FPU is in use by a task (which is harder > >than you think because crt0 does zero them out, so you have to filter > >out that case) > > Would it be possible (or even useful) to change the crt0 code to > zero the fpu area in the task struct rather than actually touch > the fpu itself?
Tytso's wording wasn't exact. What crt0/crt1 does is to set the FPU status word to the rounding mode etc. This has to be once at the startup since there is no way to control the use of the FPU afterwards.
If you *really* want to do weird things with the FPU and optimize for non-FPU using programs (which are rather infrequent) then you should think about a way to intercept the first status word setup instruction. I don't know how easy and/or useful it is but I don't see a way how on user-level you could implement lazy initialization.
-- -- Uli ---------------. drepper@cygnus.com ,-. Rubensstrasse 5 Ulrich Drepper \ ,-------------------' \ 76149 Karlsruhe/Germany Cygnus Solutions `--' drepper@gnu.ai.mit.edu `------------------------
|  |