summaryrefslogtreecommitdiff
path: root/sys/arch/hppa
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2002-09-05 21:37:19 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2002-09-05 21:37:19 +0000
commit3a327dad8e22d3b847a34518d736902335a15006 (patch)
tree69be6c798645fa2d14b87c0bd90f4d6e0e187b4d /sys/arch/hppa
parentca0155cb0500752090d0b97085cc1d83615f32bf (diff)
fpu save state is a separate magic function now
Diffstat (limited to 'sys/arch/hppa')
-rw-r--r--sys/arch/hppa/hppa/locore.S39
-rw-r--r--sys/arch/hppa/hppa/vm_machdep.c39
-rw-r--r--sys/arch/hppa/include/cpufunc.h3
3 files changed, 43 insertions, 38 deletions
diff --git a/sys/arch/hppa/hppa/locore.S b/sys/arch/hppa/hppa/locore.S
index fd22f2559de..f74a64cd0af 100644
--- a/sys/arch/hppa/hppa/locore.S
+++ b/sys/arch/hppa/hppa/locore.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.S,v 1.82 2002/09/05 18:15:23 mickey Exp $ */
+/* $OpenBSD: locore.S,v 1.83 2002/09/05 21:37:18 mickey Exp $ */
/*
* Copyright (c) 1998-2002 Michael Shalayeff
@@ -1996,6 +1996,43 @@ $ibrk_exit
nop
EXIT(TLABEL(ibrk))
+LEAF_ENTRY(fpu_save)
+ fstds,ma %fr0 , 8(arg0)
+ fstds,ma %fr1 , 8(arg0)
+ fstds,ma %fr2 , 8(arg0)
+ fstds,ma %fr3 , 8(arg0)
+ fstds,ma %fr4 , 8(arg0)
+ fstds,ma %fr5 , 8(arg0)
+ fstds,ma %fr6 , 8(arg0)
+ fstds,ma %fr7 , 8(arg0)
+ fstds,ma %fr8 , 8(arg0)
+ fstds,ma %fr9 , 8(arg0)
+ fstds,ma %fr10, 8(arg0)
+ fstds,ma %fr11, 8(arg0)
+ fstds,ma %fr12, 8(arg0)
+ fstds,ma %fr13, 8(arg0)
+ fstds,ma %fr14, 8(arg0)
+ fstds,ma %fr15, 8(arg0)
+ fstds,ma %fr16, 8(arg0)
+ fstds,ma %fr17, 8(arg0)
+ fstds,ma %fr18, 8(arg0)
+ fstds,ma %fr19, 8(arg0)
+ fstds,ma %fr20, 8(arg0)
+ fstds,ma %fr21, 8(arg0)
+ fstds,ma %fr22, 8(arg0)
+ fstds,ma %fr23, 8(arg0)
+ fstds,ma %fr24, 8(arg0)
+ fstds,ma %fr25, 8(arg0)
+ fstds,ma %fr26, 8(arg0)
+ fstds,ma %fr27, 8(arg0)
+ fstds,ma %fr28, 8(arg0)
+ fstds,ma %fr29, 8(arg0)
+ fstds,ma %fr30, 8(arg0)
+ fstds %fr31, 0(arg0)
+ bv r0(rp)
+ nop
+EXIT(fpu_save)
+
.import dcache_stride, data
LEAF_ENTRY(fdcache)
ldil L%dcache_stride,t1
diff --git a/sys/arch/hppa/hppa/vm_machdep.c b/sys/arch/hppa/hppa/vm_machdep.c
index 597f7300f1e..e0e01a7d925 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.40 2002/08/03 20:56:42 mickey Exp $ */
+/* $OpenBSD: vm_machdep.c,v 1.41 2002/09/05 21:37:18 mickey Exp $ */
/*
* Copyright (c) 1999-2002 Michael Shalayeff
@@ -135,44 +135,11 @@ void
cpu_swapout(p)
struct proc *p;
{
- extern paddr_t fpu_curpcb;
+ extern vaddr_t fpu_curpcb;
struct trapframe *tf = p->p_md.md_regs;
if (tf->tf_cr30 == fpu_curpcb) {
- __asm __volatile(
- "fstds,ma %%fr0 , 8(%0)\n\t"
- "fstds,ma %%fr1 , 8(%0)\n\t"
- "fstds,ma %%fr2 , 8(%0)\n\t"
- "fstds,ma %%fr3 , 8(%0)\n\t"
- "fstds,ma %%fr4 , 8(%0)\n\t"
- "fstds,ma %%fr5 , 8(%0)\n\t"
- "fstds,ma %%fr6 , 8(%0)\n\t"
- "fstds,ma %%fr7 , 8(%0)\n\t"
- "fstds,ma %%fr8 , 8(%0)\n\t"
- "fstds,ma %%fr9 , 8(%0)\n\t"
- "fstds,ma %%fr10, 8(%0)\n\t"
- "fstds,ma %%fr11, 8(%0)\n\t"
- "fstds,ma %%fr12, 8(%0)\n\t"
- "fstds,ma %%fr13, 8(%0)\n\t"
- "fstds,ma %%fr14, 8(%0)\n\t"
- "fstds,ma %%fr15, 8(%0)\n\t"
- "fstds,ma %%fr16, 8(%0)\n\t"
- "fstds,ma %%fr17, 8(%0)\n\t"
- "fstds,ma %%fr18, 8(%0)\n\t"
- "fstds,ma %%fr19, 8(%0)\n\t"
- "fstds,ma %%fr20, 8(%0)\n\t"
- "fstds,ma %%fr21, 8(%0)\n\t"
- "fstds,ma %%fr22, 8(%0)\n\t"
- "fstds,ma %%fr23, 8(%0)\n\t"
- "fstds,ma %%fr24, 8(%0)\n\t"
- "fstds,ma %%fr25, 8(%0)\n\t"
- "fstds,ma %%fr26, 8(%0)\n\t"
- "fstds,ma %%fr27, 8(%0)\n\t"
- "fstds,ma %%fr28, 8(%0)\n\t"
- "fstds,ma %%fr29, 8(%0)\n\t"
- "fstds,ma %%fr30, 8(%0)\n\t"
- "fstds %%fr31, 0(%0)\n\t"
- : "+r" (fpu_curpcb) :: "memory");
+ fpu_save(fpu_curpcb);
fpu_curpcb = 0;
}
}
diff --git a/sys/arch/hppa/include/cpufunc.h b/sys/arch/hppa/include/cpufunc.h
index 6b85c9e3aef..e2326ff6990 100644
--- a/sys/arch/hppa/include/cpufunc.h
+++ b/sys/arch/hppa/include/cpufunc.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpufunc.h,v 1.19 2002/03/15 21:44:18 mickey Exp $ */
+/* $OpenBSD: cpufunc.h,v 1.20 2002/09/05 21:37:18 mickey Exp $ */
/*
* Copyright (c) 1998,2000 Michael Shalayeff
@@ -220,6 +220,7 @@ ledctl(int on, int off, int toggle)
#ifdef _KERNEL
extern int (*cpu_hpt_init)(vaddr_t hpt, vsize_t hptsize);
+void fpu_save(vaddr_t va);
void ficache(pa_space_t sp, vaddr_t va, vsize_t size);
void fdcache(pa_space_t sp, vaddr_t va, vsize_t size);
void pdcache(pa_space_t sp, vaddr_t va, vsize_t size);