diff options
author | rdivacky <rdivacky@FreeBSD.org> | 2010-09-03 14:25:17 +0000 |
---|---|---|
committer | rdivacky <rdivacky@FreeBSD.org> | 2010-09-03 14:25:17 +0000 |
commit | b464d39d953775d51a7adc0f4d3a8849d9d870d4 (patch) | |
tree | 4c2e79e9c94df86b9bb6efa6de01ccc30807d496 /sys/i386/include/cpufunc.h | |
parent | 757a8d026a387961065e755dace6ecc97f0b12c3 (diff) | |
download | FreeBSD-src-b464d39d953775d51a7adc0f4d3a8849d9d870d4.zip FreeBSD-src-b464d39d953775d51a7adc0f4d3a8849d9d870d4.tar.gz |
Change the parameter passed to the inline assembly to u_short
as we are dealing with 16bit segment registers. Change mov
to movw.
Approved by: rpaulo (mentor)
Reviewed by: kib, rink
Diffstat (limited to 'sys/i386/include/cpufunc.h')
-rw-r--r-- | sys/i386/include/cpufunc.h | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/sys/i386/include/cpufunc.h b/sys/i386/include/cpufunc.h index 2de6f44..3c7251f 100644 --- a/sys/i386/include/cpufunc.h +++ b/sys/i386/include/cpufunc.h @@ -444,11 +444,11 @@ invlpg(u_int addr) #endif } -static __inline u_int +static __inline u_short rfs(void) { - u_int sel; - __asm __volatile("mov %%fs,%0" : "=rm" (sel)); + u_short sel; + __asm __volatile("movw %%fs,%0" : "=rm" (sel)); return (sel); } @@ -460,11 +460,11 @@ rgdt(void) return (gdtr); } -static __inline u_int +static __inline u_short rgs(void) { - u_int sel; - __asm __volatile("mov %%gs,%0" : "=rm" (sel)); + u_short sel; + __asm __volatile("movw %%gs,%0" : "=rm" (sel)); return (sel); } @@ -484,11 +484,11 @@ rldt(void) return (ldtr); } -static __inline u_int +static __inline u_short rss(void) { - u_int sel; - __asm __volatile("mov %%ss,%0" : "=rm" (sel)); + u_short sel; + __asm __volatile("movw %%ss,%0" : "=rm" (sel)); return (sel); } @@ -501,15 +501,15 @@ rtr(void) } static __inline void -load_fs(u_int sel) +load_fs(u_short sel) { - __asm __volatile("mov %0,%%fs" : : "rm" (sel)); + __asm __volatile("movw %0,%%fs" : : "rm" (sel)); } static __inline void -load_gs(u_int sel) +load_gs(u_short sel) { - __asm __volatile("mov %0,%%gs" : : "rm" (sel)); + __asm __volatile("movw %0,%%gs" : : "rm" (sel)); } static __inline void @@ -706,8 +706,8 @@ void load_dr4(u_int dr4); void load_dr5(u_int dr5); void load_dr6(u_int dr6); void load_dr7(u_int dr7); -void load_fs(u_int sel); -void load_gs(u_int sel); +void load_fs(u_short sel); +void load_gs(u_short sel); void ltr(u_short sel); void outb(u_int port, u_char data); void outl(u_int port, u_int data); |