From 27d89f4a00487c3ec939e9473b5e11499548c47d Mon Sep 17 00:00:00 2001 From: Peter Wemm Date: Thu, 5 May 2005 18:26:45 +0000 Subject: [PATCH] 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. --- sys/i386/i386/machdep.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index adbf5bf022a4..809e30e6748c 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -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); }