diff -ur ../src.orig/sys/compat/ndis/winx32_wrap.S ./sys/compat/ndis/winx32_wrap.S --- ../src.orig/sys/compat/ndis/winx32_wrap.S 2006-06-12 22:35:59.000000000 +0200 +++ ./sys/compat/ndis/winx32_wrap.S 2008-03-14 14:00:41.949886084 +0100 @@ -369,7 +369,7 @@ ret ENTRY(x86_setfs) - movl 4(%esp),%fs + movw 4(%esp),%fs ret ENTRY(x86_gettid) diff -ur ../src.orig/sys/i386/i386/locore.s ./sys/i386/i386/locore.s --- ../src.orig/sys/i386/i386/locore.s 2007-03-24 20:53:22.000000000 +0100 +++ ./sys/i386/i386/locore.s 2008-03-14 14:00:41.946886262 +0100 @@ -358,7 +358,7 @@ pushl %eax testl $PSL_VM,UC_EFLAGS(%eax) jne 1f - movl UC_GS(%eax),%gs /* restore %gs */ + movw UC_GS(%eax),%gs /* restore %gs */ 1: movl $SYS_sigreturn,%eax pushl %eax /* junk to fake return addr. */ @@ -375,7 +375,7 @@ pushl %eax testl $PSL_VM,UC4_EFLAGS(%eax) jne 1f - movl UC4_GS(%eax),%gs /* restore %gs */ + movw UC4_GS(%eax),%gs /* restore %gs */ 1: movl $344,%eax /* 4.x SYS_sigreturn */ pushl %eax /* junk to fake return addr. */ @@ -393,7 +393,7 @@ pushl %eax testl $PSL_VM,SC_PS(%eax) jne 9f - movl SC_GS(%eax),%gs /* restore %gs */ + movw SC_GS(%eax),%gs /* restore %gs */ 9: movl $103,%eax /* 3.x SYS_sigreturn */ pushl %eax /* junk to fake return addr. */ diff -ur ../src.orig/sys/i386/i386/swtch.s ./sys/i386/i386/swtch.s --- ../src.orig/sys/i386/i386/swtch.s 2007-08-22 07:06:14.000000000 +0200 +++ ./sys/i386/i386/swtch.s 2008-03-14 14:00:41.948886237 +0100 @@ -130,7 +130,7 @@ movl %ebp,PCB_EBP(%edx) movl %esi,PCB_ESI(%edx) movl %edi,PCB_EDI(%edx) - movl %gs,PCB_GS(%edx) + movw %gs,PCB_GS(%edx) pushfl /* PSL */ popl PCB_PSL(%edx) /* Test if debug registers should be saved. */ @@ -301,7 +301,7 @@ /* This must be done after loading the user LDT. */ .globl cpu_switch_load_gs cpu_switch_load_gs: - movl PCB_GS(%edx),%gs + movw PCB_GS(%edx),%gs /* Test if debug registers should be restored. */ testl $PCB_DBREGS,PCB_FLAGS(%edx) @@ -371,7 +371,7 @@ movl %ebp,PCB_EBP(%ecx) movl %esi,PCB_ESI(%ecx) movl %edi,PCB_EDI(%ecx) - movl %gs,PCB_GS(%ecx) + movw %gs,PCB_GS(%ecx) pushfl popl PCB_PSL(%ecx) diff -ur ../src.orig/sys/i386/include/cpufunc.h ./sys/i386/include/cpufunc.h --- ../src.orig/sys/i386/include/cpufunc.h 2007-08-09 22:14:35.000000000 +0200 +++ ./sys/i386/include/cpufunc.h 2008-03-14 14:03:09.264377451 +0100 @@ -452,7 +452,7 @@ rfs(void) { u_int sel; - __asm __volatile("movl %%fs,%0" : "=rm" (sel)); + __asm __volatile("movw %%fs,%0" : "=rm" (sel)); return (sel); } @@ -468,7 +468,7 @@ rgs(void) { u_int sel; - __asm __volatile("movl %%gs,%0" : "=rm" (sel)); + __asm __volatile("movw %%gs,%0" : "=rm" (sel)); return (sel); } @@ -492,7 +492,7 @@ rss(void) { u_int sel; - __asm __volatile("movl %%ss,%0" : "=rm" (sel)); + __asm __volatile("movw %%ss,%0" : "=rm" (sel)); return (sel); } @@ -507,13 +507,13 @@ static __inline void load_fs(u_int sel) { - __asm __volatile("movl %0,%%fs" : : "rm" (sel)); + __asm __volatile("movw %0,%%fs" : : "rm" (sel)); } static __inline void load_gs(u_int sel) { - __asm __volatile("movl %0,%%gs" : : "rm" (sel)); + __asm __volatile("movw %0,%%gs" : : "rm" (sel)); } static __inline void diff -ur ../src.orig/sys/i386/linux/linux_locore.s ./sys/i386/linux/linux_locore.s --- ../src.orig/sys/i386/linux/linux_locore.s 2001-02-25 07:29:01.000000000 +0100 +++ ./sys/i386/linux/linux_locore.s 2008-03-14 14:00:41.949886084 +0100 @@ -8,7 +8,7 @@ NON_GPROF_ENTRY(linux_sigcode) call *LINUX_SIGF_HANDLER(%esp) leal LINUX_SIGF_SC(%esp),%ebx /* linux scp */ - movl LINUX_SC_GS(%ebx),%gs + movw LINUX_SC_GS(%ebx),%gs movl %esp, %ebx /* pass sigframe */ push %eax /* fake ret addr */ movl $LINUX_SYS_linux_sigreturn,%eax /* linux_sigreturn() */ @@ -20,7 +20,7 @@ call *LINUX_RT_SIGF_HANDLER(%esp) leal LINUX_RT_SIGF_UC(%esp),%ebx /* linux ucp */ leal LINUX_RT_SIGF_SC(%ebx),%ecx /* linux sigcontext */ - movl LINUX_SC_GS(%ecx),%gs + movw LINUX_SC_GS(%ecx),%gs push %eax /* fake ret addr */ movl $LINUX_SYS_linux_rt_sigreturn,%eax /* linux_rt_sigreturn() */ int $0x80 /* enter kernel with args */