diff options
author | bde <bde@FreeBSD.org> | 1996-09-29 18:35:07 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1996-09-29 18:35:07 +0000 |
commit | 1f72e7838967343b8e4780d6d3e5cb6913599344 (patch) | |
tree | e6004f258cf5650b421fcc55ec28958d4f295556 /sys/i386/include/cpufunc.h | |
parent | d48ca4441c18678fa832ae553c95d8c162be6c34 (diff) | |
download | FreeBSD-src-1f72e7838967343b8e4780d6d3e5cb6913599344.zip FreeBSD-src-1f72e7838967343b8e4780d6d3e5cb6913599344.tar.gz |
Added "memory" to clobber list in invlpg(). It needs it if invltlb()
needs it.
Fixed style in invlpg().
Sorted recently renamed functions.
Added prototypes in the non-gcc section for recently added/renamed
functions.
Diffstat (limited to 'sys/i386/include/cpufunc.h')
-rw-r--r-- | sys/i386/include/cpufunc.h | 41 |
1 files changed, 21 insertions, 20 deletions
diff --git a/sys/i386/include/cpufunc.h b/sys/i386/include/cpufunc.h index f789ee1..81df81c 100644 --- a/sys/i386/include/cpufunc.h +++ b/sys/i386/include/cpufunc.h @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: cpufunc.h,v 1.57 1996/09/28 04:22:46 dyson Exp $ + * $Id: cpufunc.h,v 1.58 1996/09/28 22:37:57 dyson Exp $ */ /* @@ -195,6 +195,24 @@ insl(u_int port, void *addr, size_t cnt) : "di", "cx", "memory"); } +static __inline void +invlpg(u_int addr) +{ + __asm __volatile("invlpg (%0)" : : "r" (addr) : "memory"); +} + +static __inline void +invltlb(void) +{ + u_long temp; + /* + * This should be implemented as load_cr3(rcr3()) when load_cr3() + * is inlined. + */ + __asm __volatile("movl %%cr3, %0; movl %0, %%cr3" : "=r" (temp) + : : "memory"); +} + static __inline u_short inw(u_int port) { @@ -269,25 +287,6 @@ outw(u_int port, u_short data) __asm __volatile("outw %0,%%dx" : : "a" (data), "d" (port)); } - -static __inline void -invltlb(void) -{ - u_long temp; - /* - * This should be implemented as load_cr3(rcr3()) when load_cr3() - * is inlined. - */ - __asm __volatile("movl %%cr3, %0; movl %0, %%cr3" : "=r" (temp) - : : "memory"); -} - -static __inline void -invlpg(u_long addr) -{ - __asm __volatile("invlpg (%0)": :"r"(addr)); -} - static __inline u_long rcr2(void) { @@ -361,6 +360,8 @@ u_long inl __P((u_int port)); void insb __P((u_int port, void *addr, size_t cnt)); void insl __P((u_int port, void *addr, size_t cnt)); void insw __P((u_int port, void *addr, size_t cnt)); +void invlpg __P((u_int addr)); +void invltlb __P((void)); u_short inw __P((u_int port)); u_int loadandclear __P((u_int *addr)); void outb __P((u_int port, u_char data)); |