Re: FPU precision & signal handlers (bug?)

Gabriel Paubert
2002-03-07T17:32:34Z

On 6 Mar 2002, Alan Cox wrote:

> > > Think about MMX and hopefully it makes sense then.
> >
> > AFAIR MMX only mucks with tag and status words (and the exponent fields of
> > the stack elements), but never depends on or modifies the control word.
>
> Right but you don't want to end up in MMX mode by suprise in a
> signal handler in library code. By the same argument you don't want to end
> up in a weird maths more.

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).

> I don't think its a bug. I think its correct (but seriously underdocumented)
> behaviour

Indeed.

Gabriel.