xref: /original-bsd/sys/i386/include/npx.h (revision aed4ccc0)
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  *
8  * %sccs.include.noredist.c%
9  *
10  *	@(#)npx.h	5.1 (Berkeley) 04/24/90
11  */
12 
13 /*
14  * 287/387 Floating Point Data Structures and Constants
15  * W. Jolitz 1/90
16  */
17 
18 #ifndef	___FPU87___
19 #define	___FPU87___
20 
21 /* Environment information of floating point unit */
22 struct	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 */
34 struct	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 */
42 struct	save87 {
43 	struct	env87 sv_env;		/* floating point control/status */
44 	struct	fpacc87	sv_ac[8];	/* accumulator contents, 0-7 */
45 };
46 
47 #endif	___FPU87___
48