summaryrefslogtreecommitdiffstats
path: root/sys/amd64/include/cpufunc.h
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2001-12-18 08:54:39 +0000
committerjhb <jhb@FreeBSD.org>2001-12-18 08:54:39 +0000
commit5d7a6cb932b96b3e71596f48d3603f5806a26be9 (patch)
tree8cfb56c69a770ad846ddebfa04b7dd2d77e2fe9d /sys/amd64/include/cpufunc.h
parent6eb183d2d9131b2183bbb6e0fdd4330f15244475 (diff)
downloadFreeBSD-src-5d7a6cb932b96b3e71596f48d3603f5806a26be9.zip
FreeBSD-src-5d7a6cb932b96b3e71596f48d3603f5806a26be9.tar.gz
Various assembly fixes mostly in the form of using the "+" modifier for
output operands to mark them as both input and output rather than listing operands twice. Reviewed by: bde
Diffstat (limited to 'sys/amd64/include/cpufunc.h')
-rw-r--r--sys/amd64/include/cpufunc.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/sys/amd64/include/cpufunc.h b/sys/amd64/include/cpufunc.h
index a4f57cb..c80c9f2 100644
--- a/sys/amd64/include/cpufunc.h
+++ b/sys/amd64/include/cpufunc.h
@@ -71,7 +71,7 @@ bsfl(u_int mask)
{
u_int result;
- __asm __volatile("bsfl %0,%0" : "=r" (result) : "0" (mask));
+ __asm __volatile("bsfl %1,%0" : "=r" (result) : "rm" (mask));
return (result);
}
@@ -80,7 +80,7 @@ bsrl(u_int mask)
{
u_int result;
- __asm __volatile("bsrl %0,%0" : "=r" (result) : "0" (mask));
+ __asm __volatile("bsrl %1,%0" : "=r" (result) : "rm" (mask));
return (result);
}
@@ -198,8 +198,8 @@ static __inline void
insb(u_int port, void *addr, size_t cnt)
{
__asm __volatile("cld; rep; insb"
- : "=D" (addr), "=c" (cnt)
- : "0" (addr), "1" (cnt), "d" (port)
+ : "+D" (addr), "+c" (cnt)
+ : "d" (port)
: "memory");
}
@@ -207,8 +207,8 @@ static __inline void
insw(u_int port, void *addr, size_t cnt)
{
__asm __volatile("cld; rep; insw"
- : "=D" (addr), "=c" (cnt)
- : "0" (addr), "1" (cnt), "d" (port)
+ : "+D" (addr), "+c" (cnt)
+ : "d" (port)
: "memory");
}
@@ -216,8 +216,8 @@ static __inline void
insl(u_int port, void *addr, size_t cnt)
{
__asm __volatile("cld; rep; insl"
- : "=D" (addr), "=c" (cnt)
- : "0" (addr), "1" (cnt), "d" (port)
+ : "+D" (addr), "+c" (cnt)
+ : "d" (port)
: "memory");
}
@@ -321,24 +321,24 @@ static __inline void
outsb(u_int port, const void *addr, size_t cnt)
{
__asm __volatile("cld; rep; outsb"
- : "=S" (addr), "=c" (cnt)
- : "0" (addr), "1" (cnt), "d" (port));
+ : "+S" (addr), "+c" (cnt)
+ : "d" (port));
}
static __inline void
outsw(u_int port, const void *addr, size_t cnt)
{
__asm __volatile("cld; rep; outsw"
- : "=S" (addr), "=c" (cnt)
- : "0" (addr), "1" (cnt), "d" (port));
+ : "+S" (addr), "+c" (cnt)
+ : "d" (port));
}
static __inline void
outsl(u_int port, const void *addr, size_t cnt)
{
__asm __volatile("cld; rep; outsl"
- : "=S" (addr), "=c" (cnt)
- : "0" (addr), "1" (cnt), "d" (port));
+ : "+S" (addr), "+c" (cnt)
+ : "d" (port));
}
static __inline void
OpenPOWER on IntegriCloud