1
2 #ifndef _ASM_IA64_FPU_H
3 #define _ASM_IA64_FPU_H
4
5
6
7
8
9
10 #include <linux/types.h>
11
12
13 #define FPSR_TRAP_VD (1 << 0)
14 #define FPSR_TRAP_DD (1 << 1)
15 #define FPSR_TRAP_ZD (1 << 2)
16 #define FPSR_TRAP_OD (1 << 3)
17 #define FPSR_TRAP_UD (1 << 4)
18 #define FPSR_TRAP_ID (1 << 5)
19 #define FPSR_S0(x) ((x) << 6)
20 #define FPSR_S1(x) ((x) << 19)
21 #define FPSR_S2(x) (__IA64_UL(x) << 32)
22 #define FPSR_S3(x) (__IA64_UL(x) << 45)
23
24
25 #define FPSF_FTZ (1 << 0)
26 #define FPSF_WRE (1 << 1)
27 #define FPSF_PC(x) (((x) & 0x3) << 2)
28 #define FPSF_RC(x) (((x) & 0x3) << 4)
29 #define FPSF_TD (1 << 6)
30
31
32 #define FPSF_V (1 << 7)
33 #define FPSF_D (1 << 8)
34 #define FPSF_Z (1 << 9)
35 #define FPSF_O (1 << 10)
36 #define FPSF_U (1 << 11)
37 #define FPSF_I (1 << 12)
38
39
40 #define FPRC_NEAREST 0x0
41 #define FPRC_NEGINF 0x1
42 #define FPRC_POSINF 0x2
43 #define FPRC_TRUNC 0x3
44
45 #define FPSF_DEFAULT (FPSF_PC (0x3) | FPSF_RC (FPRC_NEAREST))
46
47
48
49 #define FPSR_DEFAULT (FPSR_TRAP_VD | FPSR_TRAP_DD | FPSR_TRAP_ZD \
50 | FPSR_TRAP_OD | FPSR_TRAP_UD | FPSR_TRAP_ID \
51 | FPSR_S0 (FPSF_DEFAULT) \
52 | FPSR_S1 (FPSF_DEFAULT | FPSF_TD | FPSF_WRE) \
53 | FPSR_S2 (FPSF_DEFAULT | FPSF_TD) \
54 | FPSR_S3 (FPSF_DEFAULT | FPSF_TD))
55
56 # ifndef __ASSEMBLY__
57
58 struct ia64_fpreg {
59 union {
60 unsigned long bits[2];
61 long double __dummy;
62 } u;
63 };
64
65 # endif
66
67 #endif