Okay, okay :-) The more I think about it the more I like this idea.
How about this:
1) FXSAVE into the fxsave part of the above structure. This keeps FPU
exception flags intact.
2) FSAVE into the fsave part of the above structure. This will clear
the FPU exceptions, so must be done second. I'd prefer to just call
this rather than extract the info from the FXSAVE format.
3) Extract the status word from the FSAVE format, and set the fsave
part's status field.
4) Use the high word of the fsave's status field as the magic. I think
this will be the best place for it. This will be 0xffff (I'm fairly
sure FSAVE sets the high part of the status word as this) for the
regular FSAVE format and something else if the FXSAVE format is
included.
So, this will be compatible with applications that don't know about the
FXSAVE format info, and it can be safely determined if the FXSAVE format
info is available.
I like this method as it's still clean and there are no cruft in
extracting the FSAVE info from the FXSAVE format. Do you agree? I
apologize for being completely unreasonable and stubborn, I just got off
a long international flight :-)
-- Gareth
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/