2.9
[glibc/nacl-glibc.git] / sysdeps / s390 / fpu / fpu_control.h
blob137a4d5d4e0e204312b656cf3deb2332cd997462
1 /* FPU control word definitions. Stub version.
2 Copyright (C) 2000 Free Software Foundation, Inc.
3 Contributed by Denis Joseph Barrow (djbarrow@de.ibm.com) and
4 Martin Schwidefsky (schwidefsky@de.ibm.com).
5 This file is part of the GNU C Library.
7 The GNU C Library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation; either
10 version 2.1 of the License, or (at your option) any later version.
12 The GNU C Library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Lesser General Public License for more details.
17 You should have received a copy of the GNU Lesser General Public
18 License along with the GNU C Library; if not, write to the Free
19 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
20 02111-1307 USA. */
22 #ifndef _FPU_CONTROL_H
23 # define _FPU_CONTROL_H
25 # include <features.h>
27 /* These bits are reserved are not changed. */
28 # define _FPU_RESERVED 0x070700FC
30 /* The fdlibm code requires no interrupts for exceptions. Don't
31 change the rounding mode, it would break long double I/O! */
32 #define _FPU_DEFAULT 0x00000000 /* Default value. */
34 /* Type of the control word. */
35 typedef unsigned int fpu_control_t;
37 /* Macros for accessing the hardware control word. */
38 #define _FPU_GETCW(cw) __asm__ volatile ("efpc %0,0" : "=d" (cw))
39 #define _FPU_SETCW(cw) __asm__ volatile ("sfpc %0,0" : : "d" (cw))
41 /* Default control word set at startup. */
42 extern fpu_control_t __fpu_control;
44 #endif /* _FPU_CONTROL_H */