diff options
author | kensmith <kensmith@FreeBSD.org> | 2004-10-09 16:42:09 +0000 |
---|---|---|
committer | kensmith <kensmith@FreeBSD.org> | 2004-10-09 16:42:09 +0000 |
commit | 22149b5972086cbecae60e94cbe8e93b57b3cb1e (patch) | |
tree | 378fc95d8e63761d3a29f7de824a2e59a3dd7cd9 /sys | |
parent | 38ce00cc1cdecab254d7b72ea517c1c1db877e05 (diff) | |
download | FreeBSD-src-22149b5972086cbecae60e94cbe8e93b57b3cb1e.zip FreeBSD-src-22149b5972086cbecae60e94cbe8e93b57b3cb1e.tar.gz |
Flush the register windows before we start changing the context.
Submitted by: Andrew Belashov <bel (at) orel.ru> (slightly modified)
Reviewed by: jake
Diffstat (limited to 'sys')
-rw-r--r-- | sys/sparc64/sparc64/machdep.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/sparc64/sparc64/machdep.c b/sys/sparc64/sparc64/machdep.c index f7f08c4..cc7eb3d 100644 --- a/sys/sparc64/sparc64/machdep.c +++ b/sys/sparc64/sparc64/machdep.c @@ -646,6 +646,8 @@ set_mcontext(struct thread *td, const mcontext_t *mc) return (EINVAL); tf = td->td_frame; pcb = td->td_pcb; + /* Make sure the windows are spilled first. */ + flushw(); wstate = tf->tf_wstate; bcopy(mc, tf, sizeof(*tf)); tf->tf_wstate = wstate; |