xref: /csrg-svn/sys/i386/include/npx.h (revision 63359)
141058Swilliam /*-
2*63359Sbostic  * Copyright (c) 1990, 1993
3*63359Sbostic  *	The Regents of the University of California.  All rights reserved.
441058Swilliam  *
541058Swilliam  * This code is derived from software contributed to Berkeley by
641058Swilliam  * William Jolitz.
741058Swilliam  *
846006Swilliam  * %sccs.include.redist.c%
941058Swilliam  *
10*63359Sbostic  *	@(#)npx.h	8.1 (Berkeley) 06/11/93
1141058Swilliam  */
1241058Swilliam 
1340456Sbill /*
1445582Sbill  * 287/387 NPX Coprocessor Data Structures and Constants
1540456Sbill  * W. Jolitz 1/90
1640456Sbill  */
1740456Sbill 
1845582Sbill #ifndef	___NPX87___
1945582Sbill #define	___NPX87___
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 
4745582Sbill /* Cyrix EMC memory - mapped coprocessor context switch information */
4845582Sbill struct	emcsts {
4945582Sbill 	long	em_msw;		/* memory mapped status register when swtched */
5045582Sbill 	long	em_tar;		/* memory mapped temp A register when swtched */
5145582Sbill 	long	em_dl;		/* memory mapped D low register when swtched */
5245582Sbill };
5345582Sbill #endif	___NPX87___
54