| Harvey Harrison | ae18962 | 2009-01-06 14:56:31 -0800 | [diff] [blame] | 1 | #ifndef _ASM_IA64_SWAB_H | 
 | 2 | #define _ASM_IA64_SWAB_H | 
 | 3 |  | 
 | 4 | /* | 
 | 5 |  * Modified 1998, 1999 | 
 | 6 |  *	David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co. | 
 | 7 |  */ | 
 | 8 |  | 
| Jaswinder Singh Rajput | 040c92b | 2009-01-31 11:12:29 +0530 | [diff] [blame] | 9 | #include <linux/types.h> | 
| Harvey Harrison | ae18962 | 2009-01-06 14:56:31 -0800 | [diff] [blame] | 10 | #include <asm/intrinsics.h> | 
 | 11 | #include <linux/compiler.h> | 
 | 12 |  | 
 | 13 | static __inline__ __attribute_const__ __u64 __arch_swab64(__u64 x) | 
 | 14 | { | 
 | 15 | 	__u64 result; | 
 | 16 |  | 
 | 17 | 	result = ia64_mux1(x, ia64_mux1_rev); | 
 | 18 | 	return result; | 
 | 19 | } | 
 | 20 | #define __arch_swab64 __arch_swab64 | 
 | 21 |  | 
 | 22 | static __inline__ __attribute_const__ __u32 __arch_swab32(__u32 x) | 
 | 23 | { | 
 | 24 | 	return __arch_swab64(x) >> 32; | 
 | 25 | } | 
 | 26 | #define __arch_swab32 __arch_swab32 | 
 | 27 |  | 
 | 28 | static __inline__ __attribute_const__ __u16 __arch_swab16(__u16 x) | 
 | 29 | { | 
 | 30 | 	return __arch_swab64(x) >> 48; | 
 | 31 | } | 
 | 32 | #define __arch_swab16 __arch_swab16 | 
 | 33 |  | 
 | 34 | #endif /* _ASM_IA64_SWAB_H */ |