/* Enable floating-point exceptions.
- Copyright (C) 2001 Free Software Foundation, Inc.
+ Copyright (C) 2001-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Jaeger <aj@suse.de>, 2001.
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#include <fenv.h>
feenableexcept (int excepts)
{
unsigned short int new_exc, old_exc;
- unsigned int new, old;
+ unsigned int new;
excepts &= FE_ALL_EXCEPT;
__asm__ ("stmxcsr %0" : "=m" (*&new));
/* The SSE exception masks are shifted by 7 bits. */
- old = (~new) & (FE_ALL_EXCEPT << 7);
-
new &= ~(excepts << 7);
__asm__ ("ldmxcsr %0" : : "m" (*&new));