diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2004-09-14 22:44:59 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2004-09-14 22:44:59 +0000 |
commit | cf617f539cf0d1506030b385abf3f65cb0d037b5 (patch) | |
tree | 995ad216b3e957136da774d24545dddf2ed90d79 | |
parent | be3a907bf23778bb7c0e022dfef64bc41da5e7e4 (diff) |
poke and clean all exceptions regs and not just one
-rw-r--r-- | sys/arch/hppa/hppa/locore.S | 22 | ||||
-rw-r--r-- | sys/arch/hppa/hppa/trap.c | 7 |
2 files changed, 23 insertions, 6 deletions
diff --git a/sys/arch/hppa/hppa/locore.S b/sys/arch/hppa/hppa/locore.S index 51f020c8e3a..eb5ea11c6fe 100644 --- a/sys/arch/hppa/hppa/locore.S +++ b/sys/arch/hppa/hppa/locore.S @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.S,v 1.136 2004/06/30 21:01:08 mickey Exp $ */ +/* $OpenBSD: locore.S,v 1.137 2004/09/14 22:44:58 mickey Exp $ */ /* * Copyright (c) 1998-2004 Michael Shalayeff @@ -1006,7 +1006,21 @@ ENTRY(TLABEL(excpt),0) /* now, check for trap */ ldw 0(r9), r1 bb,>=,n r1, HPPA_FPU_T_POS, excpt_notrap - ldw 8(r9), r1 + ldw 1*4(r9), r1 + comb,<>,n r0, r1, excpt_emulate + ldw 2*4(r9), r1 + comb,<>,n r0, r1, excpt_emulate + ldw 3*4(r9), r1 + comb,<>,n r0, r1, excpt_emulate + ldw 4*4(r9), r1 + comb,<>,n r0, r1, excpt_emulate + ldw 5*4(r9), r1 + comb,<>,n r0, r1, excpt_emulate + ldw 6*4(r9), r1 + comb,<>,n r0, r1, excpt_emulate + ldw 7*4(r9), r1 + +excpt_emulate bb,>=,n r1, 5, excpt_notrap /* HPPA_FPU_UNMPL not set */ ldw 0(r9), r16 @@ -2258,9 +2272,9 @@ ENTRY($fpu_emulate,320) mfctl cr30, r25 ldi 32, r1 - ldw 8(r25), r17 /* fpu exception reg 0 */ + ldw 4(r25), r17 /* fpu exception reg 0 */ zdep ret0, 5, 6, r17 /* intentionally zero the insn */ - stw r17, 8(r25) + stw r17, 4(r25) fdc,m r1(r25) fdc,m r1(r25) diff --git a/sys/arch/hppa/hppa/trap.c b/sys/arch/hppa/hppa/trap.c index 0999336d0c0..2b42af14fc2 100644 --- a/sys/arch/hppa/hppa/trap.c +++ b/sys/arch/hppa/hppa/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.80 2004/07/13 19:34:23 mickey Exp $ */ +/* $OpenBSD: trap.c,v 1.81 2004/09/14 22:44:58 mickey Exp $ */ /* * Copyright (c) 1998-2004 Michael Shalayeff @@ -305,7 +305,10 @@ trap(type, frame) else if (stat & (HPPA_FPU_U << 1)) flt = FPE_FLTUND; /* still left: under/over-flow w/ inexact */ - *pex = 0; + + /* cleanup exceptions (XXX deliver all ?) */ + while (i++ < 7) + *pex++ = 0; } /* reset the trap flag, as if there was none */ fpp[0] &= ~(((u_int64_t)HPPA_FPU_T) << 32); |