1 /*- 2 * Copyright (c) 1990, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * William Jolitz. 7 * 8 * %sccs.include.redist.c% 9 * 10 * @(#)npx.h 8.1 (Berkeley) 06/11/93 11 */ 12 13 /* 14 * 287/387 NPX Coprocessor Data Structures and Constants 15 * W. Jolitz 1/90 16 */ 17 18 #ifndef ___NPX87___ 19 #define ___NPX87___ 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 /* Cyrix EMC memory - mapped coprocessor context switch information */ 48 struct 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___ 54