Don't return garbage in high 16 bits.

This commit is contained in:
David Xu 2003-04-19 02:40:39 +00:00
parent 5a2409f32c
commit 2bdf11638e
2 changed files with 8 additions and 8 deletions

View File

@ -444,16 +444,16 @@ invlpg(u_int addr)
static __inline u_int
rfs(void)
{
u_int sel;
__asm __volatile("movl %%fs,%0" : "=rm" (sel));
u_short sel;
__asm __volatile("movw %%fs,%0" : "=rm" (sel));
return (sel);
}
static __inline u_int
rgs(void)
{
u_int sel;
__asm __volatile("movl %%gs,%0" : "=rm" (sel));
u_short sel;
__asm __volatile("movw %%gs,%0" : "=rm" (sel));
return (sel);
}

View File

@ -444,16 +444,16 @@ invlpg(u_int addr)
static __inline u_int
rfs(void)
{
u_int sel;
__asm __volatile("movl %%fs,%0" : "=rm" (sel));
u_short sel;
__asm __volatile("movw %%fs,%0" : "=rm" (sel));
return (sel);
}
static __inline u_int
rgs(void)
{
u_int sel;
__asm __volatile("movl %%gs,%0" : "=rm" (sel));
u_short sel;
__asm __volatile("movw %%gs,%0" : "=rm" (sel));
return (sel);
}