summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1994-08-11 02:26:08 +0000
committerjkh <jkh@FreeBSD.org>1994-08-11 02:26:08 +0000
commit0dbbd21c057fe64594e4a00eab4a6b2a58930eb7 (patch)
tree8fe264955a2bd876fb0a0f9287a363c51d0152ea
parent8fd9bc3d00833d86814c95e730afaa3313c5fbc1 (diff)
downloadFreeBSD-src-0dbbd21c057fe64594e4a00eab4a6b2a58930eb7.zip
FreeBSD-src-0dbbd21c057fe64594e4a00eab4a6b2a58930eb7.tar.gz
Change outb() as per Bruce's instructions so that it doesn't explicitly
try to pass its argument in the ax register. Reviewed by: Submitted by:
-rw-r--r--sys/amd64/include/cpufunc.h4
-rw-r--r--sys/i386/include/cpufunc.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/amd64/include/cpufunc.h b/sys/amd64/include/cpufunc.h
index 74067a7..8724596 100644
--- a/sys/amd64/include/cpufunc.h
+++ b/sys/amd64/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.13 1994/08/02 07:38:43 davidg Exp $
+ * $Id: cpufunc.h,v 1.14 1994/08/04 19:46:57 davidg Exp $
*/
/*
@@ -92,7 +92,7 @@ u_int_inb(u_int port)
static inline void
outb(u_int port, u_char data)
{
- register u_char al asm("ax");
+ u_char al;
al = data; /* help gcc-1.40's register allocator */
__asm __volatile("outb %0,%%dx" : : "a" (al), "d" (port));
diff --git a/sys/i386/include/cpufunc.h b/sys/i386/include/cpufunc.h
index 74067a7..8724596 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.13 1994/08/02 07:38:43 davidg Exp $
+ * $Id: cpufunc.h,v 1.14 1994/08/04 19:46:57 davidg Exp $
*/
/*
@@ -92,7 +92,7 @@ u_int_inb(u_int port)
static inline void
outb(u_int port, u_char data)
{
- register u_char al asm("ax");
+ u_char al;
al = data; /* help gcc-1.40's register allocator */
__asm __volatile("outb %0,%%dx" : : "a" (al), "d" (port));
OpenPOWER on IntegriCloud