Remove an unneeded fnstcw instruction.
Noticed by: bde
This commit is contained in:
parent
cc0d85b680
commit
3cb636ce18
@ -72,16 +72,14 @@ feraiseexcept(int excepts)
|
||||
int
|
||||
fegetenv(fenv_t *envp)
|
||||
{
|
||||
int control;
|
||||
|
||||
/*
|
||||
* fnstenv masks all exceptions, so we need to save and
|
||||
* restore the control word to avoid this side effect.
|
||||
*/
|
||||
__fnstcw(&control);
|
||||
__fnstenv(&envp->__x87);
|
||||
__stmxcsr(&envp->__mxcsr);
|
||||
__fldcw(control);
|
||||
/*
|
||||
* fnstenv masks all exceptions, so we need to restore the
|
||||
* control word to avoid this side effect.
|
||||
*/
|
||||
__fldcw(envp->__x87.__control);
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
@ -117,19 +117,18 @@ feraiseexcept(int excepts)
|
||||
int
|
||||
fegetenv(fenv_t *envp)
|
||||
{
|
||||
int control, mxcsr;
|
||||
int mxcsr;
|
||||
|
||||
/*
|
||||
* fnstenv masks all exceptions, so we need to save and
|
||||
* restore the control word to avoid this side effect.
|
||||
*/
|
||||
__fnstcw(&control);
|
||||
__fnstenv(envp);
|
||||
/*
|
||||
* fnstenv masks all exceptions, so we need to restore
|
||||
* the old control word to avoid this side effect.
|
||||
*/
|
||||
__fldcw(envp->__control);
|
||||
if (__HAS_SSE()) {
|
||||
__stmxcsr(&mxcsr);
|
||||
__set_mxcsr(*envp, mxcsr);
|
||||
}
|
||||
__fldcw(control);
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user