diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2002-03-08 08:34:04 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2002-03-08 08:34:04 +0000 |
commit | 862ab575cf0d33654d58eaef1adafcecb55a0c91 (patch) | |
tree | c636d9739a0cb8d76819327e8554df1a4ab7d375 | |
parent | fdf44b65203c56f25231a87fc67e2ba11c642d50 (diff) |
last arg to the copystr could be 0, also correct onfault handling
-rw-r--r-- | sys/arch/hppa/hppa/locore.S | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sys/arch/hppa/hppa/locore.S b/sys/arch/hppa/hppa/locore.S index 62a3825a1be..69c5857e7c4 100644 --- a/sys/arch/hppa/hppa/locore.S +++ b/sys/arch/hppa/hppa/locore.S @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.S,v 1.54 2002/02/20 19:33:01 mickey Exp $ */ +/* $OpenBSD: locore.S,v 1.55 2002/03/08 08:34:03 mickey Exp $ */ /* * Copyright (c) 1998-2002 Michael Shalayeff @@ -2211,6 +2211,7 @@ LEAF_ENTRY(spstrcpy) ldil L%curproc, r31 ldw R%curproc(r31), r31 ldw P_ADDR(r31), r31 + ldw PCB_ONFAULT+U_PCB(r31), t3 ldil L%copy_on_fault, t2 ldo R%copy_on_fault(t2), t2 stw t2, PCB_ONFAULT+U_PCB(r31) @@ -2230,13 +2231,14 @@ $spstrcpy_loop $spstrcpy_exit /* reset fault handler */ - stw r0, PCB_ONFAULT+U_PCB(r31) - copy r0, ret0 - mtsp ret0, sr2 /* XXX need this? */ sub arg1, arg0, arg1 + mtsp ret0, sr2 /* XXX need this? */ ldw HPPA_FRAME_ARG(5)(sp), arg0 - bv 0(rp) + copy r0, ret0 + add,= r0, arg0, r0 stw arg1, 0(arg0) + bv 0(rp) + stw t3, PCB_ONFAULT+U_PCB(r31) EXIT(spstrcpy) |