diff options
author | dfr <dfr@FreeBSD.org> | 2001-04-24 15:57:16 +0000 |
---|---|---|
committer | dfr <dfr@FreeBSD.org> | 2001-04-24 15:57:16 +0000 |
commit | 4671d09c836e811f3abfdc27edfc4e9eddf25013 (patch) | |
tree | 5550d0c434fad362939f5bc629ef270f6b5580ff /sys/ia64 | |
parent | ff98f99d31fb9de574ed9f2785c44461b2177c52 (diff) | |
download | FreeBSD-src-4671d09c836e811f3abfdc27edfc4e9eddf25013.zip FreeBSD-src-4671d09c836e811f3abfdc27edfc4e9eddf25013.tar.gz |
When switching backing store during signal delivery, do the switch before
creating the register frame for calling the handler. Also discard that
frame before switching back to the old backing store after the handler
returns.
Diffstat (limited to 'sys/ia64')
-rw-r--r-- | sys/ia64/ia64/locore.S | 15 | ||||
-rw-r--r-- | sys/ia64/ia64/locore.s | 15 |
2 files changed, 16 insertions, 14 deletions
diff --git a/sys/ia64/ia64/locore.S b/sys/ia64/ia64/locore.S index 4b0ef2f..313d95e 100644 --- a/sys/ia64/ia64/locore.S +++ b/sys/ia64/ia64/locore.S @@ -129,9 +129,6 @@ ENTRY(sigcode,0) mov b6=r8 // transfer to a branch register cover ;; - alloc r5=ar.pfs,0,0,3,0 // register frame for call - ;; - mov out0=r14 // signal number add r8=UC_MCONTEXT_MC_AR_BSP,r16 // address or mc_ar_bsp mov r9=ar.bsp // save ar.bsp ;; @@ -149,11 +146,16 @@ ENTRY(sigcode,0) mov ar.rsc=15 // XXX bogus value - check invala ;; -1: mov out1=r15 // siginfo +1: alloc r5=ar.pfs,0,0,3,0 // register frame for call + ;; + mov out0=r14 // signal number + mov out1=r15 // siginfo mov out2=r16 // ucontext mov r4=r16 // save from call br.call.sptk.few rp=b6 // call the signal handler ;; + alloc r14=ar.pfs,0,0,0,0 // discard call frame + ;; (p1) br.cond.sptk.few 2f // note: p1 is preserved flushrs mov ar.rsc=0 @@ -169,9 +171,8 @@ ENTRY(sigcode,0) ;; mov ar.rnat=r9 mov ar.rsc=15 - -2: alloc r14=ar.pfs,0,0,0,0 // no frame for sigreturn - CALLSYS_NOERROR(sigreturn) // call sigreturn() + ;; +2: CALLSYS_NOERROR(sigreturn) // call sigreturn() alloc r14=ar.pfs,0,0,1,0 ;; mov out0=ret0 // if that failed, get error code CALLSYS_NOERROR(exit) // and call exit() with it. diff --git a/sys/ia64/ia64/locore.s b/sys/ia64/ia64/locore.s index 4b0ef2f..313d95e 100644 --- a/sys/ia64/ia64/locore.s +++ b/sys/ia64/ia64/locore.s @@ -129,9 +129,6 @@ ENTRY(sigcode,0) mov b6=r8 // transfer to a branch register cover ;; - alloc r5=ar.pfs,0,0,3,0 // register frame for call - ;; - mov out0=r14 // signal number add r8=UC_MCONTEXT_MC_AR_BSP,r16 // address or mc_ar_bsp mov r9=ar.bsp // save ar.bsp ;; @@ -149,11 +146,16 @@ ENTRY(sigcode,0) mov ar.rsc=15 // XXX bogus value - check invala ;; -1: mov out1=r15 // siginfo +1: alloc r5=ar.pfs,0,0,3,0 // register frame for call + ;; + mov out0=r14 // signal number + mov out1=r15 // siginfo mov out2=r16 // ucontext mov r4=r16 // save from call br.call.sptk.few rp=b6 // call the signal handler ;; + alloc r14=ar.pfs,0,0,0,0 // discard call frame + ;; (p1) br.cond.sptk.few 2f // note: p1 is preserved flushrs mov ar.rsc=0 @@ -169,9 +171,8 @@ ENTRY(sigcode,0) ;; mov ar.rnat=r9 mov ar.rsc=15 - -2: alloc r14=ar.pfs,0,0,0,0 // no frame for sigreturn - CALLSYS_NOERROR(sigreturn) // call sigreturn() + ;; +2: CALLSYS_NOERROR(sigreturn) // call sigreturn() alloc r14=ar.pfs,0,0,1,0 ;; mov out0=ret0 // if that failed, get error code CALLSYS_NOERROR(exit) // and call exit() with it. |