These instructions have a lot of reserved and "ignored" space in their storage area. Does anybody know if I can use them for own purposes (thread state) or whether they do overwrite (or at least, invalidate) it?
TIA
FXSAVE / FXRSTOR
Re:FXSAVE / FXRSTOR
Rule #1 when working with interfaces: Always mask out reserved space. That space is reserved. By no means use it for your own purpose. You will be sorry later (for example, when later generations of Intel CPUs introduce yet new FPU registers, using previously reserved space and breaking your code).
If Intel reserved space, only Intel must ever use that space.
In the early days of the MC680x0 CPU, when only 24 bits of the 32 bit address registers actually had address lines connected to them, people used the remaining 8 bits for "tricky stuff". Which, of course, broke violently on later, "true" 32 bit CPU generations.
If Intel reserved space, only Intel must ever use that space.
In the early days of the MC680x0 CPU, when only 24 bits of the 32 bit address registers actually had address lines connected to them, people used the remaining 8 bits for "tricky stuff". Which, of course, broke violently on later, "true" 32 bit CPU generations.
Every good solution is obvious once you've found it.