1 #ifndef _S390_BYTEORDER_H
2 #define _S390_BYTEORDER_H
5 * include/asm-s390/byteorder.h
8 * Copyright (C) 1999 IBM Deutschland Entwicklung GmbH, IBM Corporation
9 * Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com)
12 #include <asm/types.h>
16 static __inline__ __const__ __u32 ___arch__swab32(__u32 x)
20 __asm__ __volatile__ (
26 : "+&d" (x) : "a" (&temp) : "cc" );
30 static __inline__ __const__ __u32 ___arch__swab32p(__u32 *x)
34 __asm__ __volatile__ (
39 : "=&d" (result) : "a" (x) : "cc" );
43 static __inline__ void ___arch__swab32s(__u32 *x)
45 __asm__ __volatile__ (
51 : : "a" (x) : "0", "memory", "cc");
54 static __inline__ __const__ __u16 ___arch__swab16(__u16 x)
58 __asm__ __volatile__ (
62 : "+&d" (x) : "a" (&temp) : "memory", "cc" );
66 static __inline__ __const__ __u16 ___arch__swab16p(__u16 *x)
70 __asm__ __volatile__ (
74 : "=&d" (result) : "a" (x) : "cc" );
78 static __inline__ void ___arch__swab16s(__u16 *x)
84 : : "a" (x) : "0", "memory", "cc" );
87 #define __arch__swab32(x) ___arch__swab32(x)
88 #define __arch__swab16(x) ___arch__swab16(x)
89 #define __arch__swab32p(x) ___arch__swab32p(x)
90 #define __arch__swab16p(x) ___arch__swab16p(x)
91 #define __arch__swab32s(x) ___arch__swab32s(x)
92 #define __arch__swab16s(x) ___arch__swab16s(x)
94 #if !defined(__STRICT_ANSI__) || defined(__KERNEL__)
95 # define __BYTEORDER_HAS_U64__
96 # define __SWAB_64_THRU_32__
101 #include <linux/byteorder/big_endian.h>
103 #endif /* _S390_BYTEORDER_H */