cpufunc.h (31709) | cpufunc.h (32517) |
---|---|
1/*- 2 * Copyright (c) 1993 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 16 unchanged lines hidden (view full) --- 25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * | 1/*- 2 * Copyright (c) 1993 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 16 unchanged lines hidden (view full) --- 25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * |
33 * $Id: cpufunc.h,v 1.72 1997/09/07 22:01:27 fsmp Exp $ | 33 * $Id: cpufunc.h,v 1.73 1997/12/14 02:11:23 dyson Exp $ |
34 */ 35 36/* 37 * Functions to provide access to special i386 instructions. 38 */ 39 40#ifndef _MACHINE_CPUFUNC_H_ 41#define _MACHINE_CPUFUNC_H_ --- 243 unchanged lines hidden (view full) --- 285 * outl() and outw() aren't used much so we haven't looked at 286 * possible micro-optimizations such as the unnecessary 287 * assignment for them. 288 */ 289 __asm __volatile("outl %0,%%dx" : : "a" (data), "d" (port)); 290} 291 292static __inline void | 34 */ 35 36/* 37 * Functions to provide access to special i386 instructions. 38 */ 39 40#ifndef _MACHINE_CPUFUNC_H_ 41#define _MACHINE_CPUFUNC_H_ --- 243 unchanged lines hidden (view full) --- 285 * outl() and outw() aren't used much so we haven't looked at 286 * possible micro-optimizations such as the unnecessary 287 * assignment for them. 288 */ 289 __asm __volatile("outl %0,%%dx" : : "a" (data), "d" (port)); 290} 291 292static __inline void |
293outsb(u_int port, void *addr, size_t cnt) | 293outsb(u_int port, const void *addr, size_t cnt) |
294{ 295 __asm __volatile("cld; rep; outsb" 296 : : "d" (port), "S" (addr), "c" (cnt) 297 : "si", "cx"); 298} 299 300static __inline void | 294{ 295 __asm __volatile("cld; rep; outsb" 296 : : "d" (port), "S" (addr), "c" (cnt) 297 : "si", "cx"); 298} 299 300static __inline void |
301outsw(u_int port, void *addr, size_t cnt) | 301outsw(u_int port, const void *addr, size_t cnt) |
302{ 303 __asm __volatile("cld; rep; outsw" 304 : : "d" (port), "S" (addr), "c" (cnt) 305 : "si", "cx"); 306} 307 308static __inline void | 302{ 303 __asm __volatile("cld; rep; outsw" 304 : : "d" (port), "S" (addr), "c" (cnt) 305 : "si", "cx"); 306} 307 308static __inline void |
309outsl(u_int port, void *addr, size_t cnt) | 309outsl(u_int port, const void *addr, size_t cnt) |
310{ 311 __asm __volatile("cld; rep; outsl" 312 : : "d" (port), "S" (addr), "c" (cnt) 313 : "si", "cx"); 314} 315 316static __inline void 317outw(u_int port, u_short data) --- 119 unchanged lines hidden --- | 310{ 311 __asm __volatile("cld; rep; outsl" 312 : : "d" (port), "S" (addr), "c" (cnt) 313 : "si", "cx"); 314} 315 316static __inline void 317outw(u_int port, u_short data) --- 119 unchanged lines hidden --- |