提交 4003e9be 创建 作者: rsc's avatar rsc

xv6/x86.h: inline assembly cleanup

上级 8eb20827
......@@ -12,7 +12,7 @@ inb(ushort port)
static inline void
insl(int port, void *addr, int cnt)
{
asm volatile("cld\n\trepne\n\tinsl" :
asm volatile("cld; repne insl" :
"=D" (addr), "=c" (cnt) :
"d" (port), "0" (addr), "1" (cnt) :
"memory", "cc");
......@@ -33,7 +33,7 @@ outw(ushort port, ushort data)
static inline void
outsl(int port, const void *addr, int cnt)
{
asm volatile("cld\n\trepne\n\toutsl" :
asm volatile("cld; repne outsl" :
"=S" (addr), "=c" (cnt) :
"d" (port), "0" (addr), "1" (cnt) :
"cc");
......
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论