summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2002-11-08 21:42:13 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2002-11-08 21:42:13 +0000
commit1231260e339c8e949f11b360a78f477cf480190d (patch)
tree12382b42a3e696dc4000cac87d4dee377613afba /sys/arch
parentd98cc04f9d30439bb83ca062694bf0ed2a91f151 (diff)
only reset the pending fpu exceptions on fork, not the rest of the fpu status reg
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/hppa/hppa/vm_machdep.c4
-rw-r--r--sys/arch/hppa/include/cpu.h4
2 files changed, 5 insertions, 3 deletions
diff --git a/sys/arch/hppa/hppa/vm_machdep.c b/sys/arch/hppa/hppa/vm_machdep.c
index 608e4e22ebb..807c5d5ec7c 100644
--- a/sys/arch/hppa/hppa/vm_machdep.c
+++ b/sys/arch/hppa/hppa/vm_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vm_machdep.c,v 1.44 2002/10/07 15:32:37 mickey Exp $ */
+/* $OpenBSD: vm_machdep.c,v 1.45 2002/11/08 21:42:12 mickey Exp $ */
/*
* Copyright (c) 1999-2002 Michael Shalayeff
@@ -171,7 +171,7 @@ cpu_fork(p1, p2, stack, stacksize, func, arg)
pcbp->pcb_space = p2->p_vmspace->vm_map.pmap->pm_space;
pcbp->pcb_uva = (vaddr_t)p2->p_addr;
/* reset any of the pending FPU exceptions from parent */
- pcbp->pcb_fpregs[0] = ((u_int64_t)HPPA_FPU_INIT) << 32;
+ pcbp->pcb_fpregs[0] = HPPA_FPU_FORK(pcbp->pcb_fpregs[0]);
pcbp->pcb_fpregs[1] = 0;
pcbp->pcb_fpregs[2] = 0;
pcbp->pcb_fpregs[3] = 0;
diff --git a/sys/arch/hppa/include/cpu.h b/sys/arch/hppa/include/cpu.h
index 45a215774ec..c741544f3d9 100644
--- a/sys/arch/hppa/include/cpu.h
+++ b/sys/arch/hppa/include/cpu.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.h,v 1.34 2002/10/21 18:41:05 mickey Exp $ */
+/* $OpenBSD: cpu.h,v 1.35 2002/11/08 21:42:12 mickey Exp $ */
/*
* Copyright (c) 2000-2002 Michael Shalayeff
@@ -90,12 +90,14 @@ extern const char *cpu_typename;
#define HPPA_FPU_V 0x10
#define HPPA_FPU_D 0x20
#define HPPA_FPU_T 0x40
+#define HPPA_FPU_XMASK 0x7f
#define HPPA_FPU_T_POS 25
#define HPPA_FPU_RM 0x00000600
#define HPPA_FPU_CQ 0x00fff800
#define HPPA_FPU_C 0x04000000
#define HPPA_FPU_FLSH 27
#define HPPA_FPU_INIT (0)
+#define HPPA_FPU_FORK(s) ((s) & ~((u_int64_t)(HPPA_FPU_XMASK)<<32))
#define HPPA_PMSFUS 0x20 /* ??? */
/*