summaryrefslogtreecommitdiffstats
path: root/sys/i386/include/endian.h
diff options
context:
space:
mode:
authormarkm <markm@FreeBSD.org>2001-04-14 20:42:04 +0000
committermarkm <markm@FreeBSD.org>2001-04-14 20:42:04 +0000
commit6da31e65f87031889e2e00fc71656baacdde3fdb (patch)
tree8dff5376d3df859dbc7866fea9f96b35926d783a /sys/i386/include/endian.h
parentca2a697abb1872ef055d5a8ef16c1c448470b007 (diff)
downloadFreeBSD-src-6da31e65f87031889e2e00fc71656baacdde3fdb.zip
FreeBSD-src-6da31e65f87031889e2e00fc71656baacdde3fdb.tar.gz
Back out wrapping the asm ... ; bits in #ifndef lint macros. There
are some good reasons for not doing this, even if the linting of the code breaks. 1) If lint were ever to understand the stuff inside the macros, that would break the checks. 2) There are ways to use __GNUC__ to exclude overly specific code. 3) (Not yet practical) Lint(1) needs to properlyu understand all of te code we actually run. Complained about by: bde Education by: jake, jhb, eivind
Diffstat (limited to 'sys/i386/include/endian.h')
-rw-r--r--sys/i386/include/endian.h6
1 files changed, 0 insertions, 6 deletions
diff --git a/sys/i386/include/endian.h b/sys/i386/include/endian.h
index 2764e69..41ceda4 100644
--- a/sys/i386/include/endian.h
+++ b/sys/i386/include/endian.h
@@ -71,9 +71,7 @@ __END_DECLS
static __inline unsigned long
__uint16_swap_uint32(unsigned long __x)
{
-#ifndef lint
__asm ("rorl $16, %1" : "=r" (__x) : "0" (__x));
-#endif
return __x;
}
@@ -81,23 +79,19 @@ __uint16_swap_uint32(unsigned long __x)
static __inline unsigned long
__uint8_swap_uint32(unsigned long __x)
{
-#ifndef lint
#if defined(_KERNEL) && (defined(I486_CPU) || defined(I586_CPU) || defined(I686_CPU)) && !defined(I386_CPU)
__asm ("bswap %0" : "=r" (__x) : "0" (__x));
#else
__asm ("xchgb %h1, %b1\n\trorl $16, %1\n\txchgb %h1, %b1"
: "=q" (__x) : "0" (__x));
#endif
-#endif
return __x;
}
static __inline unsigned short
__uint8_swap_uint16(unsigned short __x)
{
-#ifndef lint
__asm ("xchgb %h1, %b1" : "=q" (__x) : "0" (__x));
-#endif
return __x;
}
OpenPOWER on IntegriCloud