diff options
Diffstat (limited to 'lib/msun/amd64')
-rw-r--r-- | lib/msun/amd64/fenv.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/msun/amd64/fenv.c b/lib/msun/amd64/fenv.c index 95c82de..cf07c8b 100644 --- a/lib/msun/amd64/fenv.c +++ b/lib/msun/amd64/fenv.c @@ -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); } |