1 /* $Id: byteorder.h,v 1.8 1997/12/18 02:44:14 ecd Exp $ */
2 #ifndef _SPARC64_BYTEORDER_H
3 #define _SPARC64_BYTEORDER_H
10 static __inline__ __u16
___arch__swab16p(__u16
*addr
)
14 __asm__
__volatile__ ("lduha [%1] %2, %0"
16 : "r" (addr
), "i" (ASI_PL
));
20 static __inline__ __u32
___arch__swab32p(__u32
*addr
)
24 __asm__
__volatile__ ("lduwa [%1] %2, %0"
26 : "r" (addr
), "i" (ASI_PL
));
30 static __inline__ __u64
___arch__swab64p(__u64
*addr
)
34 __asm__
__volatile__ ("ldxa [%1] %2, %0"
36 : "r" (addr
), "i" (ASI_PL
));
40 #define __arch__swab16p(x) ___arch__swab16p(x)
41 #define __arch__swab32p(x) ___arch__swab32p(x)
42 #define __arch__swab64p(x) ___arch__swab64p(x)
44 #define __BYTEORDER_HAS_U64__
48 #include <linux/byteorder/big_endian.h>
50 #endif /* _SPARC64_BYTEORDER_H */