Skip to content
Snippets Groups Projects
Commit 4003e9be authored by rsc's avatar rsc
Browse files

xv6/x86.h: inline assembly cleanup

parent 8eb20827
No related branches found
No related tags found
No related merge requests found
...@@ -12,10 +12,10 @@ inb(ushort port) ...@@ -12,10 +12,10 @@ 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");
} }
static inline void static inline void
...@@ -33,10 +33,10 @@ outw(ushort port, ushort data) ...@@ -33,10 +33,10 @@ 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");
} }
static inline uint static inline uint
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment