no more w

This commit is contained in:
rsc 2007-08-20 18:55:51 +00:00
parent bcca6c6bde
commit ef30c2c749

12
x86.h
View file

@ -2,10 +2,10 @@
// hardware instructions. // hardware instructions.
static __inline uchar static __inline uchar
inb(int port) inb(ushort port)
{ {
uchar data; uchar data;
__asm __volatile("inb %w1,%0" : "=a" (data) : "d" (port)); __asm __volatile("in %1,%0" : "=a" (data) : "d" (port));
return data; return data;
} }
@ -19,15 +19,15 @@ insl(int port, void *addr, int cnt)
} }
static __inline void static __inline void
outb(int port, uchar data) outb(ushort port, uchar data)
{ {
__asm __volatile("outb %0,%w1" : : "a" (data), "d" (port)); __asm __volatile("out %0,%1" : : "a" (data), "d" (port));
} }
static __inline void static __inline void
outw(int port, ushort data) outw(ushort port, ushort data)
{ {
__asm __volatile("outw %0,%w1" : : "a" (data), "d" (port)); __asm __volatile("out %0,%1" : : "a" (data), "d" (port));
} }
static __inline void static __inline void