|
|
1.1 root 1: /*
2: * /usr/include/ieeefp.h
3: *
4: * Describes the stack frame presented to a user signal handler,
5: * including (optional) floating point context.
6: *
7: * Revised Mon Mar 22 13:11:43 1993 CST
8: */
9:
10: #ifndef __IEEEFP_H__
11: #define __IEEEFP_H__
12:
13: /*
14: * The following magic numbers index the "reg" part of a saved signal context.
15: * These numbers *must* correspond to the structure offsets in the
16: * <common/_gregset.h> header for this to work.
17: */
18:
19: #define SS 18
20: #define UESP 17
21: #define EFL 16
22: #define CS 15
23: #define EIP 14
24: #define ERR 13
25: #define TRAPNO 12
26: #define EAX 11
27: #define ECX 10
28: #define EDX 9
29: #define EBX 8
30: #define ESP 7
31: #define EBP 6
32: #define ESI 5
33: #define EDI 4
34: #define DS 3
35: #define ES 2
36: #define FS 1
37: #define GS 0
38:
39:
40: /*
41: * "fpem" objects are for floating point emulation.
42: *
43: * The stackframe passed to a signal handler includes a pointer "fpsp".
44: * This pointer is a (struct _fpstate *) when a true coprocessor is in use.
45: * It is actually a (struct _fpemstate *), and must be cast thus, when
46: * the emulator is used.
47: * The declaration of "fpsp" is kept as (struct _fpstate *) for BCS
48: * compatibility.
49: */
50:
51: struct _fpem_reg {
52: char sign;
53: char tag;
54: long exp;
55: unsigned sigl;
56: unsigned sigh;
57: };
58:
59: struct _fpstackframe {
60: long signo;
61: long regs[SS+1];
62: struct _fpstate *fpsp;
63: char *wsp;
64: };
65:
66: struct _fpreg {
67: unsigned short significand[4];
68: unsigned short exponent;
69: };
70:
71: struct _fpstate {
72: unsigned long cw,
73: sw,
74: tag,
75: ipoff,
76: cssel,
77: dataoff,
78: datasel;
79: struct _fpreg _st[8];
80: unsigned long status;
81: };
82:
83: struct _fpemstate {
84: unsigned long cw,
85: sw,
86: tag,
87: ipoff,
88: cssel,
89: dataoff,
90: datasel,
91: top;
92: struct _fpem_reg regs[8]; /* pseudo regs */
93: unsigned char lookahead;
94: unsigned long status,
95: entry_eip;
96: };
97:
98: /* For kernel context in u area, which keeps either emulator or ndp status. */
99: union _fpcontext {
100: struct _fpstate fpstate;
101: struct _fpemstate fpemstate;
102: };
103:
104: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.