Use PCB_USEDFPU, and a small performance tweak.
This commit is contained in:
parent
66927585fc
commit
f57d609a52
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: math_emu.h,v 1.4 1994/10/27 04:15:30 cgd Exp $ */
|
||||
/* $NetBSD: math_emu.h,v 1.5 1995/05/03 00:17:16 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
* linux/include/linux/math_emu.h
|
||||
@ -69,7 +69,7 @@ struct i387_struct {
|
||||
long st_space[20]; /* 8*10 bytes for each FP-reg = 80 bytes */
|
||||
};
|
||||
|
||||
#define I387 (*(struct i387_struct *)&(curproc->p_addr->u_pcb.pcb_savefpu))
|
||||
#define I387 (*(struct i387_struct *)&(curpcb->pcb_savefpu))
|
||||
#define SWD (*(struct swd *) &I387.swd)
|
||||
#define ROUNDING ((I387.cwd >> 10) & 3)
|
||||
#define PRECISION ((I387.cwd >> 8) & 3)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: math_emulate.c,v 1.12 1995/05/01 08:06:42 mycroft Exp $ */
|
||||
/* $NetBSD: math_emulate.c,v 1.13 1995/05/03 00:17:19 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
* expediant "port" of linux 8087 emulator to 386BSD, with apologies -wfj
|
||||
@ -79,8 +79,8 @@ math_emulate(struct trapframe *info)
|
||||
panic("math emulator called from supervisor mode");
|
||||
|
||||
/* ever used fp? */
|
||||
if ((curproc->p_addr->u_pcb.pcb_flags & FP_SOFTFP) == 0) {
|
||||
curproc->p_addr->u_pcb.pcb_flags |= FP_SOFTFP;
|
||||
if ((curpcb->pcb_flags & PCB_USEDFPU) == 0) {
|
||||
curpcb->pcb_flags |= PCB_USEDFPU;
|
||||
fninit();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user