]> git.ipfire.org Git - thirdparty/glibc.git/blame - sysdeps/s390/fpu/fpu_control.h
Update copyright dates with scripts/update-copyrights.
[thirdparty/glibc.git] / sysdeps / s390 / fpu / fpu_control.h
CommitLineData
847b055c 1/* FPU control word definitions. Stub version.
b168057a 2 Copyright (C) 2000-2015 Free Software Foundation, Inc.
528be9fe 3 Contributed by Denis Joseph Barrow (djbarrow@de.ibm.com) and
847b055c
AJ
4 Martin Schwidefsky (schwidefsky@de.ibm.com).
5 This file is part of the GNU C Library.
41bdb6e2 6
847b055c 7 The GNU C Library is free software; you can redistribute it and/or
41bdb6e2
AJ
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.
847b055c
AJ
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
41bdb6e2 15 Lesser General Public License for more details.
847b055c 16
41bdb6e2 17 You should have received a copy of the GNU Lesser General Public
59ba27a6
PE
18 License along with the GNU C Library; if not, see
19 <http://www.gnu.org/licenses/>. */
847b055c
AJ
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 0x070700FC
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. */
34typedef unsigned int fpu_control_t;
35
36/* Macros for accessing the hardware control word. */
528be9fe
AJ
37#define _FPU_GETCW(cw) __asm__ volatile ("efpc %0,0" : "=d" (cw))
38#define _FPU_SETCW(cw) __asm__ volatile ("sfpc %0,0" : : "d" (cw))
847b055c
AJ
39
40/* Default control word set at startup. */
41extern fpu_control_t __fpu_control;
42
43#endif /* _FPU_CONTROL_H */