diff options
author | davidxu <davidxu@FreeBSD.org> | 2003-04-19 02:40:39 +0000 |
---|---|---|
committer | davidxu <davidxu@FreeBSD.org> | 2003-04-19 02:40:39 +0000 |
commit | 6223a95348ea93dfdcb9a7f268196bbf9a5e834e (patch) | |
tree | 3dc50456ec17153f0e111b7263dec8a799137ff6 /sys/i386/include/cpufunc.h | |
parent | 20e15050d1a812bbce09abe4460de3b893dd773d (diff) | |
download | FreeBSD-src-6223a95348ea93dfdcb9a7f268196bbf9a5e834e.zip FreeBSD-src-6223a95348ea93dfdcb9a7f268196bbf9a5e834e.tar.gz |
Don't return garbage in high 16 bits.
Diffstat (limited to 'sys/i386/include/cpufunc.h')
-rw-r--r-- | sys/i386/include/cpufunc.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/i386/include/cpufunc.h b/sys/i386/include/cpufunc.h index c7f9ace..3fe22ac 100644 --- a/sys/i386/include/cpufunc.h +++ b/sys/i386/include/cpufunc.h @@ -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); } |