Skip to content

Commit

Permalink
xv6/x86.h: inline assembly cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
rsc committed Mar 8, 2009
1 parent 8eb2082 commit 4003e9b
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions x86.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ inb(ushort port)
static inline void
insl(int port, void *addr, int cnt)
{
asm volatile("cld\n\trepne\n\tinsl" :
"=D" (addr), "=c" (cnt) :
"d" (port), "0" (addr), "1" (cnt) :
"memory", "cc");
asm volatile("cld; repne insl" :
"=D" (addr), "=c" (cnt) :
"d" (port), "0" (addr), "1" (cnt) :
"memory", "cc");
}

static inline void
Expand All @@ -33,10 +33,10 @@ outw(ushort port, ushort data)
static inline void
outsl(int port, const void *addr, int cnt)
{
asm volatile("cld\n\trepne\n\toutsl" :
"=S" (addr), "=c" (cnt) :
"d" (port), "0" (addr), "1" (cnt) :
"cc");
asm volatile("cld; repne outsl" :
"=S" (addr), "=c" (cnt) :
"d" (port), "0" (addr), "1" (cnt) :
"cc");
}

static inline uint
Expand Down

0 comments on commit 4003e9b

Please sign in to comment.