Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/alpha/alpha Use a different initial FPCR, mainly to...



details:   https://anonhg.NetBSD.org/src/rev/23842b418b51
branches:  trunk
changeset: 472405:23842b418b51
user:      ross <ross%NetBSD.org@localhost>
date:      Thu Apr 29 03:02:20 1999 +0000

description:
Use a different initial FPCR, mainly to suppress the ieee inexact trap.

diffstat:

 sys/arch/alpha/alpha/machdep.c |  15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)

diffs (43 lines):

diff -r b1d7c015d194 -r 23842b418b51 sys/arch/alpha/alpha/machdep.c
--- a/sys/arch/alpha/alpha/machdep.c    Thu Apr 29 02:58:30 1999 +0000
+++ b/sys/arch/alpha/alpha/machdep.c    Thu Apr 29 03:02:20 1999 +0000
@@ -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 @@
 #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 @@
        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;



Home | Main Index | Thread Index | Old Index