lint
[unix-history] / usr / src / sys / i386 / include / npx.h
CommitLineData
4bd1c0bf
WN
1/*-
2 * Copyright (c) 1990 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * William Jolitz.
7 *
e375aed8 8 * %sccs.include.redist.c%
4bd1c0bf 9 *
e375aed8 10 * @(#)npx.h 5.3 (Berkeley) %G%
4bd1c0bf
WN
11 */
12
fd04f4ca 13/*
012d13e8 14 * 287/387 NPX Coprocessor Data Structures and Constants
fd04f4ca
BJ
15 * W. Jolitz 1/90
16 */
17
012d13e8
BJ
18#ifndef ___NPX87___
19#define ___NPX87___
fd04f4ca
BJ
20
21/* Environment information of floating point unit */
22struct env87 {
23 long en_cw; /* control word (16bits) */
24 long en_sw; /* status word (16bits) */
25 long en_tw; /* tag word (16bits) */
26 long en_fip; /* floating point instruction pointer */
27 u_short en_fcs; /* floating code segment selector */
28 u_short en_opcode; /* opcode last executed (11 bits ) */
29 long en_foo; /* floating operand offset */
30 long en_fos; /* floating operand segment selector */
31};
32
33/* Contents of each floating point accumulator */
34struct fpacc87 {
35 u_long fp_mantlo; /* mantissa low (31:0) */
36 u_long fp_manthi; /* mantissa high (63:32) */
37 int fp_exp:15; /* exponent */
38 int fp_sgn:1; /* mantissa sign */
39};
40
41/* Floating point context */
42struct save87 {
43 struct env87 sv_env; /* floating point control/status */
44 struct fpacc87 sv_ac[8]; /* accumulator contents, 0-7 */
45};
46
012d13e8
BJ
47/* Cyrix EMC memory - mapped coprocessor context switch information */
48struct emcsts {
49 long em_msw; /* memory mapped status register when swtched */
50 long em_tar; /* memory mapped temp A register when swtched */
51 long em_dl; /* memory mapped D low register when swtched */
52};
53#endif ___NPX87___