summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>1999-06-18 05:20:00 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>1999-06-18 05:20:00 +0000
commit4eb4c3013da3dbbfb59cfd7718f9161ba458451b (patch)
tree667b0caf3a11523bbee3c70fbe0f31e5ea60cada /sys
parent369be544ad57d1e2de923a2f1d75c994f4f385c2 (diff)
do not include fpu regs into trapframe, according to the
lazy fpu context switching it could be well saved into pcb. this brings trapframe to 256 bytes (including 5 spare words). adjust all the code to deal w/ moved fpu regs save area.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/hppa/hppa/genassym.cf4
-rw-r--r--sys/arch/hppa/hppa/locore.S6
-rw-r--r--sys/arch/hppa/hppa/process_machdep.c7
-rw-r--r--sys/arch/hppa/include/frame.h4
4 files changed, 11 insertions, 10 deletions
diff --git a/sys/arch/hppa/hppa/genassym.cf b/sys/arch/hppa/hppa/genassym.cf
index bd80afd8e94..11dd12d5911 100644
--- a/sys/arch/hppa/hppa/genassym.cf
+++ b/sys/arch/hppa/hppa/genassym.cf
@@ -1,4 +1,4 @@
-# $OpenBSD: genassym.cf,v 1.10 1999/06/12 17:40:01 mickey Exp $
+# $OpenBSD: genassym.cf,v 1.11 1999/06/18 05:19:52 mickey Exp $
#
# Copyright (c) 1982, 1990, 1993
@@ -166,7 +166,6 @@ define TF_SR4 offsetof(struct trapframe, tf_sr4)
define TF_SR5 offsetof(struct trapframe, tf_sr5)
define TF_SR6 offsetof(struct trapframe, tf_sr6)
define TF_SR7 offsetof(struct trapframe, tf_sr7)
-define TF_FPREGS offsetof(struct trapframe, tf_fpregs)
# proc fields and values
struct proc
@@ -187,6 +186,7 @@ struct pcb
member pcb_tf
member pcb_onfault
member pcb_space
+member pcb_fpregs
struct user
member u_pcb
diff --git a/sys/arch/hppa/hppa/locore.S b/sys/arch/hppa/hppa/locore.S
index de3f9e02c32..93dd972a96c 100644
--- a/sys/arch/hppa/hppa/locore.S
+++ b/sys/arch/hppa/hppa/locore.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.S,v 1.10 1999/06/12 17:35:10 mickey Exp $ */
+/* $OpenBSD: locore.S,v 1.11 1999/06/18 05:19:52 mickey Exp $ */
/*
* Copyright (c) 1998,1999 Michael Shalayeff
@@ -627,7 +627,7 @@ TLABEL(emu)
comb,=,n r0, t1, $fpusw_nosave
ldw p_addr(t1), t3
- ldo TF_FPREGS+pcb_tf+u_pcb(t3), t3
+ ldo pcb_fpregs+u_pcb(t3), t3
fstds,ma fr0 , 8(t3) /* fr0 must be saved first */
fstds,ma fr1 , 8(t3)
@@ -665,7 +665,7 @@ TLABEL(emu)
$fpusw_nosave
ldw p_addr(t2), t3
- ldo 31*8+TF_FPREGS+pcb_tf+u_pcb(t3), t3
+ ldo 31*8+pcb_fpregs+u_pcb(t3), t3
fldds,ma -8(t3), fr31
fldds,ma -8(t3), fr30
diff --git a/sys/arch/hppa/hppa/process_machdep.c b/sys/arch/hppa/hppa/process_machdep.c
index 03bdab8dd82..afe2e97dcc4 100644
--- a/sys/arch/hppa/hppa/process_machdep.c
+++ b/sys/arch/hppa/hppa/process_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: process_machdep.c,v 1.2 1999/04/20 20:46:11 mickey Exp $ */
+/* $OpenBSD: process_machdep.c,v 1.3 1999/06/18 05:19:52 mickey Exp $ */
/*
* Copyright (c) 1999 Michael Shalayeff
@@ -35,6 +35,7 @@
#include <sys/systm.h>
#include <sys/proc.h>
#include <sys/ptrace.h>
+#include <sys/user.h>
int
process_read_regs(p, regs)
@@ -60,7 +61,7 @@ process_read_fpregs(p, fpregs)
struct proc *p;
struct fpreg *fpregs;
{
- bcopy (p->p_md.md_regs->tf_fpregs, fpregs, sizeof(*fpregs));
+ bcopy (p->p_addr->u_pcb.pcb_fpregs, fpregs, sizeof(*fpregs));
return 0;
}
@@ -69,7 +70,7 @@ process_write_fpregs(p, fpregs)
struct proc *p;
struct fpreg *fpregs;
{
- bcopy (fpregs, p->p_md.md_regs->tf_fpregs, sizeof(*fpregs));
+ bcopy (fpregs, p->p_addr->u_pcb.pcb_fpregs, sizeof(*fpregs));
return 0;
}
diff --git a/sys/arch/hppa/include/frame.h b/sys/arch/hppa/include/frame.h
index 24504a637e5..3db91df4b81 100644
--- a/sys/arch/hppa/include/frame.h
+++ b/sys/arch/hppa/include/frame.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: frame.h,v 1.5 1999/04/20 19:49:35 mickey Exp $ */
+/* $OpenBSD: frame.h,v 1.6 1999/06/18 05:19:59 mickey Exp $ */
/*
* Copyright (c) 1999 Michael Shalayeff
@@ -127,7 +127,7 @@ struct trapframe {
u_int tf_vtop; /* cr25 */
u_int tf_tr2; /* cr26 */
- u_int64_t tf_fpregs[HPPA_NFPREGS];
+ u_int tf_pad[5]; /* pad to 256 bytes */
};
#endif /* !_LOCORE */