Store fsbase and gsbase in the right fields of the mcontext. They were

switched.

PR:		i386/148344
Approved by:	kib (mentor)
MFC after:	1 week
This commit is contained in:
Tijl Coosemans 2010-07-20 12:36:36 +00:00
parent e9f0d5658c
commit 3245ecbe92
2 changed files with 8 additions and 8 deletions

View File

@ -645,10 +645,10 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask)
/* /*
* Unconditionally fill the fsbase and gsbase into the mcontext. * 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 | sf.sf_uc.uc_mcontext.mc_fsbase = sdp->sd_hibase << 24 |
sdp->sd_lobase; 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 | sf.sf_uc.uc_mcontext.mc_gsbase = sdp->sd_hibase << 24 |
sdp->sd_lobase; sdp->sd_lobase;
@ -3255,9 +3255,9 @@ get_mcontext(struct thread *td, mcontext_t *mcp, int flags)
* mcontext after mc_fpstate. * mcontext after mc_fpstate.
*/ */
get_fpcontext(td, mcp); 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; 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; mcp->mc_gsbase = sdp->sd_hibase << 24 | sdp->sd_lobase;
return (0); return (0);

View File

@ -580,10 +580,10 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask)
/* /*
* Unconditionally fill the fsbase and gsbase into the mcontext. * 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 | sf.sf_uc.uc_mcontext.mc_fsbase = sdp->sd_hibase << 24 |
sdp->sd_lobase; 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 | sf.sf_uc.uc_mcontext.mc_gsbase = sdp->sd_hibase << 24 |
sdp->sd_lobase; sdp->sd_lobase;
@ -2583,9 +2583,9 @@ get_mcontext(struct thread *td, mcontext_t *mcp, int flags)
* mcontext after mc_fpstate. * mcontext after mc_fpstate.
*/ */
get_fpcontext(td, mcp); 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; 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; mcp->mc_gsbase = sdp->sd_hibase << 24 | sdp->sd_lobase;
return (0); return (0);