fpu.h (77015) | fpu.h (79609) |
---|---|
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 * Redistribution and use in source and binary forms, with or without --- 20 unchanged lines hidden (view full) --- 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34 * SUCH DAMAGE. 35 * 36 * from: @(#)npx.h 5.3 (Berkeley) 1/18/91 | 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 * Redistribution and use in source and binary forms, with or without --- 20 unchanged lines hidden (view full) --- 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34 * SUCH DAMAGE. 35 * 36 * from: @(#)npx.h 5.3 (Berkeley) 1/18/91 |
37 * $FreeBSD: head/sys/amd64/include/fpu.h 77015 2001-05-22 21:20:49Z bde $ | 37 * $FreeBSD: head/sys/amd64/include/fpu.h 79609 2001-07-12 06:32:51Z peter $ |
38 */ 39 40/* 41 * 287/387 NPX Coprocessor Data Structures and Constants 42 * W. Jolitz 1/90 43 */ 44 45#ifndef _MACHINE_NPX_H_ --- 34 unchanged lines hidden (view full) --- 80 * before it is inspected for ptracing or for core dumps. Some 81 * emulators overwrite the whole struct. We have no good way of 82 * knowing how much padding to leave. Leave just enough for the 83 * GPL emulator's i387_union (176 bytes total). 84 */ 85 u_char sv_pad[64]; /* padding; used by emulators */ 86}; 87 | 38 */ 39 40/* 41 * 287/387 NPX Coprocessor Data Structures and Constants 42 * W. Jolitz 1/90 43 */ 44 45#ifndef _MACHINE_NPX_H_ --- 34 unchanged lines hidden (view full) --- 80 * before it is inspected for ptracing or for core dumps. Some 81 * emulators overwrite the whole struct. We have no good way of 82 * knowing how much padding to leave. Leave just enough for the 83 * GPL emulator's i387_union (176 bytes total). 84 */ 85 u_char sv_pad[64]; /* padding; used by emulators */ 86}; 87 |
88struct envxmm { 89 u_int16_t en_cw; /* control word (16bits) */ 90 u_int16_t en_sw; /* status word (16bits) */ 91 u_int16_t en_tw; /* tag word (16bits) */ 92 u_int16_t en_opcode; /* opcode last executed (11 bits ) */ 93 u_int32_t en_fip; /* floating point instruction pointer */ 94 u_int16_t en_fcs; /* floating code segment selector */ 95 u_int16_t en_pad0; /* padding */ 96 u_int32_t en_foo; /* floating operand offset */ 97 u_int16_t en_fos; /* floating operand segment selector */ 98 u_int16_t en_pad1; /* padding */ 99 u_int32_t en_mxcsr; /* SSE sontorol/status register */ 100 u_int32_t en_pad2; /* padding */ 101}; 102 103/* Contents of each SSE extended accumulator */ 104struct xmmacc { 105 u_char xmm_bytes[16]; 106}; 107 108struct savexmm { 109 struct envxmm sv_env; 110 struct { 111 struct fpacc87 fp_acc; 112 u_char fp_pad[6]; /* padding */ 113 } sv_fp[8]; 114 struct xmmacc sv_xmm[8]; 115 u_long sv_ex_sw; /* status word for last exception */ 116 u_char sv_pad[220]; 117} __attribute__((aligned(16))); 118 119union savefpu { 120 struct save87 sv_87; 121 struct savexmm sv_xmm; 122}; 123 |
|
88/* 89 * The hardware default control word for i387's and later coprocessors is 90 * 0x37F, giving: 91 * 92 * round to nearest 93 * 64-bit precision 94 * all exceptions masked. 95 * --- 7 unchanged lines hidden (view full) --- 103 * intermediate values are stored in memory or in FPU registers. 104 */ 105#define __INITIAL_NPXCW__ 0x127F 106 107#ifdef _KERNEL 108int npxdna __P((void)); 109void npxexit __P((struct proc *p)); 110void npxinit __P((int control)); | 124/* 125 * The hardware default control word for i387's and later coprocessors is 126 * 0x37F, giving: 127 * 128 * round to nearest 129 * 64-bit precision 130 * all exceptions masked. 131 * --- 7 unchanged lines hidden (view full) --- 139 * intermediate values are stored in memory or in FPU registers. 140 */ 141#define __INITIAL_NPXCW__ 0x127F 142 143#ifdef _KERNEL 144int npxdna __P((void)); 145void npxexit __P((struct proc *p)); 146void npxinit __P((int control)); |
111void npxsave __P((struct save87 *addr)); | 147void npxsave __P((union savefpu *addr)); |
112int npxtrap __P((void)); 113#endif 114 115#endif /* !_MACHINE_NPX_H_ */ | 148int npxtrap __P((void)); 149#endif 150 151#endif /* !_MACHINE_NPX_H_ */ |