Re: FPU precision & signal handlers (bug?)

From: Gabriel Paubert (paubert@iram.es)
Date: Fri Mar 08 2002 - 07:11:22 EST


On 8 Mar 2002, Alan Cox wrote:

> > I agree with the second part, but actually what you want is to start with
> > an empty stack. Whether the contents are FP or MMX is irrelevant.
> > Actually the support of applications using MMX did not require any change
> > to the kernel (Intel carefully designed it that way).
>
> Not the case. If you drop into a signal or exception handler and it uses
> FPU while MMX is on it'll get a nasty shock. As it happens Linux already
> did the right thing.

You are in for the same shock if you the FPU is in non MMX mode. Think of
the case when all stack entries are marked valid in the interrupted
process: stack overflow on the first fld.

Or alernatively show me how you could simplify the signal delivery FPU
logic for non MMX processor.

Answer: you can't. I still stand by my statement that MMX is
completely irrelevant and does not add any special case.

> Intel minimised it and did pretty much the best job that could be done for
> it.

Better than this, they made it completely transparent.

        Gabriel.

-
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/



This archive was generated by hypermail 2b29 : Fri Mar 15 2002 - 22:00:08 EST