About the use of FXSAVE/FXRSTOR
Posted: Sat Aug 28, 2004 12:19 pm
What are the correct settings to make use of FXSAVE/FXRSTOR instructions ?
When I say "settings", I mean things like "NE", "MP", "TS", "EM" bits of CR0 and "OSFXSR", "OSXMMEXCPT" bits of CR4 ?
My current setting is:
NE=1
MP=1
TS=0
EM=0
OSFXSR=1
OSXMMEXCPT=1
on a Pentium 4 M
I also added a #XF exception handler
I tried to replace my existing fsave/frstor pair by the use of fxsave/fxrstor (I have also aligned the save area to a 16-byte boundary).
It seems to work for about 10-15 seconds (so there must be about 5-6 saves/restores done) and then suddenly, I get an #GP.
Where can it comes from ?
When I say "settings", I mean things like "NE", "MP", "TS", "EM" bits of CR0 and "OSFXSR", "OSXMMEXCPT" bits of CR4 ?
My current setting is:
NE=1
MP=1
TS=0
EM=0
OSFXSR=1
OSXMMEXCPT=1
on a Pentium 4 M
I also added a #XF exception handler
I tried to replace my existing fsave/frstor pair by the use of fxsave/fxrstor (I have also aligned the save area to a 16-byte boundary).
It seems to work for about 10-15 seconds (so there must be about 5-6 saves/restores done) and then suddenly, I get an #GP.
Where can it comes from ?