The doc I have state in several places:
"The denormals-are-zeros mode was introduced in the Pentium 4 processor
with the SSE2 extensions."
Maybe I should download a newer doc from Intel. The one I have states
that DAZ is associated with sse2, and does not speak at _all_ of the
MXCSR_MASK field (I have seen it in my x86_64 doc though).
>
> > /*
> > * The _current_ task is using the FPU for the first time
> > * so initialize it and set the mxcsr to its default
> >@@ -208,7 +214,7 @@
> > void set_fpu_mxcsr( struct task_struct *tsk, unsigned short mxcsr )
> > {
> > if ( cpu_has_xmm ) {
> >- tsk->thread.i387.fxsave.mxcsr = (mxcsr & 0xffbf);
> >+ tsk->thread.i387.fxsave.mxcsr = (mxcsr & MXCSR_MASK);
>
>
> intel and x64 doc advocate to use
>
> mxcsr &= tsk->thread.i387.fxsave.mxscr_mask
> ? 0xffbf : tsk->thread.i387.fxsave.mxscr_mask;
> tsk->thread.i387.fxsave.mxscr = mxcsr;
>
> with mxscr_mask the 16 upper bits of field currently named
> mxscr in fxsave area. This bits was zeroed by previous processor
> so this must be backward compatible.
So the question is, are there processors in the wild which have DAZ but
still clear the MXCSR_MASK field?
It's simply a matter of rewriting the MXCSR_MASK macro, but to avoid
a conditional, I'd rather have a global mxcsr_mask variable somewhere
with the cpu feature flags.
Gabriel
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/