summaryrefslogtreecommitdiffstats
path: root/sys/i386/include/endian.h
diff options
context:
space:
mode:
authorcsgr <csgr@FreeBSD.org>1994-09-10 20:03:14 +0000
committercsgr <csgr@FreeBSD.org>1994-09-10 20:03:14 +0000
commit35e39ab69062c32baf94c3dff23bdb93b82c5a14 (patch)
tree8d6fabcc4c43d02b0d8fef2434d892083ab9bd56 /sys/i386/include/endian.h
parentc4b37f75e8b687d147c2596f591eea4c40fa511e (diff)
downloadFreeBSD-src-35e39ab69062c32baf94c3dff23bdb93b82c5a14.zip
FreeBSD-src-35e39ab69062c32baf94c3dff23bdb93b82c5a14.tar.gz
Change "asm" to "__asm" - makes it possible to compile code with
"-ansi" compiler switch set.
Diffstat (limited to 'sys/i386/include/endian.h')
-rw-r--r--sys/i386/include/endian.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/i386/include/endian.h b/sys/i386/include/endian.h
index dc4e98c..f9a2875 100644
--- a/sys/i386/include/endian.h
+++ b/sys/i386/include/endian.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)endian.h 7.8 (Berkeley) 4/3/91
- * $Id: endian.h,v 1.3 1993/11/07 17:42:52 wollman Exp $
+ * $Id: endian.h,v 1.4 1993/12/19 05:14:45 alm Exp $
*/
#ifndef _MACHINE_ENDIAN_H_
@@ -59,33 +59,33 @@
#define __word_swap_long(x) \
({ register u_long X = (x); \
- asm ("rorl $16, %1" \
+ __asm ("rorl $16, %1" \
: "=r" (X) \
: "0" (X)); \
X; })
#if __GNUC__ >= 2
#define __byte_swap_long(x) \
({ register u_long X = (x); \
- asm ("xchgb %h1, %b1\n\trorl $16, %1\n\txchgb %h1, %b1" \
+ __asm ("xchgb %h1, %b1\n\trorl $16, %1\n\txchgb %h1, %b1" \
: "=q" (X) \
: "0" (X)); \
X; })
#define __byte_swap_word(x) \
({ register u_short X = (x); \
- asm ("xchgb %h1, %b1" \
+ __asm ("xchgb %h1, %b1" \
: "=q" (X) \
: "0" (X)); \
X; })
#else /* __GNUC__ >= 2 */
#define __byte_swap_long(x) \
({ register u_long X = (x); \
- asm ("rorw $8, %w1\n\trorl $16, %1\n\trorw $8, %w1" \
+ __asm ("rorw $8, %w1\n\trorl $16, %1\n\trorw $8, %w1" \
: "=r" (X) \
: "0" (X)); \
X; })
#define __byte_swap_word(x) \
({ register u_short X = (x); \
- asm ("rorw $8, %w1" \
+ __asm ("rorw $8, %w1" \
: "=r" (X) \
: "0" (X)); \
X; })
OpenPOWER on IntegriCloud