summaryrefslogtreecommitdiffstats
path: root/sys/i386/include/endian.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/i386/include/endian.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/i386/include/endian.h')
-rw-r--r--sys/i386/include/endian.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/i386/include/endian.h b/sys/i386/include/endian.h
index 3f96741..be87af2 100644
--- a/sys/i386/include/endian.h
+++ b/sys/i386/include/endian.h
@@ -72,7 +72,7 @@ __END_DECLS
static __inline __uint32_t
__uint16_swap_uint32(__uint32_t __x)
{
- __asm ("rorl $16, %1" : "=r" (__x) : "0" (__x));
+ __asm ("rorl $16, %0" : "+r" (__x));
return __x;
}
@@ -81,12 +81,12 @@ static __inline __uint32_t
__uint8_swap_uint32(__uint32_t __x)
{
#if defined(_KERNEL) && (defined(I486_CPU) || defined(I586_CPU) || defined(I686_CPU)) && !defined(I386_CPU)
- __asm ("bswap %0" : "=r" (__x) : "0" (__x));
+ __asm ("bswap %0" : "+r" (__x));
#else
- __asm ("xchgb %h1, %b1\n\t"
- "rorl $16, %1\n\t"
- "xchgb %h1, %b1"
- : "=q" (__x) : "0" (__x));
+ __asm ("xchgb %h0, %b0\n\t"
+ "rorl $16, %0\n\t"
+ "xchgb %h0, %b0"
+ : "+q" (__x));
#endif
return __x;
}
@@ -94,7 +94,7 @@ __uint8_swap_uint32(__uint32_t __x)
static __inline __uint16_t
__uint8_swap_uint16(__uint16_t __x)
{
- __asm ("xchgb %h1, %b1" : "=q" (__x) : "0" (__x));
+ __asm ("xchgb %h0, %b0" : "+q" (__x));
return __x;
}
OpenPOWER on IntegriCloud