diff options
author | das <das@FreeBSD.org> | 2007-01-05 07:15:26 +0000 |
---|---|---|
committer | das <das@FreeBSD.org> | 2007-01-05 07:15:26 +0000 |
commit | aeb763b099f97941d7b8aac8b7db1a173a9a2e62 (patch) | |
tree | 5ae9ffc98cb221b8fd79eecaa8d4fae8fde100c3 /lib/msun/i387 | |
parent | a1794f56b7c706a9bcb1fae4b80756ef64ba8dfe (diff) | |
download | FreeBSD-src-aeb763b099f97941d7b8aac8b7db1a173a9a2e62.zip FreeBSD-src-aeb763b099f97941d7b8aac8b7db1a173a9a2e62.tar.gz |
Remove an unneeded fnstcw instruction.
Noticed by: bde
Diffstat (limited to 'lib/msun/i387')
-rw-r--r-- | lib/msun/i387/fenv.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/msun/i387/fenv.c b/lib/msun/i387/fenv.c index 567d699..ace2d32 100644 --- a/lib/msun/i387/fenv.c +++ b/lib/msun/i387/fenv.c @@ -117,19 +117,18 @@ feraiseexcept(int excepts) int fegetenv(fenv_t *envp) { - int control, mxcsr; + int mxcsr; + __fnstenv(envp); /* - * fnstenv masks all exceptions, so we need to save and - * restore the control word to avoid this side effect. + * fnstenv masks all exceptions, so we need to restore + * the old control word to avoid this side effect. */ - __fnstcw(&control); - __fnstenv(envp); + __fldcw(envp->__control); if (__HAS_SSE()) { __stmxcsr(&mxcsr); __set_mxcsr(*envp, mxcsr); } - __fldcw(control); return (0); } |