]> git.ipfire.org Git - thirdparty/glibc.git/blob - sysdeps/s390/fpu/fpu_control.h
cb8bca2c5613d6a9e05be10d79c0f36d4d0ac99a
[thirdparty/glibc.git] / sysdeps / s390 / fpu / fpu_control.h
1 /* FPU control word definitions. Stub version.
2 Copyright (C) 2000-2018 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.
6
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.
11
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.
16
17 You should have received a copy of the GNU Lesser General Public
18 License along with the GNU C Library; if not, see
19 <http://www.gnu.org/licenses/>. */
20
21 #ifndef _FPU_CONTROL_H
22 #define _FPU_CONTROL_H
23
24 #include <features.h>
25
26 /* These bits are reserved are not changed. */
27 #define _FPU_RESERVED 0x0707FFFC
28
29 /* The fdlibm code requires no interrupts for exceptions. Don't
30 change the rounding mode, it would break long double I/O! */
31 #define _FPU_DEFAULT 0x00000000 /* Default value. */
32
33 /* Type of the control word. */
34 typedef unsigned int fpu_control_t;
35
36 /* Macros for accessing the hardware control word. */
37 #define _FPU_GETCW(cw) __asm__ __volatile__ ("efpc %0,0" : "=d" (cw))
38 #define _FPU_SETCW(cw) __asm__ __volatile__ ("sfpc %0,0" : : "d" (cw))
39
40 /* Default control word set at startup. */
41 extern fpu_control_t __fpu_control;
42
43 #endif /* _FPU_CONTROL_H */