MFi386: revision 218744

To avoid excessive code duplication create wrapper for fill regs
  from stack frame.
This commit is contained in:
nyan 2011-02-19 10:36:05 +00:00
parent 9e117269c9
commit ecb85d5624

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);
}