xref: /csrg-svn/sys/i386/include/npx.h (revision 41058)
1*41058Swilliam /*-
2*41058Swilliam  * Copyright (c) 1990 The Regents of the University of California.
3*41058Swilliam  * All rights reserved.
4*41058Swilliam  *
5*41058Swilliam  * This code is derived from software contributed to Berkeley by
6*41058Swilliam  * William Jolitz.
7*41058Swilliam  *
8*41058Swilliam  * %sccs.include.noredist.c%
9*41058Swilliam  *
10*41058Swilliam  *	@(#)npx.h	5.1 (Berkeley) 04/24/90
11*41058Swilliam  */
12*41058Swilliam 
1340456Sbill /*
1440456Sbill  * 287/387 Floating Point Data Structures and Constants
1540456Sbill  * W. Jolitz 1/90
1640456Sbill  */
1740456Sbill 
1840456Sbill #ifndef	___FPU87___
1940456Sbill #define	___FPU87___
2040456Sbill 
2140456Sbill /* Environment information of floating point unit */
2240456Sbill struct	env87 {
2340456Sbill 	long	en_cw;		/* control word (16bits) */
2440456Sbill 	long	en_sw;		/* status word (16bits) */
2540456Sbill 	long	en_tw;		/* tag word (16bits) */
2640456Sbill 	long	en_fip;		/* floating point instruction pointer */
2740456Sbill 	u_short	en_fcs;		/* floating code segment selector */
2840456Sbill 	u_short	en_opcode;	/* opcode last executed (11 bits ) */
2940456Sbill 	long	en_foo;		/* floating operand offset */
3040456Sbill 	long	en_fos;		/* floating operand segment selector */
3140456Sbill };
3240456Sbill 
3340456Sbill /* Contents of each floating point accumulator */
3440456Sbill struct	fpacc87 {
3540456Sbill 	u_long	fp_mantlo;	/* mantissa low (31:0) */
3640456Sbill 	u_long	fp_manthi;	/* mantissa high (63:32) */
3740456Sbill 	int	fp_exp:15;	/* exponent */
3840456Sbill 	int	fp_sgn:1;	/* mantissa sign */
3940456Sbill };
4040456Sbill 
4140456Sbill /* Floating point context */
4240456Sbill struct	save87 {
4340456Sbill 	struct	env87 sv_env;		/* floating point control/status */
4440456Sbill 	struct	fpacc87	sv_ac[8];	/* accumulator contents, 0-7 */
4540456Sbill };
4640456Sbill 
4740456Sbill #endif	___FPU87___
48