Use a different initial FPCR, mainly to suppress the ieee inexact trap.
This commit is contained in:
parent
d6b5fedecb
commit
7288a55336
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: machdep.c,v 1.171 1999/04/27 02:33:35 cgd Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.172 1999/04/29 03:02:20 ross Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
|
||||
|
@ -82,7 +82,7 @@
|
|||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.171 1999/04/27 02:33:35 cgd Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.172 1999/04/29 03:02:20 ross Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -134,6 +134,7 @@ __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.171 1999/04/27 02:33:35 cgd Exp $");
|
|||
#include <machine/rpb.h>
|
||||
#include <machine/prom.h>
|
||||
#include <machine/conf.h>
|
||||
#include <machine/ieeefp.h>
|
||||
|
||||
#include <alpha/alpha/cpuvar.h>
|
||||
|
||||
|
@ -1924,8 +1925,14 @@ setregs(p, pack, stack)
|
|||
bzero(tfp->tf_regs, FRAME_SIZE * sizeof tfp->tf_regs[0]);
|
||||
#endif
|
||||
bzero(&p->p_addr->u_pcb.pcb_fp, sizeof p->p_addr->u_pcb.pcb_fp);
|
||||
#define FP_RN 2 /* XXX */
|
||||
p->p_addr->u_pcb.pcb_fp.fpr_cr = (long)FP_RN << 58;
|
||||
p->p_addr->u_pcb.pcb_fp.fpr_cr = FPCR_INED
|
||||
| FPCR_UNFD
|
||||
| FPCR_UNDZ
|
||||
| FPCR_DYN(FP_RN)
|
||||
| FPCR_OVFD
|
||||
| FPCR_DZED
|
||||
| FPCR_INVD
|
||||
| FPCR_DNZ;
|
||||
alpha_pal_wrusp(stack);
|
||||
tfp->tf_regs[FRAME_PS] = ALPHA_PSL_USERSET;
|
||||
tfp->tf_regs[FRAME_PC] = pack->ep_entry & ~3;
|
||||
|
|
Loading…
Reference in New Issue