]>
Commit | Line | Data |
---|---|---|
847b055c | 1 | /* FPU control word definitions. Stub version. |
528be9fe AJ |
2 | Copyright (C) 2000 Free Software Foundation, Inc. |
3 | Contributed by Denis Joseph Barrow (djbarrow@de.ibm.com) and | |
847b055c | 4 | Martin Schwidefsky (schwidefsky@de.ibm.com). |
528be9fe | 5 | |
847b055c AJ |
6 | 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 Library General Public License as | |
9 | published by the Free Software Foundation; either version 2 of the | |
10 | 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 | Library General Public License for more details. | |
16 | ||
17 | You should have received a copy of the GNU Library General Public | |
18 | License along with the GNU C Library; see the file COPYING.LIB. If not, | |
19 | write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
20 | Boston, MA 02111-1307, USA. */ | |
21 | ||
22 | #ifndef _FPU_CONTROL_H | |
23 | # define _FPU_CONTROL_H | |
24 | ||
25 | # include <features.h> | |
26 | ||
27 | /* These bits are reserved are not changed. */ | |
28 | # define _FPU_RESERVED 0x070700FC | |
29 | ||
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. */ | |
33 | ||
34 | /* Type of the control word. */ | |
35 | typedef unsigned int fpu_control_t; | |
36 | ||
37 | /* Macros for accessing the hardware control word. */ | |
528be9fe AJ |
38 | #define _FPU_GETCW(cw) __asm__ volatile ("efpc %0,0" : "=d" (cw)) |
39 | #define _FPU_SETCW(cw) __asm__ volatile ("sfpc %0,0" : : "d" (cw)) | |
847b055c AJ |
40 | |
41 | /* Default control word set at startup. */ | |
42 | extern fpu_control_t __fpu_control; | |
43 | ||
44 | #endif /* _FPU_CONTROL_H */ |