xv6/x86.h: inline assembly cleanup
This commit is contained in:
parent
8eb20827c2
commit
4003e9bed8
4
x86.h
4
x86.h
|
@ -12,7 +12,7 @@ inb(ushort port)
|
||||||
static inline void
|
static inline void
|
||||||
insl(int port, void *addr, int cnt)
|
insl(int port, void *addr, int cnt)
|
||||||
{
|
{
|
||||||
asm volatile("cld\n\trepne\n\tinsl" :
|
asm volatile("cld; repne insl" :
|
||||||
"=D" (addr), "=c" (cnt) :
|
"=D" (addr), "=c" (cnt) :
|
||||||
"d" (port), "0" (addr), "1" (cnt) :
|
"d" (port), "0" (addr), "1" (cnt) :
|
||||||
"memory", "cc");
|
"memory", "cc");
|
||||||
|
@ -33,7 +33,7 @@ outw(ushort port, ushort data)
|
||||||
static inline void
|
static inline void
|
||||||
outsl(int port, const void *addr, int cnt)
|
outsl(int port, const void *addr, int cnt)
|
||||||
{
|
{
|
||||||
asm volatile("cld\n\trepne\n\toutsl" :
|
asm volatile("cld; repne outsl" :
|
||||||
"=S" (addr), "=c" (cnt) :
|
"=S" (addr), "=c" (cnt) :
|
||||||
"d" (port), "0" (addr), "1" (cnt) :
|
"d" (port), "0" (addr), "1" (cnt) :
|
||||||
"cc");
|
"cc");
|
||||||
|
|
Loading…
Reference in a new issue