fpu.h (117865) | fpu.h (122292) |
---|---|
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 117865 2003-07-22 06:50:34Z peter $ | 37 * $FreeBSD: head/sys/amd64/include/fpu.h 122292 2003-11-08 03:33:38Z peter $ |
38 */ 39 40/* | 38 */ 39 40/* |
41 * 287/387 NPX Coprocessor Data Structures and Constants | 41 * Floating Point Data Structures and Constants |
42 * W. Jolitz 1/90 43 */ 44 | 42 * W. Jolitz 1/90 43 */ 44 |
45#ifndef _MACHINE_NPX_H_ 46#define _MACHINE_NPX_H_ | 45#ifndef _MACHINE_FPU_H_ 46#define _MACHINE_FPU_H_ |
47 48/* Contents of each x87 floating point accumulator */ 49struct fpacc87 { 50 u_char fp_bytes[10]; 51}; 52 53/* Contents of each SSE extended accumulator */ 54struct xmmacc { --- 35 unchanged lines hidden (view full) --- 90 * If its using an intermediate fpu register, it has 80/64 bits to work 91 * with. If it uses memory, it has 64/53 bits to work with. However, 92 * gcc is aware of this and goes to a fair bit of trouble to make the 93 * best use of it. 94 * 95 * This is mostly academic for AMD64, because the ABI prefers the use 96 * SSE2 based math. For FreeBSD/amd64, we go with the default settings. 97 */ | 47 48/* Contents of each x87 floating point accumulator */ 49struct fpacc87 { 50 u_char fp_bytes[10]; 51}; 52 53/* Contents of each SSE extended accumulator */ 54struct xmmacc { --- 35 unchanged lines hidden (view full) --- 90 * If its using an intermediate fpu register, it has 80/64 bits to work 91 * with. If it uses memory, it has 64/53 bits to work with. However, 92 * gcc is aware of this and goes to a fair bit of trouble to make the 93 * best use of it. 94 * 95 * This is mostly academic for AMD64, because the ABI prefers the use 96 * SSE2 based math. For FreeBSD/amd64, we go with the default settings. 97 */ |
98#define __INITIAL_NPXCW__ 0x037F | 98#define __INITIAL_FPUCW__ 0x037F |
99#define __INITIAL_MXCSR__ 0x1F80 100#define __INITIAL_MXCSR_MASK__ 0xFFBF 101 102#ifdef _KERNEL | 99#define __INITIAL_MXCSR__ 0x1F80 100#define __INITIAL_MXCSR_MASK__ 0xFFBF 101 102#ifdef _KERNEL |
103int npxdna(void); 104void npxdrop(void); 105void npxexit(struct thread *td); 106int npxformat(void); 107int npxgetregs(struct thread *td, struct savefpu *addr); 108void npxinit(u_short control); 109void npxsave(struct savefpu *addr); 110void npxsetregs(struct thread *td, struct savefpu *addr); 111int npxtrap(void); | 103int fpudna(void); 104void fpudrop(void); 105void fpuexit(struct thread *td); 106int fpuformat(void); 107int fpugetregs(struct thread *td, struct savefpu *addr); 108void fpuinit(u_short control); 109void fpusave(struct savefpu *addr); 110void fpusetregs(struct thread *td, struct savefpu *addr); 111int fputrap(void); |
112#endif 113 | 112#endif 113 |
114#endif /* !_MACHINE_NPX_H_ */ | 114#endif /* !_MACHINE_FPU_H_ */ |