mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-17 10:26:15 +00:00
Move the pcb variable initialization earlier. This is cosmetic here, but
in as-yet uncommitted code for 32 bit binary compatability on 64 bit kernels, some of the 32 bit registers come from the pcb. Moving the initialization here means fill_regs32() etc are laid out the same.
This commit is contained in:
parent
fa37873521
commit
27d89f4a00
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=145913
@ -2363,6 +2363,7 @@ fill_regs(struct thread *td, struct reg *regs)
|
||||
struct trapframe *tp;
|
||||
|
||||
tp = td->td_frame;
|
||||
pcb = td->td_pcb;
|
||||
regs->r_fs = tp->tf_fs;
|
||||
regs->r_es = tp->tf_es;
|
||||
regs->r_ds = tp->tf_ds;
|
||||
@ -2378,7 +2379,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;
|
||||
pcb = td->td_pcb;
|
||||
regs->r_gs = pcb->pcb_gs;
|
||||
return (0);
|
||||
}
|
||||
@ -2393,6 +2393,7 @@ set_regs(struct thread *td, struct reg *regs)
|
||||
if (!EFL_SECURE(regs->r_eflags, tp->tf_eflags) ||
|
||||
!CS_SECURE(regs->r_cs))
|
||||
return (EINVAL);
|
||||
pcb = td->td_pcb;
|
||||
tp->tf_fs = regs->r_fs;
|
||||
tp->tf_es = regs->r_es;
|
||||
tp->tf_ds = regs->r_ds;
|
||||
@ -2408,7 +2409,6 @@ set_regs(struct thread *td, struct reg *regs)
|
||||
tp->tf_eflags = regs->r_eflags;
|
||||
tp->tf_esp = regs->r_esp;
|
||||
tp->tf_ss = regs->r_ss;
|
||||
pcb = td->td_pcb;
|
||||
pcb->pcb_gs = regs->r_gs;
|
||||
return (0);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user