Deleted Added
full compact
fpu.h (92761) fpu.h (103408)
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 92761 2002-03-20 05:48:58Z alfred $
37 * $FreeBSD: head/sys/amd64/include/fpu.h 103408 2002-09-16 19:25:41Z mini $
38 */
39
40/*
41 * 287/387 NPX Coprocessor Data Structures and Constants
42 * W. Jolitz 1/90
43 */
44
45#ifndef _MACHINE_NPX_H_

--- 22 unchanged lines hidden (view full) ---

68 u_char fp_bytes[10];
69#endif
70};
71
72/* Floating point context */
73struct save87 {
74 struct env87 sv_env; /* floating point control/status */
75 struct fpacc87 sv_ac[8]; /* accumulator contents, 0-7 */
38 */
39
40/*
41 * 287/387 NPX Coprocessor Data Structures and Constants
42 * W. Jolitz 1/90
43 */
44
45#ifndef _MACHINE_NPX_H_

--- 22 unchanged lines hidden (view full) ---

68 u_char fp_bytes[10];
69#endif
70};
71
72/* Floating point context */
73struct save87 {
74 struct env87 sv_env; /* floating point control/status */
75 struct fpacc87 sv_ac[8]; /* accumulator contents, 0-7 */
76 u_long sv_ex_sw; /* status word for last exception */
76 u_char sv_pad0[4]; /* padding for (now unused) saved status word */
77 /*
78 * Bogus padding for emulators. Emulators should use their own
79 * struct and arrange to store into this struct (ending here)
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 */

--- 22 unchanged lines hidden (view full) ---

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];
77 /*
78 * Bogus padding for emulators. Emulators should use their own
79 * struct and arrange to store into this struct (ending here)
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 */

--- 22 unchanged lines hidden (view full) ---

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];
115 u_char sv_pad[224];
117} __attribute__((aligned(16)));
118
119union savefpu {
120 struct save87 sv_87;
121 struct savexmm sv_xmm;
122};
123
124/*

--- 12 unchanged lines hidden (view full) ---

137 * 64-bit precision often gives bad results with high level languages
138 * because it makes the results of calculations depend on whether
139 * intermediate values are stored in memory or in FPU registers.
140 */
141#define __INITIAL_NPXCW__ 0x127F
142
143#ifdef _KERNEL
144int npxdna(void);
116} __attribute__((aligned(16)));
117
118union savefpu {
119 struct save87 sv_87;
120 struct savexmm sv_xmm;
121};
122
123/*

--- 12 unchanged lines hidden (view full) ---

136 * 64-bit precision often gives bad results with high level languages
137 * because it makes the results of calculations depend on whether
138 * intermediate values are stored in memory or in FPU registers.
139 */
140#define __INITIAL_NPXCW__ 0x127F
141
142#ifdef _KERNEL
143int npxdna(void);
144void npxdrop(void);
145void npxexit(struct thread *td);
145void npxexit(struct thread *td);
146void npxinit(int control);
146int npxformat(void);
147int npxgetregs(struct thread *td, union savefpu *addr);
148void npxinit(u_short control);
147void npxsave(union savefpu *addr);
149void npxsave(union savefpu *addr);
150void npxsetregs(struct thread *td, union savefpu *addr);
148int npxtrap(void);
149#endif
150
151#endif /* !_MACHINE_NPX_H_ */
151int npxtrap(void);
152#endif
153
154#endif /* !_MACHINE_NPX_H_ */