diff options
Diffstat (limited to 'sys/ia64')
-rw-r--r-- | sys/ia64/ia64/machdep.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/ia64/ia64/machdep.c b/sys/ia64/ia64/machdep.c index 982f746..49015b5 100644 --- a/sys/ia64/ia64/machdep.c +++ b/sys/ia64/ia64/machdep.c @@ -1023,9 +1023,14 @@ int set_mcontext(struct thread *td, const mcontext_t *mc) { struct trapframe *tf; + uint64_t psr; tf = td->td_frame; + /* Only copy the user mask from the new context. */ + psr = tf->tf_special.psr & ~0x1f; + psr |= mc->mc_special.psr & 0x1f; tf->tf_special = mc->mc_special; + tf->tf_special.psr = psr; restore_callee_saved(&mc->mc_preserved); restore_callee_saved_fp(&mc->mc_preserved_fp); return (0); |