diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index 502aa4f49c6f..872d09b36092 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -645,10 +645,10 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask) /* * Unconditionally fill the fsbase and gsbase into the mcontext. */ - sdp = &td->td_pcb->pcb_gsd; + sdp = &td->td_pcb->pcb_fsd; sf.sf_uc.uc_mcontext.mc_fsbase = sdp->sd_hibase << 24 | sdp->sd_lobase; - sdp = &td->td_pcb->pcb_fsd; + sdp = &td->td_pcb->pcb_gsd; sf.sf_uc.uc_mcontext.mc_gsbase = sdp->sd_hibase << 24 | sdp->sd_lobase; @@ -3255,9 +3255,9 @@ get_mcontext(struct thread *td, mcontext_t *mcp, int flags) * mcontext after mc_fpstate. */ get_fpcontext(td, mcp); - sdp = &td->td_pcb->pcb_gsd; - mcp->mc_fsbase = sdp->sd_hibase << 24 | sdp->sd_lobase; sdp = &td->td_pcb->pcb_fsd; + mcp->mc_fsbase = sdp->sd_hibase << 24 | sdp->sd_lobase; + sdp = &td->td_pcb->pcb_gsd; mcp->mc_gsbase = sdp->sd_hibase << 24 | sdp->sd_lobase; return (0); diff --git a/sys/pc98/pc98/machdep.c b/sys/pc98/pc98/machdep.c index aa553ca7c247..671ce5b3cf37 100644 --- a/sys/pc98/pc98/machdep.c +++ b/sys/pc98/pc98/machdep.c @@ -580,10 +580,10 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask) /* * Unconditionally fill the fsbase and gsbase into the mcontext. */ - sdp = &td->td_pcb->pcb_gsd; + sdp = &td->td_pcb->pcb_fsd; sf.sf_uc.uc_mcontext.mc_fsbase = sdp->sd_hibase << 24 | sdp->sd_lobase; - sdp = &td->td_pcb->pcb_fsd; + sdp = &td->td_pcb->pcb_gsd; sf.sf_uc.uc_mcontext.mc_gsbase = sdp->sd_hibase << 24 | sdp->sd_lobase; @@ -2583,9 +2583,9 @@ get_mcontext(struct thread *td, mcontext_t *mcp, int flags) * mcontext after mc_fpstate. */ get_fpcontext(td, mcp); - sdp = &td->td_pcb->pcb_gsd; - mcp->mc_fsbase = sdp->sd_hibase << 24 | sdp->sd_lobase; sdp = &td->td_pcb->pcb_fsd; + mcp->mc_fsbase = sdp->sd_hibase << 24 | sdp->sd_lobase; + sdp = &td->td_pcb->pcb_gsd; mcp->mc_gsbase = sdp->sd_hibase << 24 | sdp->sd_lobase; return (0);