diff options
author | Dale Rahn <drahn@cvs.openbsd.org> | 2005-08-02 21:02:50 +0000 |
---|---|---|
committer | Dale Rahn <drahn@cvs.openbsd.org> | 2005-08-02 21:02:50 +0000 |
commit | 4644da424bed48fc7cc36ce5fb79fe7eb2ca8b6e (patch) | |
tree | 88d69a0a3630229b4353627d887d39dbe7f3b445 /sys/arch/macppc | |
parent | a594ebf027047711c2fa6b99be0d94dda4ceb057 (diff) |
Save floating point context on signals, looked at miod@ is it in yet? deraadt@
Diffstat (limited to 'sys/arch/macppc')
-rw-r--r-- | sys/arch/macppc/macppc/genassym.cf | 7 | ||||
-rw-r--r-- | sys/arch/macppc/macppc/locore.S | 42 |
2 files changed, 45 insertions, 4 deletions
diff --git a/sys/arch/macppc/macppc/genassym.cf b/sys/arch/macppc/macppc/genassym.cf index ff0301788d1..3ad86d58929 100644 --- a/sys/arch/macppc/macppc/genassym.cf +++ b/sys/arch/macppc/macppc/genassym.cf @@ -1,4 +1,4 @@ -# $OpenBSD: genassym.cf,v 1.11 2004/06/24 22:35:56 drahn Exp $ +# $OpenBSD: genassym.cf,v 1.12 2005/08/02 21:02:48 drahn Exp $ # # Copyright (c) 1982, 1990 The Regents of the University of California. # All rights reserved. @@ -73,4 +73,9 @@ member p_back member p_addr member p_stat +struct sigframe +member sf_sc + +struct fpsig + export SONPROC diff --git a/sys/arch/macppc/macppc/locore.S b/sys/arch/macppc/macppc/locore.S index 7e5dda6ce8a..1a3fecd1694 100644 --- a/sys/arch/macppc/macppc/locore.S +++ b/sys/arch/macppc/macppc/locore.S @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.S,v 1.20 2004/12/24 22:50:30 miod Exp $ */ +/* $OpenBSD: locore.S,v 1.21 2005/08/02 21:02:48 drahn Exp $ */ /* $NetBSD: locore.S,v 1.2 1996/10/16 19:33:09 ws Exp $ */ /* @@ -1145,9 +1145,45 @@ _C_LABEL(setfault): .type _C_LABEL(sigcode),@function .type _C_LABEL(esigcode),@function _C_LABEL(sigcode): - addi %r1,%r1,-16 /* reserved space for callee */ + addi %r1,%r1,-((16+FPSIG_SIZEOF+15)& ~0xf) /* reserved space for callee */ + addi %r6,%r1,8 + stfd %f0,0(%r6) + stfd %f1,8(%r6) + stfd %f2,16(%r6) + stfd %f3,24(%r6) + stfd %f4,32(%r6) + stfd %f5,40(%r6) + stfd %f6,48(%r6) + stfd %f7,56(%r6) + stfd %f8,64(%r6) + stfd %f9,72(%r6) + stfd %f10,80(%r6) + stfd %f11,88(%r6) + stfd %f12,96(%r6) + stfd %f13,104(%r6) + mffs %f0 + stfd %f0,112(%r6) + lfd %f0,0(%r6) /* restore the clobbered register */ + blrl - addi %r3,%r1,16+8 /* compute &sf_sc */ + addi %r6,%r1,8 + lfd %f0,112(%r6) + mtfsf 0xff,%f0 + lfd %f0,0(%r6) + lfd %f1,8(%r6) + lfd %f2,16(%r6) + lfd %f3,24(%r6) + lfd %f4,32(%r6) + lfd %f5,40(%r6) + lfd %f6,48(%r6) + lfd %f7,56(%r6) + lfd %f8,64(%r6) + lfd %f9,72(%r6) + lfd %f10,80(%r6) + lfd %f11,88(%r6) + lfd %f12,96(%r6) + lfd %f13,104(%r6) + addi %r3,%r1,((16+FPSIG_SIZEOF+15)&~0xf)+SF_SC /* compute &sf_sc */ li %r0,SYS_sigreturn sc /* sigreturn(scp) */ li %r0,SYS_exit |