MFi386: revision 218744

To avoid excessive code duplication create wrapper for fill regs
  from stack frame.
This commit is contained in:
Yoshihiro Takahashi 2011-02-19 10:36:05 +00:00
parent 709f6be098
commit 377015fc6a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=218843

View File

@ -2458,6 +2458,13 @@ fill_regs(struct thread *td, struct reg *regs)
tp = td->td_frame;
pcb = td->td_pcb;
regs->r_gs = pcb->pcb_gs;
return (fill_frame_regs(tp, regs));
}
int
fill_frame_regs(struct trapframe *tp, struct reg *regs)
{
regs->r_fs = tp->tf_fs;
regs->r_es = tp->tf_es;
regs->r_ds = tp->tf_ds;
@ -2473,7 +2480,6 @@ fill_regs(struct thread *td, struct reg *regs)
regs->r_eflags = tp->tf_eflags;
regs->r_esp = tp->tf_esp;
regs->r_ss = tp->tf_ss;
regs->r_gs = pcb->pcb_gs;
return (0);
}