npx.h (970c23b2e61f3919cb38967ca9249e9fd6307034) | npx.h (699d648aabcebb491ac2ada593f6f97281e5903a) |
---|---|
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 --- 124 unchanged lines hidden (view full) --- 133 * because it makes the results of calculations depend on whether 134 * intermediate values are stored in memory or in FPU registers. 135 */ 136#define __INITIAL_NPXCW__ 0x127F 137#define __INITIAL_MXCSR__ 0x1F80 138 139#ifdef _KERNEL 140 | 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 --- 124 unchanged lines hidden (view full) --- 133 * because it makes the results of calculations depend on whether 134 * intermediate values are stored in memory or in FPU registers. 135 */ 136#define __INITIAL_NPXCW__ 0x127F 137#define __INITIAL_MXCSR__ 0x1F80 138 139#ifdef _KERNEL 140 |
141#define IO_NPX 0x0F0 /* Numeric Coprocessor */ 142#define IO_NPXSIZE 16 /* 80387/80487 NPX registers */ 143 144#define IRQ_NPX 13 145 | |
146struct fpu_kern_ctx { 147 union savefpu hwstate; 148 union savefpu *prev; 149 uint32_t flags; 150}; 151#define FPU_KERN_CTX_NPXINITDONE 0x01 152 153#define PCB_USER_FPU(pcb) (((pcb)->pcb_flags & PCB_KERNNPX) == 0) 154 | 141struct fpu_kern_ctx { 142 union savefpu hwstate; 143 union savefpu *prev; 144 uint32_t flags; 145}; 146#define FPU_KERN_CTX_NPXINITDONE 0x01 147 148#define PCB_USER_FPU(pcb) (((pcb)->pcb_flags & PCB_KERNNPX) == 0) 149 |
155/* full reset on some systems, NOP on others */ 156#define npx_full_reset() outb(IO_NPX + 1, 0) 157 | |
158int npxdna(void); 159void npxdrop(void); 160void npxexit(struct thread *td); 161int npxformat(void); 162int npxgetregs(struct thread *td, union savefpu *addr); 163int npxgetuserregs(struct thread *td, union savefpu *addr); 164void npxinit(void); 165void npxsave(union savefpu *addr); --- 17 unchanged lines hidden --- | 150int npxdna(void); 151void npxdrop(void); 152void npxexit(struct thread *td); 153int npxformat(void); 154int npxgetregs(struct thread *td, union savefpu *addr); 155int npxgetuserregs(struct thread *td, union savefpu *addr); 156void npxinit(void); 157void npxsave(union savefpu *addr); --- 17 unchanged lines hidden --- |